]12.1.285.27@F"&OzPbbbF`-``/`;`` BBB$Ja+L @F^)-`$Ja /P @F^`H IDaDbD`%D`D]D D`0WIa`WIa`WIa`WIa`WIa`WIa`WIa`WIa`WIa`WIa`WIa`WIa`WIa`WIa`WIa`WIa`WIa`WIa`WIa`WIa` L LL`dBRSSTBUVIVbWXXBYYZ"[[b\]"]B&B^^_"``bbcddBeffbggbhhbiibjU*B//jkblmm"nooI A E Y]M -)pbqrrBssubvwwyBz"{{|}~)-b„b"†""ŠBB"‘’9b""BbB"b"b"b"b"bQ"b®ib"±"³B¶b"1 b b½bB"Bb"1BBIMBEb"5"b"B" Y 9] "B"b"B'BBB"(b""*bbbbb""""Bb" "bbB    b "  b"bBu "BbbBBb" !      L` DcC BY DbBS "UDD"D DS Db"DbB NbDB /• qQa9- H !DaDbD`M`D T`eExb@D`D]DH%Q%^,K// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Based on https://github.com/nodejs/node/blob/889ad35d3d41e376870f785b0c1b669cb732013d/lib/internal/per_context/primordials.js // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // This file subclasses and stores the JS builtins that come from the VM // so that Node.js's builtin modules do not need to later look these up from // the global proxy, which can be mutated by users. // Use of primordials have sometimes a dramatic impact on performance, please // benchmark all changes made in performance-sensitive areas of the codebase. // See: https://github.com/nodejs/node/pull/38248 // deno-lint-ignore-file prefer-primordials "use strict"; (() => { const primordials = {}; const { defineProperty: ReflectDefineProperty, getOwnPropertyDescriptor: ReflectGetOwnPropertyDescriptor, ownKeys: ReflectOwnKeys, } = Reflect; // `uncurryThis` is equivalent to `func => Function.prototype.call.bind(func)`. // It is using `bind.bind(call)` to avoid using `Function.prototype.bind` // and `Function.prototype.call` after it may have been mutated by users. const { apply, bind, call } = Function.prototype; const uncurryThis = bind.bind(call); primordials.uncurryThis = uncurryThis; // `applyBind` is equivalent to `func => Function.prototype.apply.bind(func)`. // It is using `bind.bind(apply)` to avoid using `Function.prototype.bind` // and `Function.prototype.apply` after it may have been mutated by users. const applyBind = bind.bind(apply); primordials.applyBind = applyBind; // Methods that accept a variable number of arguments, and thus it's useful to // also create `${prefix}${key}Apply`, which uses `Function.prototype.apply`, // instead of `Function.prototype.call`, and thus doesn't require iterator // destructuring. const varargsMethods = [ // 'ArrayPrototypeConcat' is omitted, because it performs the spread // on its own for arrays and array-likes with a truthy // @@isConcatSpreadable symbol property. "ArrayOf", "ArrayPrototypePush", "ArrayPrototypeUnshift", // 'FunctionPrototypeCall' is omitted, since there's 'ReflectApply' // and 'FunctionPrototypeApply'. "MathHypot", "MathMax", "MathMin", "StringPrototypeConcat", "TypedArrayOf", ]; function getNewKey(key) { return typeof key === "symbol" ? `Symbol${key.description[7].toUpperCase()}${key.description.slice(8)}` : `${key[0].toUpperCase()}${key.slice(1)}`; } function copyAccessor(dest, prefix, key, { enumerable, get, set }) { ReflectDefineProperty(dest, `${prefix}Get${key}`, { value: uncurryThis(get), enumerable, }); if (set !== undefined) { ReflectDefineProperty(dest, `${prefix}Set${key}`, { value: uncurryThis(set), enumerable, }); } } function copyPropsRenamed(src, dest, prefix) { for (const key of ReflectOwnKeys(src)) { const newKey = getNewKey(key); const desc = ReflectGetOwnPropertyDescriptor(src, key); if ("get" in desc) { copyAccessor(dest, prefix, newKey, desc); } else { const name = `${prefix}${newKey}`; ReflectDefineProperty(dest, name, desc); if (varargsMethods.includes(name)) { ReflectDefineProperty(dest, `${name}Apply`, { // `src` is bound as the `this` so that the static `this` points // to the object it was defined on, // e.g.: `ArrayOfApply` gets a `this` of `Array`: value: applyBind(desc.value, src), }); } } } } function copyPropsRenamedBound(src, dest, prefix) { for (const key of ReflectOwnKeys(src)) { const newKey = getNewKey(key); const desc = ReflectGetOwnPropertyDescriptor(src, key); if ("get" in desc) { copyAccessor(dest, prefix, newKey, desc); } else { const { value } = desc; if (typeof value === "function") { desc.value = value.bind(src); } const name = `${prefix}${newKey}`; ReflectDefineProperty(dest, name, desc); if (varargsMethods.includes(name)) { ReflectDefineProperty(dest, `${name}Apply`, { value: applyBind(value, src), }); } } } } function copyPrototype(src, dest, prefix) { for (const key of ReflectOwnKeys(src)) { const newKey = getNewKey(key); const desc = ReflectGetOwnPropertyDescriptor(src, key); if ("get" in desc) { copyAccessor(dest, prefix, newKey, desc); } else { const { value } = desc; if (typeof value === "function") { desc.value = uncurryThis(value); } const name = `${prefix}${newKey}`; ReflectDefineProperty(dest, name, desc); if (varargsMethods.includes(name)) { ReflectDefineProperty(dest, `${name}Apply`, { value: applyBind(value), }); } } } } // Create copies of configurable value properties of the global object [ "Proxy", "globalThis", ].forEach((name) => { primordials[name] = globalThis[name]; }); // Create copy of isNaN primordials[isNaN.name] = isNaN; // Create copies of URI handling functions [ decodeURI, decodeURIComponent, encodeURI, encodeURIComponent, ].forEach((fn) => { primordials[fn.name] = fn; }); // Create copies of the namespace objects [ "JSON", "Math", "Proxy", "Reflect", ].forEach((name) => { copyPropsRenamed(globalThis[name], primordials, name); }); // Create copies of intrinsic objects [ "AggregateError", "Array", "ArrayBuffer", "BigInt", "BigInt64Array", "BigUint64Array", "Boolean", "DataView", "Date", "Error", "EvalError", "FinalizationRegistry", "Float32Array", "Float64Array", "Function", "Int16Array", "Int32Array", "Int8Array", "Map", "Number", "Object", "RangeError", "ReferenceError", "RegExp", "Set", "String", "Symbol", "SyntaxError", "TypeError", "URIError", "Uint16Array", "Uint32Array", "Uint8Array", "Uint8ClampedArray", "WeakMap", "WeakRef", "WeakSet", ].forEach((name) => { const original = globalThis[name]; primordials[name] = original; copyPropsRenamed(original, primordials, name); copyPrototype(original.prototype, primordials, `${name}Prototype`); }); // Create copies of intrinsic objects that require a valid `this` to call // static methods. // Refs: https://www.ecma-international.org/ecma-262/#sec-promise.all [ "Promise", ].forEach((name) => { const original = globalThis[name]; primordials[name] = original; copyPropsRenamedBound(original, primordials, name); copyPrototype(original.prototype, primordials, `${name}Prototype`); }); // Create copies of abstract intrinsic objects that are not directly exposed // on the global object. // Refs: https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object [ { name: "TypedArray", original: Reflect.getPrototypeOf(Uint8Array) }, { name: "ArrayIterator", original: { prototype: Reflect.getPrototypeOf(Array.prototype[Symbol.iterator]()), }, }, { name: "SetIterator", original: { prototype: Reflect.getPrototypeOf(new Set()[Symbol.iterator]()), }, }, { name: "MapIterator", original: { prototype: Reflect.getPrototypeOf(new Map()[Symbol.iterator]()), }, }, { name: "StringIterator", original: { prototype: Reflect.getPrototypeOf(String.prototype[Symbol.iterator]()), }, }, { name: "Generator", original: Reflect.getPrototypeOf(function* () {}) }, { name: "AsyncGenerator", original: Reflect.getPrototypeOf(async function* () {}), }, ].forEach(({ name, original }) => { primordials[name] = original; // The static %TypedArray% methods require a valid `this`, but can't be bound, // as they need a subclass constructor as the receiver: copyPrototype(original, primordials, name); copyPrototype(original.prototype, primordials, `${name}Prototype`); }); const { ArrayPrototypeForEach, ArrayPrototypeJoin, ArrayPrototypeMap, FunctionPrototypeCall, ObjectDefineProperty, ObjectFreeze, ObjectPrototypeIsPrototypeOf, ObjectSetPrototypeOf, Promise, PromisePrototype, PromisePrototypeThen, SymbolIterator, TypedArrayPrototypeJoin, } = primordials; // Because these functions are used by `makeSafe`, which is exposed // on the `primordials` object, it's important to use const references // to the primordials that they use: const createSafeIterator = (factory, next) => { class SafeIterator { constructor(iterable) { this._iterator = factory(iterable); } next() { return next(this._iterator); } [SymbolIterator]() { return this; } } ObjectSetPrototypeOf(SafeIterator.prototype, null); ObjectFreeze(SafeIterator.prototype); ObjectFreeze(SafeIterator); return SafeIterator; }; const SafeArrayIterator = createSafeIterator( primordials.ArrayPrototypeSymbolIterator, primordials.ArrayIteratorPrototypeNext, ); primordials.SafeArrayIterator = SafeArrayIterator; primordials.SafeSetIterator = createSafeIterator( primordials.SetPrototypeSymbolIterator, primordials.SetIteratorPrototypeNext, ); primordials.SafeMapIterator = createSafeIterator( primordials.MapPrototypeSymbolIterator, primordials.MapIteratorPrototypeNext, ); primordials.SafeStringIterator = createSafeIterator( primordials.StringPrototypeSymbolIterator, primordials.StringIteratorPrototypeNext, ); const copyProps = (src, dest) => { ArrayPrototypeForEach(ReflectOwnKeys(src), (key) => { if (!ReflectGetOwnPropertyDescriptor(dest, key)) { ReflectDefineProperty( dest, key, ReflectGetOwnPropertyDescriptor(src, key), ); } }); }; /** * @type {typeof primordials.makeSafe} */ const makeSafe = (unsafe, safe) => { if (SymbolIterator in unsafe.prototype) { const dummy = new unsafe(); let next; // We can reuse the same `next` method. ArrayPrototypeForEach(ReflectOwnKeys(unsafe.prototype), (key) => { if (!ReflectGetOwnPropertyDescriptor(safe.prototype, key)) { const desc = ReflectGetOwnPropertyDescriptor(unsafe.prototype, key); if ( typeof desc.value === "function" && desc.value.length === 0 && SymbolIterator in (FunctionPrototypeCall(desc.value, dummy) ?? {}) ) { const createIterator = uncurryThis(desc.value); next ??= uncurryThis(createIterator(dummy).next); const SafeIterator = createSafeIterator(createIterator, next); desc.value = function () { return new SafeIterator(this); }; } ReflectDefineProperty(safe.prototype, key, desc); } }); } else { copyProps(unsafe.prototype, safe.prototype); } copyProps(unsafe, safe); ObjectSetPrototypeOf(safe.prototype, null); ObjectFreeze(safe.prototype); ObjectFreeze(safe); return safe; }; primordials.makeSafe = makeSafe; // Subclass the constructors because we need to use their prototype // methods later. // Defining the `constructor` is necessary here to avoid the default // constructor which uses the user-mutable `%ArrayIteratorPrototype%.next`. primordials.SafeMap = makeSafe( Map, class SafeMap extends Map { constructor(i) { if (i == null) { super(); return; } super(new SafeArrayIterator(i)); } }, ); primordials.SafeWeakMap = makeSafe( WeakMap, class SafeWeakMap extends WeakMap { constructor(i) { if (i == null) { super(); return; } super(new SafeArrayIterator(i)); } }, ); primordials.SafeSet = makeSafe( Set, class SafeSet extends Set { constructor(i) { if (i == null) { super(); return; } super(new SafeArrayIterator(i)); } }, ); primordials.SafeWeakSet = makeSafe( WeakSet, class SafeWeakSet extends WeakSet { constructor(i) { if (i == null) { super(); return; } super(new SafeArrayIterator(i)); } }, ); primordials.SafeRegExp = makeSafe( RegExp, class SafeRegExp extends RegExp { constructor(pattern, flags) { super(pattern, flags); } }, ); primordials.SafeFinalizationRegistry = makeSafe( FinalizationRegistry, class SafeFinalizationRegistry extends FinalizationRegistry { constructor(cleanupCallback) { super(cleanupCallback); } }, ); primordials.SafeWeakRef = makeSafe( WeakRef, class SafeWeakRef extends WeakRef { constructor(target) { super(target); } }, ); const SafePromise = makeSafe( Promise, class SafePromise extends Promise { constructor(executor) { super(executor); } }, ); primordials.ArrayPrototypeToString = (thisArray) => ArrayPrototypeJoin(thisArray); primordials.TypedArrayPrototypeToString = (thisArray) => TypedArrayPrototypeJoin(thisArray); primordials.PromisePrototypeCatch = (thisPromise, onRejected) => PromisePrototypeThen(thisPromise, undefined, onRejected); const arrayToSafePromiseIterable = (array) => new SafeArrayIterator( ArrayPrototypeMap( array, (p) => { if (ObjectPrototypeIsPrototypeOf(PromisePrototype, p)) { return new SafePromise((c, d) => PromisePrototypeThen(p, c, d)); } return p; }, ), ); /** * Creates a Promise that is resolved with an array of results when all of the * provided Promises resolve, or rejected when any Promise is rejected. * @template T * @param {Array>} values * @returns {Promise[]>} */ primordials.SafePromiseAll = (values) => // Wrapping on a new Promise is necessary to not expose the SafePromise // prototype to user-land. new Promise((a, b) => SafePromise.all(arrayToSafePromiseIterable(values)).then(a, b) ); // NOTE: Uncomment the following functions when you need to use them // /** // * Creates a Promise that is resolved with an array of results when all // * of the provided Promises resolve or reject. // * @template T // * @param {Array>} values // * @returns {Promise[]>} // */ // primordials.SafePromiseAllSettled = (values) => // // Wrapping on a new Promise is necessary to not expose the SafePromise // // prototype to user-land. // new Promise((a, b) => // SafePromise.allSettled(arrayToSafePromiseIterable(values)).then(a, b) // ); // /** // * The any function returns a promise that is fulfilled by the first given // * promise to be fulfilled, or rejected with an AggregateError containing // * an array of rejection reasons if all of the given promises are rejected. // * It resolves all elements of the passed iterable to promises as it runs // * this algorithm. // * @template T // * @param {T} values // * @returns {Promise>} // */ // primordials.SafePromiseAny = (values) => // // Wrapping on a new Promise is necessary to not expose the SafePromise // // prototype to user-land. // new Promise((a, b) => // SafePromise.any(arrayToSafePromiseIterable(values)).then(a, b) // ); // /** // * Creates a Promise that is resolved or rejected when any of the provided // * Promises are resolved or rejected. // * @template T // * @param {T} values // * @returns {Promise>} // */ // primordials.SafePromiseRace = (values) => // // Wrapping on a new Promise is necessary to not expose the SafePromise // // prototype to user-land. // new Promise((a, b) => // SafePromise.race(arrayToSafePromiseIterable(values)).then(a, b) // ); /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or * rejected). The resolved value cannot be modified from the callback. * Prefer using async functions when possible. * @param {Promise} thisPromise * @param {() => void) | undefined | null} onFinally The callback to execute * when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ primordials.SafePromisePrototypeFinally = (thisPromise, onFinally) => // Wrapping on a new Promise is necessary to not expose the SafePromise // prototype to user-land. new Promise((a, b) => new SafePromise((a, b) => PromisePrototypeThen(thisPromise, a, b)) .finally(onFinally) .then(a, b) ); // Create getter and setter for `queueMicrotask`, it hasn't been bound yet. let queueMicrotask = undefined; ObjectDefineProperty(primordials, "queueMicrotask", { get() { return queueMicrotask; }, }); primordials.setQueueMicrotask = (value) => { if (queueMicrotask !== undefined) { throw new Error("queueMicrotask is already defined"); } queueMicrotask = value; }; // Renaming from `eval` is necessary because otherwise it would perform direct // evaluation, allowing user-land access to local variables. // This is because the identifier `eval` is somewhat treated as a keyword primordials.indirectEval = eval; ObjectSetPrototypeOf(primordials, null); ObjectFreeze(primordials); // Provide bootstrap namespace globalThis.__bootstrap ??= {}; globalThis.__bootstrap.primordials = primordials; })(); Q#@#ext:core/00_primordials.jsa bD``- TP`\L` B^"X9  `Dm   6- /-]x8-- ^ x8# /-]x- ^x8 b "P@b@ Td`0L` aV bCCa bCC  `DrX(--- x8 x8~)b3 3 ` 4 x8 x8~ )b3 3` cPp '0b@ T`  { const { Array, ArrayPrototypeFill, Error, ErrorCaptureStackTrace, MapPrototypeDelete, MapPrototypeGet, MapPrototypeHas, MapPrototypeSet, ObjectAssign, ObjectDefineProperty, ObjectFreeze, Promise, PromiseReject, PromiseResolve, PromisePrototypeThen, RangeError, ReferenceError, SafeMap, StringPrototypeSplit, SymbolFor, SyntaxError, TypeError, URIError, } = window.__bootstrap.primordials; let nextPromiseId = 0; const promiseMap = new SafeMap(); const RING_SIZE = 4 * 1024; const NO_PROMISE = null; // Alias to null is faster than plain nulls const promiseRing = ArrayPrototypeFill(new Array(RING_SIZE), NO_PROMISE); // TODO(bartlomieju): it future use `v8::Private` so it's not visible // to users. Currently missing bindings. const promiseIdSymbol = SymbolFor("Deno.core.internalPromiseId"); let isOpCallTracingEnabled = false; let submitOpCallTrace; let eventLoopTick; function __setOpCallTracingEnabled(enabled) { isOpCallTracingEnabled = enabled; } function __initializeCoreMethods(eventLoopTick_, submitOpCallTrace_) { eventLoopTick = eventLoopTick_; submitOpCallTrace = submitOpCallTrace_; } const build = { target: "unknown", arch: "unknown", os: "unknown", vendor: "unknown", env: undefined, }; function setBuildInfo(target) { const { 0: arch, 1: vendor, 2: os, 3: env } = StringPrototypeSplit( target, "-", 4, ); build.target = target; build.arch = arch; build.vendor = vendor; build.os = os; build.env = env; ObjectFreeze(build); } const errorMap = {}; // Builtin v8 / JS errors registerErrorClass("Error", Error); registerErrorClass("RangeError", RangeError); registerErrorClass("ReferenceError", ReferenceError); registerErrorClass("SyntaxError", SyntaxError); registerErrorClass("TypeError", TypeError); registerErrorClass("URIError", URIError); function buildCustomError(className, message, code) { let error; try { error = errorMap[className]?.(message); } catch (e) { throw new Error( `Unable to build custom error for "${className}"\n ${e.message}`, ); } // Strip buildCustomError() calls from stack trace if (typeof error == "object") { ErrorCaptureStackTrace(error, buildCustomError); if (code) { error.code = code; } } return error; } function registerErrorClass(className, errorClass) { registerErrorBuilder(className, (msg) => new errorClass(msg)); } function registerErrorBuilder(className, errorBuilder) { if (typeof errorMap[className] !== "undefined") { throw new TypeError(`Error class for "${className}" already registered`); } errorMap[className] = errorBuilder; } function setPromise(promiseId) { const idx = promiseId % RING_SIZE; // Move old promise from ring to map const oldPromise = promiseRing[idx]; if (oldPromise !== NO_PROMISE) { const oldPromiseId = promiseId - RING_SIZE; MapPrototypeSet(promiseMap, oldPromiseId, oldPromise); } const promise = new Promise((resolve) => { promiseRing[idx] = resolve; }); const wrappedPromise = PromisePrototypeThen( promise, unwrapOpError(), ); wrappedPromise[promiseIdSymbol] = promiseId; return wrappedPromise; } function __resolvePromise(promiseId, res) { // Check if out of ring bounds, fallback to map const outOfBounds = promiseId < nextPromiseId - RING_SIZE; if (outOfBounds) { const promise = MapPrototypeGet(promiseMap, promiseId); if (!promise) { throw "Missing promise in map @ " + promiseId; } MapPrototypeDelete(promiseMap, promiseId); promise(res); } else { // Otherwise take from ring const idx = promiseId % RING_SIZE; const promise = promiseRing[idx]; if (!promise) { throw "Missing promise in ring @ " + promiseId; } promiseRing[idx] = NO_PROMISE; promise(res); } } function hasPromise(promiseId) { // Check if out of ring bounds, fallback to map const outOfBounds = promiseId < nextPromiseId - RING_SIZE; if (outOfBounds) { return MapPrototypeHas(promiseMap, promiseId); } // Otherwise check it in ring const idx = promiseId % RING_SIZE; return promiseRing[idx] != NO_PROMISE; } function unwrapOpError() { return (res) => { // .$err_class_name is a special key that should only exist on errors const className = res?.$err_class_name; if (!className) { return res; } const errorBuilder = errorMap[className]; const err = errorBuilder ? errorBuilder(res.message) : new Error( `Unregistered error class: "${className}"\n ${res.message}\n Classes of errors returned from ops should be registered via Deno.core.registerErrorClass().`, ); // Set .code if error was a known OS error, see error_codes.rs if (res.code) { err.code = res.code; } // Strip eventLoopTick() calls from stack trace ErrorCaptureStackTrace(err, eventLoopTick); throw err; }; } function setUpAsyncStub(opName, originalOp) { let fn; // The body of this switch statement can be generated using the script above. switch (originalOp.length - 1) { /* BEGIN TEMPLATE setUpAsyncStub */ /* DO NOT MODIFY: use rebuild_async_stubs.js to regenerate */ case 0: fn = function async_op_0() { const id = nextPromiseId; try { const maybeResult = originalOp(id); if (maybeResult !== undefined) { return PromiseResolve(maybeResult); } } catch (err) { ErrorCaptureStackTrace(err, async_op_0); return PromiseReject(err); } if (isOpCallTracingEnabled) { submitOpCallTrace(id); } nextPromiseId = (id + 1) & 0xffffffff; return setPromise(id); }; break; case 1: fn = function async_op_1(a) { const id = nextPromiseId; try { const maybeResult = originalOp(id, a); if (maybeResult !== undefined) { return PromiseResolve(maybeResult); } } catch (err) { ErrorCaptureStackTrace(err, async_op_1); return PromiseReject(err); } if (isOpCallTracingEnabled) { submitOpCallTrace(id); } nextPromiseId = (id + 1) & 0xffffffff; return setPromise(id); }; break; case 2: fn = function async_op_2(a, b) { const id = nextPromiseId; try { const maybeResult = originalOp(id, a, b); if (maybeResult !== undefined) { return PromiseResolve(maybeResult); } } catch (err) { ErrorCaptureStackTrace(err, async_op_2); return PromiseReject(err); } if (isOpCallTracingEnabled) { submitOpCallTrace(id); } nextPromiseId = (id + 1) & 0xffffffff; return setPromise(id); }; break; case 3: fn = function async_op_3(a, b, c) { const id = nextPromiseId; try { const maybeResult = originalOp(id, a, b, c); if (maybeResult !== undefined) { return PromiseResolve(maybeResult); } } catch (err) { ErrorCaptureStackTrace(err, async_op_3); return PromiseReject(err); } if (isOpCallTracingEnabled) { submitOpCallTrace(id); } nextPromiseId = (id + 1) & 0xffffffff; return setPromise(id); }; break; case 4: fn = function async_op_4(a, b, c, d) { const id = nextPromiseId; try { const maybeResult = originalOp(id, a, b, c, d); if (maybeResult !== undefined) { return PromiseResolve(maybeResult); } } catch (err) { ErrorCaptureStackTrace(err, async_op_4); return PromiseReject(err); } if (isOpCallTracingEnabled) { submitOpCallTrace(id); } nextPromiseId = (id + 1) & 0xffffffff; return setPromise(id); }; break; case 5: fn = function async_op_5(a, b, c, d, e) { const id = nextPromiseId; try { const maybeResult = originalOp(id, a, b, c, d, e); if (maybeResult !== undefined) { return PromiseResolve(maybeResult); } } catch (err) { ErrorCaptureStackTrace(err, async_op_5); return PromiseReject(err); } if (isOpCallTracingEnabled) { submitOpCallTrace(id); } nextPromiseId = (id + 1) & 0xffffffff; return setPromise(id); }; break; case 6: fn = function async_op_6(a, b, c, d, e, f) { const id = nextPromiseId; try { const maybeResult = originalOp(id, a, b, c, d, e, f); if (maybeResult !== undefined) { return PromiseResolve(maybeResult); } } catch (err) { ErrorCaptureStackTrace(err, async_op_6); return PromiseReject(err); } if (isOpCallTracingEnabled) { submitOpCallTrace(id); } nextPromiseId = (id + 1) & 0xffffffff; return setPromise(id); }; break; case 7: fn = function async_op_7(a, b, c, d, e, f, g) { const id = nextPromiseId; try { const maybeResult = originalOp(id, a, b, c, d, e, f, g); if (maybeResult !== undefined) { return PromiseResolve(maybeResult); } } catch (err) { ErrorCaptureStackTrace(err, async_op_7); return PromiseReject(err); } if (isOpCallTracingEnabled) { submitOpCallTrace(id); } nextPromiseId = (id + 1) & 0xffffffff; return setPromise(id); }; break; case 8: fn = function async_op_8(a, b, c, d, e, f, g, h) { const id = nextPromiseId; try { const maybeResult = originalOp(id, a, b, c, d, e, f, g, h); if (maybeResult !== undefined) { return PromiseResolve(maybeResult); } } catch (err) { ErrorCaptureStackTrace(err, async_op_8); return PromiseReject(err); } if (isOpCallTracingEnabled) { submitOpCallTrace(id); } nextPromiseId = (id + 1) & 0xffffffff; return setPromise(id); }; break; case 9: fn = function async_op_9(a, b, c, d, e, f, g, h, i) { const id = nextPromiseId; try { const maybeResult = originalOp(id, a, b, c, d, e, f, g, h, i); if (maybeResult !== undefined) { return PromiseResolve(maybeResult); } } catch (err) { ErrorCaptureStackTrace(err, async_op_9); return PromiseReject(err); } if (isOpCallTracingEnabled) { submitOpCallTrace(id); } nextPromiseId = (id + 1) & 0xffffffff; return setPromise(id); }; break; /* END TEMPLATE */ default: throw new Error( `Too many arguments for async op codegen (length of ${opName} was ${ originalOp.length - 1 })`, ); } ObjectDefineProperty(fn, "name", { value: opName, configurable: false, writable: false, }); return fn; } // Extra Deno.core.* exports const core = ObjectAssign(globalThis.Deno.core, { build, setBuildInfo, registerErrorBuilder, buildCustomError, registerErrorClass, setUpAsyncStub, hasPromise, promiseIdSymbol, __resolvePromise, __setOpCallTracingEnabled, __initializeCoreMethods, }); ObjectAssign(globalThis.__bootstrap, { core }); ObjectAssign(globalThis.Deno, { core }); })(globalThis); Q&QHext:core/00_infra.jsa bD`pM` T  I`nbb"@ T I`"b@ T I`T b@ T0`L` T I`z IbK  `De  %łc ab@ T<`6L`= " `Dh /  x88 i 4B! a@b@ T  I` b@ D T I` yb@  T I`bb@  T I`b@ D T`L`"i$+29@G T I`9C"b T I`"b T I`""b T I`"<"b T I`{!""b T I`!$"b  T I`?$k&""b  T I`&("b  T I`)S+""b   T I`+-"b   b(bCHH  M`D~0 %- E + q p Jm  H ƌu ƌnƌgƌ`ƌYƌRƌKƌDƌ= ƌ6 x88- E x88 i ~ ) 3 ` "b !1BHb@U]emu}D`D]DH 'Q';N// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. "use strict"; ((window) => { const { ArrayPrototypeMap, ArrayPrototypePush, Error, ErrorCaptureStackTrace, FunctionPrototypeBind, ObjectAssign, ObjectFreeze, ObjectFromEntries, ObjectKeys, ObjectHasOwn, Proxy, setQueueMicrotask, SafeMap, StringPrototypeSlice, Symbol, SymbolFor, TypedArrayPrototypeGetLength, TypedArrayPrototypeJoin, TypedArrayPrototypeSlice, TypedArrayPrototypeGetSymbolToStringTag, TypeError, } = window.__bootstrap.primordials; const { ops, hasPromise, promiseIdSymbol, registerErrorClass, __setOpCallTracingEnabled, __initializeCoreMethods, __resolvePromise, } = window.Deno.core; const { op_abort_wasm_streaming, op_current_user_call_site, op_decode, op_deserialize, op_destructure_error, op_dispatch_exception, op_encode, op_encode_binary_string, op_eval_context, op_event_loop_has_more_work, op_get_promise_details, op_get_proxy_details, op_has_tick_scheduled, op_lazy_load_esm, op_memory_usage, op_op_names, op_panic, op_print, op_queue_microtask, op_ref_op, op_resources, op_run_microtasks, op_serialize, op_set_handled_promise_rejection_handler, op_set_has_tick_scheduled, op_set_promise_hooks, op_set_wasm_streaming_callback, op_str_byte_length, op_timer_cancel, op_timer_queue, op_timer_ref, op_timer_unref, op_unref_op, op_cancel_handle, op_opcall_tracing_enable, op_opcall_tracing_submit, op_opcall_tracing_get_all, op_opcall_tracing_get, op_is_any_array_buffer, op_is_arguments_object, op_is_array_buffer, op_is_array_buffer_view, op_is_async_function, op_is_big_int_object, op_is_boolean_object, op_is_boxed_primitive, op_is_data_view, op_is_date, op_is_generator_function, op_is_generator_object, op_is_map, op_is_map_iterator, op_is_module_namespace_object, op_is_native_error, op_is_number_object, op_is_promise, op_is_proxy, op_is_reg_exp, op_is_set, op_is_set_iterator, op_is_shared_array_buffer, op_is_string_object, op_is_symbol_object, op_is_typed_array, op_is_weak_map, op_is_weak_set, } = ensureFastOps(); // core/infra collaborative code delete window.Deno.core.__setOpCallTracingEnabled; delete window.Deno.core.__initializeCoreMethods; delete window.Deno.core.__resolvePromise; __initializeCoreMethods( eventLoopTick, submitOpCallTrace, ); function submitOpCallTrace(id) { const error = new Error(); ErrorCaptureStackTrace(error, submitOpCallTrace); op_opcall_tracing_submit(id, StringPrototypeSlice(error.stack, 6)); } let unhandledPromiseRejectionHandler = () => false; let timerDepth = 0; const macrotaskCallbacks = []; const nextTickCallbacks = []; function setMacrotaskCallback(cb) { ArrayPrototypePush(macrotaskCallbacks, cb); } function setNextTickCallback(cb) { ArrayPrototypePush(nextTickCallbacks, cb); } // This function has variable number of arguments. The last argument describes // if there's a "next tick" scheduled by the Node.js compat layer. Arguments // before last are alternating integers and any values that describe the // responses of async ops. function eventLoopTick() { // First respond to all pending ops. for (let i = 0; i < arguments.length - 3; i += 2) { const promiseId = arguments[i]; const res = arguments[i + 1]; __resolvePromise(promiseId, res); } // Drain nextTick queue if there's a tick scheduled. if (arguments[arguments.length - 1]) { for (let i = 0; i < nextTickCallbacks.length; i++) { nextTickCallbacks[i](); } } else { op_run_microtasks(); } // Finally drain macrotask queue. for (let i = 0; i < macrotaskCallbacks.length; i++) { const cb = macrotaskCallbacks[i]; while (true) { const res = cb(); // If callback returned `undefined` then it has no work to do, we don't // need to perform microtask checkpoint. if (res === undefined) { break; } op_run_microtasks(); // If callback returned `true` then it has no more work to do, stop // calling it then. if (res === true) { break; } } } const timers = arguments[arguments.length - 2]; if (timers) { for (let i = 0; i < timers.length; i += 2) { timerDepth = timers[i]; timers[i + 1](); } timerDepth = 0; } // If we have any rejections for this tick, attempt to process them const rejections = arguments[arguments.length - 3]; if (rejections) { for (let i = 0; i < rejections.length; i += 2) { const handled = unhandledPromiseRejectionHandler( rejections[i], rejections[i + 1], ); if (!handled) { const err = rejections[i + 1]; op_dispatch_exception(err, true); } } } } function refOp(promiseId) { if (!hasPromise(promiseId)) { return; } op_ref_op(promiseId); } function unrefOp(promiseId) { if (!hasPromise(promiseId)) { return; } op_unref_op(promiseId); } function refOpPromise(promise) { refOp(promise[promiseIdSymbol]); } function unrefOpPromise(promise) { unrefOp(promise[promiseIdSymbol]); } function resources() { return ObjectFromEntries(op_resources()); } function metrics() { // TODO(mmastrac): we should replace this with a newer API return { opsDispatched: 0, opsDispatchedSync: 0, opsDispatchedAsync: 0, opsDispatchedAsyncUnref: 0, opsCompleted: 0, opsCompletedSync: 0, opsCompletedAsync: 0, opsCompletedAsyncUnref: 0, bytesSentControl: 0, bytesSentData: 0, bytesReceived: 0, ops: {}, }; } let reportExceptionCallback = undefined; // Used to report errors thrown from functions passed to `queueMicrotask()`. // The callback will be passed the thrown error. For example, you can use this // to dispatch an error event to the global scope. // In other words, set the implementation for // https://html.spec.whatwg.org/multipage/webappapis.html#report-the-exception function setReportExceptionCallback(cb) { if (typeof cb != "function") { throw new TypeError("expected a function"); } reportExceptionCallback = cb; } function queueMicrotask(cb) { if (typeof cb != "function") { throw new TypeError("expected a function"); } return op_queue_microtask(() => { try { cb(); } catch (error) { if (reportExceptionCallback) { reportExceptionCallback(error); } else { throw error; } } }); } // Some "extensions" rely on "BadResource" and "Interrupted" errors in the // JS code (eg. "deno_net") so they are provided in "Deno.core" but later // reexported on "Deno.errors" class BadResource extends Error { constructor(msg) { super(msg); this.name = "BadResource"; } } const BadResourcePrototype = BadResource.prototype; class Interrupted extends Error { constructor(msg) { super(msg); this.name = "Interrupted"; } } const InterruptedPrototype = Interrupted.prototype; registerErrorClass("BadResource", BadResource); registerErrorClass("Interrupted", Interrupted); const promiseHooks = [ [], // init [], // before [], // after [], // resolve ]; function setPromiseHooks(init, before, after, resolve) { const hooks = [init, before, after, resolve]; for (let i = 0; i < hooks.length; i++) { const hook = hooks[i]; // Skip if no callback was provided for this hook type. if (hook == null) { continue; } // Verify that the type of `hook` is a function. if (typeof hook !== "function") { throw new TypeError(`Expected function at position ${i}`); } // Add the hook to the list. ArrayPrototypePush(promiseHooks[i], hook); } const wrappedHooks = ArrayPrototypeMap(promiseHooks, (hooks) => { switch (hooks.length) { case 0: return undefined; case 1: return hooks[0]; case 2: return create2xHookWrapper(hooks[0], hooks[1]); case 3: return create3xHookWrapper(hooks[0], hooks[1], hooks[2]); default: return createHookListWrapper(hooks); } // The following functions are used to create wrapper functions that call // all the hooks in a list of a certain length. The reason to use a // function that creates a wrapper is to minimize the number of objects // captured in the closure. function create2xHookWrapper(hook1, hook2) { return function (promise, parent) { hook1(promise, parent); hook2(promise, parent); }; } function create3xHookWrapper(hook1, hook2, hook3) { return function (promise, parent) { hook1(promise, parent); hook2(promise, parent); hook3(promise, parent); }; } function createHookListWrapper(hooks) { return function (promise, parent) { for (let i = 0; i < hooks.length; i++) { const hook = hooks[i]; hook(promise, parent); } }; } }); op_set_promise_hooks( wrappedHooks[0], wrappedHooks[1], wrappedHooks[2], wrappedHooks[3], ); } function ensureFastOps(keep) { return new Proxy({}, { get(_target, opName) { const op = ops[opName]; if (ops[opName] === undefined) { op_panic(`Unknown or disabled op '${opName}'`); } if (keep !== true) { delete ops[opName]; } return op; }, }); } const { op_close: close, op_try_close: tryClose, op_read: read, op_read_all: readAll, op_write: write, op_write_all: writeAll, op_write_type_error: writeTypeError, op_read_sync: readSync, op_write_sync: writeSync, op_shutdown: shutdown, } = ensureFastOps(true); const callSiteRetBuf = new Uint32Array(2); const callSiteRetBufU8 = new Uint8Array(callSiteRetBuf.buffer); function currentUserCallSite() { const fileName = op_current_user_call_site(callSiteRetBufU8); const lineNumber = callSiteRetBuf[0]; const columnNumber = callSiteRetBuf[1]; return { fileName, lineNumber, columnNumber }; } const hostObjectBrand = SymbolFor("Deno.core.hostObject"); // A helper function that will bind our own console implementation // with default implementation of Console from V8. This will cause // console messages to be piped to inspector console. // // We are using `Deno.core.callConsole` binding to preserve proper stack // frames in inspector console. This has to be done because V8 considers // the last JS stack frame as gospel for the inspector. In our case we // specifically want the latest user stack frame to be the one that matters // though. // // Inspired by: // https://github.com/nodejs/node/blob/1317252dfe8824fd9cfee125d2aaa94004db2f3b/lib/internal/util/inspector.js#L39-L61 function wrapConsole(customConsole, consoleFromV8) { const callConsole = window.Deno.core.callConsole; const keys = ObjectKeys(consoleFromV8); for (let i = 0; i < keys.length; ++i) { const key = keys[i]; if (ObjectHasOwn(customConsole, key)) { customConsole[key] = FunctionPrototypeBind( callConsole, customConsole, consoleFromV8[key], customConsole[key], ); } else { // Add additional console APIs from the inspector customConsole[key] = consoleFromV8[key]; } } } // Minimal console implementation, that uses `Deno.core.print` under the hood. // It's not fully fledged and is meant to make debugging slightly easier when working with // only `deno_core` crate. class CoreConsole { log = (...args) => { op_print(`${consoleStringify(...args)}\n`, false); }; debug = (...args) => { op_print(`${consoleStringify(...args)}\n`, false); }; warn = (...args) => { op_print(`${consoleStringify(...args)}\n`, false); }; error = (...args) => { op_print(`${consoleStringify(...args)}\n`, false); }; } const consoleStringify = (...args) => args.map(consoleStringifyArg).join(" "); const consoleStringifyArg = (arg) => { if ( typeof arg === "string" || typeof arg === "boolean" || typeof arg === "number" || arg === null || arg === undefined ) { return arg; } const tag = TypedArrayPrototypeGetSymbolToStringTag(arg); if (op_is_typed_array(arg)) { return `${tag}(${TypedArrayPrototypeGetLength(arg)}) [${ TypedArrayPrototypeJoin(TypedArrayPrototypeSlice(arg, 0, 10), ", ") }]`; } if (tag !== undefined) { tag + " " + JSON.stringify(arg, undefined, 2); } else { return JSON.stringify(arg, undefined, 2); } }; const v8Console = globalThis.console; const coreConsole = new CoreConsole(); globalThis.console = coreConsole; wrapConsole(coreConsole, v8Console); function propWritable(value) { return { value, writable: true, enumerable: true, configurable: true, }; } function propNonEnumerable(value) { return { value, writable: true, enumerable: false, configurable: true, }; } function propReadOnly(value) { return { value, enumerable: true, writable: false, configurable: true, }; } function propGetterOnly(getter) { return { get: getter, set() {}, enumerable: true, configurable: true, }; } function propWritableLazyLoaded(getter, loadFn) { let valueIsSet = false; let value; return { get() { const loadedValue = loadFn(); if (valueIsSet) { return value; } else { return getter(loadedValue); } }, set(v) { loadFn(); valueIsSet = true; value = v; }, enumerable: true, configurable: true, }; } function propNonEnumerableLazyLoaded(getter, loadFn) { let valueIsSet = false; let value; return { get() { const loadedValue = loadFn(); if (valueIsSet) { return value; } else { return getter(loadedValue); } }, set(v) { loadFn(); valueIsSet = true; value = v; }, enumerable: false, configurable: true, }; } function createLazyLoader(specifier) { let value; return function lazyLoad() { if (!value) { value = op_lazy_load_esm(specifier); } return value; }; } // Extra Deno.core.* exports const core = ObjectAssign(globalThis.Deno.core, { internalRidSymbol: Symbol("Deno.internal.rid"), ensureFastOps, resources, metrics, eventLoopTick, BadResource, BadResourcePrototype, Interrupted, InterruptedPrototype, refOpPromise, unrefOpPromise, setReportExceptionCallback, setPromiseHooks, consoleStringify, close, tryClose, read, readAll, write, writeAll, writeTypeError, readSync, writeSync, shutdown, print: (msg, isErr) => op_print(msg, isErr), setOpCallTracingEnabled: (enabled) => { __setOpCallTracingEnabled(enabled); op_opcall_tracing_enable(enabled); }, isOpCallTracingEnabled: () => false, getAllOpCallTraces: () => { const traces = op_opcall_tracing_get_all(); return new SafeMap(traces); }, getOpCallTraceForPromise: (promise) => op_opcall_tracing_get(promise[promiseIdSymbol]), setMacrotaskCallback, setNextTickCallback, runMicrotasks: () => op_run_microtasks(), hasTickScheduled: () => op_has_tick_scheduled(), setHasTickScheduled: (bool) => op_set_has_tick_scheduled(bool), evalContext: ( source, specifier, ) => op_eval_context(source, specifier), hostObjectBrand, encode: (text) => op_encode(text), encodeBinaryString: (buffer) => op_encode_binary_string(buffer), decode: (buffer) => op_decode(buffer), serialize: ( value, options, errorCallback, ) => op_serialize(value, options, errorCallback), deserialize: (buffer, options) => op_deserialize(buffer, options), getPromiseDetails: (promise) => op_get_promise_details(promise), getProxyDetails: (proxy) => op_get_proxy_details(proxy), isAnyArrayBuffer: (value) => op_is_any_array_buffer(value), isArgumentsObject: (value) => op_is_arguments_object(value), isArrayBuffer: (value) => op_is_array_buffer(value), isArrayBufferView: (value) => op_is_array_buffer_view(value), isAsyncFunction: (value) => op_is_async_function(value), isBigIntObject: (value) => op_is_big_int_object(value), isBooleanObject: (value) => op_is_boolean_object(value), isBoxedPrimitive: (value) => op_is_boxed_primitive(value), isDataView: (value) => op_is_data_view(value), isDate: (value) => op_is_date(value), isGeneratorFunction: (value) => op_is_generator_function(value), isGeneratorObject: (value) => op_is_generator_object(value), isMap: (value) => op_is_map(value), isMapIterator: (value) => op_is_map_iterator(value), isModuleNamespaceObject: (value) => op_is_module_namespace_object(value), isNativeError: (value) => op_is_native_error(value), isNumberObject: (value) => op_is_number_object(value), isPromise: (value) => op_is_promise(value), isProxy: (value) => op_is_proxy(value), isRegExp: (value) => op_is_reg_exp(value), isSet: (value) => op_is_set(value), isSetIterator: (value) => op_is_set_iterator(value), isSharedArrayBuffer: (value) => op_is_shared_array_buffer(value), isStringObject: (value) => op_is_string_object(value), isSymbolObject: (value) => op_is_symbol_object(value), isTypedArray: (value) => op_is_typed_array(value), isWeakMap: (value) => op_is_weak_map(value), isWeakSet: (value) => op_is_weak_set(value), memoryUsage: () => op_memory_usage(), setWasmStreamingCallback: (fn) => op_set_wasm_streaming_callback(fn), abortWasmStreaming: ( rid, error, ) => op_abort_wasm_streaming(rid, error), destructureError: (error) => op_destructure_error(error), opNames: () => op_op_names(), eventLoopHasMoreWork: () => op_event_loop_has_more_work(), byteLength: (str) => op_str_byte_length(str), setHandledPromiseRejectionHandler: (handler) => op_set_handled_promise_rejection_handler(handler), setUnhandledPromiseRejectionHandler: (handler) => unhandledPromiseRejectionHandler = handler, reportUnhandledException: (e) => op_dispatch_exception(e, false), reportUnhandledPromiseRejection: (e) => op_dispatch_exception(e, true), queueTimer: (depth, repeat, timeout, task) => op_timer_queue(depth, repeat, timeout, task), cancelTimer: (id) => op_timer_cancel(id), refTimer: (id) => op_timer_ref(id), unrefTimer: (id) => op_timer_unref(id), getTimerDepth: () => timerDepth, currentUserCallSite, wrapConsole, v8Console, propReadOnly, propWritable, propNonEnumerable, propGetterOnly, propWritableLazyLoaded, propNonEnumerableLazyLoaded, createLazyLoader, createCancelHandle: () => op_cancel_handle(), }); const internals = {}; ObjectAssign(globalThis.__bootstrap, { core, internals }); ObjectAssign(globalThis.Deno, { core }); ObjectFreeze(globalThis.__bootstrap.core); // Direct bindings on `globalThis` ObjectAssign(globalThis, { queueMicrotask }); setQueueMicrotask(queueMicrotask); })(globalThis); Qz ext:core/01_core.jsa bD`M`p T  I` 4 BSbbpeceD"`ZDb`Da`D ``D `D `=D`aD ` `!D `D `CD `1D `< D `"D`Db`Y1` Db` D `O $`&D (`+ ,` 0`A` 4`.D 8`:D <`'D"`^D`` @`U D`P H`>D`]Db `D L` P`3 T`T X`VD!$` \`D ``@D d`* h`5 l`HD p`6 t`, x`G |`8D `ID `NDb` D`D `Eb `= `b`cDB`d`[D `AD `LD `)D `$D!` `KD ` ` ` `D `7b`_D` `; `SD `%B`\D `4 `D` ` `9`b` `(D `2D `WD `Q `BD `-D ` `/B`Xb`D `F `#D `M `0 `Rb`bD `? `JD????????????????????????????????????????????????????????????????????????????????????????????????????I`Da[Nb@ T I`  b@ T I`> w b@ T I` Ub@ T I`gb@ T I`?"b@ T I`Xb@  T I`b@ ! T I`)b@ " T I`=b@ # T I`}b#@ $ T I`o/b@%D T B`^b 2 T b` Mb 3 T I`m=&$dFG @HI@IK@@b FG @ b HI @ b JK @ b@&D T4`'L`0SbqA``DaW&'bC TD`HL` L $K  i`Dj / /( x88b  W (Sbqm`Da&'] a by U`Df  % ~)Â3 i ab@'e T  I`T)'*b@( TX`o$L`   b   `DoX--- b -n H /  c $ / /`4 /4 PċK(SbqA`Da-=/cPxb@) T  `*0w0bKu T `00bKv T `0.1bK w T 1`=11bK!x T(` L`   `Dc- ](SbqI`Da 0 0 abDԃ"4 T4`"(L`1  `Kc0f3333(Sbqq`Da01 a 0 b#5 T  b`11bbK$6 T B`2I4BbK%7 T(`L`0bCGGG   `Dc~) 3 (SbqAb`Da5v5 ab@&* T(`L`0bCGHG  )`Dc~) 3 (SbqA`Da5 6 ab@'+ T(`L`0bCGHG  E`Dc~) 3 (SbqA `Da$66 ab@(, T,`L`0bCCGG T  I`66b*  a`Dd~) 33 (SbqA!`Da6-7 ab@)-m T<`1 L`HSbqA"!"cR??!`DaP780bCCGG T  I`7J8b, T I`U88b-  `Dh % %%%%%~)ł33  ab@+. T<`1 L`HSbqA"!"cR??#`Da9:0bCCHG T  I`]9:b/ T I` :Z:b0  `Dh % %%%%%~)ł33  ab$@./ T,`L`8SbqA"%a?$`Da:\; T  I`:W;%b2  `Dd %%%`b@10 T y` Qa.print`==B'bK38 T  `$`(`=+>(bK49 T `#``I>T>bK5: T ``(`n>>(bK6; T `%`)`>1?)bK7< T ``B*`y??B*bK8= T ``*`??*bK9> T ` `B+`? @B+bK:? T `Qb .evalContext`@j@B,bK;@ T ` Qa.encode`@@,bK<A T ``-`@@-bK=B T ` Qa.decode`@A".bK>C T `Qb .serialize`'AA.bK?D T `Qb .deserialize`AA/bK@E T ``b0`ABb0bKAF T ``1`1BWB1bKBG T ``1`oBB1bKCH T ``2`BB2bKDI T ``2`BC2bKEJ T ``"3`*CSC"3bKFK T ``3`jCC3bKGL T ``B4`CCB4bKHM T ``4`C D4bKIN T ``B5`!DHDB5bKJO T `Qb .isDataView`ZD{D5bKKP T ` Qa.isDate`DDB6bKLQ T ` `6`DD6bKMR T ``B7`E+EB7bKNS T ` Qa.isMap`8ESE7bKOT T ``B8`hEEB8bKPU T `$`8`EE8bKQV T ``b9`EFb9bKRW T ``9`)FNF9bKSX T `Qb .isPromise`_F~Fb:bKTY T ` Qa.isProxy`FF:bKUZ T `Qb .isRegExp`FFB;bKV[ T ` Qa.isSet`FG;bKW\ T ``<`G:G<bKX] T ` `<`UGG<bKY^ T ``"=`GG"=bKZ_ T ``=`GG=bK[` T `` ">` H-H">bK\a T `Qb .isWeakMap`>H^H>bK]b T `Qb .isWeakSet`oHH"?bK^c T `Qb .memoryUsage`HH?bK_d T `%`"@`HI"@bK`e T ``@`IcI@bKaf T ``A`{IIAbKbg T ` Qa.opNames`IIBBbKch T `!`B`IJBbKdi T(`  L`    `Dc3b(SbbpWM`y`Qb .byteLengthaJ4J abKej T(`  L`   = `Dc/b(SbbpWC``.`"Ca]JJ abKfk T(`  L`b ] `Dc[ %[(SbbpWD`y`0`$DaJ K bKgl T  `%`E`)KOKEbKhm T `,` bF`vKKbFbKin T `Qb .queueTimer`KL"GbKjo T `Qb .cancelTimer`L/LHbKkp T `Qb .refTimer`?LWLBIbKlq T `Qb .unrefTimer`iLLIbKmr T ``"J`LL"JbKns T ``J`MMJbKotD`D]DH m Qi jZ// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. "use strict"; ((window) => { const core = Deno.core; const { op_format_file_name, op_apply_source_map, op_apply_source_map_filename, } = core.ops; const { Error, ObjectDefineProperties, ArrayPrototypePush, StringPrototypeStartsWith, StringPrototypeEndsWith, Uint8Array, Uint32Array, } = window.__bootstrap.primordials; const DATA_URL_ABBREV_THRESHOLD = 150; // keep in sync with ./error.rs // Keep in sync with `format_file_name` in ./error.rs function formatFileName(fileName) { if ( fileName.startsWith("data:") && fileName.length > DATA_URL_ABBREV_THRESHOLD ) { return op_format_file_name(fileName); } return fileName; } // Keep in sync with `cli/fmt_errors.rs`. function formatLocation(callSite) { if (callSite.isNative) { return "native"; } let result = ""; if (callSite.fileName) { result += formatFileName(callSite.fileName); } else { if (callSite.isEval) { if (callSite.evalOrigin == null) { throw new Error("assert evalOrigin"); } result += `${callSite.evalOrigin}, `; } result += ""; } if (callSite.lineNumber !== null) { result += `:${callSite.lineNumber}`; if (callSite.columnNumber !== null) { result += `:${callSite.columnNumber}`; } } return result; } // Keep in sync with `cli/fmt_errors.rs`. function formatCallSiteEval(callSite) { let result = ""; if (callSite.isAsync) { result += "async "; } if (callSite.isPromiseAll) { result += `Promise.all (index ${callSite.promiseIndex})`; return result; } const isMethodCall = !(callSite.isToplevel || callSite.isConstructor); if (isMethodCall) { if (callSite.functionName) { if (callSite.typeName) { if ( !StringPrototypeStartsWith(callSite.functionName, callSite.typeName) ) { result += `${callSite.typeName}.`; } } result += callSite.functionName; if (callSite.methodName) { if ( !StringPrototypeEndsWith(callSite.functionName, callSite.methodName) ) { result += ` [as ${callSite.methodName}]`; } } } else { if (callSite.typeName) { result += `${callSite.typeName}.`; } if (callSite.methodName) { result += callSite.methodName; } else { result += ""; } } } else if (callSite.isConstructor) { result += "new "; if (callSite.functionName) { result += callSite.functionName; } else { result += ""; } } else if (callSite.functionName) { result += callSite.functionName; } else { result += formatLocation(callSite); return result; } result += ` (${formatLocation(callSite)})`; return result; } const applySourceMapRetBuf = new Uint32Array(2); const applySourceMapRetBufView = new Uint8Array(applySourceMapRetBuf.buffer); function prepareStackTrace(error, callSites) { const message = error.message !== undefined ? error.message : ""; const name = error.name !== undefined ? error.name : "Error"; let stack; if (name != "" && message != "") { stack = `${name}: ${message}`; } else if ((name || message) != "") { stack = name || message; } else { stack = ""; } ObjectDefineProperties(error, { __callSiteEvals: { __proto__: null, value: [], configurable: true }, }); for (let i = 0; i < callSites.length; ++i) { const v8CallSite = callSites[i]; const callSite = { this: v8CallSite.getThis(), typeName: v8CallSite.getTypeName(), function: v8CallSite.getFunction(), functionName: v8CallSite.getFunctionName(), methodName: v8CallSite.getMethodName(), fileName: v8CallSite.getFileName(), lineNumber: v8CallSite.getLineNumber(), columnNumber: v8CallSite.getColumnNumber(), evalOrigin: v8CallSite.getEvalOrigin(), isToplevel: v8CallSite.isToplevel(), isEval: v8CallSite.isEval(), isNative: v8CallSite.isNative(), isConstructor: v8CallSite.isConstructor(), isAsync: v8CallSite.isAsync(), isPromiseAll: v8CallSite.isPromiseAll(), promiseIndex: v8CallSite.getPromiseIndex(), }; let res = 0; if ( callSite.fileName !== null && callSite.lineNumber !== null && callSite.columnNumber !== null ) { res = op_apply_source_map( callSite.fileName, callSite.lineNumber, callSite.columnNumber, applySourceMapRetBufView, ); } if (res >= 1) { callSite.lineNumber = applySourceMapRetBuf[0]; callSite.columnNumber = applySourceMapRetBuf[1]; } if (res >= 2) { callSite.fileName = op_apply_source_map_filename(); } ArrayPrototypePush(error.__callSiteEvals, callSite); stack += `\n at ${formatCallSiteEval(callSite)}`; } return stack; } Error.prepareStackTrace = prepareStackTrace; })(this); QAext:core/02_error.jsa bD` M` T I`Y"MSbbp   !  AgUbL"MMNPPm??????????????I`Da[ b@| T I``M b@} T I` Nb@~ T I` BQb@D`D]DHQk// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Re-export fields from `globalThis.__bootstrap` so that embedders using // ES modules can import these symbols instead of capturing the bootstrap ns. const bootstrap = globalThis.__bootstrap; const { core, internals, primordials } = bootstrap; export { core, internals, primordials }; QbF~ext:core/mod.jsabD` ` TL`X,La !Lca  % BK  = `Dl(h ei h  !--1-1-1 LSb1Ibk`],L` ` L` BK` L`BK` L`]` a?BKa?a? a P) bAD`RD]DH =Q={// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Adapted from https://github.com/jsdom/webidl-conversions. // Copyright Domenic Denicola. Licensed under BSD-2-Clause License. // Original license at https://github.com/jsdom/webidl-conversions/blob/master/LICENSE.md. /// import { core, primordials } from "ext:core/mod.js"; const { isArrayBuffer, isDataView, isSharedArrayBuffer, isTypedArray, } = core; const { ArrayBufferIsView, ArrayPrototypeForEach, ArrayPrototypePush, ArrayPrototypeSort, ArrayIteratorPrototype, BigInt, BigIntAsIntN, BigIntAsUintN, DataViewPrototypeGetBuffer, Float32Array, Float64Array, FunctionPrototypeBind, Int16Array, Int32Array, Int8Array, MathFloor, MathFround, MathMax, MathMin, MathPow, MathRound, MathTrunc, Number, NumberIsFinite, NumberIsNaN, NumberMAX_SAFE_INTEGER, NumberMIN_SAFE_INTEGER, ObjectAssign, ObjectCreate, ObjectDefineProperties, ObjectDefineProperty, ObjectGetOwnPropertyDescriptor, ObjectGetOwnPropertyDescriptors, ObjectGetPrototypeOf, ObjectHasOwn, ObjectPrototypeIsPrototypeOf, ObjectIs, PromisePrototypeThen, PromiseReject, PromiseResolve, ReflectApply, ReflectDefineProperty, ReflectGetOwnPropertyDescriptor, ReflectHas, ReflectOwnKeys, RegExpPrototypeTest, SafeRegExp, SafeSet, SetPrototypeEntries, SetPrototypeForEach, SetPrototypeKeys, SetPrototypeValues, SetPrototypeHas, SetPrototypeClear, SetPrototypeDelete, SetPrototypeAdd, // TODO(lucacasonato): add SharedArrayBuffer to primordials // SharedArrayBufferPrototype, String, StringPrototypeCharCodeAt, StringPrototypeToWellFormed, Symbol, SymbolIterator, SymbolToStringTag, TypedArrayPrototypeGetBuffer, TypedArrayPrototypeGetSymbolToStringTag, TypeError, Uint16Array, Uint32Array, Uint8Array, Uint8ClampedArray, } = primordials; function makeException(ErrorType, message, prefix, context) { return new ErrorType( `${prefix ? prefix + ": " : ""}${context ? context : "Value"} ${message}`, ); } function toNumber(value) { if (typeof value === "bigint") { throw TypeError("Cannot convert a BigInt value to a number"); } return Number(value); } function type(V) { if (V === null) { return "Null"; } switch (typeof V) { case "undefined": return "Undefined"; case "boolean": return "Boolean"; case "number": return "Number"; case "string": return "String"; case "symbol": return "Symbol"; case "bigint": return "BigInt"; case "object": // Falls through case "function": // Falls through default: // Per ES spec, typeof returns an implementation-defined value that is not any of the existing ones for // uncallable non-standard exotic objects. Yet Type() which the Web IDL spec depends on returns Object for // such cases. So treat the default case as an object. return "Object"; } } // Round x to the nearest integer, choosing the even integer if it lies halfway between two. function evenRound(x) { // There are four cases for numbers with fractional part being .5: // // case | x | floor(x) | round(x) | expected | x <> 0 | x % 1 | x & 1 | example // 1 | 2n + 0.5 | 2n | 2n + 1 | 2n | > | 0.5 | 0 | 0.5 -> 0 // 2 | 2n + 1.5 | 2n + 1 | 2n + 2 | 2n + 2 | > | 0.5 | 1 | 1.5 -> 2 // 3 | -2n - 0.5 | -2n - 1 | -2n | -2n | < | -0.5 | 0 | -0.5 -> 0 // 4 | -2n - 1.5 | -2n - 2 | -2n - 1 | -2n - 2 | < | -0.5 | 1 | -1.5 -> -2 // (where n is a non-negative integer) // // Branch here for cases 1 and 4 if ( (x > 0 && x % 1 === +0.5 && (x & 1) === 0) || (x < 0 && x % 1 === -0.5 && (x & 1) === 1) ) { return censorNegativeZero(MathFloor(x)); } return censorNegativeZero(MathRound(x)); } function integerPart(n) { return censorNegativeZero(MathTrunc(n)); } function sign(x) { return x < 0 ? -1 : 1; } function modulo(x, y) { // https://tc39.github.io/ecma262/#eqn-modulo // Note that http://stackoverflow.com/a/4467559/3191 does NOT work for large modulos const signMightNotMatch = x % y; if (sign(y) !== sign(signMightNotMatch)) { return signMightNotMatch + y; } return signMightNotMatch; } function censorNegativeZero(x) { return x === 0 ? 0 : x; } function createIntegerConversion(bitLength, typeOpts) { const isSigned = !typeOpts.unsigned; let lowerBound; let upperBound; if (bitLength === 64) { upperBound = NumberMAX_SAFE_INTEGER; lowerBound = !isSigned ? 0 : NumberMIN_SAFE_INTEGER; } else if (!isSigned) { lowerBound = 0; upperBound = MathPow(2, bitLength) - 1; } else { lowerBound = -MathPow(2, bitLength - 1); upperBound = MathPow(2, bitLength - 1) - 1; } const twoToTheBitLength = MathPow(2, bitLength); const twoToOneLessThanTheBitLength = MathPow(2, bitLength - 1); return (V, prefix = undefined, context = undefined, opts = {}) => { let x = toNumber(V); x = censorNegativeZero(x); if (opts.enforceRange) { if (!NumberIsFinite(x)) { throw makeException( TypeError, "is not a finite number", prefix, context, ); } x = integerPart(x); if (x < lowerBound || x > upperBound) { throw makeException( TypeError, `is outside the accepted range of ${lowerBound} to ${upperBound}, inclusive`, prefix, context, ); } return x; } if (!NumberIsNaN(x) && opts.clamp) { x = MathMin(MathMax(x, lowerBound), upperBound); x = evenRound(x); return x; } if (!NumberIsFinite(x) || x === 0) { return 0; } x = integerPart(x); // Math.pow(2, 64) is not accurately representable in JavaScript, so try to avoid these per-spec operations if // possible. Hopefully it's an optimization for the non-64-bitLength cases too. if (x >= lowerBound && x <= upperBound) { return x; } // These will not work great for bitLength of 64, but oh well. See the README for more details. x = modulo(x, twoToTheBitLength); if (isSigned && x >= twoToOneLessThanTheBitLength) { return x - twoToTheBitLength; } return x; }; } function createLongLongConversion(bitLength, { unsigned }) { const upperBound = NumberMAX_SAFE_INTEGER; const lowerBound = unsigned ? 0 : NumberMIN_SAFE_INTEGER; const asBigIntN = unsigned ? BigIntAsUintN : BigIntAsIntN; return (V, prefix = undefined, context = undefined, opts = {}) => { let x = toNumber(V); x = censorNegativeZero(x); if (opts.enforceRange) { if (!NumberIsFinite(x)) { throw makeException( TypeError, "is not a finite number", prefix, context, ); } x = integerPart(x); if (x < lowerBound || x > upperBound) { throw makeException( TypeError, `is outside the accepted range of ${lowerBound} to ${upperBound}, inclusive`, prefix, context, ); } return x; } if (!NumberIsNaN(x) && opts.clamp) { x = MathMin(MathMax(x, lowerBound), upperBound); x = evenRound(x); return x; } if (!NumberIsFinite(x) || x === 0) { return 0; } let xBigInt = BigInt(integerPart(x)); xBigInt = asBigIntN(bitLength, xBigInt); return Number(xBigInt); }; } const converters = []; converters.any = (V) => { return V; }; converters.boolean = function (val) { return !!val; }; converters.byte = createIntegerConversion(8, { unsigned: false }); converters.octet = createIntegerConversion(8, { unsigned: true }); converters.short = createIntegerConversion(16, { unsigned: false }); converters["unsigned short"] = createIntegerConversion(16, { unsigned: true, }); converters.long = createIntegerConversion(32, { unsigned: false }); converters["unsigned long"] = createIntegerConversion(32, { unsigned: true }); converters["long long"] = createLongLongConversion(64, { unsigned: false }); converters["unsigned long long"] = createLongLongConversion(64, { unsigned: true, }); converters.float = (V, prefix, context, _opts) => { const x = toNumber(V); if (!NumberIsFinite(x)) { throw makeException( TypeError, "is not a finite floating-point value", prefix, context, ); } if (ObjectIs(x, -0)) { return x; } const y = MathFround(x); if (!NumberIsFinite(y)) { throw makeException( TypeError, "is outside the range of a single-precision floating-point value", prefix, context, ); } return y; }; converters["unrestricted float"] = (V, _prefix, _context, _opts) => { const x = toNumber(V); if (NumberIsNaN(x)) { return x; } if (ObjectIs(x, -0)) { return x; } return MathFround(x); }; converters.double = (V, prefix, context, _opts) => { const x = toNumber(V); if (!NumberIsFinite(x)) { throw makeException( TypeError, "is not a finite floating-point value", prefix, context, ); } return x; }; converters["unrestricted double"] = (V, _prefix, _context, _opts) => { const x = toNumber(V); return x; }; converters.DOMString = function (V, prefix, context, opts = {}) { if (typeof V === "string") { return V; } else if (V === null && opts.treatNullAsEmptyString) { return ""; } else if (typeof V === "symbol") { throw makeException( TypeError, "is a symbol, which cannot be converted to a string", prefix, context, ); } return String(V); }; function isByteString(input) { for (let i = 0; i < input.length; i++) { if (StringPrototypeCharCodeAt(input, i) > 255) { // If a character code is greater than 255, it means the string is not a byte string. return false; } } return true; } converters.ByteString = (V, prefix, context, opts) => { const x = converters.DOMString(V, prefix, context, opts); if (!isByteString(x)) { throw makeException( TypeError, "is not a valid ByteString", prefix, context, ); } return x; }; converters.USVString = (V, prefix, context, opts) => { const S = converters.DOMString(V, prefix, context, opts); return StringPrototypeToWellFormed(S); }; converters.object = (V, prefix, context, _opts) => { if (type(V) !== "Object") { throw makeException( TypeError, "is not an object", prefix, context, ); } return V; }; // Not exported, but used in Function and VoidFunction. // Neither Function nor VoidFunction is defined with [TreatNonObjectAsNull], so // handling for that is omitted. function convertCallbackFunction(V, prefix, context, _opts) { if (typeof V !== "function") { throw makeException( TypeError, "is not a function", prefix, context, ); } return V; } converters.ArrayBuffer = ( V, prefix = undefined, context = undefined, opts = {}, ) => { if (!isArrayBuffer(V)) { if (opts.allowShared && !isSharedArrayBuffer(V)) { throw makeException( TypeError, "is not an ArrayBuffer or SharedArrayBuffer", prefix, context, ); } throw makeException( TypeError, "is not an ArrayBuffer", prefix, context, ); } return V; }; converters.DataView = ( V, prefix = undefined, context = undefined, opts = {}, ) => { if (!isDataView(V)) { throw makeException( TypeError, "is not a DataView", prefix, context, ); } if ( !opts.allowShared && isSharedArrayBuffer(DataViewPrototypeGetBuffer(V)) ) { throw makeException( TypeError, "is backed by a SharedArrayBuffer, which is not allowed", prefix, context, ); } return V; }; ArrayPrototypeForEach( [ Int8Array, Int16Array, Int32Array, Uint8Array, Uint16Array, Uint32Array, Uint8ClampedArray, Float32Array, Float64Array, ], (func) => { const name = func.name; const article = RegExpPrototypeTest(new SafeRegExp(/^[AEIOU]/), name) ? "an" : "a"; converters[name] = ( V, prefix = undefined, context = undefined, opts = {}, ) => { if (TypedArrayPrototypeGetSymbolToStringTag(V) !== name) { throw makeException( TypeError, `is not ${article} ${name} object`, prefix, context, ); } if ( !opts.allowShared && isSharedArrayBuffer(TypedArrayPrototypeGetBuffer(V)) ) { throw makeException( TypeError, "is a view on a SharedArrayBuffer, which is not allowed", prefix, context, ); } return V; }; }, ); // Common definitions converters.ArrayBufferView = ( V, prefix = undefined, context = undefined, opts = {}, ) => { if (!ArrayBufferIsView(V)) { throw makeException( TypeError, "is not a view on an ArrayBuffer or SharedArrayBuffer", prefix, context, ); } let buffer; if (isTypedArray(V)) { buffer = TypedArrayPrototypeGetBuffer(V); } else { buffer = DataViewPrototypeGetBuffer(V); } if (!opts.allowShared && isSharedArrayBuffer(buffer)) { throw makeException( TypeError, "is a view on a SharedArrayBuffer, which is not allowed", prefix, context, ); } return V; }; converters.BufferSource = ( V, prefix = undefined, context = undefined, opts = {}, ) => { if (ArrayBufferIsView(V)) { let buffer; if (isTypedArray(V)) { buffer = TypedArrayPrototypeGetBuffer(V); } else { buffer = DataViewPrototypeGetBuffer(V); } if (!opts.allowShared && isSharedArrayBuffer(buffer)) { throw makeException( TypeError, "is a view on a SharedArrayBuffer, which is not allowed", prefix, context, ); } return V; } if (!opts.allowShared && !isArrayBuffer(V)) { throw makeException( TypeError, "is not an ArrayBuffer or a view on one", prefix, context, ); } if ( opts.allowShared && !isSharedArrayBuffer(V) && !isArrayBuffer(V) ) { throw makeException( TypeError, "is not an ArrayBuffer, SharedArrayBuffer, or a view on one", prefix, context, ); } return V; }; converters.DOMTimeStamp = converters["unsigned long long"]; converters.DOMHighResTimeStamp = converters["double"]; converters.Function = convertCallbackFunction; converters.VoidFunction = convertCallbackFunction; converters["UVString?"] = createNullableConverter( converters.USVString, ); converters["sequence"] = createSequenceConverter( converters.double, ); converters["sequence"] = createSequenceConverter( converters.object, ); converters["Promise"] = createPromiseConverter(() => undefined); converters["sequence"] = createSequenceConverter( converters.ByteString, ); converters["sequence>"] = createSequenceConverter( converters["sequence"], ); converters["record"] = createRecordConverter( converters.ByteString, converters.ByteString, ); converters["sequence"] = createSequenceConverter( converters.USVString, ); converters["sequence>"] = createSequenceConverter( converters["sequence"], ); converters["record"] = createRecordConverter( converters.USVString, converters.USVString, ); converters["sequence"] = createSequenceConverter( converters.DOMString, ); function requiredArguments(length, required, prefix) { if (length < required) { const errMsg = `${prefix ? prefix + ": " : ""}${required} argument${ required === 1 ? "" : "s" } required, but only ${length} present.`; throw new TypeError(errMsg); } } function createDictionaryConverter(name, ...dictionaries) { let hasRequiredKey = false; const allMembers = []; for (let i = 0; i < dictionaries.length; ++i) { const members = dictionaries[i]; for (let j = 0; j < members.length; ++j) { const member = members[j]; if (member.required) { hasRequiredKey = true; } ArrayPrototypePush(allMembers, member); } } ArrayPrototypeSort(allMembers, (a, b) => { if (a.key == b.key) { return 0; } return a.key < b.key ? -1 : 1; }); const defaultValues = {}; for (let i = 0; i < allMembers.length; ++i) { const member = allMembers[i]; if (ReflectHas(member, "defaultValue")) { const idlMemberValue = member.defaultValue; const imvType = typeof idlMemberValue; // Copy by value types can be directly assigned, copy by reference types // need to be re-created for each allocation. if ( imvType === "number" || imvType === "boolean" || imvType === "string" || imvType === "bigint" || imvType === "undefined" ) { defaultValues[member.key] = member.converter(idlMemberValue, {}); } else { ObjectDefineProperty(defaultValues, member.key, { get() { return member.converter(idlMemberValue, member.defaultValue); }, enumerable: true, }); } } } return function (V, prefix = undefined, context = undefined, opts = {}) { const typeV = type(V); switch (typeV) { case "Undefined": case "Null": case "Object": break; default: throw makeException( TypeError, "can not be converted to a dictionary", prefix, context, ); } const esDict = V; const idlDict = ObjectAssign({}, defaultValues); // NOTE: fast path Null and Undefined. if ((V === undefined || V === null) && !hasRequiredKey) { return idlDict; } for (let i = 0; i < allMembers.length; ++i) { const member = allMembers[i]; const key = member.key; let esMemberValue; if (typeV === "Undefined" || typeV === "Null") { esMemberValue = undefined; } else { esMemberValue = esDict[key]; } if (esMemberValue !== undefined) { const memberContext = `'${key}' of '${name}'${ context ? ` (${context})` : "" }`; const converter = member.converter; const idlMemberValue = converter( esMemberValue, prefix, memberContext, opts, ); idlDict[key] = idlMemberValue; } else if (member.required) { throw makeException( TypeError, `can not be converted to '${name}' because '${key}' is required in '${name}'.`, prefix, context, ); } } return idlDict; }; } // https://heycam.github.io/webidl/#es-enumeration function createEnumConverter(name, values) { const E = new SafeSet(values); return function (V, prefix = undefined, _context = undefined, _opts = {}) { const S = String(V); if (!E.has(S)) { throw new TypeError( `${ prefix ? prefix + ": " : "" }The provided value '${S}' is not a valid enum value of type ${name}.`, ); } return S; }; } function createNullableConverter(converter) { return (V, prefix = undefined, context = undefined, opts = {}) => { // FIXME: If Type(V) is not Object, and the conversion to an IDL value is // being performed due to V being assigned to an attribute whose type is a // nullable callback function that is annotated with // [LegacyTreatNonObjectAsNull], then return the IDL nullable type T? // value null. if (V === null || V === undefined) return null; return converter(V, prefix, context, opts); }; } // https://heycam.github.io/webidl/#es-sequence function createSequenceConverter(converter) { return function (V, prefix = undefined, context = undefined, opts = {}) { if (type(V) !== "Object") { throw makeException( TypeError, "can not be converted to sequence.", prefix, context, ); } const iter = V?.[SymbolIterator]?.(); if (iter === undefined) { throw makeException( TypeError, "can not be converted to sequence.", prefix, context, ); } const array = []; while (true) { const res = iter?.next?.(); if (res === undefined) { throw makeException( TypeError, "can not be converted to sequence.", prefix, context, ); } if (res.done === true) break; const val = converter( res.value, prefix, `${context}, index ${array.length}`, opts, ); ArrayPrototypePush(array, val); } return array; }; } function createRecordConverter(keyConverter, valueConverter) { return (V, prefix, context, opts) => { if (type(V) !== "Object") { throw makeException( TypeError, "can not be converted to dictionary.", prefix, context, ); } const result = {}; // Fast path for common case (not a Proxy) if (!core.isProxy(V)) { for (const key in V) { if (!ObjectHasOwn(V, key)) { continue; } const typedKey = keyConverter(key, prefix, context, opts); const value = V[key]; const typedValue = valueConverter(value, prefix, context, opts); result[typedKey] = typedValue; } return result; } // Slow path if Proxy (e.g: in WPT tests) const keys = ReflectOwnKeys(V); for (let i = 0; i < keys.length; ++i) { const key = keys[i]; const desc = ObjectGetOwnPropertyDescriptor(V, key); if (desc !== undefined && desc.enumerable === true) { const typedKey = keyConverter(key, prefix, context, opts); const value = V[key]; const typedValue = valueConverter(value, prefix, context, opts); result[typedKey] = typedValue; } } return result; }; } function createPromiseConverter(converter) { return (V, prefix, context, opts) => // should be able to handle thenables // see: https://github.com/web-platform-tests/wpt/blob/a31d3ba53a79412793642366f3816c9a63f0cf57/streams/writable-streams/close.any.js#L207 typeof V?.then === "function" ? PromisePrototypeThen(PromiseResolve(V), (V) => converter(V, prefix, context, opts)) : PromiseResolve(converter(V, prefix, context, opts)); } function invokeCallbackFunction( callable, args, thisArg, returnValueConverter, prefix, returnsPromise, ) { try { const rv = ReflectApply(callable, thisArg, args); return returnValueConverter(rv, prefix, "return value"); } catch (err) { if (returnsPromise === true) { return PromiseReject(err); } throw err; } } const brand = Symbol("[[webidl.brand]]"); function createInterfaceConverter(name, prototype) { return (V, prefix, context, _opts) => { if (!ObjectPrototypeIsPrototypeOf(prototype, V) || V[brand] !== brand) { throw makeException( TypeError, `is not of type ${name}.`, prefix, context, ); } return V; }; } // TODO(lucacasonato): have the user pass in the prototype, and not the type. function createBranded(Type) { const t = ObjectCreate(Type.prototype); t[brand] = brand; return t; } function assertBranded(self, prototype) { if ( !ObjectPrototypeIsPrototypeOf(prototype, self) || self[brand] !== brand ) { throw new TypeError("Illegal invocation"); } } function illegalConstructor() { throw new TypeError("Illegal constructor"); } function define(target, source) { const keys = ReflectOwnKeys(source); for (let i = 0; i < keys.length; ++i) { const key = keys[i]; const descriptor = ReflectGetOwnPropertyDescriptor(source, key); if (descriptor && !ReflectDefineProperty(target, key, descriptor)) { throw new TypeError(`Cannot redefine property: ${String(key)}`); } } } const _iteratorInternal = Symbol("iterator internal"); const globalIteratorPrototype = ObjectGetPrototypeOf(ArrayIteratorPrototype); function mixinPairIterable(name, prototype, dataSymbol, keyKey, valueKey) { const iteratorPrototype = ObjectCreate(globalIteratorPrototype, { [SymbolToStringTag]: { configurable: true, value: `${name} Iterator` }, }); define(iteratorPrototype, { next() { const internal = this && this[_iteratorInternal]; if (!internal) { throw new TypeError( `next() called on a value that is not a ${name} iterator object`, ); } const { target, kind, index } = internal; const values = target[dataSymbol]; const len = values.length; if (index >= len) { return { value: undefined, done: true }; } const pair = values[index]; internal.index = index + 1; let result; switch (kind) { case "key": result = pair[keyKey]; break; case "value": result = pair[valueKey]; break; case "key+value": result = [pair[keyKey], pair[valueKey]]; break; } return { value: result, done: false }; }, }); function createDefaultIterator(target, kind) { const iterator = ObjectCreate(iteratorPrototype); ObjectDefineProperty(iterator, _iteratorInternal, { value: { target, kind, index: 0 }, configurable: true, }); return iterator; } function entries() { assertBranded(this, prototype.prototype); return createDefaultIterator(this, "key+value"); } const properties = { entries: { value: entries, writable: true, enumerable: true, configurable: true, }, [SymbolIterator]: { value: entries, writable: true, enumerable: false, configurable: true, }, keys: { value: function keys() { assertBranded(this, prototype.prototype); return createDefaultIterator(this, "key"); }, writable: true, enumerable: true, configurable: true, }, values: { value: function values() { assertBranded(this, prototype.prototype); return createDefaultIterator(this, "value"); }, writable: true, enumerable: true, configurable: true, }, forEach: { value: function forEach(idlCallback, thisArg = undefined) { assertBranded(this, prototype.prototype); const prefix = `Failed to execute 'forEach' on '${name}'`; requiredArguments(arguments.length, 1, { prefix }); idlCallback = converters["Function"](idlCallback, { prefix, context: "Argument 1", }); idlCallback = FunctionPrototypeBind( idlCallback, thisArg ?? globalThis, ); const pairs = this[dataSymbol]; for (let i = 0; i < pairs.length; i++) { const entry = pairs[i]; idlCallback(entry[valueKey], entry[keyKey], this); } }, writable: true, enumerable: true, configurable: true, }, }; return ObjectDefineProperties(prototype.prototype, properties); } function configureInterface(interface_) { configureProperties(interface_); configureProperties(interface_.prototype); ObjectDefineProperty(interface_.prototype, SymbolToStringTag, { value: interface_.name, enumerable: false, configurable: true, writable: false, }); } function configureProperties(obj) { const descriptors = ObjectGetOwnPropertyDescriptors(obj); for (const key in descriptors) { if (!ObjectHasOwn(descriptors, key)) { continue; } if (key === "constructor") continue; if (key === "prototype") continue; const descriptor = descriptors[key]; if ( ReflectHas(descriptor, "value") && typeof descriptor.value === "function" ) { ObjectDefineProperty(obj, key, { enumerable: true, writable: true, configurable: true, }); } else if (ReflectHas(descriptor, "get")) { ObjectDefineProperty(obj, key, { enumerable: true, configurable: true, }); } } } const setlikeInner = Symbol("[[set]]"); // Ref: https://webidl.spec.whatwg.org/#es-setlike function setlike(obj, objPrototype, readonly) { ObjectDefineProperties(obj, { size: { configurable: true, enumerable: true, get() { assertBranded(this, objPrototype); return obj[setlikeInner].size; }, }, [SymbolIterator]: { configurable: true, enumerable: false, writable: true, value() { assertBranded(this, objPrototype); return obj[setlikeInner][SymbolIterator](); }, }, entries: { configurable: true, enumerable: true, writable: true, value() { assertBranded(this, objPrototype); return SetPrototypeEntries(obj[setlikeInner]); }, }, keys: { configurable: true, enumerable: true, writable: true, value() { assertBranded(this, objPrototype); return SetPrototypeKeys(obj[setlikeInner]); }, }, values: { configurable: true, enumerable: true, writable: true, value() { assertBranded(this, objPrototype); return SetPrototypeValues(obj[setlikeInner]); }, }, forEach: { configurable: true, enumerable: true, writable: true, value(callbackfn, thisArg) { assertBranded(this, objPrototype); return SetPrototypeForEach(obj[setlikeInner], callbackfn, thisArg); }, }, has: { configurable: true, enumerable: true, writable: true, value(value) { assertBranded(this, objPrototype); return SetPrototypeHas(obj[setlikeInner], value); }, }, }); if (!readonly) { ObjectDefineProperties(obj, { add: { configurable: true, enumerable: true, writable: true, value(value) { assertBranded(this, objPrototype); return SetPrototypeAdd(obj[setlikeInner], value); }, }, delete: { configurable: true, enumerable: true, writable: true, value(value) { assertBranded(this, objPrototype); return SetPrototypeDelete(obj[setlikeInner], value); }, }, clear: { configurable: true, enumerable: true, writable: true, value() { assertBranded(this, objPrototype); return SetPrototypeClear(obj[setlikeInner]); }, }, }); } } export { assertBranded, brand, configureInterface, converters, createBranded, createDictionaryConverter, createEnumConverter, createInterfaceConverter, createNullableConverter, createPromiseConverter, createRecordConverter, createSequenceConverter, illegalConstructor, invokeCallbackFunction, makeException, mixinPairIterable, requiredArguments, setlike, setlikeInner, type, }; Qdp.ext:deno_webidl/00_webidl.jsa bD`5M`K T`yLa" T0`L`= ª   `De  >bb(SbqAT`DaoiSb1G25<">qAab!w!wA:;a!?@Ba  !bI!KB>%%G"HJbIBEFBFESBix"TBUbVVUg”"???????????????????????????????????????????????????????????????????????Ib{` L` bS]`~]L`<b` L`b` L`` L`b^` L`b^` L`B` L`BB` L`B` L`x`  L`x{`  L`{~`  L`~z`  L`zB`  L`B"` L`"S` L`S` L`` L`` L`` L`` L`]L`  D  cei Dckv` a?a?Sa?a?b^a?a?Ba?Ba?xa ?za ?~a ?{a ?"a?a?a?a?ba?Ba ?a?a?a?a? ai b@ T  I`] BU b@ T,` L`B   `DdDbb(SbqAbV`Da ab@ T I`b @ T I`"EVb@ T(` ] A `Dc m  (SbqAU`Dab ai b@ T` L`PSbqAbYYBZZb[d?????W`Da$ "]a!? T`UHL`b\= "YBZaZbYb[  e `DP(      ?bDb-~b0>`Ab n o 80>x88x88`  b7- 1  cc@b«b m Abq p! C c"q$9% (SbbpVI`Da!] d&P@1B"Hi bK u U `Dy %%%%%-T%%% @m% %P % cE%3  EcR %  E c E % c%  Ec%bDH! b @  TH`N(L`0Sbq@X`?\`DaG "],Sbf@BZY]b??? a!ww TĔ`BLL`b\= "YBZa!]X   `DX(      ?bDb-~b0>`Ab n o 80>x88x88`  b7- 1  cc@b«b m   Abb c"b$(SbbpVI`Da d&P@1B"@i bK v  `Dk% %-ƃ%%%%  %   %  ab!@  T8`,L`S   `Dg -n!8c o PƋ$(SbqAg`Dam&a'  aD"i b@ T  I`*i+jb @ TT`f$L`!=    `Dn@+b -nQ /)cÙ5(` >7b x8 i PŋT(SbqA`Da]D_ b /i b@6 Tt`0L`  K(bGGG bGG   `Dvp bƠw 񛈦z!cjmamX /*c !- ~ )`$*c~ )`𽋇(SbqA"`Damo bP" `@ i b@?L`6 T  I`\Sb@a TP`ZHL`Q = %qb9 !   `Dm  Vm5m1m-m)m%m!mm     (SbqA`Da   ai b @b T  I`S>H?b@ a T`dL`0Sbq@`?B`Dal?J,Sbf@Bb???E Aab T4`% L`a   Q `Df--l --n  (SbbpWI`DaAcAI  a#i bK"~Sb&@`?K"aSb&@†`?e =%Q a ‰ bCG T  I`+DDi i b# T`dL`b= BBa "I‰"  } `D̘(      0bmm m0>`c   - n  / - m m / ^ x8 8 x8 8  x88x8-` 4V-P0> x88 x88x88` P (Sbq@I`DaDJI c!DĈ@ ^i b @$ = `Dܰ% %%%%%}% -nC / -n) / - %c P, PF c%  l Ì P -n lу% /%* c %- %V  m! m"m# m$3-%-'_)4+/-%~-)3.`0  2 l3 4E e5D x! F#xb"@!a T4`!L`8SbqABa?B`DaJjL % T``,L` B= BI   `Dq8(      7b-^@> 8x8 x88x88 i (Sbq@I`Da>KgL  a @i b @&  `Df %%. i% ab@%a  T(`L`0SbqA‰`x`DaL~N  T  I`L{NI bK(x   `Dc %`i b @'a!  T(`L`0SbqA‰`z`DaNR  T  I`NRI b @*y   `Dc %`i b @)a"  T,`L`8SbqA‹BaR~`DaRlW  T  I`RiWI bK,{   `Dd % %`i b@+a#  T(`L`0SbqA‰`{`DaW?Y  T  I`W i(SbqAb`Da\] a  i b@4a( T  I`]]Bb@5a)  T` |L``SbqA"—BfR??`Da_k  T I`.de b@9 T I`$ee+b@: x bGCb C T  I``di b8b+C0bCGGG+0bCGHG%0bCGGG T I`f1g b ;,0bCGGG T  I`gh,i b<b;0bCGGG T I`h&kb;b=    `DH0 % % % % %%%H~);t~)x83  7c%F~ ) 3 c ~ ~) 3  3:t~) 3  7~)3  7~)3  7!~#)3 $ 7&-(c* d,sB$ L$`2  & HPi b@7a* T<`6 L`x0bCHGH  `Dh IbI-b-;~)-3 ` (SbqA`Dakl b @i b@>b+ T I`p\y8l]@@@@@ @@@@@ b@@a,a  25<">qAabb!w!wAY]:;a!?@Ba  " !bI!KB>%%G"HJbIBEFBFESBi x"= A E I M  T  y`b^ Qa.any`I i bK  T$`]  M`Db y(SbqAI``b^ Qa.booleana"; b @=b"]HB_b"]G_b"]Hb"]G`b"]HAb"]G`b"]Hab"]Ga T  y`b^ Qa.float` "I i bK"b T `b^`e`"c#IbKe T `b^ Qa.double`z#_$IbKbf T `b^`f`$$IbKf TL`QL`bI=   `DlH(    - 0>`7b(Sbq@I`y`b^Qb .DOMStringa$U&  a@i b @bg TD`AL`b^bg= h  `Dj8(0-\Eb0>` (SbbpWI`y`b^Qb .ByteStringa{'s(  a@i bKbh T4`'L`b^bgBi `Df8(0-\9b(SbbpWI``b^Qb .USVStringa() a@bKi T  `b^ Qa.object`*))IbK T `b^Qb .ArrayBuffer`+1-IbK T y`b^Qb .DataView`J-/I bK"  `,Li  TL`R,L` 8SbbpWoa??I`Da/2B>%oBp'b^ Tt`4L` = pobqBk<"bq  m`DvH(      =bm80>x88x88`-5< bb 0> ` (SbbpVI`y`b^Qb .ay02ebDH@i bKw ]`Dl %%-%,-z ic%0Ă4 a LbK T  `b^`r` 35I bKr T `b^` "t`5@9IbK"tvBwiwbxyz T I`G;V;IbK"{b|}}"Bbb"  } `Dyh %%%%%%% % % % % %%%%%%%%%%%%%%%%%%% %!%"%#%$%%%&%'%(%)%*%+%,%-%.%/%0%1%2%3%4%5%6%7%8%9%:%;%<%=%>%?%@%A%B%C%D %E  %F%G%H %I ei h  0-%-%-%-%0-%- - %-% --% -% -% -% -- -!%-" -#"-$$-%&%-&(%-'*%-(,%-).%-*0%-+2%-,4%--6%-.8%-/:%-0<%-1>%-2@%-3B%-4D%-5F%-6H% -7J-8L%!-9N%"-:P%#-;R%$-X%'-?Z%(-@\%)-A^%*-B`%+-Cb%,-Dd%--Ef%.-Fh%/-Gj%0-Hl%1-In%2-Jp%3-Kr%4-Lt%5-Mv%6-Nx%7-Oz%8-P|%9-Q~-R%:-S%;-T%<-U%=-V%>-W-X-Y-Z}10[ 2\0] 2^0 ~_)c2`0 ~a)c2b0 ~c)c2d0 ~e)c2f0 ~g)c2h0 ~i)c2j0 @~k)c2l0 @~m)c2n0o2p0q2r0s2t0u2v0w2x0y2z0{2|0}2~020炁2{%  6  6  6  6  6  6  6  6  6Ԃc0炅20炇200-n200-t20 20 200 0-|b200 0-tb200 0-~b200 悐b200 0-zb200 0-b200 0-z0-zc2 00 0-|b 200 0-b200 0-|0-|c200 0-xb2b 1b"%Gb$%Hb&1 ly(-PPPPPPPPPPPPPPPPPPPPPPPP`&,0 `I L`````>@ ,P  ,P,@ @ ,@ @ @i bA     - 5 = Q a   9I ! 1AYi1 9 M q y         ) 9 DI Q a q           -DD`RD]DH QN// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. /// import { core, internals, primordials } from "ext:core/mod.js"; const { isAnyArrayBuffer, isArgumentsObject, isArrayBuffer, isAsyncFunction, isBigIntObject, isBooleanObject, isBoxedPrimitive, isDataView, isDate, isGeneratorFunction, isMap, isMapIterator, isModuleNamespaceObject, isNativeError, isNumberObject, isPromise, isRegExp, isSet, isSetIterator, isStringObject, isTypedArray, isWeakMap, isWeakSet, } = core; import { op_get_constructor_name, op_get_non_index_property_names, op_preview_entries, } from "ext:core/ops"; const { Array, ArrayBufferPrototypeGetByteLength, ArrayIsArray, ArrayPrototypeFill, ArrayPrototypeFilter, ArrayPrototypeFind, ArrayPrototypeForEach, ArrayPrototypeIncludes, ArrayPrototypeJoin, ArrayPrototypeMap, ArrayPrototypePop, ArrayPrototypePush, ArrayPrototypePushApply, ArrayPrototypeReduce, ArrayPrototypeShift, ArrayPrototypeSlice, ArrayPrototypeSort, ArrayPrototypeSplice, ArrayPrototypeUnshift, BigIntPrototypeValueOf, Boolean, BooleanPrototypeValueOf, DateNow, DatePrototypeGetTime, DatePrototypeToISOString, Error, ErrorCaptureStackTrace, ErrorPrototype, ErrorPrototypeToString, FunctionPrototypeBind, FunctionPrototypeCall, FunctionPrototypeToString, MapPrototypeDelete, MapPrototypeEntries, MapPrototypeForEach, MapPrototypeGet, MapPrototypeGetSize, MapPrototypeHas, MapPrototypeSet, MathAbs, MathFloor, MathMax, MathMin, MathRound, MathSqrt, Number, NumberIsInteger, NumberIsNaN, NumberParseInt, NumberPrototypeToString, NumberPrototypeValueOf, ObjectAssign, ObjectCreate, ObjectDefineProperty, ObjectFreeze, ObjectFromEntries, ObjectGetOwnPropertyDescriptor, ObjectGetOwnPropertyNames, ObjectGetOwnPropertySymbols, ObjectGetPrototypeOf, ObjectHasOwn, ObjectIs, ObjectKeys, ObjectPrototype, ObjectPrototypeIsPrototypeOf, ObjectPrototypePropertyIsEnumerable, ObjectSetPrototypeOf, ObjectValues, Proxy, ReflectGet, ReflectGetOwnPropertyDescriptor, ReflectGetPrototypeOf, ReflectHas, ReflectOwnKeys, RegExpPrototypeExec, RegExpPrototypeSymbolReplace, RegExpPrototypeTest, RegExpPrototypeToString, SafeArrayIterator, SafeMap, SafeMapIterator, SafeRegExp, SafeSet, SafeSetIterator, SafeStringIterator, SetPrototypeAdd, SetPrototypeGetSize, SetPrototypeHas, SetPrototypeValues, String, StringPrototypeCharCodeAt, StringPrototypeCodePointAt, StringPrototypeEndsWith, StringPrototypeIncludes, StringPrototypeIndexOf, StringPrototypeLastIndexOf, StringPrototypeMatch, StringPrototypeNormalize, StringPrototypePadEnd, StringPrototypePadStart, StringPrototypeRepeat, StringPrototypeReplace, StringPrototypeReplaceAll, StringPrototypeSlice, StringPrototypeSplit, StringPrototypeStartsWith, StringPrototypeToLowerCase, StringPrototypeTrim, StringPrototypeValueOf, Symbol, SymbolFor, SymbolHasInstance, SymbolIterator, SymbolPrototypeGetDescription, SymbolPrototypeToString, SymbolPrototypeValueOf, SymbolToStringTag, TypedArrayPrototypeGetByteLength, TypedArrayPrototypeGetLength, Uint8Array, } = primordials; let noColor = () => false; function setNoColorFn(fn) { noColor = fn; } function getNoColor() { return noColor(); } function assert(cond, msg = "Assertion failed.") { if (!cond) { throw new AssertionError(msg); } } // Don't use 'blue' not visible on cmd.exe const styles = { special: "cyan", number: "yellow", bigint: "yellow", boolean: "yellow", undefined: "grey", null: "bold", string: "green", symbol: "green", date: "magenta", // "name": intentionally not styling // TODO(BridgeAR): Highlight regular expressions properly. regexp: "red", module: "underline", internalError: "red", temporal: "magenta", }; const defaultFG = 39; const defaultBG = 49; // Set Graphics Rendition https://en.wikipedia.org/wiki/ANSI_escape_code#graphics // Each color consists of an array with the color code as first entry and the // reset code as second entry. const colors = { reset: [0, 0], bold: [1, 22], dim: [2, 22], // Alias: faint italic: [3, 23], underline: [4, 24], blink: [5, 25], // Swap foreground and background colors inverse: [7, 27], // Alias: swapcolors, swapColors hidden: [8, 28], // Alias: conceal strikethrough: [9, 29], // Alias: strikeThrough, crossedout, crossedOut doubleunderline: [21, 24], // Alias: doubleUnderline black: [30, defaultFG], red: [31, defaultFG], green: [32, defaultFG], yellow: [33, defaultFG], blue: [34, defaultFG], magenta: [35, defaultFG], cyan: [36, defaultFG], white: [37, defaultFG], bgBlack: [40, defaultBG], bgRed: [41, defaultBG], bgGreen: [42, defaultBG], bgYellow: [43, defaultBG], bgBlue: [44, defaultBG], bgMagenta: [45, defaultBG], bgCyan: [46, defaultBG], bgWhite: [47, defaultBG], framed: [51, 54], overlined: [53, 55], gray: [90, defaultFG], // Alias: grey, blackBright redBright: [91, defaultFG], greenBright: [92, defaultFG], yellowBright: [93, defaultFG], blueBright: [94, defaultFG], magentaBright: [95, defaultFG], cyanBright: [96, defaultFG], whiteBright: [97, defaultFG], bgGray: [100, defaultBG], // Alias: bgGrey, bgBlackBright bgRedBright: [101, defaultBG], bgGreenBright: [102, defaultBG], bgYellowBright: [103, defaultBG], bgBlueBright: [104, defaultBG], bgMagentaBright: [105, defaultBG], bgCyanBright: [106, defaultBG], bgWhiteBright: [107, defaultBG], }; function defineColorAlias(target, alias) { ObjectDefineProperty(colors, alias, { get() { return this[target]; }, set(value) { this[target] = value; }, configurable: true, enumerable: false, }); } defineColorAlias("gray", "grey"); defineColorAlias("gray", "blackBright"); defineColorAlias("bgGray", "bgGrey"); defineColorAlias("bgGray", "bgBlackBright"); defineColorAlias("dim", "faint"); defineColorAlias("strikethrough", "crossedout"); defineColorAlias("strikethrough", "strikeThrough"); defineColorAlias("strikethrough", "crossedOut"); defineColorAlias("hidden", "conceal"); defineColorAlias("inverse", "swapColors"); defineColorAlias("inverse", "swapcolors"); defineColorAlias("doubleunderline", "doubleUnderline"); // https://tc39.es/ecma262/#sec-get-sharedarraybuffer.prototype.bytelength let _getSharedArrayBufferByteLength; function getSharedArrayBufferByteLength(value) { // TODO(kt3k): add SharedArrayBuffer to primordials _getSharedArrayBufferByteLength ??= ObjectGetOwnPropertyDescriptor( // deno-lint-ignore prefer-primordials SharedArrayBuffer.prototype, "byteLength", ).get; return FunctionPrototypeCall(_getSharedArrayBufferByteLength, value); } // The name property is used to allow cross realms to make a determination // This is the same as WHATWG's structuredClone algorithm // https://github.com/whatwg/html/pull/5150 function isAggregateError(value) { return ( isNativeError(value) && value.name === "AggregateError" && ArrayIsArray(value.errors) ); } const kObjectType = 0; const kArrayType = 1; const kArrayExtrasType = 2; const kMinLineLength = 16; // Constants to map the iterator state. const kWeak = 0; const kIterator = 1; const kMapEntries = 2; // Escaped control characters (plus the single quote and the backslash). Use // empty strings to fill up unused entries. // deno-fmt-ignore const meta = [ '\\x00', '\\x01', '\\x02', '\\x03', '\\x04', '\\x05', '\\x06', '\\x07', // x07 '\\b', '\\t', '\\n', '\\x0B', '\\f', '\\r', '\\x0E', '\\x0F', // x0F '\\x10', '\\x11', '\\x12', '\\x13', '\\x14', '\\x15', '\\x16', '\\x17', // x17 '\\x18', '\\x19', '\\x1A', '\\x1B', '\\x1C', '\\x1D', '\\x1E', '\\x1F', // x1F '', '', '', '', '', '', '', "\\'", '', '', '', '', '', '', '', '', // x2F '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', // x3F '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', // x4F '', '', '', '', '', '', '', '', '', '', '', '', '\\\\', '', '', '', // x5F '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', // x6F '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '\\x7F', // x7F '\\x80', '\\x81', '\\x82', '\\x83', '\\x84', '\\x85', '\\x86', '\\x87', // x87 '\\x88', '\\x89', '\\x8A', '\\x8B', '\\x8C', '\\x8D', '\\x8E', '\\x8F', // x8F '\\x90', '\\x91', '\\x92', '\\x93', '\\x94', '\\x95', '\\x96', '\\x97', // x97 '\\x98', '\\x99', '\\x9A', '\\x9B', '\\x9C', '\\x9D', '\\x9E', '\\x9F', // x9F ]; // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot const isUndetectableObject = (v) => typeof v === "undefined" && v !== undefined; const strEscapeSequencesReplacer = new SafeRegExp( "[\x00-\x1f\x27\x5c\x7f-\x9f]", "g", ); const keyStrRegExp = new SafeRegExp("^[a-zA-Z_][a-zA-Z_0-9]*$"); const numberRegExp = new SafeRegExp("^(0|[1-9][0-9]*)$"); // TODO(wafuwafu13): Figure out const escapeFn = (str) => meta[StringPrototypeCharCodeAt(str, 0)]; function stylizeNoColor(str) { return str; } // node custom inspect symbol const nodeCustomInspectSymbol = SymbolFor("nodejs.util.inspect.custom"); // This non-unique symbol is used to support op_crates, ie. // in extensions/web we don't want to depend on public // Symbol.for("Deno.customInspect") symbol defined in the public API. // Internal only, shouldn't be used by users. const privateCustomInspect = SymbolFor("Deno.privateCustomInspect"); function getUserOptions(ctx, isCrossContext) { const ret = { stylize: ctx.stylize, showHidden: ctx.showHidden, depth: ctx.depth, colors: ctx.colors, customInspect: ctx.customInspect, showProxy: ctx.showProxy, maxArrayLength: ctx.maxArrayLength, maxStringLength: ctx.maxStringLength, breakLength: ctx.breakLength, compact: ctx.compact, sorted: ctx.sorted, getters: ctx.getters, numericSeparator: ctx.numericSeparator, ...ctx.userOptions, }; // Typically, the target value will be an instance of `Object`. If that is // *not* the case, the object may come from another vm.Context, and we want // to avoid passing it objects from this Context in that case, so we remove // the prototype from the returned object itself + the `stylize()` function, // and remove all other non-primitives, including non-primitive user options. if (isCrossContext) { ObjectSetPrototypeOf(ret, null); for (const key of new SafeArrayIterator(ObjectKeys(ret))) { if ( (typeof ret[key] === "object" || typeof ret[key] === "function") && ret[key] !== null ) { delete ret[key]; } } ret.stylize = ObjectSetPrototypeOf((value, flavour) => { let stylized; try { stylized = `${ctx.stylize(value, flavour)}`; } catch { // Continue regardless of error. } if (typeof stylized !== "string") return value; // `stylized` is a string as it should be, which is safe to pass along. return stylized; }, null); } return ret; } // Note: using `formatValue` directly requires the indentation level to be // corrected by setting `ctx.indentationLvL += diff` and then to decrease the // value afterwards again. function formatValue( ctx, value, recurseTimes, typedArray, ) { // Primitive types cannot have properties. if ( typeof value !== "object" && typeof value !== "function" && !isUndetectableObject(value) ) { return formatPrimitive(ctx.stylize, value, ctx); } if (value === null) { return ctx.stylize("null", "null"); } // Memorize the context for custom inspection on proxies. const context = value; // Always check for proxies to prevent side effects and to prevent triggering // any proxy handlers. // TODO(wafuwafu13): Set Proxy const proxyDetails = core.getProxyDetails(value); // const proxy = getProxyDetails(value, !!ctx.showProxy); // if (proxy !== undefined) { // if (ctx.showProxy) { // return formatProxy(ctx, proxy, recurseTimes); // } // value = proxy; // } // Provide a hook for user-specified inspect functions. // Check that value is an object with an inspect function on it. if (ctx.customInspect) { if ( ReflectHas(value, customInspect) && typeof value[customInspect] === "function" ) { return String(value[customInspect](inspect, ctx)); } else if ( ReflectHas(value, privateCustomInspect) && typeof value[privateCustomInspect] === "function" ) { // TODO(nayeemrmn): `inspect` is passed as an argument because custom // inspect implementations in `extensions` need it, but may not have access // to the `Deno` namespace in web workers. Remove when the `Deno` // namespace is always enabled. return String(value[privateCustomInspect](inspect, ctx)); } else if (ReflectHas(value, nodeCustomInspectSymbol)) { const maybeCustom = value[nodeCustomInspectSymbol]; if ( typeof maybeCustom === "function" && // Filter out the util module, its inspect function is special. maybeCustom !== ctx.inspect && // Also filter out any prototype objects using the circular check. !(value.constructor && value.constructor.prototype === value) ) { // This makes sure the recurseTimes are reported as before while using // a counter internally. const depth = ctx.depth === null ? null : ctx.depth - recurseTimes; // TODO(@crowlKats): proxy handling const isCrossContext = !ObjectPrototypeIsPrototypeOf( ObjectPrototype, context, ); const ret = FunctionPrototypeCall( maybeCustom, context, depth, getUserOptions(ctx, isCrossContext), ctx.inspect, ); // If the custom inspection method returned `this`, don't go into // infinite recursion. if (ret !== context) { if (typeof ret !== "string") { return formatValue(ctx, ret, recurseTimes); } return StringPrototypeReplaceAll( ret, "\n", `\n${StringPrototypeRepeat(" ", ctx.indentationLvl)}`, ); } } } } // Using an array here is actually better for the average case than using // a Set. `seen` will only check for the depth and will never grow too large. if (ArrayPrototypeIncludes(ctx.seen, value)) { let index = 1; if (ctx.circular === undefined) { ctx.circular = new SafeMap(); MapPrototypeSet(ctx.circular, value, index); } else { index = ctx.circular.get(value); if (index === undefined) { index = ctx.circular.size + 1; MapPrototypeSet(ctx.circular, value, index); } } return ctx.stylize(`[Circular *${index}]`, "special"); } return formatRaw(ctx, value, recurseTimes, typedArray, proxyDetails); } function getClassBase(value, constructor, tag) { const hasName = ObjectHasOwn(value, "name"); const name = (hasName && value.name) || "(anonymous)"; let base = `class ${name}`; if (constructor !== "Function" && constructor !== null) { base += ` [${constructor}]`; } if (tag !== "" && constructor !== tag) { base += ` [${tag}]`; } if (constructor !== null) { const superName = ObjectGetPrototypeOf(value).name; if (superName) { base += ` extends ${superName}`; } } else { base += " extends [null prototype]"; } return `[${base}]`; } const stripCommentsRegExp = new SafeRegExp( "(\\/\\/.*?\\n)|(\\/\\*(.|\\n)*?\\*\\/)", "g", ); const classRegExp = new SafeRegExp("^(\\s+[^(]*?)\\s*{"); function getFunctionBase(value, constructor, tag) { const stringified = FunctionPrototypeToString(value); if ( StringPrototypeStartsWith(stringified, "class") && StringPrototypeEndsWith(stringified, "}") ) { const slice = StringPrototypeSlice(stringified, 5, -1); const bracketIndex = StringPrototypeIndexOf(slice, "{"); if ( bracketIndex !== -1 && (!StringPrototypeIncludes( StringPrototypeSlice(slice, 0, bracketIndex), "(", ) || // Slow path to guarantee that it's indeed a class. RegExpPrototypeExec( classRegExp, RegExpPrototypeSymbolReplace(stripCommentsRegExp, slice), ) !== null) ) { return getClassBase(value, constructor, tag); } } let type = "Function"; if (isGeneratorFunction(value)) { type = `Generator${type}`; } if (isAsyncFunction(value)) { type = `Async${type}`; } let base = `[${type}`; if (constructor === null) { base += " (null prototype)"; } if (value.name === "") { base += " (anonymous)"; } else { base += `: ${value.name}`; } base += "]"; if (constructor !== type && constructor !== null) { base += ` ${constructor}`; } if (tag !== "" && constructor !== tag) { base += ` [${tag}]`; } return base; } function formatRaw(ctx, value, recurseTimes, typedArray, proxyDetails) { let keys; let protoProps; if (ctx.showHidden && (recurseTimes <= ctx.depth || ctx.depth === null)) { protoProps = []; } const constructor = getConstructorName(value, ctx, recurseTimes, protoProps); // Reset the variable to check for this later on. if (protoProps !== undefined && protoProps.length === 0) { protoProps = undefined; } let tag = value[SymbolToStringTag]; // Only list the tag in case it's non-enumerable / not an own property. // Otherwise we'd print this twice. if ( typeof tag !== "string" // TODO(wafuwafu13): Implement // (tag !== "" && // (ctx.showHidden // ? Object.prototype.hasOwnProperty // : Object.prototype.propertyIsEnumerable)( // value, // Symbol.toStringTag, // )) ) { tag = ""; } let base = ""; let formatter = () => []; let braces; let noIterator = true; let i = 0; const filter = ctx.showHidden ? 0 : 2; let extrasType = kObjectType; if (proxyDetails !== null && ctx.showProxy) { return `Proxy ` + formatValue(ctx, proxyDetails, recurseTimes); } else { // Iterators and the rest are split to reduce checks. // We have to check all values in case the constructor is set to null. // Otherwise it would not possible to identify all types properly. if (ReflectHas(value, SymbolIterator) || constructor === null) { noIterator = false; if (ArrayIsArray(value)) { // Only set the constructor for non ordinary ("Array [...]") arrays. const prefix = (constructor !== "Array" || tag !== "") ? getPrefix(constructor, tag, "Array", `(${value.length})`) : ""; keys = op_get_non_index_property_names(value, filter); braces = [`${prefix}[`, "]"]; if ( value.length === 0 && keys.length === 0 && protoProps === undefined ) { return `${braces[0]}]`; } extrasType = kArrayExtrasType; formatter = formatArray; } else if ( (proxyDetails === null && isSet(value)) || (proxyDetails !== null && isSet(proxyDetails[0])) ) { const set = proxyDetails?.[0] ?? value; const size = SetPrototypeGetSize(set); const prefix = getPrefix(constructor, tag, "Set", `(${size})`); keys = getKeys(set, ctx.showHidden); formatter = constructor !== null ? FunctionPrototypeBind(formatSet, null, set) : FunctionPrototypeBind(formatSet, null, SetPrototypeValues(set)); if (size === 0 && keys.length === 0 && protoProps === undefined) { return `${prefix}{}`; } braces = [`${prefix}{`, "}"]; } else if ( (proxyDetails === null && isMap(value)) || (proxyDetails !== null && isMap(proxyDetails[0])) ) { const map = proxyDetails?.[0] ?? value; const size = MapPrototypeGetSize(map); const prefix = getPrefix(constructor, tag, "Map", `(${size})`); keys = getKeys(map, ctx.showHidden); formatter = constructor !== null ? FunctionPrototypeBind(formatMap, null, map) : FunctionPrototypeBind(formatMap, null, MapPrototypeEntries(map)); if (size === 0 && keys.length === 0 && protoProps === undefined) { return `${prefix}{}`; } braces = [`${prefix}{`, "}"]; } else if ( (proxyDetails === null && isTypedArray(value)) || (proxyDetails !== null && isTypedArray(proxyDetails[0])) ) { const typedArray = proxyDetails?.[0] ?? value; keys = op_get_non_index_property_names(typedArray, filter); const bound = typedArray; const fallback = ""; if (constructor === null) { // TODO(wafuwafu13): Implement // fallback = TypedArrayPrototypeGetSymbolToStringTag(value); // // Reconstruct the array information. // bound = new primordials[fallback](value); } const size = TypedArrayPrototypeGetLength(typedArray); const prefix = getPrefix(constructor, tag, fallback, `(${size})`); braces = [`${prefix}[`, "]"]; if (typedArray.length === 0 && keys.length === 0 && !ctx.showHidden) { return `${braces[0]}]`; } // Special handle the value. The original value is required below. The // bound function is required to reconstruct missing information. formatter = FunctionPrototypeBind(formatTypedArray, null, bound, size); extrasType = kArrayExtrasType; } else if ( (proxyDetails === null && isMapIterator(value)) || (proxyDetails !== null && isMapIterator(proxyDetails[0])) ) { const mapIterator = proxyDetails?.[0] ?? value; keys = getKeys(mapIterator, ctx.showHidden); braces = getIteratorBraces("Map", tag); // Add braces to the formatter parameters. formatter = FunctionPrototypeBind(formatIterator, null, braces); } else if ( (proxyDetails === null && isSetIterator(value)) || (proxyDetails !== null && isSetIterator(proxyDetails[0])) ) { const setIterator = proxyDetails?.[0] ?? value; keys = getKeys(setIterator, ctx.showHidden); braces = getIteratorBraces("Set", tag); // Add braces to the formatter parameters. formatter = FunctionPrototypeBind(formatIterator, null, braces); } else { noIterator = true; } } if (noIterator) { keys = getKeys(value, ctx.showHidden); braces = ["{", "}"]; if (constructor === "Object") { if (isArgumentsObject(value)) { braces[0] = "[Arguments] {"; } else if (tag !== "") { braces[0] = `${getPrefix(constructor, tag, "Object")}{`; } if (keys.length === 0 && protoProps === undefined) { return `${braces[0]}}`; } } else if (typeof value === "function") { base = getFunctionBase(value, constructor, tag); if (keys.length === 0 && protoProps === undefined) { return ctx.stylize(base, "special"); } } else if ( (proxyDetails === null && isRegExp(value)) || (proxyDetails !== null && isRegExp(proxyDetails[0])) ) { const regExp = proxyDetails?.[0] ?? value; // Make RegExps say that they are RegExps base = RegExpPrototypeToString( constructor !== null ? regExp : new SafeRegExp(regExp), ); const prefix = getPrefix(constructor, tag, "RegExp"); if (prefix !== "RegExp ") { base = `${prefix}${base}`; } if ( (keys.length === 0 && protoProps === undefined) || (recurseTimes > ctx.depth && ctx.depth !== null) ) { return ctx.stylize(base, "regexp"); } } else if ( (proxyDetails === null && isDate(value)) || (proxyDetails !== null && isDate(proxyDetails[0])) ) { const date = proxyDetails?.[0] ?? value; if (NumberIsNaN(DatePrototypeGetTime(date))) { return ctx.stylize("Invalid Date", "date"); } else { base = DatePrototypeToISOString(date); if (keys.length === 0 && protoProps === undefined) { return ctx.stylize(base, "date"); } } } else if ( proxyDetails === null && typeof globalThis.Temporal !== "undefined" && ( ObjectPrototypeIsPrototypeOf( globalThis.Temporal.Instant.prototype, value, ) || ObjectPrototypeIsPrototypeOf( globalThis.Temporal.ZonedDateTime.prototype, value, ) || ObjectPrototypeIsPrototypeOf( globalThis.Temporal.PlainDate.prototype, value, ) || ObjectPrototypeIsPrototypeOf( globalThis.Temporal.PlainTime.prototype, value, ) || ObjectPrototypeIsPrototypeOf( globalThis.Temporal.PlainDateTime.prototype, value, ) || ObjectPrototypeIsPrototypeOf( globalThis.Temporal.PlainYearMonth.prototype, value, ) || ObjectPrototypeIsPrototypeOf( globalThis.Temporal.PlainMonthDay.prototype, value, ) || ObjectPrototypeIsPrototypeOf( globalThis.Temporal.Duration.prototype, value, ) || ObjectPrototypeIsPrototypeOf( globalThis.Temporal.TimeZone.prototype, value, ) || ObjectPrototypeIsPrototypeOf( globalThis.Temporal.Calendar.prototype, value, ) ) ) { // Temporal is not available in primordials yet // deno-lint-ignore prefer-primordials return ctx.stylize(value.toString(), "temporal"); } else if ( (proxyDetails === null && (isNativeError(value) || ObjectPrototypeIsPrototypeOf(ErrorPrototype, value))) || (proxyDetails !== null && (isNativeError(proxyDetails[0]) || ObjectPrototypeIsPrototypeOf(ErrorPrototype, proxyDetails[0]))) ) { const error = proxyDetails?.[0] ?? value; base = inspectError(error, ctx); if (keys.length === 0 && protoProps === undefined) { return base; } } else if (isAnyArrayBuffer(value)) { // Fast path for ArrayBuffer and SharedArrayBuffer. // Can't do the same for DataView because it has a non-primitive // .buffer property that we need to recurse for. const arrayType = isArrayBuffer(value) ? "ArrayBuffer" : "SharedArrayBuffer"; const prefix = getPrefix(constructor, tag, arrayType); if (typedArray === undefined) { formatter = formatArrayBuffer; } else if (keys.length === 0 && protoProps === undefined) { return prefix + `{ byteLength: ${ formatNumber(ctx.stylize, TypedArrayPrototypeGetByteLength(value)) } }`; } braces[0] = `${prefix}{`; ArrayPrototypeUnshift(keys, "byteLength"); } else if (isDataView(value)) { braces[0] = `${getPrefix(constructor, tag, "DataView")}{`; // .buffer goes last, it's not a primitive like the others. ArrayPrototypeUnshift(keys, "byteLength", "byteOffset", "buffer"); } else if (isPromise(value)) { braces[0] = `${getPrefix(constructor, tag, "Promise")}{`; formatter = formatPromise; } else if (isWeakSet(value)) { braces[0] = `${getPrefix(constructor, tag, "WeakSet")}{`; formatter = ctx.showHidden ? formatWeakSet : formatWeakCollection; } else if (isWeakMap(value)) { braces[0] = `${getPrefix(constructor, tag, "WeakMap")}{`; formatter = ctx.showHidden ? formatWeakMap : formatWeakCollection; } else if (isModuleNamespaceObject(value)) { braces[0] = `${getPrefix(constructor, tag, "Module")}{`; // Special handle keys for namespace objects. formatter = FunctionPrototypeBind(formatNamespaceObject, null, keys); } else if (isBoxedPrimitive(value)) { base = getBoxedBase(value, ctx, keys, constructor, tag); if (keys.length === 0 && protoProps === undefined) { return base; } } else { if (keys.length === 0 && protoProps === undefined) { // TODO(wafuwafu13): Implement // if (isExternal(value)) { // const address = getExternalValue(value).toString(16); // return ctx.stylize(`[External: ${address}]`, 'special'); // } return `${getCtxStyle(value, constructor, tag)}{}`; } braces[0] = `${getCtxStyle(value, constructor, tag)}{`; } } } if (recurseTimes > ctx.depth && ctx.depth !== null) { let constructorName = StringPrototypeSlice( getCtxStyle(value, constructor, tag), 0, -1, ); if (constructor !== null) { constructorName = `[${constructorName}]`; } return ctx.stylize(constructorName, "special"); } recurseTimes += 1; ArrayPrototypePush(ctx.seen, value); ctx.currentDepth = recurseTimes; let output; try { output = formatter(ctx, value, recurseTimes); for (i = 0; i < keys.length; i++) { ArrayPrototypePush( output, formatProperty(ctx, value, recurseTimes, keys[i], extrasType), ); } if (protoProps !== undefined) { ArrayPrototypePushApply(output, protoProps); } } catch (error) { // TODO(wafuwafu13): Implement stack overflow check return ctx.stylize( `[Internal Formatting Error] ${error.stack}`, "internalError", ); } if (ctx.circular !== undefined) { const index = ctx.circular.get(value); if (index !== undefined) { const reference = ctx.stylize(``, "special"); // Add reference always to the very beginning of the output. if (ctx.compact !== true) { base = base === "" ? reference : `${reference} ${base}`; } else { braces[0] = `${reference} ${braces[0]}`; } } } ArrayPrototypePop(ctx.seen); if (ctx.sorted) { const comparator = ctx.sorted === true ? undefined : ctx.sorted; if (extrasType === kObjectType) { output = ArrayPrototypeSort(output, comparator); } else if (keys.length > 1) { const sorted = ArrayPrototypeSort( ArrayPrototypeSlice(output, output.length - keys.length), comparator, ); ArrayPrototypeSplice( output, output.length - keys.length, keys.length, ...new SafeArrayIterator(sorted), ); } } const res = reduceToSingleString( ctx, output, base, braces, extrasType, recurseTimes, value, ); const budget = ctx.budget[ctx.indentationLvl] || 0; const newLength = budget + res.length; ctx.budget[ctx.indentationLvl] = newLength; // If any indentationLvl exceeds this limit, limit further inspecting to the // minimum. Otherwise the recursive algorithm might continue inspecting the // object even though the maximum string size (~2 ** 28 on 32 bit systems and // ~2 ** 30 on 64 bit systems) exceeded. The actual output is not limited at // exactly 2 ** 27 but a bit higher. This depends on the object shape. // This limit also makes sure that huge objects don't block the event loop // significantly. if (newLength > 2 ** 27) { ctx.depth = -1; } return res; } const builtInObjectsRegExp = new SafeRegExp("^[A-Z][a-zA-Z0-9]+$"); const builtInObjects = new SafeSet( ArrayPrototypeFilter( ObjectGetOwnPropertyNames(globalThis), (e) => RegExpPrototypeTest(builtInObjectsRegExp, e), ), ); function addPrototypeProperties( ctx, main, obj, recurseTimes, output, ) { let depth = 0; let keys; let keySet; do { if (depth !== 0 || main === obj) { obj = ObjectGetPrototypeOf(obj); // Stop as soon as a null prototype is encountered. if (obj === null) { return; } // Stop as soon as a built-in object type is detected. const descriptor = ObjectGetOwnPropertyDescriptor(obj, "constructor"); if ( descriptor !== undefined && typeof descriptor.value === "function" && SetPrototypeHas(builtInObjects, descriptor.value.name) ) { return; } } if (depth === 0) { keySet = new SafeSet(); } else { ArrayPrototypeForEach(keys, (key) => SetPrototypeAdd(keySet, key)); } // Get all own property names and symbols. keys = ReflectOwnKeys(obj); ArrayPrototypePush(ctx.seen, main); for (const key of new SafeArrayIterator(keys)) { // Ignore the `constructor` property and keys that exist on layers above. if ( key === "constructor" || ObjectHasOwn(main, key) || (depth !== 0 && SetPrototypeHas(keySet, key)) ) { continue; } const desc = ObjectGetOwnPropertyDescriptor(obj, key); if (typeof desc.value === "function") { continue; } const value = formatProperty( ctx, obj, recurseTimes, key, kObjectType, desc, main, ); if (ctx.colors) { // Faint! ArrayPrototypePush(output, `\u001b[2m${value}\u001b[22m`); } else { ArrayPrototypePush(output, value); } } ArrayPrototypePop(ctx.seen); // Limit the inspection to up to three prototype layers. Using `recurseTimes` // is not a good choice here, because it's as if the properties are declared // on the current object from the users perspective. } while (++depth !== 3); } function isInstanceof(proto, object) { try { return ObjectPrototypeIsPrototypeOf(proto, object); } catch { return false; } } function getConstructorName(obj, ctx, recurseTimes, protoProps) { let firstProto; const tmp = obj; while (obj || isUndetectableObject(obj)) { let descriptor; try { descriptor = ObjectGetOwnPropertyDescriptor(obj, "constructor"); } catch { /* this could fail */ } if ( descriptor !== undefined && typeof descriptor.value === "function" && descriptor.value.name !== "" && isInstanceof(descriptor.value.prototype, tmp) ) { if ( protoProps !== undefined && (firstProto !== obj || !SetPrototypeHas(builtInObjects, descriptor.value.name)) ) { addPrototypeProperties( ctx, tmp, firstProto || tmp, recurseTimes, protoProps, ); } return String(descriptor.value.name); } obj = ObjectGetPrototypeOf(obj); if (firstProto === undefined) { firstProto = obj; } } if (firstProto === null) { return null; } const res = op_get_constructor_name(tmp); if (recurseTimes > ctx.depth && ctx.depth !== null) { return `${res} `; } const protoConstr = getConstructorName( firstProto, ctx, recurseTimes + 1, protoProps, ); if (protoConstr === null) { return `${res} <${ inspect(firstProto, { ...ctx, customInspect: false, depth: -1, }) }>`; } return `${res} <${protoConstr}>`; } const formatPrimitiveRegExp = new SafeRegExp("(?<=\n)"); function formatPrimitive(fn, value, ctx) { if (typeof value === "string") { let trailer = ""; if (value.length > ctx.maxStringLength) { const remaining = value.length - ctx.maxStringLength; value = StringPrototypeSlice(value, 0, ctx.maxStringLength); trailer = `... ${remaining} more character${remaining > 1 ? "s" : ""}`; } if ( ctx.compact !== true && // TODO(BridgeAR): Add unicode support. Use the readline getStringWidth // function. value.length > kMinLineLength && value.length > ctx.breakLength - ctx.indentationLvl - 4 ) { return ArrayPrototypeJoin( ArrayPrototypeMap( StringPrototypeSplit(value, formatPrimitiveRegExp), (line) => fn(quoteString(line, ctx), "string"), ), ` +\n${StringPrototypeRepeat(" ", ctx.indentationLvl + 2)}`, ) + trailer; } return fn(quoteString(value, ctx), "string") + trailer; } if (typeof value === "number") { return formatNumber(fn, value); } if (typeof value === "bigint") { return formatBigInt(fn, value); } if (typeof value === "boolean") { return fn(`${value}`, "boolean"); } if (typeof value === "undefined") { return fn("undefined", "undefined"); } // es6 symbol primitive return fn(maybeQuoteSymbol(value, ctx), "symbol"); } function getPrefix(constructor, tag, fallback, size = "") { if (constructor === null) { if (tag !== "" && fallback !== tag) { return `[${fallback}${size}: null prototype] [${tag}] `; } return `[${fallback}${size}: null prototype] `; } if (tag !== "" && constructor !== tag) { return `${constructor}${size} [${tag}] `; } return `${constructor}${size} `; } function formatArray(ctx, value, recurseTimes) { const valLen = value.length; const len = MathMin(MathMax(0, ctx.maxArrayLength), valLen); const remaining = valLen - len; const output = []; for (let i = 0; i < len; i++) { // Special handle sparse arrays. if (!ObjectHasOwn(value, i)) { return formatSpecialArray(ctx, value, recurseTimes, len, output, i); } ArrayPrototypePush( output, formatProperty(ctx, value, recurseTimes, i, kArrayType), ); } if (remaining > 0) { ArrayPrototypePush( output, `... ${remaining} more item${remaining > 1 ? "s" : ""}`, ); } return output; } function getCtxStyle(value, constructor, tag) { let fallback = ""; if (constructor === null) { fallback = op_get_constructor_name(value); if (fallback === tag) { fallback = "Object"; } } return getPrefix(constructor, tag, fallback); } // Look up the keys of the object. function getKeys(value, showHidden) { let keys; const symbols = ObjectGetOwnPropertySymbols(value); if (showHidden) { keys = ObjectGetOwnPropertyNames(value); if (symbols.length !== 0) { ArrayPrototypePushApply(keys, symbols); } } else { // This might throw if `value` is a Module Namespace Object from an // unevaluated module, but we don't want to perform the actual type // check because it's expensive. // TODO(devsnek): track https://github.com/tc39/ecma262/issues/1209 // and modify this logic as needed. try { keys = ObjectKeys(value); } catch (err) { assert( isNativeError(err) && err.name === "ReferenceError" && isModuleNamespaceObject(value), ); keys = ObjectGetOwnPropertyNames(value); } if (symbols.length !== 0) { const filter = (key) => ObjectPrototypePropertyIsEnumerable(value, key); ArrayPrototypePushApply(keys, ArrayPrototypeFilter(symbols, filter)); } } return keys; } function formatSet(value, ctx, _ignored, recurseTimes) { ctx.indentationLvl += 2; const values = [...new SafeSetIterator(value)]; const valLen = SetPrototypeGetSize(value); const len = MathMin(MathMax(0, ctx.iterableLimit), valLen); const remaining = valLen - len; const output = []; for (let i = 0; i < len; i++) { ArrayPrototypePush(output, formatValue(ctx, values[i], recurseTimes)); } if (remaining > 0) { ArrayPrototypePush( output, `... ${remaining} more item${remaining > 1 ? "s" : ""}`, ); } ctx.indentationLvl -= 2; return output; } function formatMap(value, ctx, _ignored, recurseTimes) { ctx.indentationLvl += 2; const values = [...new SafeMapIterator(value)]; const valLen = MapPrototypeGetSize(value); const len = MathMin(MathMax(0, ctx.iterableLimit), valLen); const remaining = valLen - len; const output = []; for (let i = 0; i < len; i++) { ArrayPrototypePush( output, `${formatValue(ctx, values[i][0], recurseTimes)} => ${ formatValue(ctx, values[i][1], recurseTimes) }`, ); } if (remaining > 0) { ArrayPrototypePush( output, `... ${remaining} more item${remaining > 1 ? "s" : ""}`, ); } ctx.indentationLvl -= 2; return output; } function formatTypedArray( value, length, ctx, _ignored, recurseTimes, ) { const maxLength = MathMin(MathMax(0, ctx.maxArrayLength), length); const remaining = value.length - maxLength; const output = []; const elementFormatter = value.length > 0 && typeof value[0] === "number" ? formatNumber : formatBigInt; for (let i = 0; i < maxLength; ++i) { output[i] = elementFormatter(ctx.stylize, value[i]); } if (remaining > 0) { output[maxLength] = `... ${remaining} more item${remaining > 1 ? "s" : ""}`; } if (ctx.showHidden) { // .buffer goes last, it's not a primitive like the others. // All besides `BYTES_PER_ELEMENT` are actually getters. ctx.indentationLvl += 2; for ( const key of new SafeArrayIterator([ "BYTES_PER_ELEMENT", "length", "byteLength", "byteOffset", "buffer", ]) ) { const str = formatValue(ctx, value[key], recurseTimes, true); ArrayPrototypePush(output, `[${key}]: ${str}`); } ctx.indentationLvl -= 2; } return output; } function getIteratorBraces(type, tag) { if (tag !== `${type} Iterator`) { if (tag !== "") { tag += "] ["; } tag += `${type} Iterator`; } return [`[${tag}] {`, "}"]; } const iteratorRegExp = new SafeRegExp(" Iterator] {$"); function formatIterator(braces, ctx, value, recurseTimes) { const { 0: entries, 1: isKeyValue } = op_preview_entries(value, true); if (isKeyValue) { // Mark entry iterators as such. braces[0] = StringPrototypeReplace( braces[0], iteratorRegExp, " Entries] {", ); return formatMapIterInner(ctx, recurseTimes, entries, kMapEntries); } return formatSetIterInner(ctx, recurseTimes, entries, kIterator); } function handleCircular(value, ctx) { let index = 1; if (ctx.circular === undefined) { ctx.circular = new SafeMap(); MapPrototypeSet(ctx.circular, value, index); } else { index = MapPrototypeGet(ctx.circular, value); if (index === undefined) { index = MapPrototypeGetSize(ctx.circular) + 1; MapPrototypeSet(ctx.circular, value, index); } } // Circular string is cyan return ctx.stylize(`[Circular *${index}]`, "special"); } const AGGREGATE_ERROR_HAS_AT_PATTERN = new SafeRegExp(/\s+at/); const AGGREGATE_ERROR_NOT_EMPTY_LINE_PATTERN = new SafeRegExp(/^(?!\s*$)/gm); function inspectError(value, ctx) { const causes = [value]; let err = value; while (err.cause) { if (ArrayPrototypeIncludes(causes, err.cause)) { ArrayPrototypePush(causes, handleCircular(err.cause, ctx)); break; } else { ArrayPrototypePush(causes, err.cause); err = err.cause; } } const refMap = new SafeMap(); for (let i = 0; i < causes.length; ++i) { const cause = causes[i]; if (ctx.circular !== undefined) { const index = MapPrototypeGet(ctx.circular, cause); if (index !== undefined) { MapPrototypeSet( refMap, cause, ctx.stylize(` `, "special"), ); } } } ArrayPrototypeShift(causes); let finalMessage = MapPrototypeGet(refMap, value) ?? ""; if (isAggregateError(value)) { const stackLines = StringPrototypeSplit(value.stack, "\n"); while (true) { const line = ArrayPrototypeShift(stackLines); if (RegExpPrototypeTest(AGGREGATE_ERROR_HAS_AT_PATTERN, line)) { ArrayPrototypeUnshift(stackLines, line); break; } else if (typeof line === "undefined") { break; } finalMessage += line; finalMessage += "\n"; } const aggregateMessage = ArrayPrototypeJoin( ArrayPrototypeMap( value.errors, (error) => StringPrototypeReplace( inspectArgs([error]), AGGREGATE_ERROR_NOT_EMPTY_LINE_PATTERN, StringPrototypeRepeat(" ", 4), ), ), "\n", ); finalMessage += aggregateMessage; finalMessage += "\n"; finalMessage += ArrayPrototypeJoin(stackLines, "\n"); } else { const stack = value.stack; if (stack?.includes("\n at")) { finalMessage += stack; } else { finalMessage += `[${stack || ErrorPrototypeToString(value)}]`; } } finalMessage += ArrayPrototypeJoin( ArrayPrototypeMap( causes, (cause) => "\nCaused by " + (MapPrototypeGet(refMap, cause) ?? "") + (cause?.stack ?? cause), ), "", ); return finalMessage; } const hexSliceLookupTable = function () { const alphabet = "0123456789abcdef"; const table = []; for (let i = 0; i < 16; ++i) { const i16 = i * 16; for (let j = 0; j < 16; ++j) { table[i16 + j] = alphabet[i] + alphabet[j]; } } return table; }(); function hexSlice(buf, start, end) { const len = TypedArrayPrototypeGetLength(buf); if (!start || start < 0) { start = 0; } if (!end || end < 0 || end > len) { end = len; } let out = ""; for (let i = start; i < end; ++i) { out += hexSliceLookupTable[buf[i]]; } return out; } const arrayBufferRegExp = new SafeRegExp("(.{2})", "g"); function formatArrayBuffer(ctx, value) { let valLen; try { valLen = ArrayBufferPrototypeGetByteLength(value); } catch { valLen = getSharedArrayBufferByteLength(value); } const len = MathMin(MathMax(0, ctx.maxArrayLength), valLen); let buffer; try { buffer = new Uint8Array(value, 0, len); } catch { return [ctx.stylize("(detached)", "special")]; } let str = StringPrototypeTrim( StringPrototypeReplace(hexSlice(buffer), arrayBufferRegExp, "$1 "), ); const remaining = valLen - len; if (remaining > 0) { str += ` ... ${remaining} more byte${remaining > 1 ? "s" : ""}`; } return [`${ctx.stylize("[Uint8Contents]", "special")}: <${str}>`]; } function formatNumber(fn, value) { // Format -0 as '-0'. Checking `value === -0` won't distinguish 0 from -0. return fn(ObjectIs(value, -0) ? "-0" : `${value}`, "number"); } const PromiseState = { Pending: 0, Fulfilled: 1, Rejected: 2, }; function formatPromise(ctx, value, recurseTimes) { let output; const { 0: state, 1: result } = core.getPromiseDetails(value); if (state === PromiseState.Pending) { output = [ctx.stylize("", "special")]; } else { ctx.indentationLvl += 2; const str = formatValue(ctx, result, recurseTimes); ctx.indentationLvl -= 2; output = [ state === PromiseState.Rejected ? `${ctx.stylize("", "special")} ${str}` : str, ]; } return output; } function formatWeakCollection(ctx) { return [ctx.stylize("", "special")]; } function formatWeakSet(ctx, value, recurseTimes) { const entries = op_preview_entries(value, false); return formatSetIterInner(ctx, recurseTimes, entries, kWeak); } function formatWeakMap(ctx, value, recurseTimes) { const entries = op_preview_entries(value, false); return formatMapIterInner(ctx, recurseTimes, entries, kWeak); } function formatProperty( ctx, value, recurseTimes, key, type, desc, original = value, ) { let name, str; let extra = " "; desc = desc || ObjectGetOwnPropertyDescriptor(value, key) || { value: value[key], enumerable: true }; if (desc.value !== undefined) { const diff = (ctx.compact !== true || type !== kObjectType) ? 2 : 3; ctx.indentationLvl += diff; str = formatValue(ctx, desc.value, recurseTimes); if (diff === 3 && ctx.breakLength < getStringWidth(str, ctx.colors)) { extra = `\n${StringPrototypeRepeat(" ", ctx.indentationLvl)}`; } ctx.indentationLvl -= diff; } else if (desc.get !== undefined) { const label = desc.set !== undefined ? "Getter/Setter" : "Getter"; const s = ctx.stylize; const sp = "special"; if ( ctx.getters && (ctx.getters === true || (ctx.getters === "get" && desc.set === undefined) || (ctx.getters === "set" && desc.set !== undefined)) ) { try { const tmp = FunctionPrototypeCall(desc.get, original); ctx.indentationLvl += 2; if (tmp === null) { str = `${s(`[${label}:`, sp)} ${s("null", "null")}${s("]", sp)}`; } else if (typeof tmp === "object") { str = `${s(`[${label}]`, sp)} ${formatValue(ctx, tmp, recurseTimes)}`; } else { const primitive = formatPrimitive(s, tmp, ctx); str = `${s(`[${label}:`, sp)} ${primitive}${s("]", sp)}`; } ctx.indentationLvl -= 2; } catch (err) { const message = ``; str = `${s(`[${label}:`, sp)} ${message}${s("]", sp)}`; } } else { str = ctx.stylize(`[${label}]`, sp); } } else if (desc.set !== undefined) { str = ctx.stylize("[Setter]", "special"); } else { str = ctx.stylize("undefined", "undefined"); } if (type === kArrayType) { return str; } if (typeof key === "symbol") { name = `[${ctx.stylize(maybeQuoteSymbol(key, ctx), "symbol")}]`; } else if (key === "__proto__") { name = "['__proto__']"; } else if (desc.enumerable === false) { const tmp = StringPrototypeReplace( key, strEscapeSequencesReplacer, escapeFn, ); name = `[${tmp}]`; } else if (keyStrRegExp.test(key)) { name = ctx.stylize(key, "name"); } else { name = ctx.stylize(quoteString(key, ctx), "string"); } return `${name}:${extra}${str}`; } const colorRegExp = new SafeRegExp("\u001b\\[\\d\\d?m", "g"); function removeColors(str) { return StringPrototypeReplace(str, colorRegExp, ""); } function isBelowBreakLength(ctx, output, start, base) { // Each entry is separated by at least a comma. Thus, we start with a total // length of at least `output.length`. In addition, some cases have a // whitespace in-between each other that is added to the total as well. // TODO(BridgeAR): Add unicode support. Use the readline getStringWidth // function. Check the performance overhead and make it an opt-in in case it's // significant. let totalLength = output.length + start; if (totalLength + output.length > ctx.breakLength) { return false; } for (let i = 0; i < output.length; i++) { if (ctx.colors) { totalLength += removeColors(output[i]).length; } else { totalLength += output[i].length; } if (totalLength > ctx.breakLength) { return false; } } // Do not line up properties on the same line if `base` contains line breaks. return base === "" || !StringPrototypeIncludes(base, "\n"); } function formatBigInt(fn, value) { return fn(`${value}n`, "bigint"); } function formatNamespaceObject( keys, ctx, value, recurseTimes, ) { const output = []; for (let i = 0; i < keys.length; i++) { try { output[i] = formatProperty( ctx, value, recurseTimes, keys[i], kObjectType, ); } catch (_err) { // TODO(wafuwfu13): Implement // assert(isNativeError(err) && err.name === 'ReferenceError'); // Use the existing functionality. This makes sure the indentation and // line breaks are always correct. Otherwise it is very difficult to keep // this aligned, even though this is a hacky way of dealing with this. const tmp = { [keys[i]]: "" }; output[i] = formatProperty(ctx, tmp, recurseTimes, keys[i], kObjectType); const pos = StringPrototypeLastIndexOf(output[i], " "); // We have to find the last whitespace and have to replace that value as // it will be visualized as a regular string. output[i] = StringPrototypeSlice(output[i], 0, pos + 1) + ctx.stylize("", "special"); } } // Reset the keys to an empty array. This prevents duplicated inspection. keys.length = 0; return output; } // The array is sparse and/or has extra keys function formatSpecialArray( ctx, value, recurseTimes, maxLength, output, i, ) { const keys = ObjectKeys(value); let index = i; for (; i < keys.length && output.length < maxLength; i++) { const key = keys[i]; const tmp = +key; // Arrays can only have up to 2^32 - 1 entries if (tmp > 2 ** 32 - 2) { break; } if (`${index}` !== key) { if (!numberRegExp.test(key)) { break; } const emptyItems = tmp - index; const ending = emptyItems > 1 ? "s" : ""; const message = `<${emptyItems} empty item${ending}>`; ArrayPrototypePush(output, ctx.stylize(message, "undefined")); index = tmp; if (output.length === maxLength) { break; } } ArrayPrototypePush( output, formatProperty(ctx, value, recurseTimes, key, kArrayType), ); index++; } const remaining = value.length - index; if (output.length !== maxLength) { if (remaining > 0) { const ending = remaining > 1 ? "s" : ""; const message = `<${remaining} empty item${ending}>`; ArrayPrototypePush(output, ctx.stylize(message, "undefined")); } } else if (remaining > 0) { ArrayPrototypePush( output, `... ${remaining} more item${remaining > 1 ? "s" : ""}`, ); } return output; } function getBoxedBase( value, ctx, keys, constructor, tag, ) { let type, primitive; if (isNumberObject(value)) { type = "Number"; primitive = NumberPrototypeValueOf(value); } else if (isStringObject(value)) { type = "String"; primitive = StringPrototypeValueOf(value); // For boxed Strings, we have to remove the 0-n indexed entries, // since they just noisy up the output and are redundant // Make boxed primitive Strings look like such ArrayPrototypeSplice(keys, 0, value.length); } else if (isBooleanObject(value)) { type = "Boolean"; primitive = BooleanPrototypeValueOf(value); } else if (isBigIntObject(value)) { type = "BigInt"; primitive = BigIntPrototypeValueOf(value); } else { type = "Symbol"; primitive = SymbolPrototypeValueOf(value); } let base = `[${type}`; if (type !== constructor) { if (constructor === null) { base += " (null prototype)"; } else { base += ` (${constructor})`; } } base += `: ${formatPrimitive(stylizeNoColor, primitive, ctx)}]`; if (tag !== "" && tag !== constructor) { base += ` [${tag}]`; } if (keys.length !== 0 || ctx.stylize === stylizeNoColor) { return base; } return ctx.stylize(base, StringPrototypeToLowerCase(type)); } function reduceToSingleString( ctx, output, base, braces, extrasType, recurseTimes, value, ) { if (ctx.compact !== true) { if (typeof ctx.compact === "number" && ctx.compact >= 1) { // Memorize the original output length. In case the output is grouped, // prevent lining up the entries on a single line. const entries = output.length; // Group array elements together if the array contains at least six // separate entries. if (extrasType === kArrayExtrasType && entries > 6) { output = groupArrayElements(ctx, output, value); } // `ctx.currentDepth` is set to the most inner depth of the currently // inspected object part while `recurseTimes` is the actual current depth // that is inspected. // // Example: // // const a = { first: [ 1, 2, 3 ], second: { inner: [ 1, 2, 3 ] } } // // The deepest depth of `a` is 2 (a.second.inner) and `a.first` has a max // depth of 1. // // Consolidate all entries of the local most inner depth up to // `ctx.compact`, as long as the properties are smaller than // `ctx.breakLength`. if ( ctx.currentDepth - recurseTimes < ctx.compact && entries === output.length ) { // Line up all entries on a single line in case the entries do not // exceed `breakLength`. Add 10 as constant to start next to all other // factors that may reduce `breakLength`. const start = output.length + ctx.indentationLvl + braces[0].length + base.length + 10; if (isBelowBreakLength(ctx, output, start, base)) { const joinedOutput = ArrayPrototypeJoin(output, ", "); if (!StringPrototypeIncludes(joinedOutput, "\n")) { return `${base ? `${base} ` : ""}${braces[0]} ${joinedOutput}` + ` ${braces[1]}`; } } } } // Line up each entry on an individual line. const indentation = `\n${StringPrototypeRepeat(" ", ctx.indentationLvl)}`; return `${base ? `${base} ` : ""}${braces[0]}${indentation} ` + `${ArrayPrototypeJoin(output, `,${indentation} `)}${ ctx.trailingComma ? "," : "" }${indentation}${braces[1]}`; } // Line up all entries on a single line in case the entries do not exceed // `breakLength`. if (isBelowBreakLength(ctx, output, 0, base)) { return `${braces[0]}${base ? ` ${base}` : ""} ${ ArrayPrototypeJoin(output, ", ") } ` + braces[1]; } const indentation = StringPrototypeRepeat(" ", ctx.indentationLvl); // If the opening "brace" is too large, like in the case of "Set {", // we need to force the first item to be on the next line or the // items will not line up correctly. const ln = base === "" && braces[0].length === 1 ? " " : `${base ? ` ${base}` : ""}\n${indentation} `; // Line up each entry on an individual line. return `${braces[0]}${ln}${ ArrayPrototypeJoin(output, `,\n${indentation} `) } ${braces[1]}`; } function groupArrayElements(ctx, output, value) { let totalLength = 0; let maxLength = 0; let i = 0; let outputLength = output.length; if (ctx.maxArrayLength < output.length) { // This makes sure the "... n more items" part is not taken into account. outputLength--; } const separatorSpace = 2; // Add 1 for the space and 1 for the separator. const dataLen = []; // Calculate the total length of all output entries and the individual max // entries length of all output entries. We have to remove colors first, // otherwise the length would not be calculated properly. for (; i < outputLength; i++) { const len = getStringWidth(output[i], ctx.colors); dataLen[i] = len; totalLength += len + separatorSpace; if (maxLength < len) { maxLength = len; } } // Add two to `maxLength` as we add a single whitespace character plus a comma // in-between two entries. const actualMax = maxLength + separatorSpace; // Check if at least three entries fit next to each other and prevent grouping // of arrays that contains entries of very different length (i.e., if a single // entry is longer than 1/5 of all other entries combined). Otherwise the // space in-between small entries would be enormous. if ( actualMax * 3 + ctx.indentationLvl < ctx.breakLength && (totalLength / actualMax > 5 || maxLength <= 6) ) { const approxCharHeights = 2.5; const averageBias = MathSqrt(actualMax - totalLength / output.length); const biasedMax = MathMax(actualMax - 3 - averageBias, 1); // Dynamically check how many columns seem possible. const columns = MathMin( // Ideally a square should be drawn. We expect a character to be about 2.5 // times as high as wide. This is the area formula to calculate a square // which contains n rectangles of size `actualMax * approxCharHeights`. // Divide that by `actualMax` to receive the correct number of columns. // The added bias increases the columns for short entries. MathRound( MathSqrt( approxCharHeights * biasedMax * outputLength, ) / biasedMax, ), // Do not exceed the breakLength. MathFloor((ctx.breakLength - ctx.indentationLvl) / actualMax), // Limit array grouping for small `compact` modes as the user requested // minimal grouping. ctx.compact * 4, // Limit the columns to a maximum of fifteen. 15, ); // Return with the original output if no grouping should happen. if (columns <= 1) { return output; } const tmp = []; const maxLineLength = []; for (let i = 0; i < columns; i++) { let lineMaxLength = 0; for (let j = i; j < output.length; j += columns) { if (dataLen[j] > lineMaxLength) { lineMaxLength = dataLen[j]; } } lineMaxLength += separatorSpace; maxLineLength[i] = lineMaxLength; } let order = StringPrototypePadStart; if (value !== undefined) { for (let i = 0; i < output.length; i++) { if (typeof value[i] !== "number" && typeof value[i] !== "bigint") { order = StringPrototypePadEnd; break; } } } // Each iteration creates a single line of grouped entries. for (let i = 0; i < outputLength; i += columns) { // The last lines may contain less entries than columns. const max = MathMin(i + columns, outputLength); let str = ""; let j = i; for (; j < max - 1; j++) { // Calculate extra color padding in case it's active. This has to be // done line by line as some lines might contain more colors than // others. const padding = maxLineLength[j - i] + output[j].length - dataLen[j]; str += order(`${output[j]}, `, padding, " "); } if (order === StringPrototypePadStart) { const padding = maxLineLength[j - i] + output[j].length - dataLen[j] - separatorSpace; str += StringPrototypePadStart(output[j], padding, " "); } else { str += output[j]; } ArrayPrototypePush(tmp, str); } if (ctx.maxArrayLength < output.length) { ArrayPrototypePush(tmp, output[outputLength]); } output = tmp; } return output; } function formatMapIterInner( ctx, recurseTimes, entries, state, ) { const maxArrayLength = MathMax(ctx.maxArrayLength, 0); // Entries exist as [key1, val1, key2, val2, ...] const len = entries.length / 2; const remaining = len - maxArrayLength; const maxLength = MathMin(maxArrayLength, len); const output = []; let i = 0; ctx.indentationLvl += 2; if (state === kWeak) { for (; i < maxLength; i++) { const pos = i * 2; output[i] = `${formatValue(ctx, entries[pos], recurseTimes)} => ${ formatValue(ctx, entries[pos + 1], recurseTimes) }`; } // Sort all entries to have a halfway reliable output (if more entries than // retrieved ones exist, we can not reliably return the same output) if the // output is not sorted anyway. if (!ctx.sorted) { ArrayPrototypeSort(output); } } else { for (; i < maxLength; i++) { const pos = i * 2; const res = [ formatValue(ctx, entries[pos], recurseTimes), formatValue(ctx, entries[pos + 1], recurseTimes), ]; output[i] = reduceToSingleString( ctx, res, "", ["[", "]"], kArrayExtrasType, recurseTimes, ); } } ctx.indentationLvl -= 2; if (remaining > 0) { ArrayPrototypePush( output, `... ${remaining} more item${remaining > 1 ? "s" : ""}`, ); } return output; } function formatSetIterInner( ctx, recurseTimes, entries, state, ) { const maxArrayLength = MathMax(ctx.maxArrayLength, 0); const maxLength = MathMin(maxArrayLength, entries.length); const output = []; ctx.indentationLvl += 2; for (let i = 0; i < maxLength; i++) { output[i] = formatValue(ctx, entries[i], recurseTimes); } ctx.indentationLvl -= 2; if (state === kWeak && !ctx.sorted) { // Sort all entries to have a halfway reliable output (if more entries than // retrieved ones exist, we can not reliably return the same output) if the // output is not sorted anyway. ArrayPrototypeSort(output); } const remaining = entries.length - maxLength; if (remaining > 0) { ArrayPrototypePush( output, `... ${remaining} more item${remaining > 1 ? "s" : ""}`, ); } return output; } // Regex used for ansi escape code splitting // Adopted from https://github.com/chalk/ansi-regex/blob/HEAD/index.js // License: MIT, authors: @sindresorhus, Qix-, arjunmehta and LitoMore // Matches all ansi escape code sequences in a string const ansiPattern = "[\\u001B\\u009B][[\\]()#;?]*" + "(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*" + "|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)" + "|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"; const ansi = new SafeRegExp(ansiPattern, "g"); /** * Returns the number of columns required to display the given string. */ export function getStringWidth(str, removeControlChars = true) { let width = 0; if (removeControlChars) { str = stripVTControlCharacters(str); } str = StringPrototypeNormalize(str, "NFC"); for (const char of new SafeStringIterator(str)) { const code = StringPrototypeCodePointAt(char, 0); if (isFullWidthCodePoint(code)) { width += 2; } else if (!isZeroWidthCodePoint(code)) { width++; } } return width; } const isZeroWidthCodePoint = (code) => { return code <= 0x1F || // C0 control codes (code >= 0x7F && code <= 0x9F) || // C1 control codes (code >= 0x300 && code <= 0x36F) || // Combining Diacritical Marks (code >= 0x200B && code <= 0x200F) || // Modifying Invisible Characters // Combining Diacritical Marks for Symbols (code >= 0x20D0 && code <= 0x20FF) || (code >= 0xFE00 && code <= 0xFE0F) || // Variation Selectors (code >= 0xFE20 && code <= 0xFE2F) || // Combining Half Marks (code >= 0xE0100 && code <= 0xE01EF); // Variation Selectors }; /** * Remove all VT control characters. Use to estimate displayed string width. */ export function stripVTControlCharacters(str) { return StringPrototypeReplace(str, ansi, ""); } function hasOwnProperty(obj, v) { if (obj == null) { return false; } return ObjectHasOwn(obj, v); } // Copyright Joyent, Inc. and other Node contributors. MIT license. // Forked from Node's lib/internal/cli_table.js const tableChars = { middleMiddle: "\u2500", rowMiddle: "\u253c", topRight: "\u2510", topLeft: "\u250c", leftMiddle: "\u251c", topMiddle: "\u252c", bottomRight: "\u2518", bottomLeft: "\u2514", bottomMiddle: "\u2534", rightMiddle: "\u2524", left: "\u2502 ", right: " \u2502", middle: " \u2502 ", }; function isFullWidthCodePoint(code) { // Code points are partially derived from: // http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt return ( code >= 0x1100 && (code <= 0x115f || // Hangul Jamo code === 0x2329 || // LEFT-POINTING ANGLE BRACKET code === 0x232a || // RIGHT-POINTING ANGLE BRACKET // CJK Radicals Supplement .. Enclosed CJK Letters and Months (code >= 0x2e80 && code <= 0x3247 && code !== 0x303f) || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A (code >= 0x3250 && code <= 0x4dbf) || // CJK Unified Ideographs .. Yi Radicals (code >= 0x4e00 && code <= 0xa4c6) || // Hangul Jamo Extended-A (code >= 0xa960 && code <= 0xa97c) || // Hangul Syllables (code >= 0xac00 && code <= 0xd7a3) || // CJK Compatibility Ideographs (code >= 0xf900 && code <= 0xfaff) || // Vertical Forms (code >= 0xfe10 && code <= 0xfe19) || // CJK Compatibility Forms .. Small Form Variants (code >= 0xfe30 && code <= 0xfe6b) || // Halfwidth and Fullwidth Forms (code >= 0xff01 && code <= 0xff60) || (code >= 0xffe0 && code <= 0xffe6) || // Kana Supplement (code >= 0x1b000 && code <= 0x1b001) || // Enclosed Ideographic Supplement (code >= 0x1f200 && code <= 0x1f251) || // Miscellaneous Symbols and Pictographs 0x1f300 - 0x1f5ff // Emoticons 0x1f600 - 0x1f64f (code >= 0x1f300 && code <= 0x1f64f) || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane (code >= 0x20000 && code <= 0x3fffd)) ); } function renderRow(row, columnWidths, columnRightAlign) { let out = tableChars.left; for (let i = 0; i < row.length; i++) { const cell = row[i]; const len = getStringWidth(cell); const padding = StringPrototypeRepeat(" ", columnWidths[i] - len); if (columnRightAlign?.[i]) { out += `${padding}${cell}`; } else { out += `${cell}${padding}`; } if (i !== row.length - 1) { out += tableChars.middle; } } out += tableChars.right; return out; } function cliTable(head, columns) { const rows = []; const columnWidths = ArrayPrototypeMap(head, (h) => getStringWidth(h)); const longestColumn = ArrayPrototypeReduce( columns, (n, a) => MathMax(n, a.length), 0, ); const columnRightAlign = ArrayPrototypeFill( new Array(columnWidths.length), true, ); for (let i = 0; i < head.length; i++) { const column = columns[i]; for (let j = 0; j < longestColumn; j++) { if (rows[j] === undefined) { rows[j] = []; } const value = (rows[j][i] = hasOwnProperty(column, j) ? column[j] : ""); const width = columnWidths[i] || 0; const counted = getStringWidth(value); columnWidths[i] = MathMax(width, counted); columnRightAlign[i] &= NumberIsInteger(+value); } } const divider = ArrayPrototypeMap( columnWidths, (i) => StringPrototypeRepeat(tableChars.middleMiddle, i + 2), ); let result = `${tableChars.topLeft}${ ArrayPrototypeJoin(divider, tableChars.topMiddle) }` + `${tableChars.topRight}\n${renderRow(head, columnWidths)}\n` + `${tableChars.leftMiddle}${ ArrayPrototypeJoin(divider, tableChars.rowMiddle) }` + `${tableChars.rightMiddle}\n`; for (let i = 0; i < rows.length; ++i) { const row = rows[i]; result += `${renderRow(row, columnWidths, columnRightAlign)}\n`; } result += `${tableChars.bottomLeft}${ ArrayPrototypeJoin(divider, tableChars.bottomMiddle) }` + tableChars.bottomRight; return result; } /* End of forked part */ // We can match Node's quoting behavior exactly by swapping the double quote and // single quote in this array. That would give preference to single quotes. // However, we prefer double quotes as the default. const denoInspectDefaultOptions = { indentationLvl: 0, currentDepth: 0, stylize: stylizeNoColor, showHidden: false, depth: 4, colors: false, showProxy: false, breakLength: 80, escapeSequences: true, compact: 3, sorted: false, getters: false, // node only maxArrayLength: 100, maxStringLength: 100, // deno: strAbbreviateSize: 100 customInspect: true, // deno only /** You can override the quotes preference in inspectString. * Used by util.inspect() */ // TODO(kt3k): Consider using symbol as a key to hide this from the public // API. quotes: ['"', "'", "`"], iterableLimit: 100, // similar to node's maxArrayLength, but doesn't only apply to arrays trailingComma: false, inspect, // TODO(@crowlKats): merge into indentationLvl indentLevel: 0, }; function getDefaultInspectOptions() { return { budget: {}, seen: [], ...denoInspectDefaultOptions, }; } const DEFAULT_INDENT = " "; // Default indent string const STR_ABBREVIATE_SIZE = 100; class CSI { static kClear = "\x1b[1;1H"; static kClearScreenDown = "\x1b[0J"; } const QUOTE_SYMBOL_REG = new SafeRegExp(/^[a-zA-Z_][a-zA-Z_.0-9]*$/); function maybeQuoteSymbol(symbol, ctx) { const description = SymbolPrototypeGetDescription(symbol); if (description === undefined) { return SymbolPrototypeToString(symbol); } if (RegExpPrototypeTest(QUOTE_SYMBOL_REG, description)) { return SymbolPrototypeToString(symbol); } return `Symbol(${quoteString(description, ctx)})`; } /** Surround the string in quotes. * * The quote symbol is chosen by taking the first of the `QUOTES` array which * does not occur in the string. If they all occur, settle with `QUOTES[0]`. * * Insert a backslash before any occurrence of the chosen quote symbol and * before any backslash. */ function quoteString(string, ctx) { const quote = ArrayPrototypeFind( ctx.quotes, (c) => !StringPrototypeIncludes(string, c), ) ?? ctx.quotes[0]; const escapePattern = new SafeRegExp(`(?=[${quote}\\\\])`, "g"); string = StringPrototypeReplace(string, escapePattern, "\\"); if (ctx.escapeSequences) { string = replaceEscapeSequences(string); } return `${quote}${string}${quote}`; } const ESCAPE_PATTERN = new SafeRegExp(/([\b\f\n\r\t\v])/g); const ESCAPE_MAP = ObjectFreeze({ "\b": "\\b", "\f": "\\f", "\n": "\\n", "\r": "\\r", "\t": "\\t", "\v": "\\v", }); const ESCAPE_PATTERN2 = new SafeRegExp("[\x00-\x1f\x7f-\x9f]", "g"); // Replace escape sequences that can modify output. function replaceEscapeSequences(string) { return StringPrototypeReplace( StringPrototypeReplace( string, ESCAPE_PATTERN, (c) => ESCAPE_MAP[c], ), ESCAPE_PATTERN2, (c) => "\\x" + StringPrototypePadStart( NumberPrototypeToString(StringPrototypeCharCodeAt(c, 0), 16), 2, "0", ), ); } // Print strings when they are inside of arrays or objects with quotes function inspectValueWithQuotes( value, ctx, ) { const abbreviateSize = typeof ctx.strAbbreviateSize === "undefined" ? STR_ABBREVIATE_SIZE : ctx.strAbbreviateSize; switch (typeof value) { case "string": { const trunc = value.length > abbreviateSize ? StringPrototypeSlice(value, 0, abbreviateSize) + "..." : value; return ctx.stylize(quoteString(trunc, ctx), "string"); // Quoted strings are green } default: return formatValue(ctx, value, 0); } } const colorKeywords = new SafeMap([ ["black", "#000000"], ["silver", "#c0c0c0"], ["gray", "#808080"], ["white", "#ffffff"], ["maroon", "#800000"], ["red", "#ff0000"], ["purple", "#800080"], ["fuchsia", "#ff00ff"], ["green", "#008000"], ["lime", "#00ff00"], ["olive", "#808000"], ["yellow", "#ffff00"], ["navy", "#000080"], ["blue", "#0000ff"], ["teal", "#008080"], ["aqua", "#00ffff"], ["orange", "#ffa500"], ["aliceblue", "#f0f8ff"], ["antiquewhite", "#faebd7"], ["aquamarine", "#7fffd4"], ["azure", "#f0ffff"], ["beige", "#f5f5dc"], ["bisque", "#ffe4c4"], ["blanchedalmond", "#ffebcd"], ["blueviolet", "#8a2be2"], ["brown", "#a52a2a"], ["burlywood", "#deb887"], ["cadetblue", "#5f9ea0"], ["chartreuse", "#7fff00"], ["chocolate", "#d2691e"], ["coral", "#ff7f50"], ["cornflowerblue", "#6495ed"], ["cornsilk", "#fff8dc"], ["crimson", "#dc143c"], ["cyan", "#00ffff"], ["darkblue", "#00008b"], ["darkcyan", "#008b8b"], ["darkgoldenrod", "#b8860b"], ["darkgray", "#a9a9a9"], ["darkgreen", "#006400"], ["darkgrey", "#a9a9a9"], ["darkkhaki", "#bdb76b"], ["darkmagenta", "#8b008b"], ["darkolivegreen", "#556b2f"], ["darkorange", "#ff8c00"], ["darkorchid", "#9932cc"], ["darkred", "#8b0000"], ["darksalmon", "#e9967a"], ["darkseagreen", "#8fbc8f"], ["darkslateblue", "#483d8b"], ["darkslategray", "#2f4f4f"], ["darkslategrey", "#2f4f4f"], ["darkturquoise", "#00ced1"], ["darkviolet", "#9400d3"], ["deeppink", "#ff1493"], ["deepskyblue", "#00bfff"], ["dimgray", "#696969"], ["dimgrey", "#696969"], ["dodgerblue", "#1e90ff"], ["firebrick", "#b22222"], ["floralwhite", "#fffaf0"], ["forestgreen", "#228b22"], ["gainsboro", "#dcdcdc"], ["ghostwhite", "#f8f8ff"], ["gold", "#ffd700"], ["goldenrod", "#daa520"], ["greenyellow", "#adff2f"], ["grey", "#808080"], ["honeydew", "#f0fff0"], ["hotpink", "#ff69b4"], ["indianred", "#cd5c5c"], ["indigo", "#4b0082"], ["ivory", "#fffff0"], ["khaki", "#f0e68c"], ["lavender", "#e6e6fa"], ["lavenderblush", "#fff0f5"], ["lawngreen", "#7cfc00"], ["lemonchiffon", "#fffacd"], ["lightblue", "#add8e6"], ["lightcoral", "#f08080"], ["lightcyan", "#e0ffff"], ["lightgoldenrodyellow", "#fafad2"], ["lightgray", "#d3d3d3"], ["lightgreen", "#90ee90"], ["lightgrey", "#d3d3d3"], ["lightpink", "#ffb6c1"], ["lightsalmon", "#ffa07a"], ["lightseagreen", "#20b2aa"], ["lightskyblue", "#87cefa"], ["lightslategray", "#778899"], ["lightslategrey", "#778899"], ["lightsteelblue", "#b0c4de"], ["lightyellow", "#ffffe0"], ["limegreen", "#32cd32"], ["linen", "#faf0e6"], ["magenta", "#ff00ff"], ["mediumaquamarine", "#66cdaa"], ["mediumblue", "#0000cd"], ["mediumorchid", "#ba55d3"], ["mediumpurple", "#9370db"], ["mediumseagreen", "#3cb371"], ["mediumslateblue", "#7b68ee"], ["mediumspringgreen", "#00fa9a"], ["mediumturquoise", "#48d1cc"], ["mediumvioletred", "#c71585"], ["midnightblue", "#191970"], ["mintcream", "#f5fffa"], ["mistyrose", "#ffe4e1"], ["moccasin", "#ffe4b5"], ["navajowhite", "#ffdead"], ["oldlace", "#fdf5e6"], ["olivedrab", "#6b8e23"], ["orangered", "#ff4500"], ["orchid", "#da70d6"], ["palegoldenrod", "#eee8aa"], ["palegreen", "#98fb98"], ["paleturquoise", "#afeeee"], ["palevioletred", "#db7093"], ["papayawhip", "#ffefd5"], ["peachpuff", "#ffdab9"], ["peru", "#cd853f"], ["pink", "#ffc0cb"], ["plum", "#dda0dd"], ["powderblue", "#b0e0e6"], ["rosybrown", "#bc8f8f"], ["royalblue", "#4169e1"], ["saddlebrown", "#8b4513"], ["salmon", "#fa8072"], ["sandybrown", "#f4a460"], ["seagreen", "#2e8b57"], ["seashell", "#fff5ee"], ["sienna", "#a0522d"], ["skyblue", "#87ceeb"], ["slateblue", "#6a5acd"], ["slategray", "#708090"], ["slategrey", "#708090"], ["snow", "#fffafa"], ["springgreen", "#00ff7f"], ["steelblue", "#4682b4"], ["tan", "#d2b48c"], ["thistle", "#d8bfd8"], ["tomato", "#ff6347"], ["turquoise", "#40e0d0"], ["violet", "#ee82ee"], ["wheat", "#f5deb3"], ["whitesmoke", "#f5f5f5"], ["yellowgreen", "#9acd32"], ["rebeccapurple", "#663399"], ]); const HASH_PATTERN = new SafeRegExp( /^#([\dA-Fa-f]{2})([\dA-Fa-f]{2})([\dA-Fa-f]{2})([\dA-Fa-f]{2})?$/, ); const SMALL_HASH_PATTERN = new SafeRegExp( /^#([\dA-Fa-f])([\dA-Fa-f])([\dA-Fa-f])([\dA-Fa-f])?$/, ); const RGB_PATTERN = new SafeRegExp( /^rgba?\(\s*([+\-]?\d*\.?\d+)\s*,\s*([+\-]?\d*\.?\d+)\s*,\s*([+\-]?\d*\.?\d+)\s*(,\s*([+\-]?\d*\.?\d+)\s*)?\)$/, ); const HSL_PATTERN = new SafeRegExp( /^hsla?\(\s*([+\-]?\d*\.?\d+)\s*,\s*([+\-]?\d*\.?\d+)%\s*,\s*([+\-]?\d*\.?\d+)%\s*(,\s*([+\-]?\d*\.?\d+)\s*)?\)$/, ); function parseCssColor(colorString) { if (colorKeywords.has(colorString)) { colorString = colorKeywords.get(colorString); } // deno-fmt-ignore const hashMatch = StringPrototypeMatch(colorString, HASH_PATTERN); if (hashMatch != null) { return [ NumberParseInt(hashMatch[1], 16), NumberParseInt(hashMatch[2], 16), NumberParseInt(hashMatch[3], 16), ]; } // deno-fmt-ignore const smallHashMatch = StringPrototypeMatch(colorString, SMALL_HASH_PATTERN); if (smallHashMatch != null) { return [ NumberParseInt(`${smallHashMatch[1]}${smallHashMatch[1]}`, 16), NumberParseInt(`${smallHashMatch[2]}${smallHashMatch[2]}`, 16), NumberParseInt(`${smallHashMatch[3]}${smallHashMatch[3]}`, 16), ]; } // deno-fmt-ignore const rgbMatch = StringPrototypeMatch(colorString, RGB_PATTERN); if (rgbMatch != null) { return [ MathRound(MathMax(0, MathMin(255, rgbMatch[1]))), MathRound(MathMax(0, MathMin(255, rgbMatch[2]))), MathRound(MathMax(0, MathMin(255, rgbMatch[3]))), ]; } // deno-fmt-ignore const hslMatch = StringPrototypeMatch(colorString, HSL_PATTERN); if (hslMatch != null) { // https://www.rapidtables.com/convert/color/hsl-to-rgb.html let h = Number(hslMatch[1]) % 360; if (h < 0) { h += 360; } const s = MathMax(0, MathMin(100, hslMatch[2])) / 100; const l = MathMax(0, MathMin(100, hslMatch[3])) / 100; const c = (1 - MathAbs(2 * l - 1)) * s; const x = c * (1 - MathAbs((h / 60) % 2 - 1)); const m = l - c / 2; let r_; let g_; let b_; if (h < 60) { ({ 0: r_, 1: g_, 2: b_ } = [c, x, 0]); } else if (h < 120) { ({ 0: r_, 1: g_, 2: b_ } = [x, c, 0]); } else if (h < 180) { ({ 0: r_, 1: g_, 2: b_ } = [0, c, x]); } else if (h < 240) { ({ 0: r_, 1: g_, 2: b_ } = [0, x, c]); } else if (h < 300) { ({ 0: r_, 1: g_, 2: b_ } = [x, 0, c]); } else { ({ 0: r_, 1: g_, 2: b_ } = [c, 0, x]); } return [ MathRound((r_ + m) * 255), MathRound((g_ + m) * 255), MathRound((b_ + m) * 255), ]; } return null; } function getDefaultCss() { return { backgroundColor: null, color: null, fontWeight: null, fontStyle: null, textDecorationColor: null, textDecorationLine: [], }; } const SPACE_PATTERN = new SafeRegExp(/\s+/g); function parseCss(cssString) { const css = getDefaultCss(); const rawEntries = []; let inValue = false; let currentKey = null; let parenthesesDepth = 0; let currentPart = ""; for (let i = 0; i < cssString.length; i++) { const c = cssString[i]; if (c == "(") { parenthesesDepth++; } else if (parenthesesDepth > 0) { if (c == ")") { parenthesesDepth--; } } else if (inValue) { if (c == ";") { const value = StringPrototypeTrim(currentPart); if (value != "") { ArrayPrototypePush(rawEntries, [currentKey, value]); } currentKey = null; currentPart = ""; inValue = false; continue; } } else if (c == ":") { currentKey = StringPrototypeTrim(currentPart); currentPart = ""; inValue = true; continue; } currentPart += c; } if (inValue && parenthesesDepth == 0) { const value = StringPrototypeTrim(currentPart); if (value != "") { ArrayPrototypePush(rawEntries, [currentKey, value]); } currentKey = null; currentPart = ""; } for (let i = 0; i < rawEntries.length; ++i) { const { 0: key, 1: value } = rawEntries[i]; if (key == "background-color") { if (value != null) { css.backgroundColor = value; } } else if (key == "color") { if (value != null) { css.color = value; } } else if (key == "font-weight") { if (value == "bold") { css.fontWeight = value; } } else if (key == "font-style") { if ( ArrayPrototypeIncludes(["italic", "oblique", "oblique 14deg"], value) ) { css.fontStyle = "italic"; } } else if (key == "text-decoration-line") { css.textDecorationLine = []; const lineTypes = StringPrototypeSplit(value, SPACE_PATTERN); for (let i = 0; i < lineTypes.length; ++i) { const lineType = lineTypes[i]; if ( ArrayPrototypeIncludes( ["line-through", "overline", "underline"], lineType, ) ) { ArrayPrototypePush(css.textDecorationLine, lineType); } } } else if (key == "text-decoration-color") { const color = parseCssColor(value); if (color != null) { css.textDecorationColor = color; } } else if (key == "text-decoration") { css.textDecorationColor = null; css.textDecorationLine = []; const args = StringPrototypeSplit(value, SPACE_PATTERN); for (let i = 0; i < args.length; ++i) { const arg = args[i]; const maybeColor = parseCssColor(arg); if (maybeColor != null) { css.textDecorationColor = maybeColor; } else if ( ArrayPrototypeIncludes( ["line-through", "overline", "underline"], arg, ) ) { ArrayPrototypePush(css.textDecorationLine, arg); } } } } return css; } function colorEquals(color1, color2) { return color1?.[0] == color2?.[0] && color1?.[1] == color2?.[1] && color1?.[2] == color2?.[2]; } function cssToAnsi(css, prevCss = null) { prevCss = prevCss ?? getDefaultCss(); let ansi = ""; if (!colorEquals(css.backgroundColor, prevCss.backgroundColor)) { if (css.backgroundColor == null) { ansi += "\x1b[49m"; } else if (css.backgroundColor == "black") { ansi += `\x1b[40m`; } else if (css.backgroundColor == "red") { ansi += `\x1b[41m`; } else if (css.backgroundColor == "green") { ansi += `\x1b[42m`; } else if (css.backgroundColor == "yellow") { ansi += `\x1b[43m`; } else if (css.backgroundColor == "blue") { ansi += `\x1b[44m`; } else if (css.backgroundColor == "magenta") { ansi += `\x1b[45m`; } else if (css.backgroundColor == "cyan") { ansi += `\x1b[46m`; } else if (css.backgroundColor == "white") { ansi += `\x1b[47m`; } else { if (ArrayIsArray(css.backgroundColor)) { const { 0: r, 1: g, 2: b } = css.backgroundColor; ansi += `\x1b[48;2;${r};${g};${b}m`; } else { const parsed = parseCssColor(css.backgroundColor); if (parsed !== null) { const { 0: r, 1: g, 2: b } = parsed; ansi += `\x1b[48;2;${r};${g};${b}m`; } else { ansi += "\x1b[49m"; } } } } if (!colorEquals(css.color, prevCss.color)) { if (css.color == null) { ansi += "\x1b[39m"; } else if (css.color == "black") { ansi += `\x1b[30m`; } else if (css.color == "red") { ansi += `\x1b[31m`; } else if (css.color == "green") { ansi += `\x1b[32m`; } else if (css.color == "yellow") { ansi += `\x1b[33m`; } else if (css.color == "blue") { ansi += `\x1b[34m`; } else if (css.color == "magenta") { ansi += `\x1b[35m`; } else if (css.color == "cyan") { ansi += `\x1b[36m`; } else if (css.color == "white") { ansi += `\x1b[37m`; } else { if (ArrayIsArray(css.color)) { const { 0: r, 1: g, 2: b } = css.color; ansi += `\x1b[38;2;${r};${g};${b}m`; } else { const parsed = parseCssColor(css.color); if (parsed !== null) { const { 0: r, 1: g, 2: b } = parsed; ansi += `\x1b[38;2;${r};${g};${b}m`; } else { ansi += "\x1b[39m"; } } } } if (css.fontWeight != prevCss.fontWeight) { if (css.fontWeight == "bold") { ansi += `\x1b[1m`; } else { ansi += "\x1b[22m"; } } if (css.fontStyle != prevCss.fontStyle) { if (css.fontStyle == "italic") { ansi += `\x1b[3m`; } else { ansi += "\x1b[23m"; } } if (!colorEquals(css.textDecorationColor, prevCss.textDecorationColor)) { if (css.textDecorationColor != null) { const { 0: r, 1: g, 2: b } = css.textDecorationColor; ansi += `\x1b[58;2;${r};${g};${b}m`; } else { ansi += "\x1b[59m"; } } if ( ArrayPrototypeIncludes(css.textDecorationLine, "line-through") != ArrayPrototypeIncludes(prevCss.textDecorationLine, "line-through") ) { if (ArrayPrototypeIncludes(css.textDecorationLine, "line-through")) { ansi += "\x1b[9m"; } else { ansi += "\x1b[29m"; } } if ( ArrayPrototypeIncludes(css.textDecorationLine, "overline") != ArrayPrototypeIncludes(prevCss.textDecorationLine, "overline") ) { if (ArrayPrototypeIncludes(css.textDecorationLine, "overline")) { ansi += "\x1b[53m"; } else { ansi += "\x1b[55m"; } } if ( ArrayPrototypeIncludes(css.textDecorationLine, "underline") != ArrayPrototypeIncludes(prevCss.textDecorationLine, "underline") ) { if (ArrayPrototypeIncludes(css.textDecorationLine, "underline")) { ansi += "\x1b[4m"; } else { ansi += "\x1b[24m"; } } return ansi; } function inspectArgs(args, inspectOptions = {}) { const ctx = { ...getDefaultInspectOptions(), ...inspectOptions, }; if (inspectOptions.iterableLimit !== undefined) { ctx.maxArrayLength = inspectOptions.iterableLimit; } if (inspectOptions.strAbbreviateSize !== undefined) { ctx.maxStringLength = inspectOptions.strAbbreviateSize; } if (ctx.colors) ctx.stylize = createStylizeWithColor(styles, colors); if (ctx.maxArrayLength === null) ctx.maxArrayLength = Infinity; if (ctx.maxStringLength === null) ctx.maxStringLength = Infinity; const noColor = getNoColor(); const first = args[0]; let a = 0; let string = ""; if (typeof first == "string" && args.length > 1) { a++; // Index of the first not-yet-appended character. Use this so we only // have to append to `string` when a substitution occurs / at the end. let appendedChars = 0; let usedStyle = false; let prevCss = null; for (let i = 0; i < first.length - 1; i++) { if (first[i] == "%") { const char = first[++i]; if (a < args.length) { let formattedArg = null; if (char == "s") { // Format as a string. formattedArg = String(args[a++]); } else if (ArrayPrototypeIncludes(["d", "i"], char)) { // Format as an integer. const value = args[a++]; if (typeof value == "bigint") { formattedArg = `${value}n`; } else if (typeof value == "number") { formattedArg = `${NumberParseInt(String(value))}`; } else { formattedArg = "NaN"; } } else if (char == "f") { // Format as a floating point value. const value = args[a++]; if (typeof value == "number") { formattedArg = `${value}`; } else { formattedArg = "NaN"; } } else if (ArrayPrototypeIncludes(["O", "o"], char)) { // Format as an object. formattedArg = formatValue(ctx, args[a++], 0); } else if (char == "c") { const value = args[a++]; if (!noColor) { const css = parseCss(value); formattedArg = cssToAnsi(css, prevCss); if (formattedArg != "") { usedStyle = true; prevCss = css; } } else { formattedArg = ""; } } if (formattedArg != null) { string += StringPrototypeSlice(first, appendedChars, i - 1) + formattedArg; appendedChars = i + 1; } } if (char == "%") { string += StringPrototypeSlice(first, appendedChars, i - 1) + "%"; appendedChars = i + 1; } } } string += StringPrototypeSlice(first, appendedChars); if (usedStyle) { string += "\x1b[0m"; } } for (; a < args.length; a++) { if (a > 0) { string += " "; } if (typeof args[a] == "string") { string += args[a]; } else { // Use default maximum depth for null or undefined arguments. string += formatValue(ctx, args[a], 0); } } if (ctx.indentLevel > 0) { const groupIndent = StringPrototypeRepeat( DEFAULT_INDENT, ctx.indentLevel, ); string = groupIndent + StringPrototypeReplaceAll(string, "\n", `\n${groupIndent}`); } return string; } function createStylizeWithColor(styles, colors) { return function stylizeWithColor(str, styleType) { const style = styles[styleType]; if (style !== undefined) { const color = colors[style]; if (color !== undefined) { return `\u001b[${color[0]}m${str}\u001b[${color[1]}m`; } } return str; }; } const countMap = new SafeMap(); const timerMap = new SafeMap(); const isConsoleInstance = Symbol("isConsoleInstance"); function getConsoleInspectOptions() { const color = !getNoColor(); return { ...getDefaultInspectOptions(), colors: color, stylize: color ? createStylizeWithColor(styles, colors) : stylizeNoColor, }; } class Console { #printFunc = null; [isConsoleInstance] = false; constructor(printFunc) { this.#printFunc = printFunc; this.indentLevel = 0; this[isConsoleInstance] = true; // ref https://console.spec.whatwg.org/#console-namespace // For historical web-compatibility reasons, the namespace object for // console must have as its [[Prototype]] an empty object, created as if // by ObjectCreate(%ObjectPrototype%), instead of %ObjectPrototype%. const console = ObjectCreate({}, { [SymbolToStringTag]: { enumerable: false, writable: false, configurable: true, value: "console", }, }); ObjectAssign(console, this); return console; } log = (...args) => { this.#printFunc( inspectArgs(args, { ...getConsoleInspectOptions(), indentLevel: this.indentLevel, }) + "\n", 1, ); }; debug = (...args) => { this.#printFunc( inspectArgs(args, { ...getConsoleInspectOptions(), indentLevel: this.indentLevel, }) + "\n", 0, ); }; info = (...args) => { this.#printFunc( inspectArgs(args, { ...getConsoleInspectOptions(), indentLevel: this.indentLevel, }) + "\n", 1, ); }; dir = (obj = undefined, options = {}) => { this.#printFunc( inspectArgs([obj], { ...getConsoleInspectOptions(), ...options }) + "\n", 1, ); }; dirxml = this.dir; warn = (...args) => { this.#printFunc( inspectArgs(args, { ...getConsoleInspectOptions(), indentLevel: this.indentLevel, }) + "\n", 2, ); }; error = (...args) => { this.#printFunc( inspectArgs(args, { ...getConsoleInspectOptions(), indentLevel: this.indentLevel, }) + "\n", 3, ); }; assert = (condition = false, ...args) => { if (condition) { return; } if (args.length === 0) { this.error("Assertion failed"); return; } const [first, ...rest] = new SafeArrayIterator(args); if (typeof first === "string") { this.error( `Assertion failed: ${first}`, ...new SafeArrayIterator(rest), ); return; } this.error(`Assertion failed:`, ...new SafeArrayIterator(args)); }; count = (label = "default") => { label = String(label); if (MapPrototypeHas(countMap, label)) { const current = MapPrototypeGet(countMap, label) || 0; MapPrototypeSet(countMap, label, current + 1); } else { MapPrototypeSet(countMap, label, 1); } this.info(`${label}: ${MapPrototypeGet(countMap, label)}`); }; countReset = (label = "default") => { label = String(label); if (MapPrototypeHas(countMap, label)) { MapPrototypeSet(countMap, label, 0); } else { this.warn(`Count for '${label}' does not exist`); } }; table = (data = undefined, properties = undefined) => { if (properties !== undefined && !ArrayIsArray(properties)) { throw new Error( "The 'properties' argument must be of type Array. " + "Received type " + typeof properties, ); } if (data === null || typeof data !== "object") { return this.log(data); } const stringifyValue = (value) => inspectValueWithQuotes(value, { ...getDefaultInspectOptions(), depth: 1, compact: true, }); const toTable = (header, body) => this.log(cliTable(header, body)); let resultData; const isSetObject = isSet(data); const isMapObject = isMap(data); const valuesKey = "Values"; const indexKey = isSetObject || isMapObject ? "(iter idx)" : "(idx)"; if (isSetObject) { resultData = [...new SafeSetIterator(data)]; } else if (isMapObject) { let idx = 0; resultData = {}; MapPrototypeForEach(data, (v, k) => { resultData[idx] = { Key: k, Values: v }; idx++; }); } else { resultData = data; } const keys = ObjectKeys(resultData); const numRows = keys.length; const objectValues = properties ? ObjectFromEntries( ArrayPrototypeMap( properties, (name) => [name, ArrayPrototypeFill(new Array(numRows), "")], ), ) : {}; const indexKeys = []; const values = []; let hasPrimitives = false; ArrayPrototypeForEach(keys, (k, idx) => { const value = resultData[k]; const primitive = value === null || (typeof value !== "function" && typeof value !== "object"); if (properties === undefined && primitive) { hasPrimitives = true; ArrayPrototypePush(values, stringifyValue(value)); } else { const valueObj = value || {}; const keys = properties || ObjectKeys(valueObj); for (let i = 0; i < keys.length; ++i) { const k = keys[i]; if (!primitive && ReflectHas(valueObj, k)) { if (!(ReflectHas(objectValues, k))) { objectValues[k] = ArrayPrototypeFill(new Array(numRows), ""); } objectValues[k][idx] = stringifyValue(valueObj[k]); } } ArrayPrototypePush(values, ""); } ArrayPrototypePush(indexKeys, k); }); const headerKeys = ObjectKeys(objectValues); const bodyValues = ObjectValues(objectValues); const headerProps = properties || [ ...new SafeArrayIterator(headerKeys), !isMapObject && hasPrimitives && valuesKey, ]; const header = ArrayPrototypeFilter([ indexKey, ...new SafeArrayIterator(headerProps), ], Boolean); const body = [indexKeys, ...new SafeArrayIterator(bodyValues), values]; toTable(header, body); }; time = (label = "default") => { label = String(label); if (MapPrototypeHas(timerMap, label)) { this.warn(`Timer '${label}' already exists`); return; } MapPrototypeSet(timerMap, label, DateNow()); }; timeLog = (label = "default", ...args) => { label = String(label); if (!MapPrototypeHas(timerMap, label)) { this.warn(`Timer '${label}' does not exist`); return; } const startTime = MapPrototypeGet(timerMap, label); const duration = DateNow() - startTime; this.info(`${label}: ${duration}ms`, ...new SafeArrayIterator(args)); }; timeEnd = (label = "default") => { label = String(label); if (!MapPrototypeHas(timerMap, label)) { this.warn(`Timer '${label}' does not exist`); return; } const startTime = MapPrototypeGet(timerMap, label); MapPrototypeDelete(timerMap, label); const duration = DateNow() - startTime; this.info(`${label}: ${duration}ms`); }; group = (...label) => { if (label.length > 0) { this.log(...new SafeArrayIterator(label)); } this.indentLevel += 2; }; groupCollapsed = this.group; groupEnd = () => { if (this.indentLevel > 0) { this.indentLevel -= 2; } }; clear = () => { this.indentLevel = 0; this.#printFunc(CSI.kClear, 1); this.#printFunc(CSI.kClearScreenDown, 1); }; trace = (...args) => { const message = inspectArgs( args, { ...getConsoleInspectOptions(), indentLevel: 0 }, ); const err = { name: "Trace", message, }; ErrorCaptureStackTrace(err, this.trace); this.error(err.stack); }; // These methods are noops, but when the inspector is connected, they // call into V8. profile = (_label) => {}; profileEnd = (_label) => {}; timeStamp = (_label) => {}; static [SymbolHasInstance](instance) { return instance[isConsoleInstance]; } } const customInspect = SymbolFor("Deno.customInspect"); function inspect( value, inspectOptions = {}, ) { // Default options const ctx = { ...getDefaultInspectOptions(), ...inspectOptions, }; if (inspectOptions.iterableLimit !== undefined) { ctx.maxArrayLength = inspectOptions.iterableLimit; } if (inspectOptions.strAbbreviateSize !== undefined) { ctx.maxStringLength = inspectOptions.strAbbreviateSize; } if (ctx.colors) ctx.stylize = createStylizeWithColor(styles, colors); if (ctx.maxArrayLength === null) ctx.maxArrayLength = Infinity; if (ctx.maxStringLength === null) ctx.maxStringLength = Infinity; return formatValue(ctx, value, 0); } /** Creates a proxy that represents a subset of the properties * of the original object optionally without evaluating the properties * in order to get the values. */ function createFilteredInspectProxy({ object, keys, evaluate }) { const obj = class {}; if (object.constructor?.name) { ObjectDefineProperty(obj, "name", { value: object.constructor.name }); } return new Proxy(new obj(), { get(_target, key) { if (key === SymbolToStringTag) { return object.constructor?.name; } else if (ArrayPrototypeIncludes(keys, key)) { return ReflectGet(object, key); } else { return undefined; } }, getOwnPropertyDescriptor(_target, key) { if (!ArrayPrototypeIncludes(keys, key)) { return undefined; } else if (evaluate) { return getEvaluatedDescriptor(object, key); } else { return getDescendantPropertyDescriptor(object, key) ?? getEvaluatedDescriptor(object, key); } }, has(_target, key) { return ArrayPrototypeIncludes(keys, key); }, ownKeys() { return keys; }, }); function getDescendantPropertyDescriptor(object, key) { let propertyDescriptor = ReflectGetOwnPropertyDescriptor(object, key); if (!propertyDescriptor) { const prototype = ReflectGetPrototypeOf(object); if (prototype) { propertyDescriptor = getDescendantPropertyDescriptor(prototype, key); } } return propertyDescriptor; } function getEvaluatedDescriptor(object, key) { return { configurable: true, enumerable: true, value: object[key], }; } } // Expose these fields to internalObject for tests. internals.Console = Console; internals.cssToAnsi = cssToAnsi; internals.inspectArgs = inspectArgs; internals.parseCss = parseCss; internals.parseCssColor = parseCssColor; export { colors, Console, createFilteredInspectProxy, createStylizeWithColor, CSI, customInspect, formatBigInt, formatNumber, formatValue, getDefaultInspectOptions, getNoColor, inspect, inspectArgs, quoteString, setNoColorFn, styles, }; Qdext:deno_console/01_console.jsa b D`M`~ Tq`uLa[ T  I`   Sb1c"&`D"`D`Oa`17`a`&c`(D3``dD%`D"`DB6`"=`">`DD`K`ab`'D:`?`E`D2`i`$DBQ`D`N"`D9`+D"`n`P`"`DB ``b5`DZ``B5`D``{D`YDA`"D!_`#K`D9```4B;` `KD`LDS`pDb `TD!`G`b`Db`D=`c!$`eD`DT`a`5H`l`fb``E`k`!4`>K`]z``D%`h"``Db9` _`yDb`D`D`J`DBE`mDb`"``D`o`D^`!D`2Db`Da`|``D`D;`D`DA`,D!`bT`qDx``/DA`Dj`(`D`Db{`D`Da``%D `DB` D`DI `D`_f``b``<`D``"`D`)`-D%`g`D `0$``FD`UD|`B`"?`N`D`S`i`D`<6` ![``D``jB>`bDb?`7` Db`1`ZDY`tb`}DA`CDb`DA`6`b`b@`a`;D`D2``D!`\"`B6````X`.D`DAz`*``D`HB`P"p`"`D"`D5`D`T``Db^`w"`DBR`Db`"]`vD `D@`BD>`` D!s``@a`A`:U`rDb `MB``z`=Dg``Db:`]`D``D9`D`DbI`n_`x"``WD"`b`D`7" `QK`^DB`B8` bX`s[`u"d`~Dc`"`D`D``R".`DJ`[` D"S`!`VD"U`1`b8`D`4``38` ¢`DA`8D`9B4`D`D`D`ID`D`D???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????Ib`L` bS]`B]`]L`6L` L`L` L`` L`` L`"` L`"` L`` L`b` L`b`  L`bJ`  L`bJ`  L`"`  L`"`  L`B` L`B"` L`""` L`"6` L`6` L`] L`  D  c DBKBKc D ) )cXo D - -cs D 1 1c Dc` a?BKa?a? )a? -a? 1a?"a?a ?a?a?a ?ba?a?"a ?6a?bJa ?La?"a?Ba?"a?a?a?a ?a?b@ T<`5(L`0SbqA ``Dag90bCCGH T  I`qb| T I`b}  i`Dh( %O0~)‚33` ab@ T I`bb'@ T I`_"b@  T I`$2$Bb@  T I`%+b@  T I`@;r=bb@ T I`)>1Cb@ T I`ECd|b@ T I`r} b@ T I`# b@ T I`Yb@ T I`Ґb@ T I`Wb@ T I`mb@ T I`"b@ T I`b@ T I`Vbb@  T I`jb@! T I`!Ab@" T I`]b@# T I`Rbb@$ T I`˧b@% T I`qb@& T I`ñ"b@* T I`7ҵb@+ T I`Ƹb@- T I`$b@. T I`<ιbb@/ T I`xb@0 T I`b@1 T I`R%b@2 T I`X"&b@3 T I`Ib@5 T I`b@6 T I`b@7 T I`bb@8 T I`e(b@9 T I`bb@: T I` >b@; T I`l".b@? T I` 7b@@ T I` b?b@A T I`Ab@B T I`j"b@I T I`!Pb@L T I`!`#Tb@O T I`5!>b@P T I`9>>b@Q T I`#?J"b@R T I`JFK"b@S T I`ZKZbb@T T I`iVj"b!@XL`, T(`  L`¢ 1`Dc %(SbqA"`DaO g  b@a@ T  I`| b@cA  T I`,);b@aB  T I`bb@,aC T I`ob@4aD T I`W"b@<aE  T I`S6b!@>aF T I`ZbJb!@FbG  T I`w"b@JaH T I`)ZgBb@UaI T I`gib  @ "b@VcJ T I`&b@uaK  TI`(h;Ù @֛ @۞ @@ @ @ (b#@vaLa  1223B44B55B667B88b99b:B;;<"=">>"?!sTZf![c!^A!_ia`aabcAz9A aaAA!4:a@A! b B" b !1J!KKB6b@B>=!$%%EHBEbISbTUbXY["]b^__B``ab"dgnj"p Brs|zb{xbI  T  ¢`, 7 ¢bKxb b¥"%"="Q BI Bb¨"b"qbX,  `MbBI `MbB `Mb `Mb" `Mb `Mb `Mbb `Mb­ `Mb B `Mb®CbCC"C"CC¥CCCBCCCbC±CBCC `Mb36b `Mb57CBC´CBCµCBC¶CBC·C"CC"CC"CC"C `Lb® `Lbb `Lb  `Lb!" `Lb"" `Lb# `Lb$¥ `Lb% `Lb( `Lb)B `Lb* `Lb+ `Lb,b `Lb-± `Lb.B `Lb/ `LbZ `Lb[B `Lb\´ `Lb]B `Lb^µ `Lb_B `Lb`¶ `LbaB `Lbd· `Lbe" `Lbf `Lbg" `Lbh `Lbi" `Lbj `Lbk"bB­B¾Bb¿"B" `M`b"Bb"Bb"Bb"BI I @Ib"Bb"Bb"Bb"Bb T  `""bK "*"B T `#$bK b T(`L`B>  5`Dcec(SbbpWI`Da}H} abK b" TH`K L`  M`Dk@} n; F n# 8 / /84 P ‹$ Pċ< (SbqAI`Daİb3! b @)(b ` `b!`"%1B2"3B4 T  b8`vb8bK=xb 9 5: 9: =: AB; E; IB< M< QB= U= YB> ]> a? eb(D`BE`ECHG`H"FHF`P"GG`HGH0`dH`dGH  `M`"b'H`dbIHCI`EK  `T ``/ `/ `?  `  aD] ` aj] T  I`LbDG T(`L`BML"NM  `Kb P 0c33(SbqsL`Da a 0bHOQ@b b""BbRS  `YL` `M`®U `M`VbV `M`V `M`"W `M`WW `M`bBX `M`XY `M`bYY `M`"Z `M`ZZ `M`B[[ `M`"\ `M`b\\ `M`""] `M`]] `M`B^^ `M`_b_ `M`_B` `M``"a `M`ab `M`bbb `M`"cc `M`cBd `M`d"e `M`ef `M`bff `M`"gg `M`hh `M`hbi `M`iBj `M`jk `M`bkk `M`Bll `M`mbm `M`¥^ `M`m"n `M`nn `M`Boo `M`"pp `M`pbq `M`qp `M`"rr `M`ss `M`sbt `M`tBu `M`u"v `M`vv `M`Bww `M`"xx `M`yy `M`ybz `M`zbz `M`B{{ `M`"|| `M`}b} `M`}B~ `M`~ `M`b `M`B `M`" `M` `M`b `M`Bƒ `M`" `M`b `M`…B `M`" `M`V `M` `M`B `M` `M`B `M` `M`b‹ `M`" `M`b `M`B `M`" `M` `M`b `M`B‘ `M`"’ `M`" `M` `M` `M`b `M`B– `M`" `M` `M`b `M`™b `M`Bš `M`" `M` `M`B `M`Y `M`" `M` `M`b `M`B  `M`" `M` `M` `M`b `M`¤B `M`" `M` `M`b `M`B `M` `M`B `M`" `M` `M`b¬ `M`" `M` `M`b `M`¯B `M`" `M` `M`b² `M`" `M`B `M`" `M` `M`b `M`B· `M`" `M`b `M`¹" `M` `M`B `M`b `M`¼B `M`" `M`" `M`b `M`¿B `M`" `M`" `M`B `M` `M`b `M`B `M`b `M`B `M`" `M`b,Sb @"c??Xjv  `f6 D ` D `  `   aXjv`DHcD La ` aj]" TP`\(L` I x0bHHG  }`Dm8- ] 4 24N~ )t~ )7 cMc (SbpG`Daj-m]b 80'@b ՃY T  I`<t`bs T`L`+0Sbbqq `?`Dafjv T `7mmbKZ T `mnbK[ T "`n`o"bK\" T `kopbK] B T `2ppbK^  T 1`pqbK_  T  `qwsbK`  T `stbKa  T B`tuBbKb B T `ubKc  T `݁bKi  T `RbKj  T b`aDŽbbKk b T I`ԄUbKl  T `ӅbKm  T `WbKn  T b`dhbbKo b T `҇bKp  T "`"bKq " T `bKr   `0KjODx < Y  T |x| %553333 - 3  3  3 333 3 3 3 3  3"-$3&3 (!3"*#3$,%3&.'3(0)3*2e4 4 00 0 0 00 0 0bt BBKbB" `DYh %%%%%%% % % % % %%%%%%%%%%%%%%%%%%% %!%"%#%$%%%&%'%(%)%*%+%,%-%.%/%0%1%2%3%4%5%6%7%8%9%:%;%<%=%>%?%@%A%B%C%D%E%F%G%H%I%J%K%L%M%N%O%P%Q%R%S%T%U%V%W%X%Y%Z%[%\%]%^%_%`%a%b%c%d%e%f%g%h%i%j%k%l%m%n%o%p%q%r%s%t%u%v%w%x%y%z%{%|%}%~%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% % % %% % %%%%%%%%%%%%%%%%%%%‚%Â%Ă%ł%Ƃ%%Ȃ %ɂ! %ʂ"!%˂#"%̂$#%͂%$%΂&%%ς'&%Ђ('%%%ӂ)(%%Ղ*)%ւ+*%ׂ,+%%%%%܂-,%%%%.-%/.%%%%%%0/%10%%21%32%43%%%%54%6ei h 7 09-:%-;%-<%-=%->%-? %-@ % -A% -B% -C% -D% -E%-F%-G%-H%-I%-J %-K"%-L$%-M&%-N(%-O*%-P,%0Q-R.%-S0%-T2%-U4%-V6%-W8%-X:% -Y<%!-Z>%"-[@%#-\B%$-]D%%-^F%&-_H%'-`J%(-aL%)-bN%*-cP%+-dR%,-eT%--fV%.-gX%/-hZ%0-i\%1-j^%2-k`%3-lb%4-md%5-nf%6-oh%7-pj%8-ql%9-rn%:-sp%;-tr%<-ut%=-vv%>-wx%?-xz%@-y|%A-z~%B-{%C-|%D-}%E-~%F-%G-%H-%I-%J-%K-%L-%M-%N-%O--%P-%Q-%R-%S-%T-%U-%V-%W-%X-%Y-%Z-%[-%\-%]-%^-%_-%`-%a-%b-%c-%d-%e-%f-%g-%h-%i-%j-%k-%l-%m-%n-%o-%p-%q-%r-%s-%t-%u-%v-%w-%x-%y-%z-%{-%|-%}-%~-%-%-%-%-%-%-%-- - -%-%-%-%-%-%-%-%5%~)1 ' 1~ { %  6! 3#{%%  6& 3({*%  6+ 3-{/%  60 32{4%  65 37{9%  6: 3<{>%  6? 3A{C%  6D 3F{H%  6I 3K{M%  6N 3P{R%  6S 3U{W%  6X 3Z{\%  6] 3_{a%  6b 3d{f%  6g 3i{k%  6l 3n{p%  6q 3s{u%  6v 3x{z%  6{ 3}{%  6 3{%  6 3{%  6 3{%  6 3{%  6 3{%  6 3{%  6 3{%  6 3{%  6 3{%  6 3{%  6 3{ %  6 3 { %  6 3  1 cccccccccccc% % % % % % % %{%%6%j ! i%j" i%j# i%$7%%b%&b%j'! i%j( i%j) i%kR!*b+8c i%j, i%j- i%jz. i%jz/ i%09a%j1! i%~2)%j3! i%4586878j! i%8:%~9)%~: 3; 0 3<  %=% d%?;>e+@<]  1jzA i%jzB i%~C)b%jD! i%h{E i%jzF i%jzG  i!%jzH# i$%jzI& i'%jzJ) i*%hi,%hi.%Kb0%L%NNe%O=Mt% tPm2e2Q>e+R?2S3 1Tb510U02V702W9002X;02Y=02Z? ̔AMPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP0'&00 `>&00 `>&00 `>&00 `>&00 `>&0@@@@0 I`!9&L&0 `0 `0 `@`bA-Aey!)DID1DDD !)19DIAIQQYaiqyYaeiDqyDD D!yD %-5=EDD`RD]DH =-Q9-iaZ// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @ts-check /// /// /// import { primordials } from "ext:core/mod.js"; import { op_url_get_serialization, op_url_parse, op_url_parse_search_params, op_url_parse_with_base, op_url_reparse, op_url_stringify_search_params, } from "ext:core/ops"; const { ArrayIsArray, ArrayPrototypeMap, ArrayPrototypePush, ArrayPrototypeSome, ArrayPrototypeSort, ArrayPrototypeSplice, ObjectKeys, ObjectPrototypeIsPrototypeOf, SafeArrayIterator, StringPrototypeSlice, StringPrototypeStartsWith, Symbol, SymbolFor, SymbolIterator, TypeError, Uint32Array, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; const _list = Symbol("list"); const _urlObject = Symbol("url object"); // WARNING: must match rust code's UrlSetter::* const SET_HASH = 0; const SET_HOST = 1; const SET_HOSTNAME = 2; const SET_PASSWORD = 3; const SET_PATHNAME = 4; const SET_PORT = 5; const SET_PROTOCOL = 6; const SET_SEARCH = 7; const SET_USERNAME = 8; // Helper functions /** * @param {string} href * @param {number} setter * @param {string} value * @returns {string} */ function opUrlReparse(href, setter, value) { const status = op_url_reparse( href, setter, value, componentsBuf, ); return getSerialization(status, href); } /** * @param {string} href * @param {string} [maybeBase] * @returns {number} */ function opUrlParse(href, maybeBase) { if (maybeBase === undefined) { return op_url_parse(href, componentsBuf); } return op_url_parse_with_base( href, maybeBase, componentsBuf, ); } /** * @param {number} status * @param {string} href * @param {string} [maybeBase] * @returns {string} */ function getSerialization(status, href, maybeBase) { if (status === 0) { return href; } else if (status === 1) { return op_url_get_serialization(); } else { throw new TypeError( `Invalid URL: '${href}'` + (maybeBase ? ` with base '${maybeBase}'` : ""), ); } } class URLSearchParams { [_list]; [_urlObject] = null; /** * @param {string | [string][] | Record} init */ constructor(init = "") { const prefix = "Failed to construct 'URL'"; init = webidl.converters ["sequence> or record or USVString"]( init, prefix, "Argument 1", ); this[webidl.brand] = webidl.brand; if (!init) { // if there is no query string, return early this[_list] = []; return; } if (typeof init === "string") { // Overload: USVString // If init is a string and starts with U+003F (?), // remove the first code point from init. if (init[0] == "?") { init = StringPrototypeSlice(init, 1); } this[_list] = op_url_parse_search_params(init); } else if (ArrayIsArray(init)) { // Overload: sequence> this[_list] = ArrayPrototypeMap(init, (pair, i) => { if (pair.length !== 2) { throw new TypeError( `${prefix}: Item ${ i + 0 } in the parameter list does have length 2 exactly.`, ); } return [pair[0], pair[1]]; }); } else { // Overload: record this[_list] = ArrayPrototypeMap( ObjectKeys(init), (key) => [key, init[key]], ); } } #updateUrlSearch() { const url = this[_urlObject]; if (url === null) { return; } // deno-lint-ignore prefer-primordials url[_updateUrlSearch](this.toString()); } /** * @param {string} name * @param {string} value */ append(name, value) { webidl.assertBranded(this, URLSearchParamsPrototype); const prefix = "Failed to execute 'append' on 'URLSearchParams'"; webidl.requiredArguments(arguments.length, 2, prefix); name = webidl.converters.USVString(name, prefix, "Argument 1"); value = webidl.converters.USVString(value, prefix, "Argument 2"); ArrayPrototypePush(this[_list], [name, value]); this.#updateUrlSearch(); } /** * @param {string} name * @param {string} [value] */ delete(name, value = undefined) { webidl.assertBranded(this, URLSearchParamsPrototype); const prefix = "Failed to execute 'append' on 'URLSearchParams'"; webidl.requiredArguments(arguments.length, 1, prefix); name = webidl.converters.USVString(name, prefix, "Argument 1"); const list = this[_list]; let i = 0; if (value === undefined) { while (i < list.length) { if (list[i][0] === name) { ArrayPrototypeSplice(list, i, 1); } else { i++; } } } else { value = webidl.converters.USVString(value, prefix, "Argument 2"); while (i < list.length) { if (list[i][0] === name && list[i][1] === value) { ArrayPrototypeSplice(list, i, 1); } else { i++; } } } this.#updateUrlSearch(); } /** * @param {string} name * @returns {string[]} */ getAll(name) { webidl.assertBranded(this, URLSearchParamsPrototype); const prefix = "Failed to execute 'getAll' on 'URLSearchParams'"; webidl.requiredArguments(arguments.length, 1, prefix); name = webidl.converters.USVString(name, prefix, "Argument 1"); const values = []; const entries = this[_list]; for (let i = 0; i < entries.length; ++i) { const entry = entries[i]; if (entry[0] === name) { ArrayPrototypePush(values, entry[1]); } } return values; } /** * @param {string} name * @return {string | null} */ get(name) { webidl.assertBranded(this, URLSearchParamsPrototype); const prefix = "Failed to execute 'get' on 'URLSearchParams'"; webidl.requiredArguments(arguments.length, 1, prefix); name = webidl.converters.USVString(name, prefix, "Argument 1"); const entries = this[_list]; for (let i = 0; i < entries.length; ++i) { const entry = entries[i]; if (entry[0] === name) { return entry[1]; } } return null; } /** * @param {string} name * @param {string} [value] * @return {boolean} */ has(name, value = undefined) { webidl.assertBranded(this, URLSearchParamsPrototype); const prefix = "Failed to execute 'has' on 'URLSearchParams'"; webidl.requiredArguments(arguments.length, 1, prefix); name = webidl.converters.USVString(name, prefix, "Argument 1"); if (value !== undefined) { value = webidl.converters.USVString(value, prefix, "Argument 2"); return ArrayPrototypeSome( this[_list], (entry) => entry[0] === name && entry[1] === value, ); } return ArrayPrototypeSome(this[_list], (entry) => entry[0] === name); } /** * @param {string} name * @param {string} value */ set(name, value) { webidl.assertBranded(this, URLSearchParamsPrototype); const prefix = "Failed to execute 'set' on 'URLSearchParams'"; webidl.requiredArguments(arguments.length, 2, prefix); name = webidl.converters.USVString(name, prefix, "Argument 1"); value = webidl.converters.USVString(value, prefix, "Argument 2"); const list = this[_list]; // If there are any name-value pairs whose name is name, in list, // set the value of the first such name-value pair to value // and remove the others. let found = false; let i = 0; while (i < list.length) { if (list[i][0] === name) { if (!found) { list[i][1] = value; found = true; i++; } else { ArrayPrototypeSplice(list, i, 1); } } else { i++; } } // Otherwise, append a new name-value pair whose name is name // and value is value, to list. if (!found) { ArrayPrototypePush(list, [name, value]); } this.#updateUrlSearch(); } sort() { webidl.assertBranded(this, URLSearchParamsPrototype); ArrayPrototypeSort( this[_list], (a, b) => (a[0] === b[0] ? 0 : a[0] > b[0] ? 1 : -1), ); this.#updateUrlSearch(); } /** * @return {string} */ toString() { webidl.assertBranded(this, URLSearchParamsPrototype); return op_url_stringify_search_params(this[_list]); } get size() { webidl.assertBranded(this, URLSearchParamsPrototype); return this[_list].length; } } webidl.mixinPairIterable("URLSearchParams", URLSearchParams, _list, 0, 1); webidl.configureInterface(URLSearchParams); const URLSearchParamsPrototype = URLSearchParams.prototype; webidl.converters["URLSearchParams"] = webidl.createInterfaceConverter( "URLSearchParams", URLSearchParamsPrototype, ); const _updateUrlSearch = Symbol("updateUrlSearch"); function trim(s) { if (s.length === 1) return ""; return s; } // Represents a "no port" value. A port in URL cannot be greater than 2^16 - 1 const NO_PORT = 65536; const componentsBuf = new Uint32Array(8); class URL { #queryObject = null; #serialization; #schemeEnd; #usernameEnd; #hostStart; #hostEnd; #port; #pathStart; #queryStart; #fragmentStart; [_updateUrlSearch](value) { this.#serialization = opUrlReparse( this.#serialization, SET_SEARCH, value, ); this.#updateComponents(); } /** * @param {string} url * @param {string} [base] */ constructor(url, base = undefined) { const prefix = "Failed to construct 'URL'"; webidl.requiredArguments(arguments.length, 1, prefix); url = webidl.converters.DOMString(url, prefix, "Argument 1"); if (base !== undefined) { base = webidl.converters.DOMString(base, prefix, "Argument 2"); } this[webidl.brand] = webidl.brand; const status = opUrlParse(url, base); this.#serialization = getSerialization(status, url, base); this.#updateComponents(); } /** * @param {string} url * @param {string} [base] */ static canParse(url, base = undefined) { const prefix = "Failed to call 'URL.canParse'"; webidl.requiredArguments(arguments.length, 1, prefix); url = webidl.converters.DOMString(url, prefix, "Argument 1"); if (base !== undefined) { base = webidl.converters.DOMString(base, prefix, "Argument 2"); } const status = opUrlParse(url, base); return status === 0 || status === 1; } #updateComponents() { ({ 0: this.#schemeEnd, 1: this.#usernameEnd, 2: this.#hostStart, 3: this.#hostEnd, 4: this.#port, 5: this.#pathStart, 6: this.#queryStart, 7: this.#fragmentStart, } = componentsBuf); } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(URLPrototype, this), keys: [ "href", "origin", "protocol", "username", "password", "host", "hostname", "port", "pathname", "hash", "search", ], }), inspectOptions, ); } #updateSearchParams() { if (this.#queryObject !== null) { const params = this.#queryObject[_list]; const newParams = op_url_parse_search_params( StringPrototypeSlice(this.search, 1), ); ArrayPrototypeSplice( params, 0, params.length, ...new SafeArrayIterator(newParams), ); } } #hasAuthority() { // https://github.com/servo/rust-url/blob/1d307ae51a28fecc630ecec03380788bfb03a643/url/src/lib.rs#L824 return StringPrototypeStartsWith( StringPrototypeSlice(this.#serialization, this.#schemeEnd), "://", ); } /** @return {string} */ get hash() { webidl.assertBranded(this, URLPrototype); // https://github.com/servo/rust-url/blob/1d307ae51a28fecc630ecec03380788bfb03a643/url/src/quirks.rs#L263 return this.#fragmentStart ? trim(StringPrototypeSlice(this.#serialization, this.#fragmentStart)) : ""; } /** @param {string} value */ set hash(value) { webidl.assertBranded(this, URLPrototype); const prefix = "Failed to set 'hash' on 'URL'"; webidl.requiredArguments(arguments.length, 1, prefix); value = webidl.converters.DOMString(value, prefix, "Argument 1"); try { this.#serialization = opUrlReparse( this.#serialization, SET_HASH, value, ); this.#updateComponents(); } catch { /* pass */ } } /** @return {string} */ get host() { webidl.assertBranded(this, URLPrototype); // https://github.com/servo/rust-url/blob/1d307ae51a28fecc630ecec03380788bfb03a643/url/src/quirks.rs#L101 return StringPrototypeSlice( this.#serialization, this.#hostStart, this.#pathStart, ); } /** @param {string} value */ set host(value) { webidl.assertBranded(this, URLPrototype); const prefix = "Failed to set 'host' on 'URL'"; webidl.requiredArguments(arguments.length, 1, prefix); value = webidl.converters.DOMString(value, prefix, "Argument 1"); try { this.#serialization = opUrlReparse( this.#serialization, SET_HOST, value, ); this.#updateComponents(); } catch { /* pass */ } } /** @return {string} */ get hostname() { webidl.assertBranded(this, URLPrototype); // https://github.com/servo/rust-url/blob/1d307ae51a28fecc630ecec03380788bfb03a643/url/src/lib.rs#L988 return StringPrototypeSlice( this.#serialization, this.#hostStart, this.#hostEnd, ); } /** @param {string} value */ set hostname(value) { webidl.assertBranded(this, URLPrototype); const prefix = "Failed to set 'hostname' on 'URL'"; webidl.requiredArguments(arguments.length, 1, prefix); value = webidl.converters.DOMString(value, prefix, "Argument 1"); try { this.#serialization = opUrlReparse( this.#serialization, SET_HOSTNAME, value, ); this.#updateComponents(); } catch { /* pass */ } } /** @return {string} */ get href() { webidl.assertBranded(this, URLPrototype); return this.#serialization; } /** @param {string} value */ set href(value) { webidl.assertBranded(this, URLPrototype); const prefix = "Failed to set 'href' on 'URL'"; webidl.requiredArguments(arguments.length, 1, prefix); value = webidl.converters.DOMString(value, prefix, "Argument 1"); const status = opUrlParse(value); this.#serialization = getSerialization(status, value); this.#updateComponents(); this.#updateSearchParams(); } /** @return {string} */ get origin() { webidl.assertBranded(this, URLPrototype); // https://github.com/servo/rust-url/blob/1d307ae51a28fecc630ecec03380788bfb03a643/url/src/origin.rs#L14 const scheme = StringPrototypeSlice( this.#serialization, 0, this.#schemeEnd, ); if ( scheme === "http" || scheme === "https" || scheme === "ftp" || scheme === "ws" || scheme === "wss" ) { return `${scheme}://${this.host}`; } if (scheme === "blob") { // TODO(@littledivy): Fast path. try { return new URL(this.pathname).origin; } catch { return "null"; } } return "null"; } /** @return {string} */ get password() { webidl.assertBranded(this, URLPrototype); // https://github.com/servo/rust-url/blob/1d307ae51a28fecc630ecec03380788bfb03a643/url/src/lib.rs#L914 if ( this.#hasAuthority() && this.#usernameEnd !== this.#serialization.length && this.#serialization[this.#usernameEnd] === ":" ) { return StringPrototypeSlice( this.#serialization, this.#usernameEnd + 1, this.#hostStart - 1, ); } return ""; } /** @param {string} value */ set password(value) { webidl.assertBranded(this, URLPrototype); const prefix = "Failed to set 'password' on 'URL'"; webidl.requiredArguments(arguments.length, 1, prefix); value = webidl.converters.DOMString(value, prefix, "Argument 1"); try { this.#serialization = opUrlReparse( this.#serialization, SET_PASSWORD, value, ); this.#updateComponents(); } catch { /* pass */ } } /** @return {string} */ get pathname() { webidl.assertBranded(this, URLPrototype); // https://github.com/servo/rust-url/blob/1d307ae51a28fecc630ecec03380788bfb03a643/url/src/lib.rs#L1203 if (!this.#queryStart && !this.#fragmentStart) { return StringPrototypeSlice(this.#serialization, this.#pathStart); } const nextComponentStart = this.#queryStart || this.#fragmentStart; return StringPrototypeSlice( this.#serialization, this.#pathStart, nextComponentStart, ); } /** @param {string} value */ set pathname(value) { webidl.assertBranded(this, URLPrototype); const prefix = "Failed to set 'pathname' on 'URL'"; webidl.requiredArguments(arguments.length, 1, prefix); value = webidl.converters.DOMString(value, prefix, "Argument 1"); try { this.#serialization = opUrlReparse( this.#serialization, SET_PATHNAME, value, ); this.#updateComponents(); } catch { /* pass */ } } /** @return {string} */ get port() { webidl.assertBranded(this, URLPrototype); // https://github.com/servo/rust-url/blob/1d307ae51a28fecc630ecec03380788bfb03a643/url/src/quirks.rs#L196 if (this.#port === NO_PORT) { return StringPrototypeSlice( this.#serialization, this.#hostEnd, this.#pathStart, ); } else { return StringPrototypeSlice( this.#serialization, this.#hostEnd + 1, /* : */ this.#pathStart, ); } } /** @param {string} value */ set port(value) { webidl.assertBranded(this, URLPrototype); const prefix = "Failed to set 'port' on 'URL'"; webidl.requiredArguments(arguments.length, 1, prefix); value = webidl.converters.DOMString(value, prefix, "Argument 1"); try { this.#serialization = opUrlReparse( this.#serialization, SET_PORT, value, ); this.#updateComponents(); } catch { /* pass */ } } /** @return {string} */ get protocol() { webidl.assertBranded(this, URLPrototype); // https://github.com/servo/rust-url/blob/1d307ae51a28fecc630ecec03380788bfb03a643/url/src/quirks.rs#L56 return StringPrototypeSlice( this.#serialization, 0, this.#schemeEnd + 1, /* : */ ); } /** @param {string} value */ set protocol(value) { webidl.assertBranded(this, URLPrototype); const prefix = "Failed to set 'protocol' on 'URL'"; webidl.requiredArguments(arguments.length, 1, prefix); value = webidl.converters.DOMString(value, prefix, "Argument 1"); try { this.#serialization = opUrlReparse( this.#serialization, SET_PROTOCOL, value, ); this.#updateComponents(); } catch { /* pass */ } } /** @return {string} */ get search() { webidl.assertBranded(this, URLPrototype); // https://github.com/servo/rust-url/blob/1d307ae51a28fecc630ecec03380788bfb03a643/url/src/quirks.rs#L249 const afterPath = this.#queryStart || this.#fragmentStart || this.#serialization.length; const afterQuery = this.#fragmentStart || this.#serialization.length; return trim( StringPrototypeSlice(this.#serialization, afterPath, afterQuery), ); } /** @param {string} value */ set search(value) { webidl.assertBranded(this, URLPrototype); const prefix = "Failed to set 'search' on 'URL'"; webidl.requiredArguments(arguments.length, 1, prefix); value = webidl.converters.DOMString(value, prefix, "Argument 1"); try { this.#serialization = opUrlReparse( this.#serialization, SET_SEARCH, value, ); this.#updateComponents(); this.#updateSearchParams(); } catch { /* pass */ } } /** @return {string} */ get username() { webidl.assertBranded(this, URLPrototype); // https://github.com/servo/rust-url/blob/1d307ae51a28fecc630ecec03380788bfb03a643/url/src/lib.rs#L881 const schemeSeparatorLen = 3; /* :// */ if ( this.#hasAuthority() && this.#usernameEnd > this.#schemeEnd + schemeSeparatorLen ) { return StringPrototypeSlice( this.#serialization, this.#schemeEnd + schemeSeparatorLen, this.#usernameEnd, ); } else { return ""; } } /** @param {string} value */ set username(value) { webidl.assertBranded(this, URLPrototype); const prefix = "Failed to set 'username' on 'URL'"; webidl.requiredArguments(arguments.length, 1, prefix); value = webidl.converters.DOMString(value, prefix, "Argument 1"); try { this.#serialization = opUrlReparse( this.#serialization, SET_USERNAME, value, ); this.#updateComponents(); } catch { /* pass */ } } /** @return {string} */ get searchParams() { if (this.#queryObject == null) { this.#queryObject = new URLSearchParams(this.search); this.#queryObject[_urlObject] = this; } return this.#queryObject; } /** @return {string} */ toString() { webidl.assertBranded(this, URLPrototype); return this.#serialization; } /** @return {string} */ toJSON() { webidl.assertBranded(this, URLPrototype); return this.#serialization; } } webidl.configureInterface(URL); const URLPrototype = URL.prototype; /** * This function implements application/x-www-form-urlencoded parsing. * https://url.spec.whatwg.org/#concept-urlencoded-parser * @param {Uint8Array} bytes * @returns {[string, string][]} */ function parseUrlEncoded(bytes) { return op_url_parse_search_params(null, bytes); } webidl .converters[ "sequence> or record or USVString" ] = (V, prefix, context, opts) => { // Union for (sequence> or record or USVString) if (webidl.type(V) === "Object" && V !== null) { if (V[SymbolIterator] !== undefined) { return webidl.converters["sequence>"]( V, prefix, context, opts, ); } return webidl.converters["record"]( V, prefix, context, opts, ); } return webidl.converters.USVString(V, prefix, context, opts); }; export { parseUrlEncoded, URL, URLPrototype, URLSearchParams, URLSearchParamsPrototype, }; Qc%Iext:deno_url/00_url.jsa b D`M`8 T`Laa T  I`'bSb1 TAAiabcb !bg= BBbbB"BT B????????????????????????????????IbaZ`L` bS]`B]`b]`I"]`]DL`B ` L`B b` L`bB` L`B ` L` b` L`b L`  DDc=C(L` Dcr D i ic.F D m mcJV D q qcZt D u ucx D y yc D } }c Dc` a? ia? ma? qa? ua? ya? }a?a?Ba? a?B a?ba?ba?ab@  T I`JBb@  T I`b@  T I`}##BTb @ $Ld T I`WDWbb@6 a1a TAAiabcb !bg BrE   T I`0TTQbget searchParamsb2?  T I`UeUb3@  T I`UUb4A  TP`\]  5`KdL H8@80$8< m555555 5  5 5 5(SbqqB `DaN$Ub 4 4 4 b5B  T y`\`V`Ub^`KB`WYIabK7C B u`D8h %%%%%%% % % % % %%%%%%%%%%%%%%%%%% %!%"ei e% h  0- %- %- %- %- %- %- % -% -% -% -% ---%-%-b %b"% % % % % % % % % %%%e%%t%t% !"# $ % & ' (e+)2*$ 1-+&0 \(-,*0^,0--.1-.0-/20_4260b8% %!  i:%"1%3e%44e%55e%66e%77e%88e%99e%::e%;;e% <% ?% @%A2tBCDb 1-,*0^@0--B1-.0_02`D  fF2PPPPP@ @P@ @,@,bA })D!19AIQDYaDiq} %1=IUamy !)1ID`RD]DH QGZ+// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @ts-check /// /// /// /// /// import { primordials } from "ext:core/mod.js"; import { op_urlpattern_parse, op_urlpattern_process_match_input, } from "ext:core/ops"; const { ArrayPrototypePush, MathRandom, ObjectAssign, ObjectCreate, ObjectPrototypeIsPrototypeOf, RegExpPrototypeExec, RegExpPrototypeTest, SafeMap, SafeRegExp, Symbol, SymbolFor, TypeError, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; const _components = Symbol("components"); /** * @typedef Components * @property {Component} protocol * @property {Component} username * @property {Component} password * @property {Component} hostname * @property {Component} port * @property {Component} pathname * @property {Component} search * @property {Component} hash */ const COMPONENTS_KEYS = [ "protocol", "username", "password", "hostname", "port", "pathname", "search", "hash", ]; /** * @typedef Component * @property {string} patternString * @property {RegExp} regexp * @property {string[]} groupNameList */ /** * This implements a least-recently-used cache that has a pseudo-"young * generation" by using sampling. The idea is that we want to keep the most * recently used items in the cache, but we don't want to pay the cost of * updating the cache on every access. This relies on the fact that the data * we're caching is not uniformly distributed, and that the most recently used * items are more likely to be used again soon (long tail distribution). * * The LRU cache is implemented as a Map, with the key being the cache key and * the value being the cache value. When an item is accessed, it is moved to the * end of the Map. When an item is inserted, if the Map is at capacity, the * first item in the Map is deleted. Because maps iterate using insertion order, * this means that the oldest item is always the first. * * The sampling is implemented by using a random number generator to decide * whether to update the cache on each access. This means that the cache will * not be updated on every access, but will be updated on a random subset of * accesses. * * @template K * @template V */ class SampledLRUCache { /** @type {SafeMap} */ #map = new SafeMap(); #capacity = 0; #sampleRate = 0.1; /** @type {K} */ #lastUsedKey = undefined; /** @type {V} */ #lastUsedValue = undefined; /** @param {number} capacity */ constructor(capacity) { this.#capacity = capacity; } /** * @param {K} key * @param {(key: K) => V} factory * @return {V} */ getOrInsert(key, factory) { if (this.#lastUsedKey === key) return this.#lastUsedValue; const value = this.#map.get(key); if (value !== undefined) { if (MathRandom() < this.#sampleRate) { // put the item into the map this.#map.delete(key); this.#map.set(key, value); } this.#lastUsedKey = key; this.#lastUsedValue = value; return value; } else { // value doesn't exist yet, create const value = factory(key); if (MathRandom() < this.#sampleRate) { // if the map is at capacity, delete the oldest (first) element if (this.#map.size > this.#capacity) { // deno-lint-ignore prefer-primordials this.#map.delete(this.#map.keys().next().value); } // insert the new value this.#map.set(key, value); } this.#lastUsedKey = key; this.#lastUsedValue = value; return value; } } } const matchInputCache = new SampledLRUCache(4096); class URLPattern { /** @type {Components} */ [_components]; #reusedResult; /** * @param {URLPatternInput} input * @param {string} [baseURL] */ constructor(input, baseURL = undefined) { this[webidl.brand] = webidl.brand; const prefix = "Failed to construct 'URLPattern'"; webidl.requiredArguments(arguments.length, 1, prefix); input = webidl.converters.URLPatternInput(input, prefix, "Argument 1"); if (baseURL !== undefined) { baseURL = webidl.converters.USVString(baseURL, prefix, "Argument 2"); } const components = op_urlpattern_parse(input, baseURL); for (let i = 0; i < COMPONENTS_KEYS.length; ++i) { const key = COMPONENTS_KEYS[i]; try { components[key].regexp = new SafeRegExp( components[key].regexpString, "u", ); } catch (e) { throw new TypeError(`${prefix}: ${key} is invalid; ${e.message}`); } } this[_components] = components; } get protocol() { webidl.assertBranded(this, URLPatternPrototype); return this[_components].protocol.patternString; } get username() { webidl.assertBranded(this, URLPatternPrototype); return this[_components].username.patternString; } get password() { webidl.assertBranded(this, URLPatternPrototype); return this[_components].password.patternString; } get hostname() { webidl.assertBranded(this, URLPatternPrototype); return this[_components].hostname.patternString; } get port() { webidl.assertBranded(this, URLPatternPrototype); return this[_components].port.patternString; } get pathname() { webidl.assertBranded(this, URLPatternPrototype); return this[_components].pathname.patternString; } get search() { webidl.assertBranded(this, URLPatternPrototype); return this[_components].search.patternString; } get hash() { webidl.assertBranded(this, URLPatternPrototype); return this[_components].hash.patternString; } /** * @param {URLPatternInput} input * @param {string} [baseURL] * @returns {boolean} */ test(input, baseURL = undefined) { webidl.assertBranded(this, URLPatternPrototype); const prefix = "Failed to execute 'test' on 'URLPattern'"; webidl.requiredArguments(arguments.length, 1, prefix); input = webidl.converters.URLPatternInput(input, prefix, "Argument 1"); if (baseURL !== undefined) { baseURL = webidl.converters.USVString(baseURL, prefix, "Argument 2"); } const res = baseURL === undefined ? matchInputCache.getOrInsert( input, op_urlpattern_process_match_input, ) : op_urlpattern_process_match_input(input, baseURL); if (res === null) return false; const values = res[0]; for (let i = 0; i < COMPONENTS_KEYS.length; ++i) { const key = COMPONENTS_KEYS[i]; const component = this[_components][key]; switch (component.regexpString) { case "^$": if (values[key] !== "") return false; break; case "^(.*)$": break; default: { if (!RegExpPrototypeTest(component.regexp, values[key])) return false; } } } return true; } /** * @param {URLPatternInput} input * @param {string} [baseURL] * @returns {URLPatternResult | null} */ exec(input, baseURL = undefined) { webidl.assertBranded(this, URLPatternPrototype); const prefix = "Failed to execute 'exec' on 'URLPattern'"; webidl.requiredArguments(arguments.length, 1, prefix); input = webidl.converters.URLPatternInput(input, prefix, "Argument 1"); if (baseURL !== undefined) { baseURL = webidl.converters.USVString(baseURL, prefix, "Argument 2"); } const res = baseURL === undefined ? matchInputCache.getOrInsert( input, op_urlpattern_process_match_input, ) : op_urlpattern_process_match_input(input, baseURL); if (res === null) { return null; } const { 0: values, 1: inputs } = res; /** @type {URLPatternResult} */ // globalThis.allocAttempt++; this.#reusedResult ??= { inputs: [undefined] }; const result = this.#reusedResult; // We don't construct the `inputs` until after the matching is done under // the assumption that most patterns do not match. const components = this[_components]; for (let i = 0; i < COMPONENTS_KEYS.length; ++i) { const key = COMPONENTS_KEYS[i]; /** @type {Component} */ const component = components[key]; const res = result[key] ??= { input: values[key], groups: component.regexpString === "^(.*)$" ? { "0": values[key] } : {}, }; switch (component.regexpString) { case "^$": if (values[key] !== "") return null; break; case "^(.*)$": res.groups["0"] = values[key]; break; default: { const match = RegExpPrototypeExec(component.regexp, values[key]); if (match === null) return null; const groupList = component.groupNameList; const groups = res.groups; for (let i = 0; i < groupList.length; ++i) { // TODO(lucacasonato): this is vulnerable to override mistake groups[groupList[i]] = match[i + 1] ?? ""; } break; } } res.input = values[key]; } // Now populate result.inputs result.inputs[0] = typeof inputs[0] === "string" ? inputs[0] : ObjectAssign(ObjectCreate(null), inputs[0]); if (inputs[1] !== null) ArrayPrototypePush(result.inputs, inputs[1]); this.#reusedResult = undefined; return result; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(URLPatternPrototype, this), keys: [ "protocol", "username", "password", "hostname", "port", "pathname", "search", "hash", ], }), inspectOptions, ); } } webidl.configureInterface(URLPattern); const URLPatternPrototype = URLPattern.prototype; webidl.converters.URLPatternInit = webidl .createDictionaryConverter("URLPatternInit", [ { key: "protocol", converter: webidl.converters.USVString }, { key: "username", converter: webidl.converters.USVString }, { key: "password", converter: webidl.converters.USVString }, { key: "hostname", converter: webidl.converters.USVString }, { key: "port", converter: webidl.converters.USVString }, { key: "pathname", converter: webidl.converters.USVString }, { key: "search", converter: webidl.converters.USVString }, { key: "hash", converter: webidl.converters.USVString }, { key: "baseURL", converter: webidl.converters.USVString }, ]); webidl.converters["URLPatternInput"] = (V, prefix, context, opts) => { // Union for (URLPatternInit or USVString) if (typeof V == "object") { return webidl.converters.URLPatternInit(V, prefix, context, opts); } return webidl.converters.USVString(V, prefix, context, opts); }; export { URLPattern }; Qd29ext:deno_url/01_urlpattern.jsa b D`PM` T` LaBU Laa A? !B6B>!$% Br= B  `(M`""QDSb @""  f????? 7Sb1A? !B6B>!$%"#n???????????????Ib+`L` bS]`fB]`b]`"]`!]L`"` L`" L`  DDcL` Dc D  c D  c DcS^`a? a? a?a?"a?  `T ``/ `/ `?  `  a 7D]$ ` aj!aj]""   T0` L`   `De - ] 4(SbpGB`Da .  aib ՃE  T  I` 5!b F  T@`;L`!$Y`?  `KcPtL#i i5 5555 (SbqqB`Da 7 a 4 4bG  ,Sb @#c??ms'  `T ``/ `/ `?  `  ams'D]ff D } ` F` DQ ` F` Db{a DEa D `F` D" `F`  `F`  `F` " ` F` D aD `F` HcD La8# T  I`A"%ib ՃH  T I`QQb get protocolb I  T I`EQb get usernameb J  T I`UQb get passwordb K  T I`IQb get hostnameb L  T I`U Qaget portb M  T I`EQb get pathnameb  N  T I`SQb get searchb  O  T I`= Qaget hashb P  T I`b{b Q  T I`%bR  T I`%q'`b(S  T,`]  `Kb { D d55(Sbqq"`Da~s' a 4bT b^B%  `,Li  ba ‰Ci‰ ba ‰C ba ‰C ba ‰C ba "‰C ba "‰C ba Q‰C ba ‰C ba #‰C T  y`!``b^`b&`*+IibKU b&  }`Dh %%%%%%% % % % %%%%ei e% h  0-%-%-%-%- %- %- % - % - % ---% b%{%%e%e%e%e%e%e+2  i%%  e%!t%"#$%&' ( ) * + ,bt-e+.2! 1 -/#0^%0-0'% -1) -2+3{4- ~5.) -1)-6/371 63 ~85) -1)-66378 63 ~9:) -1)-6;37= 63 ~:?) -1)-6@37B 63 ~;D) -1)-6E37G 63 ~S) -1)-6T37V 63 ~?X) -1)-6Y37[ 63_]23_ -1)@2Aa ,icPPPP  9 &00 Y `&00 `bAD aiu%D`RD]DH UQQ.// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @ts-check /// /// /// /// import { core, internals, primordials } from "ext:core/mod.js"; import { op_base64_decode, op_base64_encode } from "ext:core/ops"; const { ArrayPrototypeJoin, ArrayPrototypeMap, decodeURIComponent, Error, JSONStringify, NumberPrototypeToString, ObjectPrototypeIsPrototypeOf, RegExpPrototypeTest, SafeArrayIterator, SafeRegExp, String, StringPrototypeCharAt, StringPrototypeCharCodeAt, StringPrototypeMatch, StringPrototypePadStart, StringPrototypeReplace, StringPrototypeReplaceAll, StringPrototypeSlice, StringPrototypeSubstring, StringPrototypeToLowerCase, StringPrototypeToUpperCase, Symbol, TypeError, } = primordials; import { URLPrototype } from "ext:deno_url/00_url.js"; const ASCII_DIGIT = ["\u0030-\u0039"]; const ASCII_UPPER_ALPHA = ["\u0041-\u005A"]; const ASCII_LOWER_ALPHA = ["\u0061-\u007A"]; const ASCII_ALPHA = [ ...new SafeArrayIterator(ASCII_UPPER_ALPHA), ...new SafeArrayIterator(ASCII_LOWER_ALPHA), ]; const ASCII_ALPHANUMERIC = [ ...new SafeArrayIterator(ASCII_DIGIT), ...new SafeArrayIterator(ASCII_ALPHA), ]; const HTTP_TAB_OR_SPACE = ["\u0009", "\u0020"]; const HTTP_WHITESPACE = [ "\u000A", "\u000D", ...new SafeArrayIterator(HTTP_TAB_OR_SPACE), ]; const HTTP_TOKEN_CODE_POINT = [ "\u0021", "\u0023", "\u0024", "\u0025", "\u0026", "\u0027", "\u002A", "\u002B", "\u002D", "\u002E", "\u005E", "\u005F", "\u0060", "\u007C", "\u007E", ...new SafeArrayIterator(ASCII_ALPHANUMERIC), ]; const HTTP_TOKEN_CODE_POINT_RE = new SafeRegExp( `^[${regexMatcher(HTTP_TOKEN_CODE_POINT)}]+$`, ); const HTTP_QUOTED_STRING_TOKEN_POINT = [ "\u0009", "\u0020-\u007E", "\u0080-\u00FF", ]; const HTTP_QUOTED_STRING_TOKEN_POINT_RE = new SafeRegExp( `^[${regexMatcher(HTTP_QUOTED_STRING_TOKEN_POINT)}]+$`, ); const HTTP_TAB_OR_SPACE_MATCHER = regexMatcher(HTTP_TAB_OR_SPACE); const HTTP_TAB_OR_SPACE_PREFIX_RE = new SafeRegExp( `^[${HTTP_TAB_OR_SPACE_MATCHER}]+`, "g", ); const HTTP_TAB_OR_SPACE_SUFFIX_RE = new SafeRegExp( `[${HTTP_TAB_OR_SPACE_MATCHER}]+$`, "g", ); const HTTP_WHITESPACE_MATCHER = regexMatcher(HTTP_WHITESPACE); const HTTP_BETWEEN_WHITESPACE = new SafeRegExp( `^[${HTTP_WHITESPACE_MATCHER}]*(.*?)[${HTTP_WHITESPACE_MATCHER}]*$`, ); const HTTP_WHITESPACE_PREFIX_RE = new SafeRegExp( `^[${HTTP_WHITESPACE_MATCHER}]+`, "g", ); const HTTP_WHITESPACE_SUFFIX_RE = new SafeRegExp( `[${HTTP_WHITESPACE_MATCHER}]+$`, "g", ); /** * Turn a string of chars into a regex safe matcher. * @param {string[]} chars * @returns {string} */ function regexMatcher(chars) { const matchers = ArrayPrototypeMap(chars, (char) => { if (char.length === 1) { const a = StringPrototypePadStart( NumberPrototypeToString(StringPrototypeCharCodeAt(char, 0), 16), 4, "0", ); return `\\u${a}`; } else if (char.length === 3 && char[1] === "-") { const a = StringPrototypePadStart( NumberPrototypeToString(StringPrototypeCharCodeAt(char, 0), 16), 4, "0", ); const b = StringPrototypePadStart( NumberPrototypeToString(StringPrototypeCharCodeAt(char, 2), 16), 4, "0", ); return `\\u${a}-\\u${b}`; } else { throw TypeError("unreachable"); } }); return ArrayPrototypeJoin(matchers, ""); } /** * https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points * @param {string} input * @param {number} position * @param {(char: string) => boolean} condition * @returns {{result: string, position: number}} */ function collectSequenceOfCodepoints(input, position, condition) { const start = position; for ( let c = StringPrototypeCharAt(input, position); position < input.length && condition(c); c = StringPrototypeCharAt(input, ++position) ); return { result: StringPrototypeSlice(input, start, position), position }; } const LOWERCASE_PATTERN = new SafeRegExp(/[a-z]/g); /** * @param {string} s * @returns {string} */ function byteUpperCase(s) { return StringPrototypeReplace( String(s), LOWERCASE_PATTERN, function byteUpperCaseReplace(c) { return StringPrototypeToUpperCase(c); }, ); } /** * @param {string} s * @returns {string} */ function byteLowerCase(s) { // NOTE: correct since all callers convert to ByteString first // TODO(@AaronO): maybe prefer a ByteString_Lower webidl converter return StringPrototypeToLowerCase(s); } /** * https://fetch.spec.whatwg.org/#collect-an-http-quoted-string * @param {string} input * @param {number} position * @param {boolean} extractValue * @returns {{result: string, position: number}} */ function collectHttpQuotedString(input, position, extractValue) { // 1. const positionStart = position; // 2. let value = ""; // 3. if (input[position] !== "\u0022") throw new TypeError('must be "'); // 4. position++; // 5. while (true) { // 5.1. const res = collectSequenceOfCodepoints( input, position, (c) => c !== "\u0022" && c !== "\u005C", ); value += res.result; position = res.position; // 5.2. if (position >= input.length) break; // 5.3. const quoteOrBackslash = input[position]; // 5.4. position++; // 5.5. if (quoteOrBackslash === "\u005C") { // 5.5.1. if (position >= input.length) { value += "\u005C"; break; } // 5.5.2. value += input[position]; // 5.5.3. position++; } else { // 5.6. // 5.6.1 if (quoteOrBackslash !== "\u0022") throw new TypeError('must be "'); // 5.6.2 break; } } // 6. if (extractValue) return { result: value, position }; // 7. return { result: StringPrototypeSubstring(input, positionStart, position + 1), position, }; } /** * @param {Uint8Array} data * @returns {string} */ function forgivingBase64Encode(data) { return op_base64_encode(data); } /** * @param {string} data * @returns {Uint8Array} */ function forgivingBase64Decode(data) { return op_base64_decode(data); } // Taken from std/encoding/base64url.ts /* * Some variants allow or require omitting the padding '=' signs: * https://en.wikipedia.org/wiki/Base64#The_URL_applications * @param base64url */ /** * @param {string} base64url * @returns {string} */ function addPaddingToBase64url(base64url) { if (base64url.length % 4 === 2) return base64url + "=="; if (base64url.length % 4 === 3) return base64url + "="; if (base64url.length % 4 === 1) { throw new TypeError("Illegal base64url string!"); } return base64url; } const BASE64URL_PATTERN = new SafeRegExp(/^[-_A-Z0-9]*?={0,2}$/i); /** * @param {string} base64url * @returns {string} */ function convertBase64urlToBase64(base64url) { if (!RegExpPrototypeTest(BASE64URL_PATTERN, base64url)) { // Contains characters not part of base64url spec. throw new TypeError("Failed to decode base64url: invalid character"); } return StringPrototypeReplaceAll( StringPrototypeReplaceAll( addPaddingToBase64url(base64url), "-", "+", ), "_", "/", ); } /** * Encodes a given ArrayBuffer or string into a base64url representation * @param {ArrayBuffer | string} data * @returns {string} */ function forgivingBase64UrlEncode(data) { return StringPrototypeReplaceAll( StringPrototypeReplaceAll( StringPrototypeReplaceAll( forgivingBase64Encode( typeof data === "string" ? new TextEncoder().encode(data) : data, ), "=", "", ), "+", "-", ), "/", "_", ); } /** * Converts given base64url encoded data back to original * @param {string} b64url * @returns {Uint8Array} */ function forgivingBase64UrlDecode(b64url) { return forgivingBase64Decode(convertBase64urlToBase64(b64url)); } /** * @param {string} char * @returns {boolean} */ function isHttpWhitespace(char) { switch (char) { case "\u0009": case "\u000A": case "\u000D": case "\u0020": return true; default: return false; } } /** * @param {string} s * @returns {string} */ function httpTrim(s) { if (!isHttpWhitespace(s[0]) && !isHttpWhitespace(s[s.length - 1])) { return s; } return StringPrototypeMatch(s, HTTP_BETWEEN_WHITESPACE)?.[1] ?? ""; } class AssertionError extends Error { constructor(msg) { super(msg); this.name = "AssertionError"; } } /** * @param {unknown} cond * @param {string=} msg * @returns {asserts cond} */ function assert(cond, msg = "Assertion failed.") { if (!cond) { throw new AssertionError(msg); } } /** * @param {unknown} value * @returns {string} */ function serializeJSValueToJSONString(value) { const result = JSONStringify(value); if (result === undefined) { throw new TypeError("Value is not JSON serializable."); } return result; } const PATHNAME_WIN_RE = new SafeRegExp(/^\/*([A-Za-z]:)(\/|$)/); const SLASH_WIN_RE = new SafeRegExp(/\//g); const PERCENT_RE = new SafeRegExp(/%(?![0-9A-Fa-f]{2})/g); // Keep in sync with `fromFileUrl()` in `std/path/win32.ts`. /** * @param {URL} url * @returns {string} */ function pathFromURLWin32(url) { let p = StringPrototypeReplace( url.pathname, PATHNAME_WIN_RE, "$1/", ); p = StringPrototypeReplace( p, SLASH_WIN_RE, "\\", ); p = StringPrototypeReplace( p, PERCENT_RE, "%25", ); let path = decodeURIComponent(p); if (url.hostname != "") { // Note: The `URL` implementation guarantees that the drive letter and // hostname are mutually exclusive. Otherwise it would not have been valid // to append the hostname and path like this. path = `\\\\${url.hostname}${path}`; } return path; } // Keep in sync with `fromFileUrl()` in `std/path/posix.ts`. /** * @param {URL} url * @returns {string} */ function pathFromURLPosix(url) { if (url.hostname !== "") { throw new TypeError(`Host must be empty.`); } return decodeURIComponent( StringPrototypeReplace( url.pathname, PERCENT_RE, "%25", ), ); } function pathFromURL(pathOrUrl) { if (ObjectPrototypeIsPrototypeOf(URLPrototype, pathOrUrl)) { if (pathOrUrl.protocol != "file:") { throw new TypeError("Must be a file URL."); } return core.build.os == "windows" ? pathFromURLWin32(pathOrUrl) : pathFromURLPosix(pathOrUrl); } return pathOrUrl; } // NOTE(bartlomieju): this is exposed on `internals` so we can test // it in unit tests internals.pathFromURL = pathFromURL; // deno-lint-ignore prefer-primordials export const SymbolDispose = Symbol.dispose ?? Symbol("Symbol.dispose"); // deno-lint-ignore prefer-primordials export const SymbolAsyncDispose = Symbol.asyncDispose ?? Symbol("Symbol.asyncDispose"); // deno-lint-ignore prefer-primordials export const SymbolMetadata = Symbol.metadata ?? Symbol("Symbol.metadata"); export { ASCII_ALPHA, ASCII_ALPHANUMERIC, ASCII_DIGIT, ASCII_LOWER_ALPHA, ASCII_UPPER_ALPHA, assert, AssertionError, byteLowerCase, byteUpperCase, collectHttpQuotedString, collectSequenceOfCodepoints, forgivingBase64Decode, forgivingBase64Encode, forgivingBase64UrlDecode, forgivingBase64UrlEncode, HTTP_QUOTED_STRING_TOKEN_POINT, HTTP_QUOTED_STRING_TOKEN_POINT_RE, HTTP_TAB_OR_SPACE, HTTP_TAB_OR_SPACE_PREFIX_RE, HTTP_TAB_OR_SPACE_SUFFIX_RE, HTTP_TOKEN_CODE_POINT, HTTP_TOKEN_CODE_POINT_RE, HTTP_WHITESPACE, HTTP_WHITESPACE_PREFIX_RE, HTTP_WHITESPACE_SUFFIX_RE, httpTrim, pathFromURL, regexMatcher, serializeJSValueToJSONString, }; Qc Hext:deno_web/00_infra.jsa b D`dM` T5`!LaB T  I`"?Sb1!B3!B>SS"]_`abfnbo= 4"9"?B@ABDEGGII}??????????????????????????????Ib.`L` bS]`PB]`&]`]L``b*` L`b**` L`*'` L`'b)` L`b)b(` L`b(` L`"/` L`"/0` L`0+`  L`+B2`  L`B2b3`  L`b3,`  L`,B-`  L`B-",` L`","6` L`"66` L`6L` L`LbK` L`bKN` L`N ` L`B;` L`B;":` L`":;` L`;b8` L`b8>` L`>=` L`=BC` L`BC"B` L`"BD` L`DbJ` L`bJB.` L`B."E`  L`"E] L`  Dbbc D  c,0 DBKBKc2; D  cl| D  c~ Dc=H`& a?BKa?a? a? a?ba?'a?b(a?b)a?b*a?*a?+a ?",a?,a ?B-a ?"/a?0a?B2a ?b3a ?"6a?6a?B.a?b8a?":a?B;a?;a?=a?>a?"Ba?BCa?Da?a?a?"Ea ?bJa?bKa?La?Na?Eb@ d  T I` Aib!@ e  T  I`, BDb@f  T I`%P'Ib@g  T I`'(Ib@h Lo:    T0`L` T`0L` _S BB= By  U `D|@- m8  c c ` x8 - m y / m l  c c ` c c ` x88 x8 b(SbbpWI`Daw icD @@@EbK!I I `De łcc(SbqAB.`DaA 3 ab@W a T  I`;ab8b$@X a T I`b "#@":b@Y a T I`B;b@Z a  T I`};b @[ a  T I`;f=b@ \ a  T I`>b@ ] a  T I`"Bb!@ ^ a  T I`BCb!@_ a T I`!!Db@` b T I`"" b@a a T I`H##"Eb%@b a  T I`()bJb@c da !B 3!B>%SS"]_`abfnbo =   ` M`( ` M`) ` M`*  `M`b `L`"B `DL`B"B&'b'12-. `M`/B03*%b559@  `T ``/ `/ `?  `  a!*"D] ` aj] T  I`!("iEb i bFGbHBKbJKBLbMMObO  Y`Dhh %%%%%%% % % % % %%%%%%%%%%%%%%%%%%% ei h  0 - %- %- %- -%- %- %-% ---% -% -% -% -%-%- %-"%-$%-&%-(%-*- ,%{!.%1{"/%1{#0%10 i1|-$30 i579-%;]De-&F-'=6B PAH 10 iI|-$K0 iMOQ-%S]\e-&^-'U6Z PY` 1{(a%1 {)b% 0 iceg-%i]re-&t-'k6p Pov 1{*w% 0 ixz|-%~]e-&-'6 P 1 +00 bx8,8 i1 {-%1+00bx8,8 i100 b+ x8.8/ i1 0 x8,8/ i1 00b+ x818 x828 i%+ x8.8/ i10 x8,8/ i1z3 i%z4 i%65e+ 1z7 i%z8 i%z9 i%0:02;-< =b1-> ?b1-@à Ab1 LqPPPPPPP0'  P  PwN  p'@P B`BH @ L&L&L bAV E Q u } D  D  a!   )  !!  1 9  D`RD]DH  Q :8// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @ts-check /// /// /// /// /// import { primordials } from "ext:core/mod.js"; const { ArrayPrototypeSlice, Error, ErrorPrototype, ObjectDefineProperty, ObjectCreate, ObjectEntries, ObjectPrototypeIsPrototypeOf, ObjectSetPrototypeOf, Symbol, SymbolFor, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; const _name = Symbol("name"); const _message = Symbol("message"); const _code = Symbol("code"); const _error = Symbol("error"); // Defined in WebIDL 4.3. // https://webidl.spec.whatwg.org/#idl-DOMException const INDEX_SIZE_ERR = 1; const DOMSTRING_SIZE_ERR = 2; const HIERARCHY_REQUEST_ERR = 3; const WRONG_DOCUMENT_ERR = 4; const INVALID_CHARACTER_ERR = 5; const NO_DATA_ALLOWED_ERR = 6; const NO_MODIFICATION_ALLOWED_ERR = 7; const NOT_FOUND_ERR = 8; const NOT_SUPPORTED_ERR = 9; const INUSE_ATTRIBUTE_ERR = 10; const INVALID_STATE_ERR = 11; const SYNTAX_ERR = 12; const INVALID_MODIFICATION_ERR = 13; const NAMESPACE_ERR = 14; const INVALID_ACCESS_ERR = 15; const VALIDATION_ERR = 16; const TYPE_MISMATCH_ERR = 17; const SECURITY_ERR = 18; const NETWORK_ERR = 19; const ABORT_ERR = 20; const URL_MISMATCH_ERR = 21; const QUOTA_EXCEEDED_ERR = 22; const TIMEOUT_ERR = 23; const INVALID_NODE_TYPE_ERR = 24; const DATA_CLONE_ERR = 25; // Defined in WebIDL 2.8.1. // https://webidl.spec.whatwg.org/#dfn-error-names-table /** @type {Record} */ // the prototype should be null, to prevent user code from looking // up Object.prototype properties, such as "toString" const nameToCodeMapping = ObjectCreate(null, { IndexSizeError: { value: INDEX_SIZE_ERR }, HierarchyRequestError: { value: HIERARCHY_REQUEST_ERR }, WrongDocumentError: { value: WRONG_DOCUMENT_ERR }, InvalidCharacterError: { value: INVALID_CHARACTER_ERR }, NoModificationAllowedError: { value: NO_MODIFICATION_ALLOWED_ERR }, NotFoundError: { value: NOT_FOUND_ERR }, NotSupportedError: { value: NOT_SUPPORTED_ERR }, InUseAttributeError: { value: INUSE_ATTRIBUTE_ERR }, InvalidStateError: { value: INVALID_STATE_ERR }, SyntaxError: { value: SYNTAX_ERR }, InvalidModificationError: { value: INVALID_MODIFICATION_ERR }, NamespaceError: { value: NAMESPACE_ERR }, InvalidAccessError: { value: INVALID_ACCESS_ERR }, TypeMismatchError: { value: TYPE_MISMATCH_ERR }, SecurityError: { value: SECURITY_ERR }, NetworkError: { value: NETWORK_ERR }, AbortError: { value: ABORT_ERR }, URLMismatchError: { value: URL_MISMATCH_ERR }, QuotaExceededError: { value: QUOTA_EXCEEDED_ERR }, TimeoutError: { value: TIMEOUT_ERR }, InvalidNodeTypeError: { value: INVALID_NODE_TYPE_ERR }, DataCloneError: { value: DATA_CLONE_ERR }, }); // Defined in WebIDL 4.3. // https://webidl.spec.whatwg.org/#idl-DOMException class DOMException { [_message]; [_name]; [_code]; // https://webidl.spec.whatwg.org/#dom-domexception-domexception constructor(message = "", name = "Error") { message = webidl.converters.DOMString( message, "Failed to construct 'DOMException'", "Argument 1", ); name = webidl.converters.DOMString( name, "Failed to construct 'DOMException'", "Argument 2", ); const code = nameToCodeMapping[name] ?? 0; this[_message] = message; this[_name] = name; this[_code] = code; this[webidl.brand] = webidl.brand; this[_error] = new Error(message); this[_error].name = "DOMException"; } get message() { webidl.assertBranded(this, DOMExceptionPrototype); return this[_message]; } get name() { webidl.assertBranded(this, DOMExceptionPrototype); return this[_name]; } get code() { webidl.assertBranded(this, DOMExceptionPrototype); return this[_code]; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { if (ObjectPrototypeIsPrototypeOf(DOMExceptionPrototype, this)) { return this[_error].stack; } else { return inspect( createFilteredInspectProxy({ object: this, evaluate: false, keys: [ "message", "name", "code", ], }), inspectOptions, ); } } } ObjectDefineProperty(DOMException.prototype, "stack", { get() { return this[_error].stack; }, set(value) { this[_error].stack = value; }, configurable: true, }); // `DOMException` isn't a native error, so `Error.prepareStackTrace()` is // not called when accessing `.stack`, meaning our structured stack trace // hack doesn't apply. This patches it in. ObjectDefineProperty(DOMException.prototype, "__callSiteEvals", { get() { return ArrayPrototypeSlice(this[_error].__callSiteEvals, 1); }, configurable: true, }); ObjectSetPrototypeOf(DOMException.prototype, ErrorPrototype); webidl.configureInterface(DOMException); const DOMExceptionPrototype = DOMException.prototype; const entries = ObjectEntries({ INDEX_SIZE_ERR, DOMSTRING_SIZE_ERR, HIERARCHY_REQUEST_ERR, WRONG_DOCUMENT_ERR, INVALID_CHARACTER_ERR, NO_DATA_ALLOWED_ERR, NO_MODIFICATION_ALLOWED_ERR, NOT_FOUND_ERR, NOT_SUPPORTED_ERR, INUSE_ATTRIBUTE_ERR, INVALID_STATE_ERR, SYNTAX_ERR, INVALID_MODIFICATION_ERR, NAMESPACE_ERR, INVALID_ACCESS_ERR, VALIDATION_ERR, TYPE_MISMATCH_ERR, SECURITY_ERR, NETWORK_ERR, ABORT_ERR, URL_MISMATCH_ERR, QUOTA_EXCEEDED_ERR, TIMEOUT_ERR, INVALID_NODE_TYPE_ERR, DATA_CLONE_ERR, }); for (let i = 0; i < entries.length; ++i) { const { 0: key, 1: value } = entries[i]; const desc = { value, enumerable: true }; ObjectDefineProperty(DOMException, key, desc); ObjectDefineProperty(DOMException.prototype, key, desc); } export { DOMException, DOMExceptionPrototype }; QdN ext:deno_web/01_dom_exception.jsa b D`0M`  Ty`LarELba a   ! BrYq1b,b`C`CaC"bCbCcCdCdCBeC CeCfCgCgCBhChCBiCiCBjCjCbkClCbCb`bC`bCabC"bbCbbCcbCdbCdbCBebCbCebCfbCgbCgbCBhbChbCBibCibCBjbCjbCbkbCl4Sb @md???G Sb1 a !OBPPQ_h?????????Ib`L` bS]`pb]`o"]`] L`l` L`lm` L`m L`  DDcciL` Dc Dc]h`a?a?la?ma?  ` T ``/ `/ `?  `  aG D]fD } `F` D aDY `F` q `F` HcD La$ T  I` l!1!b Ճk  T I`OQb get messageb l  T I`[ Qaget namebm  T I` Qaget codebn  T I`A`b(o  T0`]  E"`Kb b 8, *e555(Sbqql`DaZ  a 4bp  (bCCG T  I`:!1!bq  T I`Anbr "n bCG T I`b s ؕb2bQCQCRC"SCSCbTCUCUCBVCVCWC"XCXCBYCYCbZCZC[C\C\C]C]C"^C^CB_CbQQR"SSbTUUBVVW"XXBYYbZZ[\\]]"^^B_ bCG  E!`Dah %%%%%% % % ei e% ''h  ҩ ҫ0-%-%--- - - %- - -b%b%b% b%                         ~~) 3 3 ~") 3# 3%~') 3( 3*~,) 3- 3/~1) 32 34~6) 37 3 9~!;) 3< 3">~#@) 3A 3$C~%E) 3F 3&H~'J) 3K 3(M~)O) 3P 3*R~+T) 3U 3,W~-Y) 3Z 3.\~/^) 3_ 30a~1c) 3d 32f~3h) 3i 34k~5m) 3n 36p~7r) 3s 38u~9w) 3x 3:z~;|) 3} 3<~=) 3 3>~?) 3 3@cЋ% A%%%΂CBt%t% t%˂DʂEɂFGbōtǂHe+ I2J 10-KL~M)ςN3OP3Q`0-KR~S)ςT3O`0-Kc-U0^У0-K1~V) 3W 3X 3Y 3Z 3[ 3\ 3] 3^ 3_ 3` 3a 3b 3c 3d 3e 3f 3g 3h 3i 3j 3k 3l 3m 3n 3ob -pnܛ[ / / /~q) 30`0-K` P֋^ ׫Xt PPP@0' 00 L`2& 00 L`2& 00 L`2& 00 L 0 0 0 0 0 0 0 0 0& @bAj  ""!"-"9"A"]"e"q"D`RD]DH EQA>u(// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @ts-check /// /// /// /// import { primordials } from "ext:core/mod.js"; const { ArrayPrototypeIncludes, MapPrototypeGet, MapPrototypeHas, MapPrototypeSet, RegExpPrototypeTest, RegExpPrototypeExec, SafeMap, SafeMapIterator, StringPrototypeReplaceAll, StringPrototypeToLowerCase, StringPrototypeEndsWith, Uint8Array, TypedArrayPrototypeGetLength, TypedArrayPrototypeIncludes, } = primordials; import { assert, collectHttpQuotedString, collectSequenceOfCodepoints, HTTP_QUOTED_STRING_TOKEN_POINT_RE, HTTP_TOKEN_CODE_POINT_RE, HTTP_WHITESPACE, HTTP_WHITESPACE_PREFIX_RE, HTTP_WHITESPACE_SUFFIX_RE, } from "ext:deno_web/00_infra.js"; /** * @typedef MimeType * @property {string} type * @property {string} subtype * @property {Map} parameters */ /** * @param {string} input * @returns {MimeType | null} */ function parseMimeType(input) { // 1. input = StringPrototypeReplaceAll(input, HTTP_WHITESPACE_PREFIX_RE, ""); input = StringPrototypeReplaceAll(input, HTTP_WHITESPACE_SUFFIX_RE, ""); // 2. let position = 0; const endOfInput = input.length; // 3. const res1 = collectSequenceOfCodepoints( input, position, (c) => c != "\u002F", ); const type = res1.result; position = res1.position; // 4. if (type === "" || !RegExpPrototypeTest(HTTP_TOKEN_CODE_POINT_RE, type)) { return null; } // 5. if (position >= endOfInput) return null; // 6. position++; // 7. const res2 = collectSequenceOfCodepoints( input, position, (c) => c != "\u003B", ); let subtype = res2.result; position = res2.position; // 8. subtype = StringPrototypeReplaceAll(subtype, HTTP_WHITESPACE_SUFFIX_RE, ""); // 9. if ( subtype === "" || !RegExpPrototypeTest(HTTP_TOKEN_CODE_POINT_RE, subtype) ) { return null; } // 10. const mimeType = { type: StringPrototypeToLowerCase(type), subtype: StringPrototypeToLowerCase(subtype), /** @type {Map} */ parameters: new SafeMap(), }; // 11. while (position < endOfInput) { // 11.1. position++; // 11.2. const res1 = collectSequenceOfCodepoints( input, position, (c) => ArrayPrototypeIncludes(HTTP_WHITESPACE, c), ); position = res1.position; // 11.3. const res2 = collectSequenceOfCodepoints( input, position, (c) => c !== "\u003B" && c !== "\u003D", ); let parameterName = res2.result; position = res2.position; // 11.4. parameterName = StringPrototypeToLowerCase(parameterName); // 11.5. if (position < endOfInput) { if (input[position] == "\u003B") continue; position++; } // 11.6. if (position >= endOfInput) break; // 11.7. let parameterValue = null; // 11.8. if (input[position] === "\u0022") { // 11.8.1. const res = collectHttpQuotedString(input, position, true); parameterValue = res.result; position = res.position; // 11.8.2. position++; } else { // 11.9. // 11.9.1. const res = collectSequenceOfCodepoints( input, position, (c) => c !== "\u003B", ); parameterValue = res.result; position = res.position; // 11.9.2. parameterValue = StringPrototypeReplaceAll( parameterValue, HTTP_WHITESPACE_SUFFIX_RE, "", ); // 11.9.3. if (parameterValue === "") continue; } // 11.10. if ( parameterName !== "" && RegExpPrototypeTest(HTTP_TOKEN_CODE_POINT_RE, parameterName) && RegExpPrototypeTest( HTTP_QUOTED_STRING_TOKEN_POINT_RE, parameterValue, ) && !MapPrototypeHas(mimeType.parameters, parameterName) ) { MapPrototypeSet(mimeType.parameters, parameterName, parameterValue); } } // 12. return mimeType; } /** * @param {MimeType} mimeType * @returns {string} */ function essence(mimeType) { return `${mimeType.type}/${mimeType.subtype}`; } /** * @param {MimeType} mimeType * @returns {string} */ function serializeMimeType(mimeType) { let serialization = essence(mimeType); for (const param of new SafeMapIterator(mimeType.parameters)) { serialization += `;${param[0]}=`; let value = param[1]; if (RegExpPrototypeExec(HTTP_TOKEN_CODE_POINT_RE, value) === null) { value = StringPrototypeReplaceAll(value, "\\", "\\\\"); value = StringPrototypeReplaceAll(value, '"', '\\"'); value = `"${value}"`; } serialization += value; } return serialization; } /** * Part of the Fetch spec's "extract a MIME type" algorithm * (https://fetch.spec.whatwg.org/#concept-header-extract-mime-type). * @param {string[] | null} headerValues The result of getting, decoding and * splitting the "Content-Type" header. * @returns {MimeType | null} */ function extractMimeType(headerValues) { if (headerValues === null) return null; let charset = null; let essence_ = null; let mimeType = null; for (let i = 0; i < headerValues.length; ++i) { const value = headerValues[i]; const temporaryMimeType = parseMimeType(value); if ( temporaryMimeType === null || essence(temporaryMimeType) == "*/*" ) { continue; } mimeType = temporaryMimeType; if (essence(mimeType) !== essence_) { charset = null; const newCharset = MapPrototypeGet(mimeType.parameters, "charset"); if (newCharset !== undefined) { charset = newCharset; } essence_ = essence(mimeType); } else { if ( !MapPrototypeHas(mimeType.parameters, "charset") && charset !== null ) { MapPrototypeSet(mimeType.parameters, "charset", charset); } } } return mimeType; } /** * Ref: https://mimesniff.spec.whatwg.org/#xml-mime-type * @param {MimeType} mimeType * @returns {boolean} */ function isXML(mimeType) { return StringPrototypeEndsWith(mimeType.subtype, "+xml") || essence(mimeType) === "text/xml" || essence(mimeType) === "application/xml"; } /** * Ref: https://mimesniff.spec.whatwg.org/#pattern-matching-algorithm * @param {Uint8Array} input * @param {Uint8Array} pattern * @param {Uint8Array} mask * @param {Uint8Array} ignored * @returns {boolean} */ function patternMatchingAlgorithm(input, pattern, mask, ignored) { assert( TypedArrayPrototypeGetLength(pattern) === TypedArrayPrototypeGetLength(mask), ); if ( TypedArrayPrototypeGetLength(input) < TypedArrayPrototypeGetLength(pattern) ) { return false; } let s = 0; for (; s < TypedArrayPrototypeGetLength(input); s++) { if (!TypedArrayPrototypeIncludes(ignored, input[s])) { break; } } let p = 0; for (; p < TypedArrayPrototypeGetLength(pattern); p++, s++) { const maskedData = input[s] & mask[p]; if (maskedData !== pattern[p]) { return false; } } return true; } const ImageTypePatternTable = [ // A Windows Icon signature. [ new Uint8Array([0x00, 0x00, 0x01, 0x00]), new Uint8Array([0xFF, 0xFF, 0xFF, 0xFF]), new Uint8Array(), "image/x-icon", ], // A Windows Cursor signature. [ new Uint8Array([0x00, 0x00, 0x02, 0x00]), new Uint8Array([0xFF, 0xFF, 0xFF, 0xFF]), new Uint8Array(), "image/x-icon", ], // The string "BM", a BMP signature. [ new Uint8Array([0x42, 0x4D]), new Uint8Array([0xFF, 0xFF]), new Uint8Array(), "image/bmp", ], // The string "GIF87a", a GIF signature. [ new Uint8Array([0x47, 0x49, 0x46, 0x38, 0x37, 0x61]), new Uint8Array([0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]), new Uint8Array(), "image/gif", ], // The string "GIF89a", a GIF signature. [ new Uint8Array([0x47, 0x49, 0x46, 0x38, 0x39, 0x61]), new Uint8Array([0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]), new Uint8Array(), "image/gif", ], // The string "RIFF" followed by four bytes followed by the string "WEBPVP". [ new Uint8Array([ 0x52, 0x49, 0x46, 0x46, 0x00, 0x00, 0x00, 0x00, 0x57, 0x45, 0x42, 0x50, 0x56, 0x50, ]), new Uint8Array([ 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, ]), new Uint8Array(), "image/webp", ], // An error-checking byte followed by the string "PNG" followed by CR LF SUB LF, the PNG signature. [ new Uint8Array([0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A]), new Uint8Array([0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]), new Uint8Array(), "image/png", ], // The JPEG Start of Image marker followed by the indicator byte of another marker. [ new Uint8Array([0xFF, 0xD8, 0xFF]), new Uint8Array([0xFF, 0xFF, 0xFF]), new Uint8Array(), "image/jpeg", ], ]; /** * Ref: https://mimesniff.spec.whatwg.org/#image-type-pattern-matching-algorithm * @param {Uint8Array} input * @returns {string | undefined} */ function imageTypePatternMatchingAlgorithm(input) { for (let i = 0; i < ImageTypePatternTable.length; i++) { const row = ImageTypePatternTable[i]; const patternMatched = patternMatchingAlgorithm( input, row[0], row[1], row[2], ); if (patternMatched) { return row[3]; } } return undefined; } /** * Ref: https://mimesniff.spec.whatwg.org/#rules-for-sniffing-images-specifically * @param {string} mimeTypeString * @returns {string} */ function sniffImage(mimeTypeString) { const mimeType = parseMimeType(mimeTypeString); if (mimeType === null) { return mimeTypeString; } if (isXML(mimeType)) { return mimeTypeString; } const imageTypeMatched = imageTypePatternMatchingAlgorithm( new TextEncoder().encode(mimeTypeString), ); if (imageTypeMatched !== undefined) { return imageTypeMatched; } return mimeTypeString; } export { essence, extractMimeType, parseMimeType, serializeMimeType, sniffImage, }; Qd.Ӡext:deno_web/01_mimesniff.jsa bD`@M` T`La/] T  I`1wYSb1cB>B6!$anUbBwwyb}p?????????????????Ibu(`L` bS]`?n]`]DL`r` L`rt` L`tBo` L`Bo"s` L`"s~` L`~],L`   D00c DB-B-c": D",",c>M D"6"6cQj D66cn D c D;;c Db8b8c Dc,7`a?a?;a?b8a?0a?B-a?",a?"6a?6a?Boa?ra?"sa?ta?~a?"b@ z  T I`/w"b!@ {  T I`$%b}b*@ | DL` T I`CBob@u a T I`rb@v a T I`&"sb@w a T I`3tb@ x a T I`&(~b@ y aa cB>B6!$anUI bB  `(Lh `Lcbz `Md `Md `Lcbz `Md `Md `Lcz `MbBM `Mb `Lcb{ ` MfGIF87a ` Mf `Lcb{ ` MfGIF89a ` Mf `Lc{ `@MnRIFFWEBPVP `@Mn `Lcb| `(MhPNG   `(Mh `Lc| `Mc `Mc  "`DyHh %%%%%%% % % % % %%%%%%ei h  0-%- %- %- %- %- %- % -% -% -% -% --%-%{ {% {% i6! {#% i$6!  i&6! 6( {*% {+% i,6. {0% i16.  i36. 6( {5% {6% i769 {;% i<69  i>69 6( { @% {!A% iB6D {"F% iG6D  iI6D 6( {#K% {$L% iM6O {%Q% iR6O  iT6O 6( {&V% {'W% iX6Z {(\% i]6Z  i_6Z 6( {)a% {*b% ic6e {+g% ih6e  ij6e 6( {,l% {-m% in6p {.r% is6p  iu6p 6( % 0jwPPPP0'&s&&0'<0 9 IIL`N`@sbAt #D#%#-#"# #5#D`RD]DH aFQ]F2// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // This module follows most of the WHATWG Living Standard for the DOM logic. // Many parts of the DOM are not implemented in Deno, but the logic for those // parts still exists. This means you will observe a lot of strange structures // and impossible logic branches based on what Deno currently supports. import { core, primordials } from "ext:core/mod.js"; const { ArrayPrototypeFilter, ArrayPrototypeIncludes, ArrayPrototypeIndexOf, ArrayPrototypeMap, ArrayPrototypePush, ArrayPrototypeSlice, ArrayPrototypeSplice, ArrayPrototypeUnshift, Boolean, Error, FunctionPrototypeCall, MapPrototypeGet, MapPrototypeSet, ObjectCreate, ObjectDefineProperty, ObjectGetOwnPropertyDescriptor, ObjectPrototypeIsPrototypeOf, ReflectDefineProperty, SafeArrayIterator, SafeMap, StringPrototypeStartsWith, Symbol, SymbolFor, SymbolToStringTag, TypeError, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { DOMException } from "ext:deno_web/01_dom_exception.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; // This should be set via setGlobalThis this is required so that if even // user deletes globalThis it is still usable let globalThis_; function saveGlobalThisReference(val) { globalThis_ = val; } // accessors for non runtime visible data function getDispatched(event) { return Boolean(event[_dispatched]); } function getPath(event) { return event[_path] ?? []; } function getStopImmediatePropagation(event) { return Boolean(event[_stopImmediatePropagationFlag]); } function setCurrentTarget( event, value, ) { event[_attributes].currentTarget = value; } function setIsTrusted(event, value) { event[_isTrusted] = value; } function setDispatched(event, value) { event[_dispatched] = value; } function setEventPhase(event, value) { event[_attributes].eventPhase = value; } function setInPassiveListener(event, value) { event[_inPassiveListener] = value; } function setPath(event, value) { event[_path] = value; } function setRelatedTarget( event, value, ) { event[_attributes].relatedTarget = value; } function setTarget(event, value) { event[_attributes].target = value; } function setStopImmediatePropagation( event, value, ) { event[_stopImmediatePropagationFlag] = value; } const isTrusted = ObjectGetOwnPropertyDescriptor({ get isTrusted() { return this[_isTrusted]; }, }, "isTrusted").get; const _attributes = Symbol("[[attributes]]"); const _canceledFlag = Symbol("[[canceledFlag]]"); const _stopPropagationFlag = Symbol("[[stopPropagationFlag]]"); const _stopImmediatePropagationFlag = Symbol( "[[stopImmediatePropagationFlag]]", ); const _inPassiveListener = Symbol("[[inPassiveListener]]"); const _dispatched = Symbol("[[dispatched]]"); const _isTrusted = Symbol("[[isTrusted]]"); const _path = Symbol("[[path]]"); class Event { constructor(type, eventInitDict = {}) { // TODO(lucacasonato): remove when this interface is spec aligned this[SymbolToStringTag] = "Event"; this[_canceledFlag] = false; this[_stopPropagationFlag] = false; this[_stopImmediatePropagationFlag] = false; this[_inPassiveListener] = false; this[_dispatched] = false; this[_isTrusted] = false; this[_path] = []; webidl.requiredArguments( arguments.length, 1, "Failed to construct 'Event'", ); type = webidl.converters.DOMString( type, "Failed to construct 'Event'", "Argument 1", ); this[_attributes] = { type, bubbles: !!eventInitDict.bubbles, cancelable: !!eventInitDict.cancelable, composed: !!eventInitDict.composed, currentTarget: null, eventPhase: Event.NONE, target: null, timeStamp: 0, }; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(EventPrototype, this), keys: EVENT_PROPS, }), inspectOptions, ); } get type() { return this[_attributes].type; } get target() { return this[_attributes].target; } get srcElement() { return null; } set srcElement(_) { // this member is deprecated } get currentTarget() { return this[_attributes].currentTarget; } composedPath() { const path = this[_path]; if (path.length === 0) { return []; } if (!this.currentTarget) { throw new Error("assertion error"); } const composedPath = [ { item: this.currentTarget, itemInShadowTree: false, relatedTarget: null, rootOfClosedTree: false, slotInClosedTree: false, target: null, touchTargetList: [], }, ]; let currentTargetIndex = 0; let currentTargetHiddenSubtreeLevel = 0; for (let index = path.length - 1; index >= 0; index--) { const { item, rootOfClosedTree, slotInClosedTree } = path[index]; if (rootOfClosedTree) { currentTargetHiddenSubtreeLevel++; } if (item === this.currentTarget) { currentTargetIndex = index; break; } if (slotInClosedTree) { currentTargetHiddenSubtreeLevel--; } } let currentHiddenLevel = currentTargetHiddenSubtreeLevel; let maxHiddenLevel = currentTargetHiddenSubtreeLevel; for (let i = currentTargetIndex - 1; i >= 0; i--) { const { item, rootOfClosedTree, slotInClosedTree } = path[i]; if (rootOfClosedTree) { currentHiddenLevel++; } if (currentHiddenLevel <= maxHiddenLevel) { ArrayPrototypeUnshift(composedPath, { item, itemInShadowTree: false, relatedTarget: null, rootOfClosedTree: false, slotInClosedTree: false, target: null, touchTargetList: [], }); } if (slotInClosedTree) { currentHiddenLevel--; if (currentHiddenLevel < maxHiddenLevel) { maxHiddenLevel = currentHiddenLevel; } } } currentHiddenLevel = currentTargetHiddenSubtreeLevel; maxHiddenLevel = currentTargetHiddenSubtreeLevel; for (let index = currentTargetIndex + 1; index < path.length; index++) { const { item, rootOfClosedTree, slotInClosedTree } = path[index]; if (slotInClosedTree) { currentHiddenLevel++; } if (currentHiddenLevel <= maxHiddenLevel) { ArrayPrototypePush(composedPath, { item, itemInShadowTree: false, relatedTarget: null, rootOfClosedTree: false, slotInClosedTree: false, target: null, touchTargetList: [], }); } if (rootOfClosedTree) { currentHiddenLevel--; if (currentHiddenLevel < maxHiddenLevel) { maxHiddenLevel = currentHiddenLevel; } } } return ArrayPrototypeMap(composedPath, (p) => p.item); } get NONE() { return Event.NONE; } get CAPTURING_PHASE() { return Event.CAPTURING_PHASE; } get AT_TARGET() { return Event.AT_TARGET; } get BUBBLING_PHASE() { return Event.BUBBLING_PHASE; } static get NONE() { return 0; } static get CAPTURING_PHASE() { return 1; } static get AT_TARGET() { return 2; } static get BUBBLING_PHASE() { return 3; } get eventPhase() { return this[_attributes].eventPhase; } stopPropagation() { this[_stopPropagationFlag] = true; } get cancelBubble() { return this[_stopPropagationFlag]; } set cancelBubble(value) { this[_stopPropagationFlag] = webidl.converters.boolean(value); } stopImmediatePropagation() { this[_stopPropagationFlag] = true; this[_stopImmediatePropagationFlag] = true; } get bubbles() { return this[_attributes].bubbles; } get cancelable() { return this[_attributes].cancelable; } get returnValue() { return !this[_canceledFlag]; } set returnValue(value) { if (!webidl.converters.boolean(value)) { this[_canceledFlag] = true; } } preventDefault() { if (this[_attributes].cancelable && !this[_inPassiveListener]) { this[_canceledFlag] = true; } } get defaultPrevented() { return this[_canceledFlag]; } get composed() { return this[_attributes].composed; } get initialized() { return true; } get timeStamp() { return this[_attributes].timeStamp; } } const EventPrototype = Event.prototype; // Not spec compliant. The spec defines it as [LegacyUnforgeable] // but doing so has a big performance hit ReflectDefineProperty(Event.prototype, "isTrusted", { enumerable: true, get: isTrusted, }); function defineEnumerableProps( Ctor, props, ) { for (let i = 0; i < props.length; ++i) { const prop = props[i]; ReflectDefineProperty(Ctor.prototype, prop, { enumerable: true }); } } const EVENT_PROPS = [ "bubbles", "cancelable", "composed", "currentTarget", "defaultPrevented", "eventPhase", "srcElement", "target", "returnValue", "timeStamp", "type", ]; defineEnumerableProps(Event, EVENT_PROPS); // This is currently the only node type we are using, so instead of implementing // the whole of the Node interface at the moment, this just gives us the one // value to power the standards based logic const DOCUMENT_FRAGMENT_NODE = 11; // DOM Logic Helper functions and type guards /** Get the parent node, for event targets that have a parent. * * Ref: https://dom.spec.whatwg.org/#get-the-parent */ function getParent(eventTarget) { return isNode(eventTarget) ? eventTarget.parentNode : null; } function getRoot(eventTarget) { return isNode(eventTarget) ? eventTarget.getRootNode({ composed: true }) : null; } function isNode( eventTarget, ) { return eventTarget?.nodeType !== undefined; } // https://dom.spec.whatwg.org/#concept-shadow-including-inclusive-ancestor function isShadowInclusiveAncestor( ancestor, node, ) { while (isNode(node)) { if (node === ancestor) { return true; } if (isShadowRoot(node)) { node = node && getHost(node); } else { node = getParent(node); } } return false; } function isShadowRoot(nodeImpl) { return Boolean( nodeImpl && isNode(nodeImpl) && nodeImpl.nodeType === DOCUMENT_FRAGMENT_NODE && getHost(nodeImpl) != null, ); } function isSlottable( /* nodeImpl, */ ) { // TODO(marcosc90) currently there aren't any slottables nodes // https://dom.spec.whatwg.org/#concept-slotable // return isNode(nodeImpl) && ReflectHas(nodeImpl, "assignedSlot"); return false; } // DOM Logic functions /** Append a path item to an event's path. * * Ref: https://dom.spec.whatwg.org/#concept-event-path-append */ function appendToEventPath( eventImpl, target, targetOverride, relatedTarget, touchTargets, slotInClosedTree, ) { const itemInShadowTree = isNode(target) && isShadowRoot(getRoot(target)); const rootOfClosedTree = isShadowRoot(target) && getMode(target) === "closed"; ArrayPrototypePush(getPath(eventImpl), { item: target, itemInShadowTree, target: targetOverride, relatedTarget, touchTargetList: touchTargets, rootOfClosedTree, slotInClosedTree, }); } function dispatch( targetImpl, eventImpl, targetOverride, ) { let clearTargets = false; let activationTarget = null; setDispatched(eventImpl, true); targetOverride = targetOverride ?? targetImpl; const eventRelatedTarget = eventImpl.relatedTarget; let relatedTarget = retarget(eventRelatedTarget, targetImpl); if (targetImpl !== relatedTarget || targetImpl === eventRelatedTarget) { const touchTargets = []; appendToEventPath( eventImpl, targetImpl, targetOverride, relatedTarget, touchTargets, false, ); const isActivationEvent = eventImpl.type === "click"; if (isActivationEvent && getHasActivationBehavior(targetImpl)) { activationTarget = targetImpl; } let slotInClosedTree = false; let slottable = isSlottable(targetImpl) && getAssignedSlot(targetImpl) ? targetImpl : null; let parent = getParent(targetImpl); // Populate event path // https://dom.spec.whatwg.org/#event-path while (parent !== null) { if (slottable !== null) { slottable = null; const parentRoot = getRoot(parent); if ( isShadowRoot(parentRoot) && parentRoot && getMode(parentRoot) === "closed" ) { slotInClosedTree = true; } } relatedTarget = retarget(eventRelatedTarget, parent); if ( isNode(parent) && isShadowInclusiveAncestor(getRoot(targetImpl), parent) ) { appendToEventPath( eventImpl, parent, null, relatedTarget, touchTargets, slotInClosedTree, ); } else if (parent === relatedTarget) { parent = null; } else { targetImpl = parent; if ( isActivationEvent && activationTarget === null && getHasActivationBehavior(targetImpl) ) { activationTarget = targetImpl; } appendToEventPath( eventImpl, parent, targetImpl, relatedTarget, touchTargets, slotInClosedTree, ); } if (parent !== null) { parent = getParent(parent); } slotInClosedTree = false; } let clearTargetsTupleIndex = -1; const path = getPath(eventImpl); for ( let i = path.length - 1; i >= 0 && clearTargetsTupleIndex === -1; i-- ) { if (path[i].target !== null) { clearTargetsTupleIndex = i; } } const clearTargetsTuple = path[clearTargetsTupleIndex]; clearTargets = (isNode(clearTargetsTuple.target) && isShadowRoot(getRoot(clearTargetsTuple.target))) || (isNode(clearTargetsTuple.relatedTarget) && isShadowRoot(getRoot(clearTargetsTuple.relatedTarget))); setEventPhase(eventImpl, Event.CAPTURING_PHASE); for (let i = path.length - 1; i >= 0; --i) { const tuple = path[i]; if (tuple.target === null) { invokeEventListeners(tuple, eventImpl); } } for (let i = 0; i < path.length; i++) { const tuple = path[i]; if (tuple.target !== null) { setEventPhase(eventImpl, Event.AT_TARGET); } else { setEventPhase(eventImpl, Event.BUBBLING_PHASE); } if ( (eventImpl.eventPhase === Event.BUBBLING_PHASE && eventImpl.bubbles) || eventImpl.eventPhase === Event.AT_TARGET ) { invokeEventListeners(tuple, eventImpl); } } } setEventPhase(eventImpl, Event.NONE); setCurrentTarget(eventImpl, null); setPath(eventImpl, []); setDispatched(eventImpl, false); eventImpl.cancelBubble = false; setStopImmediatePropagation(eventImpl, false); if (clearTargets) { setTarget(eventImpl, null); setRelatedTarget(eventImpl, null); } // TODO(bartlomieju): invoke activation targets if HTML nodes will be implemented // if (activationTarget !== null) { // if (!eventImpl.defaultPrevented) { // activationTarget._activationBehavior(); // } // } return !eventImpl.defaultPrevented; } /** Inner invoking of the event listeners where the resolved listeners are * called. * * Ref: https://dom.spec.whatwg.org/#concept-event-listener-inner-invoke */ function innerInvokeEventListeners( eventImpl, targetListeners, ) { let found = false; const { type } = eventImpl; if (!targetListeners || !targetListeners[type]) { return found; } let handlers = targetListeners[type]; const handlersLength = handlers.length; // Copy event listeners before iterating since the list can be modified during the iteration. if (handlersLength > 1) { handlers = ArrayPrototypeSlice(targetListeners[type]); } for (let i = 0; i < handlersLength; i++) { const listener = handlers[i]; let capture, once, passive; if (typeof listener.options === "boolean") { capture = listener.options; once = false; passive = false; } else { capture = listener.options.capture; once = listener.options.once; passive = listener.options.passive; } // Check if the event listener has been removed since the listeners has been cloned. if (!ArrayPrototypeIncludes(targetListeners[type], listener)) { continue; } found = true; if ( (eventImpl.eventPhase === Event.CAPTURING_PHASE && !capture) || (eventImpl.eventPhase === Event.BUBBLING_PHASE && capture) ) { continue; } if (once) { ArrayPrototypeSplice( targetListeners[type], ArrayPrototypeIndexOf(targetListeners[type], listener), 1, ); } if (passive) { setInPassiveListener(eventImpl, true); } if (typeof listener.callback === "object") { if (typeof listener.callback.handleEvent === "function") { listener.callback.handleEvent(eventImpl); } } else { FunctionPrototypeCall( listener.callback, eventImpl.currentTarget, eventImpl, ); } setInPassiveListener(eventImpl, false); if (getStopImmediatePropagation(eventImpl)) { return found; } } return found; } /** Invokes the listeners on a given event path with the supplied event. * * Ref: https://dom.spec.whatwg.org/#concept-event-listener-invoke */ function invokeEventListeners(tuple, eventImpl) { const path = getPath(eventImpl); if (path.length === 1) { const t = path[0]; if (t.target) { setTarget(eventImpl, t.target); } } else { const tupleIndex = ArrayPrototypeIndexOf(path, tuple); for (let i = tupleIndex; i >= 0; i--) { const t = path[i]; if (t.target) { setTarget(eventImpl, t.target); break; } } } setRelatedTarget(eventImpl, tuple.relatedTarget); if (eventImpl.cancelBubble) { return; } setCurrentTarget(eventImpl, tuple.item); try { innerInvokeEventListeners(eventImpl, getListeners(tuple.item)); } catch (error) { reportException(error); } } function normalizeEventHandlerOptions( options, ) { if (typeof options === "boolean" || typeof options === "undefined") { return { capture: Boolean(options), }; } else { return options; } } /** Retarget the target following the spec logic. * * Ref: https://dom.spec.whatwg.org/#retarget */ function retarget(a, b) { while (true) { if (!isNode(a)) { return a; } const aRoot = a.getRootNode(); if (aRoot) { if ( !isShadowRoot(aRoot) || (isNode(b) && isShadowInclusiveAncestor(aRoot, b)) ) { return a; } a = getHost(aRoot); } } } // Accessors for non-public data const eventTargetData = Symbol(); function setEventTargetData(target) { target[eventTargetData] = getDefaultTargetData(); } function getAssignedSlot(target) { return Boolean(target?.[eventTargetData]?.assignedSlot); } function getHasActivationBehavior(target) { return Boolean(target?.[eventTargetData]?.hasActivationBehavior); } function getHost(target) { return target?.[eventTargetData]?.host ?? null; } function getListeners(target) { return target?.[eventTargetData]?.listeners ?? {}; } function getMode(target) { return target?.[eventTargetData]?.mode ?? null; } function listenerCount(target, type) { return getListeners(target)?.[type]?.length ?? 0; } function getDefaultTargetData() { return { assignedSlot: false, hasActivationBehavior: false, host: null, listeners: ObjectCreate(null), mode: "", }; } function addEventListenerOptionsConverter(V, prefix) { if (webidl.type(V) !== "Object") { return { capture: !!V, once: false, passive: false }; } const options = { capture: !!V.capture, once: !!V.once, passive: !!V.passive, }; const signal = V.signal; if (signal !== undefined) { options.signal = webidl.converters.AbortSignal( signal, prefix, "'signal' of 'AddEventListenerOptions' (Argument 3)", ); } return options; } class EventTarget { constructor() { this[eventTargetData] = getDefaultTargetData(); this[webidl.brand] = webidl.brand; } addEventListener( type, callback, options, ) { const self = this ?? globalThis_; webidl.assertBranded(self, EventTargetPrototype); const prefix = "Failed to execute 'addEventListener' on 'EventTarget'"; webidl.requiredArguments(arguments.length, 2, prefix); options = addEventListenerOptionsConverter(options, prefix); if (callback === null) { return; } const { listeners } = self[eventTargetData]; if (!listeners[type]) { listeners[type] = []; } const listenerList = listeners[type]; for (let i = 0; i < listenerList.length; ++i) { const listener = listenerList[i]; if ( ((typeof listener.options === "boolean" && listener.options === options.capture) || (typeof listener.options === "object" && listener.options.capture === options.capture)) && listener.callback === callback ) { return; } } if (options?.signal) { const signal = options?.signal; if (signal.aborted) { // If signal is not null and its aborted flag is set, then return. return; } else { // If listener's signal is not null, then add the following abort // abort steps to it: Remove an event listener. signal.addEventListener("abort", () => { self.removeEventListener(type, callback, options); }); } } ArrayPrototypePush(listeners[type], { callback, options }); } removeEventListener( type, callback, options, ) { const self = this ?? globalThis_; webidl.assertBranded(self, EventTargetPrototype); webidl.requiredArguments( arguments.length, 2, "Failed to execute 'removeEventListener' on 'EventTarget'", ); const { listeners } = self[eventTargetData]; if (callback !== null && listeners[type]) { listeners[type] = ArrayPrototypeFilter( listeners[type], (listener) => listener.callback !== callback, ); } else if (callback === null || !listeners[type]) { return; } options = normalizeEventHandlerOptions(options); for (let i = 0; i < listeners[type].length; ++i) { const listener = listeners[type][i]; if ( ((typeof listener.options === "boolean" && listener.options === options.capture) || (typeof listener.options === "object" && listener.options.capture === options.capture)) && listener.callback === callback ) { ArrayPrototypeSplice(listeners[type], i, 1); break; } } } dispatchEvent(event) { // If `this` is not present, then fallback to global scope. We don't use // `globalThis` directly here, because it could be deleted by user. // Instead use saved reference to global scope when the script was // executed. const self = this ?? globalThis_; webidl.assertBranded(self, EventTargetPrototype); webidl.requiredArguments( arguments.length, 1, "Failed to execute 'dispatchEvent' on 'EventTarget'", ); // This is an optimization to avoid creating an event listener // on each startup. // Stores the flag for checking whether unload is dispatched or not. // This prevents the recursive dispatches of unload events. // See https://github.com/denoland/deno/issues/9201. if (event.type === "unload" && self === globalThis_) { globalThis_[SymbolFor("Deno.isUnloadDispatched")] = true; } const { listeners } = self[eventTargetData]; if (!listeners[event.type]) { setTarget(event, this); return true; } if (getDispatched(event)) { throw new DOMException("Invalid event state.", "InvalidStateError"); } if (event.eventPhase !== Event.NONE) { throw new DOMException("Invalid event state.", "InvalidStateError"); } return dispatch(self, event); } getParent(_event) { return null; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return `${this.constructor.name} ${inspect({}, inspectOptions)}`; } } webidl.configureInterface(EventTarget); const EventTargetPrototype = EventTarget.prototype; defineEnumerableProps(EventTarget, [ "addEventListener", "removeEventListener", "dispatchEvent", ]); class ErrorEvent extends Event { #message = ""; #filename = ""; #lineno = ""; #colno = ""; #error = ""; get message() { return this.#message; } get filename() { return this.#filename; } get lineno() { return this.#lineno; } get colno() { return this.#colno; } get error() { return this.#error; } constructor( type, { bubbles, cancelable, composed, message = "", filename = "", lineno = 0, colno = 0, error, } = {}, ) { super(type, { bubbles: bubbles, cancelable: cancelable, composed: composed, }); this.#message = message; this.#filename = filename; this.#lineno = lineno; this.#colno = colno; this.#error = error; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(ErrorEventPrototype, this), keys: [ ...new SafeArrayIterator(EVENT_PROPS), "message", "filename", "lineno", "colno", "error", ], }), inspectOptions, ); } // TODO(lucacasonato): remove when this interface is spec aligned [SymbolToStringTag] = "ErrorEvent"; } const ErrorEventPrototype = ErrorEvent.prototype; defineEnumerableProps(ErrorEvent, [ "message", "filename", "lineno", "colno", "error", ]); class CloseEvent extends Event { #wasClean = ""; #code = ""; #reason = ""; get wasClean() { return this.#wasClean; } get code() { return this.#code; } get reason() { return this.#reason; } constructor(type, { bubbles, cancelable, composed, wasClean = false, code = 0, reason = "", } = {}) { super(type, { bubbles: bubbles, cancelable: cancelable, composed: composed, }); this.#wasClean = wasClean; this.#code = code; this.#reason = reason; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(CloseEventPrototype, this), keys: [ ...new SafeArrayIterator(EVENT_PROPS), "wasClean", "code", "reason", ], }), inspectOptions, ); } } const CloseEventPrototype = CloseEvent.prototype; class MessageEvent extends Event { get source() { return null; } constructor(type, eventInitDict) { super(type, { bubbles: eventInitDict?.bubbles ?? false, cancelable: eventInitDict?.cancelable ?? false, composed: eventInitDict?.composed ?? false, }); this.data = eventInitDict?.data ?? null; this.ports = eventInitDict?.ports ?? []; this.origin = eventInitDict?.origin ?? ""; this.lastEventId = eventInitDict?.lastEventId ?? ""; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(MessageEventPrototype, this), keys: [ ...new SafeArrayIterator(EVENT_PROPS), "data", "origin", "lastEventId", ], }), inspectOptions, ); } // TODO(lucacasonato): remove when this interface is spec aligned [SymbolToStringTag] = "CloseEvent"; } const MessageEventPrototype = MessageEvent.prototype; class CustomEvent extends Event { #detail = null; constructor(type, eventInitDict = {}) { super(type, eventInitDict); webidl.requiredArguments( arguments.length, 1, "Failed to construct 'CustomEvent'", ); const { detail } = eventInitDict; this.#detail = detail; } get detail() { return this.#detail; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(CustomEventPrototype, this), keys: [ ...new SafeArrayIterator(EVENT_PROPS), "detail", ], }), inspectOptions, ); } // TODO(lucacasonato): remove when this interface is spec aligned [SymbolToStringTag] = "CustomEvent"; } const CustomEventPrototype = CustomEvent.prototype; ReflectDefineProperty(CustomEvent.prototype, "detail", { enumerable: true, }); // ProgressEvent could also be used in other DOM progress event emits. // Current use is for FileReader. class ProgressEvent extends Event { constructor(type, eventInitDict = {}) { super(type, eventInitDict); this.lengthComputable = eventInitDict?.lengthComputable ?? false; this.loaded = eventInitDict?.loaded ?? 0; this.total = eventInitDict?.total ?? 0; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(ProgressEventPrototype, this), keys: [ ...new SafeArrayIterator(EVENT_PROPS), "lengthComputable", "loaded", "total", ], }), inspectOptions, ); } // TODO(lucacasonato): remove when this interface is spec aligned [SymbolToStringTag] = "ProgressEvent"; } const ProgressEventPrototype = ProgressEvent.prototype; class PromiseRejectionEvent extends Event { #promise = null; #reason = null; get promise() { return this.#promise; } get reason() { return this.#reason; } constructor( type, { bubbles, cancelable, composed, promise, reason, } = {}, ) { super(type, { bubbles: bubbles, cancelable: cancelable, composed: composed, }); this.#promise = promise; this.#reason = reason; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf( PromiseRejectionEventPrototype, this, ), keys: [ ...new SafeArrayIterator(EVENT_PROPS), "promise", "reason", ], }), inspectOptions, ); } // TODO(lucacasonato): remove when this interface is spec aligned [SymbolToStringTag] = "PromiseRejectionEvent"; } const PromiseRejectionEventPrototype = PromiseRejectionEvent.prototype; defineEnumerableProps(PromiseRejectionEvent, [ "promise", "reason", ]); const _eventHandlers = Symbol("eventHandlers"); function makeWrappedHandler(handler, isSpecialErrorEventHandler) { function wrappedHandler(evt) { if (typeof wrappedHandler.handler !== "function") { return; } if ( isSpecialErrorEventHandler && ObjectPrototypeIsPrototypeOf(ErrorEventPrototype, evt) && evt.type === "error" ) { const ret = FunctionPrototypeCall( wrappedHandler.handler, this, evt.message, evt.filename, evt.lineno, evt.colno, evt.error, ); if (ret === true) { evt.preventDefault(); } return; } return FunctionPrototypeCall(wrappedHandler.handler, this, evt); } wrappedHandler.handler = handler; return wrappedHandler; } // `init` is an optional function that will be called the first time that the // event handler property is set. It will be called with the object on which // the property is set as its argument. // `isSpecialErrorEventHandler` can be set to true to opt into the special // behavior of event handlers for the "error" event in a global scope. function defineEventHandler( emitter, name, init = undefined, isSpecialErrorEventHandler = false, ) { // HTML specification section 8.1.7.1 ObjectDefineProperty(emitter, `on${name}`, { get() { if (!this[_eventHandlers]) { return null; } return MapPrototypeGet(this[_eventHandlers], name)?.handler ?? null; }, set(value) { // All three Web IDL event handler types are nullable callback functions // with the [LegacyTreatNonObjectAsNull] extended attribute, meaning // anything other than an object is treated as null. if (typeof value !== "object" && typeof value !== "function") { value = null; } if (!this[_eventHandlers]) { this[_eventHandlers] = new SafeMap(); } let handlerWrapper = MapPrototypeGet(this[_eventHandlers], name); if (handlerWrapper) { handlerWrapper.handler = value; } else if (value !== null) { handlerWrapper = makeWrappedHandler( value, isSpecialErrorEventHandler, ); this.addEventListener(name, handlerWrapper); init?.(this); } MapPrototypeSet(this[_eventHandlers], name, handlerWrapper); }, configurable: true, enumerable: true, }); } let reportExceptionStackedCalls = 0; // https://html.spec.whatwg.org/#report-the-exception function reportException(error) { reportExceptionStackedCalls++; const jsError = core.destructureError(error); const message = jsError.exceptionMessage; let filename = ""; let lineno = 0; let colno = 0; if (jsError.frames.length > 0) { filename = jsError.frames[0].fileName; lineno = jsError.frames[0].lineNumber; colno = jsError.frames[0].columnNumber; } else { const jsError = core.destructureError(new Error()); const frames = jsError.frames; for (let i = 0; i < frames.length; ++i) { const frame = frames[i]; if ( typeof frame.fileName == "string" && !StringPrototypeStartsWith(frame.fileName, "ext:") ) { filename = frame.fileName; lineno = frame.lineNumber; colno = frame.columnNumber; break; } } } const event = new ErrorEvent("error", { cancelable: true, message, filename, lineno, colno, error, }); // Avoid recursing `reportException()` via error handlers more than once. if (reportExceptionStackedCalls > 1 || globalThis_.dispatchEvent(event)) { core.reportUnhandledException(error); } reportExceptionStackedCalls--; } function checkThis(thisArg) { if (thisArg !== null && thisArg !== undefined && thisArg !== globalThis_) { throw new TypeError("Illegal invocation"); } } // https://html.spec.whatwg.org/#dom-reporterror function reportError(error) { checkThis(this); const prefix = "Failed to call 'reportError'"; webidl.requiredArguments(arguments.length, 1, prefix); reportException(error); } export { CloseEvent, CustomEvent, defineEventHandler, dispatch, ErrorEvent, Event, EventTarget, listenerCount, MessageEvent, ProgressEvent, PromiseRejectionEvent, reportError, reportException, saveGlobalThisReference, setEventTargetData, setIsTrusted, setTarget, }; Qc֛8ext:deno_web/02_event.jsa bD`M`r T`Lak T  I`"YSb1LcLD"`B`#`4f``B`b`-`Fa`c`Br``D`` D`C`D¦`<D`3= `g``  ` `+"`:B`D"`Bb`5D`@`7`(`KDb`"9`D`0D¤`1D`*º`?Db`H`8`EDb`!`"`%"`$c``=b`'Db`A"`J"`>DA`b`IDx`DAd``‡``,B`)D²`6 ` D…`B`2`!``9D`DDˆ``;b`/D`` `&`GD!$`Da` D`.1????????????????????????????????????????????????????????????????????????????Ib`L` bS]`b]`B]`."]`}]L`3` L`` L`` L`"` L`"` L`` L`` L`` L``  L``  L`b`  L`b`  L``  L`` L`"` L`"†` L`†` L` L`  DDcL` Dllc& D  c Dc[u Dc` a?a?la?a?a?†a?a?"a?a ?"a?ba ?a?a?a?a?a?a?a?a ?a ?a ? $b@  T  I`1$b@  T I`;~Bb$@  T I`…b@  T I`<l‡b@  T I`Bb@  T I`ˆb@  T I`'Qb@  T I`lbb@  T I`" k bb$@  T<`3L`bG  %`Dh0 -n( /-~)` P Ƌ+ (SbqA`Da"n#1$ a D `/ $b@.  T  I`&W&b@/  T I`i&&bb@0  T I`&*'b@1  T I`'(¤b"@2  T I`(J)Bb@3  T I``)C*b@4  T I`*,b@5  T I`=Dbb"@7  T I`ESH²b@8  T I`zH,Ib%@9  T I`IJb@:  T I`KK"b@<  T I`KGLb!@=  T I`YLL¦b@>  T I`LLb@?  T I`M?M"b@@  T,`L`8b _HB`HBFCbcI   %`Dd~)b3 (SbqAº`DaMNN1$ a $b@B  T  I`yN1Pb)@C  T I`{~b @bb@j  T I`b@p L`# T I`Igb @~ ab T I`$†b@ ac T I`b@ bd T I`,<b@6 ae  T I`3KsK"b@; af T I`WMMbb@A hg  TP`[(L`@Sbq@ b???`DaB 0bCCGG T  I`ĀZ& $bm T I`cbn   &`Dm0(%%% %  %  %x8~)33` ap2b@l ah  T I`f1$b@o ai  T I`ڊ|b@q aj a fcAdAac9 a !!$g Brx= b"C" T  I` Qb get isTrusted $b  Žb"B‘$Sb @"b? !1$  `! ` `/ `/  `?  `  a !b`+  } `F™`+  `FB`+ `Fš`+ `FD]!f@'ža"D ` F` &DœaDb `F` D  `F` ›aDŸ `F` $ 0D `F` B ` F`  a a` D `F` DB a` Dš `F` " `F` %DB a` Da DB `F` #Db ` F` D™ ` F` D ` F` B `F` DHcD La  T  I` &"Q& $b   T I`RF`b(  T I`R} Qaget typeb  T I`Qb get targetb   T I`Qbget srcElementb  T I`Qbset srcElementb  T I`4hQcget currentTargetb  T I`xb   T I` Qaget NONEb  T I`0Qcget CAPTURING_PHASEb  T I`AeQb get AT_TARGETb   T I`{Qcget BUBBLING_PHASEb  T I` Qaget NONEb  T I`Qcget CAPTURING_PHASEb  T I`/Qb get AT_TARGETb   T I`LbQcget BUBBLING_PHASEb  T I`tQbget eventPhaseb  T I`›b!  T I`*Qbget cancelBubbleb"  T I`>Qbset cancelBubbleb#  T I` œb$  T I`FQb get bubblesb %  T I`XQbget cancelableb&  T I`Qbget returnValueb'  T I`: Qbset returnValueb(  T I`L žb)  T I` !Qcget defaultPreventedb*  T I`!@!Qb get composedb +  T I`S!l!Qbget initializedb,  T I`}!!Qb get timeStampb -  bGC  `4M` bŸBB B  ` T ``/ `/ `?  `  a3P`D]f6 Da Da  aa Da HcD La T4`$L`  9(`Df<Ba4--4(SbpG`DaTPP1$ a8P $b D  T  I`PVbE  T I`VZbG  T I`Z`b I  T I``<`b J  T I`h```b(K   `M`LSb @bBg??????af  ` T ``/ `/ `?  `  aafD]f6 } `F` Db `F` DY `F` D1 `F` D aD `F` HcD La bB T  I`cd}( $b ՃQ  T I`bL`I  (`Kc<H@<<%<i555555 (Sbqq`Daaf a 4 4bS    `M`Yb14Sb @B"d???kgk1$  `T ``/ `/ `?  `  akgkD]fD } `F`  aD `F` q `F` DHcD LaB" T  I`Uhi) $b ՃW  T I`ggQb get wasCleanb T  T I`gh Qaget codebU  T I`%hFhQb get reasonb V  T I`ik`b(X  T0`  L`I  })`Kb @8@e555(Sbqq`Dagk a 4bY $Sb @b?Rk=o1$  `T ``/ `/ `?  `  aRk=oD]Pf  } `F` D aHcD La T  I`k9m) $b Ճ[  T I`kkQb get sourceb Z  T I`emn`b(\  T(`  L`  )`Kb <c5(Sbqq`Dask=o a b] ,Sb @"c??vor1$  `T ``/ `/ `?  `  avorD]Pf  } `F` D aHcD La" T  I`op) $b Ճ^  T I`ppQb get detailb _  T I`qDr`b(`  T,` L`  -*`Kb 8@d55(Sbqq`Daor a 4ba bG$Sb @b?sv1$  `T ``/ `/ `?  `  asvD]Pf D aHcD La  T  I`stI* $b Ճb  T I`tTv`b(c  T(`  L`  y*`Kb Hc5(Sbqq`Dasv a bd 4Sb @B"d???vz1$  `T ``/ `/ `?  `  avzD]f D% } `F`  `F`  aDHcD LaB T  I`wx* $b Ճg  T I`^wwQb get promiseb e  T I`wwQb get reasonb f  T I`y~z`b(h  T0` L`  *`Kb <Hhe555(Sbqq`Da)wz a 4bi   `M`% !$`DHh %%%%%%% % % % % %%%%%%%%%%%%%%%%%% %!%"%# %$ %%%&%'%(%)%*%+%,%-%. %/%0 %1 %2 %3%4%5%6%7%8%9%:%;%<%=%>%?%@%A%B%C%D%E%F%G%H%I%J%K%L%M%N ei e% h ! 0#-$%-%%-&%-'%-(%-) %-* % -+% -,% --% -.% -/%-0%-1%-2%-3-4 %-5"%-6$%-7&%-8(%-9*-:,%-;.%-<0%%~=2)>? e>c3-@5Ab7%&Bb9%'Cb;%(Db=%)Eb?%*FbA%+GbC%,HbE%-I%K JLbGtM!N"O#P$Q%R&S'T(U)V*W+X,Y-Z.[/߂\0ނ]1݂^2܂_3ۂ`4ڂa5قb6؂c7ׂd8ւe9Ղf:Ԃg;ӂh<҂i=e+! %10-jI%.0-jI>~kK) 3@L`N{lP%%/0/cQ %0aS%<n>mo?p@qArBLbUtsCe+ 1-tW0^Y0-j[%D0{u]%c^v%xxe%yye%zze%{{e%||e%0}Dw~EFGHILb`t邃Jt%e+ K2b 10-jd%E0{f%cge%e%e%0LMNOLbitPe+Q2k 10-jm%F%0RSLbotTt%e+U2q 10-js%G%e%0VWLbutXt%e+Y2w 10-jy%H0-jy~{)`|%0ZLb~t[t%e+\2 10-j%I%e%e%0]^_Lbt`t%e+a2 10-j%J0{%cb%K %M 1$8lkPPPPPPPPL LI,PI,P,P $bA} %)$$$$%$$$$$%$E&&&&&&&' 'D'!'-'9'E'Q']'i'u'''''''''''''($%!%)%1%9%A%I%%Q%Y%a%i%%q%y%%%%%%%5(M(DU(D](e(m(((((((((M)Y)e)E)q)y))))) **!*)*e*m*u******%D&&!&1&%9&D`RD]DH MQI^m// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @ts-check /// /// /// /// import { core, primordials } from "ext:core/mod.js"; const { isArrayBuffer, } = core; const { ArrayBuffer, ArrayBufferPrototypeGetByteLength, ArrayBufferPrototypeSlice, ArrayBufferIsView, DataView, DataViewPrototypeGetBuffer, DataViewPrototypeGetByteLength, DataViewPrototypeGetByteOffset, ObjectPrototypeIsPrototypeOf, SafeWeakMap, TypedArrayPrototypeGetBuffer, TypedArrayPrototypeGetByteOffset, TypedArrayPrototypeGetLength, TypedArrayPrototypeGetSymbolToStringTag, TypeErrorPrototype, WeakMapPrototypeSet, Int8Array, Int16Array, Int32Array, BigInt64Array, Uint8Array, Uint8ClampedArray, Uint16Array, Uint32Array, BigUint64Array, Float32Array, Float64Array, } = primordials; import { DOMException } from "ext:deno_web/01_dom_exception.js"; const objectCloneMemo = new SafeWeakMap(); function cloneArrayBuffer( srcBuffer, srcByteOffset, srcLength, _cloneConstructor, ) { // this function fudges the return type but SharedArrayBuffer is disabled for a while anyway return ArrayBufferPrototypeSlice( srcBuffer, srcByteOffset, srcByteOffset + srcLength, ); } // TODO(petamoriken): Resizable ArrayBuffer support in the future /** Clone a value in a similar way to structured cloning. It is similar to a * StructureDeserialize(StructuredSerialize(...)). */ function structuredClone(value) { // Performance optimization for buffers, otherwise // `serialize/deserialize` will allocate new buffer. if (isArrayBuffer(value)) { const cloned = cloneArrayBuffer( value, 0, ArrayBufferPrototypeGetByteLength(value), ArrayBuffer, ); WeakMapPrototypeSet(objectCloneMemo, value, cloned); return cloned; } if (ArrayBufferIsView(value)) { const tag = TypedArrayPrototypeGetSymbolToStringTag(value); // DataView if (tag === undefined) { return new DataView( structuredClone(DataViewPrototypeGetBuffer(value)), DataViewPrototypeGetByteOffset(value), DataViewPrototypeGetByteLength(value), ); } // TypedArray let Constructor; switch (tag) { case "Int8Array": Constructor = Int8Array; break; case "Int16Array": Constructor = Int16Array; break; case "Int32Array": Constructor = Int32Array; break; case "BigInt64Array": Constructor = BigInt64Array; break; case "Uint8Array": Constructor = Uint8Array; break; case "Uint8ClampedArray": Constructor = Uint8ClampedArray; break; case "Uint16Array": Constructor = Uint16Array; break; case "Uint32Array": Constructor = Uint32Array; break; case "BigUint64Array": Constructor = BigUint64Array; break; case "Float32Array": Constructor = Float32Array; break; case "Float64Array": Constructor = Float64Array; break; } return new Constructor( structuredClone(TypedArrayPrototypeGetBuffer(value)), TypedArrayPrototypeGetByteOffset(value), TypedArrayPrototypeGetLength(value), ); } try { return core.deserialize(core.serialize(value)); } catch (e) { if (ObjectPrototypeIsPrototypeOf(TypeErrorPrototype, e)) { throw new DOMException(e.message, "DataCloneError"); } throw e; } } export { structuredClone }; Qe]#ext:deno_web/02_structured_clone.jsa bD`M` T`PLa#{ T  I`ASb12!stq"A!"b")I M A E -Y]|?????????????????????????????Ib`L` bS]`EB]`]L`"` L`"]L`  Dllc  D  c,0 Dc2=` a?a?la?"a? +b@ L` T  I`wd"-+b@ aa  2!stq"A!$"b")I M A E -Y]  +`D(h %%%%%%% % % % % %%%%%%%%%%%%%%%%%%ei h  0-%0-%- %- %- %- %- % -% -% -% --% -%-%-%-%- %-"%-$%-&%-(%-*%-,%-.%-0%- 2%-!4%-"6% i8% -+e:PPPPPPPPP +bA %+]+D`RD]DH Qϙ-// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { core, primordials } from "ext:core/mod.js"; import { op_now, op_sleep, op_sleep_interval, op_timer_handle, } from "ext:core/ops"; const { ArrayPrototypePush, ArrayPrototypeShift, FunctionPrototypeCall, MapPrototypeDelete, MapPrototypeGet, MapPrototypeHas, MapPrototypeSet, Uint8Array, Uint32Array, PromisePrototypeThen, SafeArrayIterator, SafeMap, TypedArrayPrototypeGetBuffer, TypeError, indirectEval, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { reportException } from "ext:deno_web/02_event.js"; import { assert } from "ext:deno_web/00_infra.js"; const hrU8 = new Uint8Array(8); const hr = new Uint32Array(TypedArrayPrototypeGetBuffer(hrU8)); function opNow() { op_now(hrU8); return (hr[0] * 1000 + hr[1] / 1e6); } // --------------------------------------------------------------------------- /** * The task queue corresponding to the timer task source. * * @type { {action: () => void, nestingLevel: number}[] } */ const timerTasks = []; /** * The current task's timer nesting level, or zero if we're not currently * running a timer task (since the minimum nesting level is 1). * * @type {number} */ let timerNestingLevel = 0; function handleTimerMacrotask() { // We have no work to do, tell the runtime that we don't // need to perform microtask checkpoint. if (timerTasks.length === 0) { return undefined; } const task = ArrayPrototypeShift(timerTasks); timerNestingLevel = task.nestingLevel; try { task.action(); } finally { timerNestingLevel = 0; } return timerTasks.length === 0; } // --------------------------------------------------------------------------- /** * The keys in this map correspond to the key ID's in the spec's map of active * timers. The values are the timeout's cancel rid. * * @type {Map }>} */ const activeTimers = new SafeMap(); let nextId = 1; /** * @param {Function | string} callback * @param {number} timeout * @param {Array} args * @param {boolean} repeat * @param {number | undefined} prevId * @returns {number} The timer ID */ function initializeTimer( callback, timeout, args, repeat, prevId, // TODO(bartlomieju): remove this option, once `nextTick` and `setImmediate` // in Node compat are cleaned up respectNesting = true, ) { // 2. If previousId was given, let id be previousId; otherwise, let // previousId be an implementation-defined integer than is greater than zero // and does not already exist in global's map of active timers. let id; let timerInfo; if (prevId !== undefined) { // `prevId` is only passed for follow-up calls on intervals assert(repeat); id = prevId; timerInfo = MapPrototypeGet(activeTimers, id); } else { // TODO(@andreubotella): Deal with overflow. // https://github.com/whatwg/html/issues/7358 id = nextId++; const cancelRid = op_timer_handle(); timerInfo = { cancelRid, isRef: true, promise: null }; // Step 4 in "run steps after a timeout". MapPrototypeSet(activeTimers, id, timerInfo); } // 3. If the surrounding agent's event loop's currently running task is a // task that was created by this algorithm, then let nesting level be the // task's timer nesting level. Otherwise, let nesting level be zero. // 4. If timeout is less than 0, then set timeout to 0. // 5. If nesting level is greater than 5, and timeout is less than 4, then // set timeout to 4. // // The nesting level of 5 and minimum of 4 ms are spec-mandated magic // constants. if (timeout < 0) timeout = 0; if (timerNestingLevel > 5 && timeout < 4 && respectNesting) timeout = 4; // 9. Let task be a task that runs the following steps: const task = { action: () => { // 1. If id does not exist in global's map of active timers, then abort // these steps. // // This is relevant if the timer has been canceled after the sleep op // resolves but before this task runs. if (!MapPrototypeHas(activeTimers, id)) { return; } // 2. // 3. if (typeof callback === "function") { try { FunctionPrototypeCall( callback, globalThis, ...new SafeArrayIterator(args), ); } catch (error) { reportException(error); } } else { indirectEval(callback); } if (repeat) { if (MapPrototypeHas(activeTimers, id)) { // 4. If id does not exist in global's map of active timers, then // abort these steps. // NOTE: If might have been removed via the author code in handler // calling clearTimeout() or clearInterval(). // 5. If repeat is true, then perform the timer initialization steps // again, given global, handler, timeout, arguments, true, and id. initializeTimer(callback, timeout, args, true, id); } } else { // 6. Otherwise, remove global's map of active timers[id]. core.tryClose(timerInfo.cancelRid); MapPrototypeDelete(activeTimers, id); } }, // 10. Increment nesting level by one. // 11. Set task's timer nesting level to nesting level. nestingLevel: timerNestingLevel + 1, }; // 12. Let completionStep be an algorithm step which queues a global task on // the timer task source given global to run task. // 13. Run steps after a timeout given global, "setTimeout/setInterval", // timeout, completionStep, and id. runAfterTimeout( task, timeout, timerInfo, repeat, ); return id; } // --------------------------------------------------------------------------- /** * @typedef ScheduledTimer * @property {number} millis * @property { {action: () => void, nestingLevel: number}[] } task * @property {boolean} resolved * @property {ScheduledTimer | null} prev * @property {ScheduledTimer | null} next */ /** * A doubly linked list of timers. * @type { { head: ScheduledTimer | null, tail: ScheduledTimer | null } } */ const scheduledTimers = { head: null, tail: null }; /** * @param { {action: () => void, nestingLevel: number}[] } task Will be run * after the timeout, if it hasn't been cancelled. * @param {number} millis * @param {{ cancelRid: number, isRef: boolean, promise: Promise }} timerInfo * @param {boolean} repeat */ function runAfterTimeout(task, millis, timerInfo, repeat) { const cancelRid = timerInfo.cancelRid; const sleepPromise = repeat ? op_sleep_interval(millis, cancelRid) : op_sleep(millis, cancelRid); timerInfo.promise = sleepPromise; if (!timerInfo.isRef) { core.unrefOpPromise(timerInfo.promise); } /** @type {ScheduledTimer} */ const timerObject = { millis, resolved: false, prev: scheduledTimers.tail, next: null, task, }; // Add timerObject to the end of the list. if (scheduledTimers.tail === null) { assert(scheduledTimers.head === null); scheduledTimers.head = scheduledTimers.tail = timerObject; } else { scheduledTimers.tail.next = timerObject; scheduledTimers.tail = timerObject; } // 1. PromisePrototypeThen( sleepPromise, (cancelled) => { if (timerObject.resolved) { return; } // "op_void_async_deferred" returns null if (cancelled !== null && !cancelled) { // The timer was cancelled. removeFromScheduledTimers(timerObject); return; } // 2. Wait until any invocations of this algorithm that had the same // global and orderingIdentifier, that started before this one, and // whose milliseconds is equal to or less than this one's, have // completed. // 4. Perform completionSteps. // IMPORTANT: Since the sleep ops aren't guaranteed to resolve in the // right order, whenever one resolves, we run through the scheduled // timers list (which is in the order in which they were scheduled), and // we call the callback for every timer which both: // a) has resolved, and // b) its timeout is lower than the lowest unresolved timeout found so // far in the list. let currentEntry = scheduledTimers.head; while (currentEntry !== null) { if (currentEntry.millis <= timerObject.millis) { currentEntry.resolved = true; ArrayPrototypePush(timerTasks, currentEntry.task); removeFromScheduledTimers(currentEntry); if (currentEntry === timerObject) { break; } } currentEntry = currentEntry.next; } }, ); } /** @param {ScheduledTimer} timerObj */ function removeFromScheduledTimers(timerObj) { if (timerObj.prev !== null) { timerObj.prev.next = timerObj.next; } else { assert(scheduledTimers.head === timerObj); scheduledTimers.head = timerObj.next; } if (timerObj.next !== null) { timerObj.next.prev = timerObj.prev; } else { assert(scheduledTimers.tail === timerObj); scheduledTimers.tail = timerObj.prev; } } // --------------------------------------------------------------------------- function checkThis(thisArg) { if (thisArg !== null && thisArg !== undefined && thisArg !== globalThis) { throw new TypeError("Illegal invocation"); } } function setTimeout(callback, timeout = 0, ...args) { checkThis(this); if (typeof callback !== "function") { callback = webidl.converters.DOMString(callback); } timeout = webidl.converters.long(timeout); return initializeTimer(callback, timeout, args, false); } function setInterval(callback, timeout = 0, ...args) { checkThis(this); if (typeof callback !== "function") { callback = webidl.converters.DOMString(callback); } timeout = webidl.converters.long(timeout); return initializeTimer(callback, timeout, args, true); } // TODO(bartlomieju): remove this option, once `nextTick` and `setImmediate` // in Node compat are cleaned up function setTimeoutUnclamped(callback, timeout = 0, ...args) { checkThis(this); if (typeof callback !== "function") { callback = webidl.converters.DOMString(callback); } timeout = webidl.converters.long(timeout); return initializeTimer(callback, timeout, args, false, undefined, false); } function clearTimeout(id = 0) { checkThis(this); id = webidl.converters.long(id); const timerInfo = MapPrototypeGet(activeTimers, id); if (timerInfo !== undefined) { core.tryClose(timerInfo.cancelRid); MapPrototypeDelete(activeTimers, id); } } function clearInterval(id = 0) { checkThis(this); clearTimeout(id); } function refTimer(id) { const timerInfo = MapPrototypeGet(activeTimers, id); if (timerInfo === undefined || timerInfo.isRef) { return; } timerInfo.isRef = true; core.refOpPromise(timerInfo.promise); } function unrefTimer(id) { const timerInfo = MapPrototypeGet(activeTimers, id); if (timerInfo === undefined || !timerInfo.isRef) { return; } timerInfo.isRef = false; core.unrefOpPromise(timerInfo.promise); } // Defer to avoid starving the event loop. Not using queueMicrotask() // for that reason: it lets promises make forward progress but can // still starve other parts of the event loop. function defer(go) { // If we pass a delay of zero to op_sleep, it returns at the next event spin PromisePrototypeThen(op_sleep(0, 0), () => go()); } export { clearInterval, clearTimeout, defer, handleTimerMacrotask, opNow, refTimer, setInterval, setTimeout, setTimeoutUnclamped, unrefTimer, }; Qd:D'ext:deno_web/02_timers.jsa bD`PM` T`%lLay T  I`Sb1Aa`a= 1"BBv???????????????????????Ib-`L` bS]`nB]`b]`8]`xn]`]L`B` L`B` L`` L`b` L`b` L`BI` L`BI` L`"` L`""`  L`"I`  L`I L`  DDc,2(L` D c D  cUY D  c D  c D  c D  c Dc[f Dcap` a?a? a? a? a? a?a?a?a?ba?"a?a?"a ?a?Ba?BIa?Ia ?a?m+b@  T I`_"B+b@  T I`"$b"@  T I`}$ %b@ L` T I`6sb@ a T I`<bb@ a T I`% &"b@ a T I`6&6'b@ a T I`'("b@ a  T I`()b@ a  T I`)'*Bb@ a  T I`:**BIb@ a  T I`++Ib@ a  T I`,0-b@ a a Aa`aI E !$"= 1 bBFBF  +`DHh %%%%%%% % % % % %%%%%%%%%%%ei e% h  0- %- %- %- %- %- %- % ---% -% ---% -%  i%b i"%}$% % i%% %~')% d(PPPPP@ m+bA %,-,+D ,D,,5,=,E,M,U,],e,m,DD`RD]DH QAn'// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @ts-check /// import { primordials } from "ext:core/mod.js"; const { ArrayPrototypeEvery, ArrayPrototypePush, ObjectPrototypeIsPrototypeOf, SafeArrayIterator, SafeSet, SafeSetIterator, SafeWeakRef, SafeWeakSet, SetPrototypeAdd, SetPrototypeDelete, Symbol, SymbolFor, TypeError, WeakRefPrototypeDeref, WeakSetPrototypeAdd, WeakSetPrototypeHas, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { assert } from "ext:deno_web/00_infra.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; import { defineEventHandler, Event, EventTarget, listenerCount, setIsTrusted, } from "ext:deno_web/02_event.js"; import { refTimer, setTimeout, unrefTimer } from "ext:deno_web/02_timers.js"; // Since WeakSet is not a iterable, WeakRefSet class is provided to store and // iterate objects. // To create an AsyncIterable using GeneratorFunction in the internal code, // there are many primordial considerations, so we simply implement the // toArray method. class WeakRefSet { #weakSet = new SafeWeakSet(); #refs = []; add(value) { if (WeakSetPrototypeHas(this.#weakSet, value)) { return; } WeakSetPrototypeAdd(this.#weakSet, value); ArrayPrototypePush(this.#refs, new SafeWeakRef(value)); } has(value) { return WeakSetPrototypeHas(this.#weakSet, value); } toArray() { const ret = []; for (let i = 0; i < this.#refs.length; ++i) { const value = WeakRefPrototypeDeref(this.#refs[i]); if (value !== undefined) { ArrayPrototypePush(ret, value); } } return ret; } } const add = Symbol("[[add]]"); const signalAbort = Symbol("[[signalAbort]]"); const remove = Symbol("[[remove]]"); const abortReason = Symbol("[[abortReason]]"); const abortAlgos = Symbol("[[abortAlgos]]"); const dependent = Symbol("[[dependent]]"); const sourceSignals = Symbol("[[sourceSignals]]"); const dependentSignals = Symbol("[[dependentSignals]]"); const signal = Symbol("[[signal]]"); const timerId = Symbol("[[timerId]]"); const illegalConstructorKey = Symbol("illegalConstructorKey"); class AbortSignal extends EventTarget { static any(signals) { const prefix = "Failed to call 'AbortSignal.any'"; webidl.requiredArguments(arguments.length, 1, prefix); return createDependentAbortSignal(signals, prefix); } static abort(reason = undefined) { if (reason !== undefined) { reason = webidl.converters.any(reason); } const signal = new AbortSignal(illegalConstructorKey); signal[signalAbort](reason); return signal; } static timeout(millis) { const prefix = "Failed to call 'AbortSignal.timeout'"; webidl.requiredArguments(arguments.length, 1, prefix); millis = webidl.converters["unsigned long long"]( millis, prefix, "Argument 1", { enforceRange: true, }, ); const signal = new AbortSignal(illegalConstructorKey); signal[timerId] = setTimeout( () => { signal[timerId] = null; signal[signalAbort]( new DOMException("Signal timed out.", "TimeoutError"), ); }, millis, ); unrefTimer(signal[timerId]); return signal; } [add](algorithm) { if (this.aborted) { return; } this[abortAlgos] ??= new SafeSet(); SetPrototypeAdd(this[abortAlgos], algorithm); } [signalAbort]( reason = new DOMException("The signal has been aborted", "AbortError"), ) { if (this.aborted) { return; } this[abortReason] = reason; const algos = this[abortAlgos]; this[abortAlgos] = null; const event = new Event("abort"); setIsTrusted(event, true); super.dispatchEvent(event); if (algos !== null) { for (const algorithm of new SafeSetIterator(algos)) { algorithm(); } } if (this[dependentSignals] !== null) { const dependentSignalArray = this[dependentSignals].toArray(); for (let i = 0; i < dependentSignalArray.length; ++i) { const dependentSignal = dependentSignalArray[i]; dependentSignal[signalAbort](reason); } } } [remove](algorithm) { this[abortAlgos] && SetPrototypeDelete(this[abortAlgos], algorithm); } constructor(key = null) { if (key !== illegalConstructorKey) { throw new TypeError("Illegal constructor."); } super(); this[abortReason] = undefined; this[abortAlgos] = null; this[dependent] = false; this[sourceSignals] = null; this[dependentSignals] = null; this[timerId] = null; this[webidl.brand] = webidl.brand; } get aborted() { webidl.assertBranded(this, AbortSignalPrototype); return this[abortReason] !== undefined; } get reason() { webidl.assertBranded(this, AbortSignalPrototype); return this[abortReason]; } throwIfAborted() { webidl.assertBranded(this, AbortSignalPrototype); if (this[abortReason] !== undefined) { throw this[abortReason]; } } // `addEventListener` and `removeEventListener` have to be overridden in // order to have the timer block the event loop while there are listeners. // `[add]` and `[remove]` don't ref and unref the timer because they can // only be used by Deno internals, which use it to essentially cancel async // ops which would block the event loop. addEventListener(...args) { super.addEventListener(...new SafeArrayIterator(args)); if (listenerCount(this, "abort") > 0) { if (this[timerId] !== null) { refTimer(this[timerId]); } else if (this[sourceSignals] !== null) { const sourceSignalArray = this[sourceSignals].toArray(); for (let i = 0; i < sourceSignalArray.length; ++i) { const sourceSignal = sourceSignalArray[i]; if (sourceSignal[timerId] !== null) { refTimer(sourceSignal[timerId]); } } } } } removeEventListener(...args) { super.removeEventListener(...new SafeArrayIterator(args)); if (listenerCount(this, "abort") === 0) { if (this[timerId] !== null) { unrefTimer(this[timerId]); } else if (this[sourceSignals] !== null) { const sourceSignalArray = this[sourceSignals].toArray(); for (let i = 0; i < sourceSignalArray.length; ++i) { const sourceSignal = sourceSignalArray[i]; if (sourceSignal[timerId] !== null) { // Check that all dependent signals of the timer signal do not have listeners if ( ArrayPrototypeEvery( sourceSignal[dependentSignals].toArray(), (dependentSignal) => dependentSignal === this || listenerCount(dependentSignal, "abort") === 0, ) ) { unrefTimer(sourceSignal[timerId]); } } } } } } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(AbortSignalPrototype, this), keys: [ "aborted", "reason", "onabort", ], }), inspectOptions, ); } } defineEventHandler(AbortSignal.prototype, "abort"); webidl.configureInterface(AbortSignal); const AbortSignalPrototype = AbortSignal.prototype; class AbortController { [signal] = new AbortSignal(illegalConstructorKey); constructor() { this[webidl.brand] = webidl.brand; } get signal() { webidl.assertBranded(this, AbortControllerPrototype); return this[signal]; } abort(reason) { webidl.assertBranded(this, AbortControllerPrototype); this[signal][signalAbort](reason); } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(AbortControllerPrototype, this), keys: [ "signal", ], }), inspectOptions, ); } } webidl.configureInterface(AbortController); const AbortControllerPrototype = AbortController.prototype; webidl.converters.AbortSignal = webidl.createInterfaceConverter( "AbortSignal", AbortSignal.prototype, ); webidl.converters["sequence"] = webidl.createSequenceConverter( webidl.converters.AbortSignal, ); function newSignal() { return new AbortSignal(illegalConstructorKey); } function createDependentAbortSignal(signals, prefix) { signals = webidl.converters["sequence"]( signals, prefix, "Argument 1", ); const resultSignal = new AbortSignal(illegalConstructorKey); for (let i = 0; i < signals.length; ++i) { const signal = signals[i]; if (signal[abortReason] !== undefined) { resultSignal[abortReason] = signal[abortReason]; return resultSignal; } } resultSignal[dependent] = true; resultSignal[sourceSignals] = new WeakRefSet(); for (let i = 0; i < signals.length; ++i) { const signal = signals[i]; if (!signal[dependent]) { signal[dependentSignals] ??= new WeakRefSet(); resultSignal[sourceSignals].add(signal); signal[dependentSignals].add(resultSignal); } else { const sourceSignalArray = signal[sourceSignals].toArray(); for (let j = 0; j < sourceSignalArray.length; ++j) { const sourceSignal = sourceSignalArray[j]; assert(sourceSignal[abortReason] === undefined); assert(!sourceSignal[dependent]); if (resultSignal[sourceSignals].has(sourceSignal)) { continue; } resultSignal[sourceSignals].add(sourceSignal); sourceSignal[dependentSignals].add(resultSignal); } } } return resultSignal; } export { AbortController, AbortSignal, AbortSignalPrototype, add, createDependentAbortSignal, newSignal, remove, signalAbort, timerId, }; Qdz)ext:deno_web/03_abort_signal.jsa bD`xM` T` 5LaKp>0^@0-<:1?%A@t%BC9bBtDe+E2D 1->>0^F0- import { EventTarget } from "ext:deno_web/02_event.js"; import { primordials } from "ext:core/mod.js"; const { Symbol, SymbolToStringTag, TypeError, } = primordials; const illegalConstructorKey = Symbol("illegalConstructorKey"); class Window extends EventTarget { constructor(key = null) { if (key !== illegalConstructorKey) { throw new TypeError("Illegal constructor."); } super(); } get [SymbolToStringTag]() { return "Window"; } } class WorkerGlobalScope extends EventTarget { constructor(key = null) { if (key != illegalConstructorKey) { throw new TypeError("Illegal constructor."); } super(); } get [SymbolToStringTag]() { return "WorkerGlobalScope"; } } class DedicatedWorkerGlobalScope extends WorkerGlobalScope { constructor(key = null) { if (key != illegalConstructorKey) { throw new TypeError("Illegal constructor."); } super(); } get [SymbolToStringTag]() { return "DedicatedWorkerGlobalScope"; } } const dedicatedWorkerGlobalScopeConstructorDescriptor = { configurable: true, enumerable: false, value: DedicatedWorkerGlobalScope, writable: true, }; const windowConstructorDescriptor = { configurable: true, enumerable: false, value: Window, writable: true, }; const workerGlobalScopeConstructorDescriptor = { configurable: true, enumerable: false, value: WorkerGlobalScope, writable: true, }; export { DedicatedWorkerGlobalScope, dedicatedWorkerGlobalScopeConstructorDescriptor, Window, windowConstructorDescriptor, WorkerGlobalScope, workerGlobalScopeConstructorDescriptor, }; Qe}\$ext:deno_web/04_global_interfaces.jsa bD`$M` T`dLa' Lfa  x=   `T ``/ `/ `?  `  aydD]Pf D aHcD La  T  I`*Sb1= a??Ib`L` ]`bS]`]PL`` L`` L`"` L`"` L`` L`B` L`B]L`  Dc Dc`a?a?a?"a?a?a?a?Ba?.b   T I`Eb`.b   `T ``/ `/ `?  `  affD]Pf D aHcD La  T  I`!"..b   T I`<d`b   `T ``/ `/ `?  `  ahD]Pf D aHcD La  T  I`2..b   T I`M~`b 0bGHCG0bGHCG0bGHCG  .`DPh %%ei h  0---%b%0  t e+ 10 te+ 10 te+ 1~)03 1~ )03 1~)03 1 .bPL& L.bA ../%/E/M/D`RD]DH IQEưn~// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @ts-check /// /// /// /// import { primordials } from "ext:core/mod.js"; import { op_base64_atob, op_base64_btoa } from "ext:core/ops"; const { ObjectPrototypeIsPrototypeOf, TypeErrorPrototype, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { DOMException } from "ext:deno_web/01_dom_exception.js"; /** * @param {string} data * @returns {string} */ function atob(data) { const prefix = "Failed to execute 'atob'"; webidl.requiredArguments(arguments.length, 1, prefix); data = webidl.converters.DOMString(data, prefix, "Argument 1"); try { return op_base64_atob(data); } catch (e) { if (ObjectPrototypeIsPrototypeOf(TypeErrorPrototype, e)) { throw new DOMException( "Failed to decode base64: invalid character", "InvalidCharacterError", ); } throw e; } } /** * @param {string} data * @returns {string} */ function btoa(data) { const prefix = "Failed to execute 'btoa'"; webidl.requiredArguments(arguments.length, 1, prefix); data = webidl.converters.DOMString(data, prefix, "Argument 1"); try { return op_base64_btoa(data); } catch (e) { if (ObjectPrototypeIsPrototypeOf(TypeErrorPrototype, e)) { throw new DOMException( "The string to be encoded contains characters outside of the Latin1 range.", "InvalidCharacterError", ); } throw e; } } export { atob, btoa }; Qd%ext:deno_web/05_base64.jsa bD`M` TP`\$La1 L` T  I`C"Sb1!"b???Ib~`L` bS]`&B]`hb]`B]`] L`"` L`"` L` L`  DDcL` Dllc  D  cBP D  cR` Dc`a? a? a?la?"a?a?i/b @ a T I`e/b @ aa !"  }/`Dm h %%ei e% h  0-%-%  abA //D`RD]DH Qr // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @ts-check /// /// /// /// import { core, internals, primordials } from "ext:core/mod.js"; const { isAnyArrayBuffer, isArrayBuffer, isSharedArrayBuffer, isTypedArray, } = core; import { op_arraybuffer_was_detached, // TODO(mmastrac): use readAll op_read_all, op_readable_stream_resource_allocate, op_readable_stream_resource_allocate_sized, op_readable_stream_resource_await_close, op_readable_stream_resource_close, op_readable_stream_resource_get_sink, op_readable_stream_resource_write_buf, op_readable_stream_resource_write_error, op_readable_stream_resource_write_sync, op_transfer_arraybuffer, } from "ext:core/ops"; const { ArrayBuffer, ArrayBufferIsView, ArrayBufferPrototypeGetByteLength, ArrayBufferPrototypeSlice, ArrayPrototypeMap, ArrayPrototypePush, ArrayPrototypeShift, AsyncGeneratorPrototype, BigInt64Array, BigUint64Array, DataView, DataViewPrototypeGetBuffer, DataViewPrototypeGetByteLength, DataViewPrototypeGetByteOffset, Float32Array, Float64Array, Int16Array, Int32Array, Int8Array, MathMin, NumberIsInteger, NumberIsNaN, ObjectCreate, ObjectDefineProperty, ObjectGetPrototypeOf, ObjectPrototypeIsPrototypeOf, ObjectSetPrototypeOf, Promise, PromisePrototypeCatch, PromisePrototypeThen, PromiseReject, PromiseResolve, RangeError, ReflectHas, SafeFinalizationRegistry, SafePromiseAll, SafeWeakMap, // TODO(lucacasonato): add SharedArrayBuffer to primordials // SharedArrayBufferPrototype, String, Symbol, SymbolAsyncIterator, SymbolIterator, SymbolFor, TypeError, TypedArrayPrototypeGetBuffer, TypedArrayPrototypeGetByteLength, TypedArrayPrototypeGetByteOffset, TypedArrayPrototypeGetLength, TypedArrayPrototypeGetSymbolToStringTag, TypedArrayPrototypeSet, TypedArrayPrototypeSlice, Uint16Array, Uint32Array, Uint8Array, Uint8ClampedArray, WeakMapPrototypeGet, WeakMapPrototypeHas, WeakMapPrototypeSet, queueMicrotask, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { structuredClone } from "ext:deno_web/02_structured_clone.js"; import { AbortSignalPrototype, add, newSignal, remove, signalAbort, } from "ext:deno_web/03_abort_signal.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; import { assert, AssertionError } from "ext:deno_web/00_infra.js"; /** @template T */ class Deferred { /** @type {Promise} */ #promise; /** @type {(reject?: any) => void} */ #reject; /** @type {(value: T | PromiseLike) => void} */ #resolve; /** @type {"pending" | "fulfilled"} */ #state = "pending"; constructor() { this.#promise = new Promise((resolve, reject) => { this.#resolve = resolve; this.#reject = reject; }); } /** @returns {Promise} */ get promise() { return this.#promise; } /** @returns {"pending" | "fulfilled"} */ get state() { return this.#state; } /** @param {any=} reason */ reject(reason) { // already settled promises are a no-op if (this.#state !== "pending") { return; } this.#state = "fulfilled"; this.#reject(reason); } /** @param {T | PromiseLike} value */ resolve(value) { // already settled promises are a no-op if (this.#state !== "pending") { return; } this.#state = "fulfilled"; this.#resolve(value); } } /** * @template T * @param {T | PromiseLike} value * @returns {Promise} */ function resolvePromiseWith(value) { return new Promise((resolve) => resolve(value)); } /** @param {any} e */ function rethrowAssertionErrorRejection(e) { if (e && ObjectPrototypeIsPrototypeOf(AssertionError.prototype, e)) { queueMicrotask(() => { console.error(`Internal Error: ${e.stack}`); }); } } /** @param {Promise} promise */ function setPromiseIsHandledToTrue(promise) { PromisePrototypeThen(promise, undefined, rethrowAssertionErrorRejection); } /** * @template T * @template TResult1 * @template TResult2 * @param {Promise} promise * @param {(value: T) => TResult1 | PromiseLike} fulfillmentHandler * @param {(reason: any) => TResult2 | PromiseLike=} rejectionHandler * @returns {Promise} */ function transformPromiseWith(promise, fulfillmentHandler, rejectionHandler) { return PromisePrototypeThen(promise, fulfillmentHandler, rejectionHandler); } /** * @template T * @template TResult * @param {Promise} promise * @param {(value: T) => TResult | PromiseLike} onFulfilled * @returns {void} */ function uponFulfillment(promise, onFulfilled) { uponPromise(promise, onFulfilled); } /** * @template T * @template TResult * @param {Promise} promise * @param {(value: T) => TResult | PromiseLike} onRejected * @returns {void} */ function uponRejection(promise, onRejected) { uponPromise(promise, undefined, onRejected); } /** * @template T * @template TResult1 * @template TResult2 * @param {Promise} promise * @param {(value: T) => TResult1 | PromiseLike} onFulfilled * @param {(reason: any) => TResult2 | PromiseLike=} onRejected * @returns {void} */ function uponPromise(promise, onFulfilled, onRejected) { PromisePrototypeThen( PromisePrototypeThen(promise, onFulfilled, onRejected), undefined, rethrowAssertionErrorRejection, ); } class Queue { #head = null; #tail = null; #size = 0; enqueue(value) { const node = { value, next: null }; if (this.#head === null) { this.#head = node; this.#tail = node; } else { this.#tail.next = node; this.#tail = node; } return ++this.#size; } dequeue() { const node = this.#head; if (node === null) { return null; } if (this.#head === this.#tail) { this.#tail = null; } this.#head = this.#head.next; this.#size--; return node.value; } peek() { if (this.#head === null) { return null; } return this.#head.value; } get size() { return this.#size; } } /** * @param {ArrayBufferLike} O * @returns {boolean} */ function isDetachedBuffer(O) { if (isSharedArrayBuffer(O)) { return false; } return ArrayBufferPrototypeGetByteLength(O) === 0 && op_arraybuffer_was_detached(O); } /** * @param {ArrayBufferLike} O * @returns {boolean} */ function canTransferArrayBuffer(O) { assert(typeof O === "object"); assert(isAnyArrayBuffer(O)); if (isDetachedBuffer(O)) { return false; } // TODO(@crowlKats): 4. If SameValue(O.[[ArrayBufferDetachKey]], undefined) is false, return false. return true; } /** * @param {ArrayBufferLike} O * @returns {ArrayBufferLike} */ function transferArrayBuffer(O) { return op_transfer_arraybuffer(O); } /** * @param {ArrayBufferLike} O * @returns {number} */ function getArrayBufferByteLength(O) { if (isSharedArrayBuffer(O)) { // TODO(petamoriken): use primordials // deno-lint-ignore prefer-primordials return O.byteLength; } else { return ArrayBufferPrototypeGetByteLength(O); } } /** * @param {ArrayBufferView} O * @returns {Uint8Array} */ function cloneAsUint8Array(O) { assert(typeof O === "object"); assert(ArrayBufferIsView(O)); if (isTypedArray(O)) { return TypedArrayPrototypeSlice( new Uint8Array( TypedArrayPrototypeGetBuffer(/** @type {Uint8Array} */ (O)), TypedArrayPrototypeGetByteOffset(/** @type {Uint8Array} */ (O)), TypedArrayPrototypeGetByteLength(/** @type {Uint8Array} */ (O)), ), ); } else { return TypedArrayPrototypeSlice( new Uint8Array( DataViewPrototypeGetBuffer(/** @type {DataView} */ (O)), DataViewPrototypeGetByteOffset(/** @type {DataView} */ (O)), DataViewPrototypeGetByteLength(/** @type {DataView} */ (O)), ), ); } } const _abortAlgorithm = Symbol("[[abortAlgorithm]]"); const _abortSteps = Symbol("[[AbortSteps]]"); const _autoAllocateChunkSize = Symbol("[[autoAllocateChunkSize]]"); const _backpressure = Symbol("[[backpressure]]"); const _backpressureChangePromise = Symbol("[[backpressureChangePromise]]"); const _byobRequest = Symbol("[[byobRequest]]"); const _cancelAlgorithm = Symbol("[[cancelAlgorithm]]"); const _cancelSteps = Symbol("[[CancelSteps]]"); const _close = Symbol("close sentinel"); const _closeAlgorithm = Symbol("[[closeAlgorithm]]"); const _closedPromise = Symbol("[[closedPromise]]"); const _closeRequest = Symbol("[[closeRequest]]"); const _closeRequested = Symbol("[[closeRequested]]"); const _controller = Symbol("[[controller]]"); const _detached = Symbol("[[Detached]]"); const _disturbed = Symbol("[[disturbed]]"); const _errorSteps = Symbol("[[ErrorSteps]]"); const _finishPromise = Symbol("[[finishPromise]]"); const _flushAlgorithm = Symbol("[[flushAlgorithm]]"); const _globalObject = Symbol("[[globalObject]]"); const _highWaterMark = Symbol("[[highWaterMark]]"); const _inFlightCloseRequest = Symbol("[[inFlightCloseRequest]]"); const _inFlightWriteRequest = Symbol("[[inFlightWriteRequest]]"); const _pendingAbortRequest = Symbol("[pendingAbortRequest]"); const _pendingPullIntos = Symbol("[[pendingPullIntos]]"); const _preventCancel = Symbol("[[preventCancel]]"); const _pullAgain = Symbol("[[pullAgain]]"); const _pullAlgorithm = Symbol("[[pullAlgorithm]]"); const _pulling = Symbol("[[pulling]]"); const _pullSteps = Symbol("[[PullSteps]]"); const _releaseSteps = Symbol("[[ReleaseSteps]]"); const _queue = Symbol("[[queue]]"); const _queueTotalSize = Symbol("[[queueTotalSize]]"); const _readable = Symbol("[[readable]]"); const _reader = Symbol("[[reader]]"); const _readRequests = Symbol("[[readRequests]]"); const _readIntoRequests = Symbol("[[readIntoRequests]]"); const _readyPromise = Symbol("[[readyPromise]]"); const _signal = Symbol("[[signal]]"); const _started = Symbol("[[started]]"); const _state = Symbol("[[state]]"); const _storedError = Symbol("[[storedError]]"); const _strategyHWM = Symbol("[[strategyHWM]]"); const _strategySizeAlgorithm = Symbol("[[strategySizeAlgorithm]]"); const _stream = Symbol("[[stream]]"); const _transformAlgorithm = Symbol("[[transformAlgorithm]]"); const _view = Symbol("[[view]]"); const _writable = Symbol("[[writable]]"); const _writeAlgorithm = Symbol("[[writeAlgorithm]]"); const _writer = Symbol("[[writer]]"); const _writeRequests = Symbol("[[writeRequests]]"); const _brand = webidl.brand; function noop() {} async function noopAsync() {} const _defaultStartAlgorithm = noop; const _defaultWriteAlgorithm = noopAsync; const _defaultCloseAlgorithm = noopAsync; const _defaultAbortAlgorithm = noopAsync; const _defaultPullAlgorithm = noopAsync; const _defaultFlushAlgorithm = noopAsync; const _defaultCancelAlgorithm = noopAsync; /** * @template R * @param {ReadableStream} stream * @returns {ReadableStreamDefaultReader} */ function acquireReadableStreamDefaultReader(stream) { const reader = new ReadableStreamDefaultReader(_brand); setUpReadableStreamDefaultReader(reader, stream); return reader; } /** * @template R * @param {ReadableStream} stream * @returns {ReadableStreamBYOBReader} */ function acquireReadableStreamBYOBReader(stream) { const reader = new ReadableStreamBYOBReader(_brand); setUpReadableStreamBYOBReader(reader, stream); return reader; } /** * @template W * @param {WritableStream} stream * @returns {WritableStreamDefaultWriter} */ function acquireWritableStreamDefaultWriter(stream) { return new WritableStreamDefaultWriter(stream); } /** * @template R * @param {() => void} startAlgorithm * @param {() => Promise} pullAlgorithm * @param {(reason: any) => Promise} cancelAlgorithm * @param {number=} highWaterMark * @param {((chunk: R) => number)=} sizeAlgorithm * @returns {ReadableStream} */ function createReadableStream( startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark = 1, sizeAlgorithm = () => 1, ) { assert(isNonNegativeNumber(highWaterMark)); /** @type {ReadableStream} */ const stream = new ReadableStream(_brand); initializeReadableStream(stream); const controller = new ReadableStreamDefaultController(_brand); setUpReadableStreamDefaultController( stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm, ); return stream; } /** * @template W * @param {(controller: WritableStreamDefaultController) => Promise} startAlgorithm * @param {(chunk: W) => Promise} writeAlgorithm * @param {() => Promise} closeAlgorithm * @param {(reason: any) => Promise} abortAlgorithm * @param {number} highWaterMark * @param {(chunk: W) => number} sizeAlgorithm * @returns {WritableStream} */ function createWritableStream( startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm, ) { assert(isNonNegativeNumber(highWaterMark)); const stream = new WritableStream(_brand); initializeWritableStream(stream); const controller = new WritableStreamDefaultController(_brand); setUpWritableStreamDefaultController( stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm, ); return stream; } /** * @template T * @param {{ [_queue]: Array>, [_queueTotalSize]: number }} container * @returns {T} */ function dequeueValue(container) { assert(container[_queue] && typeof container[_queueTotalSize] === "number"); assert(container[_queue].size); const valueWithSize = container[_queue].dequeue(); container[_queueTotalSize] -= valueWithSize.size; if (container[_queueTotalSize] < 0) { container[_queueTotalSize] = 0; } return valueWithSize.value; } /** * @template T * @param {{ [_queue]: Array>, [_queueTotalSize]: number }} container * @param {T} value * @param {number} size * @returns {void} */ function enqueueValueWithSize(container, value, size) { assert(container[_queue] && typeof container[_queueTotalSize] === "number"); if (isNonNegativeNumber(size) === false) { throw RangeError("chunk size isn't a positive number"); } if (size === Infinity) { throw RangeError("chunk size is invalid"); } container[_queue].enqueue({ value, size }); container[_queueTotalSize] += size; } /** * @param {QueuingStrategy} strategy * @param {number} defaultHWM */ function extractHighWaterMark(strategy, defaultHWM) { if (strategy.highWaterMark === undefined) { return defaultHWM; } const highWaterMark = strategy.highWaterMark; if (NumberIsNaN(highWaterMark) || highWaterMark < 0) { throw RangeError( `Expected highWaterMark to be a positive number or Infinity, got "${highWaterMark}".`, ); } return highWaterMark; } /** * @template T * @param {QueuingStrategy} strategy * @return {(chunk: T) => number} */ function extractSizeAlgorithm(strategy) { if (strategy.size === undefined) { return () => 1; } return (chunk) => webidl.invokeCallbackFunction( strategy.size, [chunk], undefined, webidl.converters["unrestricted double"], "Failed to call `sizeAlgorithm`", ); } /** * @param {() => void} startAlgorithm * @param {() => Promise} pullAlgorithm * @param {(reason: any) => Promise} cancelAlgorithm * @returns {ReadableStream} */ function createReadableByteStream( startAlgorithm, pullAlgorithm, cancelAlgorithm, ) { const stream = new ReadableStream(_brand); initializeReadableStream(stream); const controller = new ReadableByteStreamController(_brand); setUpReadableByteStreamController( stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, 0, undefined, ); return stream; } /** * @param {ReadableStream} stream * @returns {void} */ function initializeReadableStream(stream) { stream[_state] = "readable"; stream[_reader] = stream[_storedError] = undefined; stream[_disturbed] = false; } /** * @template I * @template O * @param {TransformStream} stream * @param {Deferred} startPromise * @param {number} writableHighWaterMark * @param {(chunk: I) => number} writableSizeAlgorithm * @param {number} readableHighWaterMark * @param {(chunk: O) => number} readableSizeAlgorithm */ function initializeTransformStream( stream, startPromise, writableHighWaterMark, writableSizeAlgorithm, readableHighWaterMark, readableSizeAlgorithm, ) { function startAlgorithm() { return startPromise.promise; } function writeAlgorithm(chunk) { return transformStreamDefaultSinkWriteAlgorithm(stream, chunk); } function abortAlgorithm(reason) { return transformStreamDefaultSinkAbortAlgorithm(stream, reason); } function closeAlgorithm() { return transformStreamDefaultSinkCloseAlgorithm(stream); } stream[_writable] = createWritableStream( startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, writableHighWaterMark, writableSizeAlgorithm, ); function pullAlgorithm() { return transformStreamDefaultSourcePullAlgorithm(stream); } function cancelAlgorithm(reason) { return transformStreamDefaultSourceCancelAlgorithm(stream, reason); } stream[_readable] = createReadableStream( startAlgorithm, pullAlgorithm, cancelAlgorithm, readableHighWaterMark, readableSizeAlgorithm, ); stream[_backpressure] = stream[_backpressureChangePromise] = undefined; transformStreamSetBackpressure(stream, true); stream[_controller] = undefined; } /** @param {WritableStream} stream */ function initializeWritableStream(stream) { stream[_state] = "writable"; stream[_storedError] = stream[_writer] = stream[_controller] = stream[_inFlightWriteRequest] = stream[_closeRequest] = stream[_inFlightCloseRequest] = stream[_pendingAbortRequest] = undefined; stream[_writeRequests] = []; stream[_backpressure] = false; } /** * @param {unknown} v * @returns {v is number} */ function isNonNegativeNumber(v) { return typeof v === "number" && v >= 0; } /** * @param {unknown} value * @returns {value is ReadableStream} */ function isReadableStream(value) { return !(typeof value !== "object" || value === null || !value[_controller]); } /** * @param {ReadableStream} stream * @returns {boolean} */ function isReadableStreamLocked(stream) { return stream[_reader] !== undefined; } /** * @param {unknown} value * @returns {value is ReadableStreamDefaultReader} */ function isReadableStreamDefaultReader(value) { return !(typeof value !== "object" || value === null || !value[_readRequests]); } /** * @param {unknown} value * @returns {value is ReadableStreamBYOBReader} */ function isReadableStreamBYOBReader(value) { return !(typeof value !== "object" || value === null || !ReflectHas(value, _readIntoRequests)); } /** * @param {ReadableStream} stream * @returns {boolean} */ function isReadableStreamDisturbed(stream) { assert(isReadableStream(stream)); return stream[_disturbed]; } /** * @param {Error | string | undefined} error * @returns {string} */ function extractStringErrorFromError(error) { if (typeof error == "string") { return error; } const message = error?.message; const stringMessage = typeof message == "string" ? message : String(message); return stringMessage; } // We don't want to leak resources associated with our sink, even if something bad happens const READABLE_STREAM_SOURCE_REGISTRY = new SafeFinalizationRegistry( (external) => { op_readable_stream_resource_close(external); }, ); class ResourceStreamResourceSink { external; constructor(external) { this.external = external; READABLE_STREAM_SOURCE_REGISTRY.register(this, external, this); } close() { if (this.external === undefined) { return; } READABLE_STREAM_SOURCE_REGISTRY.unregister(this); op_readable_stream_resource_close(this.external); this.external = undefined; } } /** * @param {ReadableStreamDefaultReader} reader * @param {any} sink * @param {Uint8Array} chunk */ function readableStreamWriteChunkFn(reader, sink, chunk) { // Empty chunk. Re-read. if (chunk.length == 0) { readableStreamReadFn(reader, sink); return; } const res = op_readable_stream_resource_write_sync(sink.external, chunk); if (res == 0) { // Closed reader.cancel("resource closed"); sink.close(); } else if (res == 1) { // Successfully written (synchronous). Re-read. readableStreamReadFn(reader, sink); } else if (res == 2) { // Full. If the channel is full, we perform an async await until we can write, and then return // to a synchronous loop. (async () => { if ( await op_readable_stream_resource_write_buf( sink.external, chunk, ) ) { readableStreamReadFn(reader, sink); } else { reader.cancel("resource closed"); sink.close(); } })(); } } /** * @param {ReadableStreamDefaultReader} reader * @param {any} sink */ function readableStreamReadFn(reader, sink) { // The ops here look like op_write_all/op_close, but we're not actually writing to a // real resource. let reentrant = true; let gotChunk = undefined; readableStreamDefaultReaderRead(reader, { chunkSteps(chunk) { // If the chunk has non-zero length, write it if (reentrant) { gotChunk = chunk; } else { readableStreamWriteChunkFn(reader, sink, chunk); } }, closeSteps() { sink.close(); }, errorSteps(error) { const success = op_readable_stream_resource_write_error( sink.external, extractStringErrorFromError(error), ); // We don't cancel the reader if there was an error reading. We'll let the downstream // consumer close the resource after it receives the error. if (!success) { reader.cancel("resource closed"); } sink.close(); }, }); reentrant = false; if (gotChunk) { readableStreamWriteChunkFn(reader, sink, gotChunk); } } /** * Create a new resource that wraps a ReadableStream. The resource will support * read operations, and those read operations will be fed by the output of the * ReadableStream source. * @param {ReadableStream} stream * @param {number | undefined} length * @returns {number} */ function resourceForReadableStream(stream, length) { const reader = acquireReadableStreamDefaultReader(stream); // Allocate the resource const rid = typeof length == "number" ? op_readable_stream_resource_allocate_sized(length) : op_readable_stream_resource_allocate(); // Close the Reader we get from the ReadableStream when the resource is closed, ignoring any errors PromisePrototypeCatch( PromisePrototypeThen( op_readable_stream_resource_await_close(rid), () => reader.cancel("resource closed"), ), () => {}, ); // This allocation is freed when readableStreamReadFn is completed const sink = new ResourceStreamResourceSink( op_readable_stream_resource_get_sink(rid), ); // Trigger the first read readableStreamReadFn(reader, sink); return rid; } const DEFAULT_CHUNK_SIZE = 64 * 1024; // 64 KiB // A finalization registry to clean up underlying resources that are GC'ed. const RESOURCE_REGISTRY = new SafeFinalizationRegistry((rid) => { core.tryClose(rid); }); const _readAll = Symbol("[[readAll]]"); const _original = Symbol("[[original]]"); /** * Create a new ReadableStream object that is backed by a Resource that * implements `Resource::read_return`. This object contains enough metadata to * allow callers to bypass the JavaScript ReadableStream implementation and * read directly from the underlying resource if they so choose (FastStream). * * @param {number} rid The resource ID to read from. * @param {boolean=} autoClose If the resource should be auto-closed when the stream closes. Defaults to true. * @returns {ReadableStream} */ function readableStreamForRid(rid, autoClose = true) { const stream = new ReadableStream(_brand); stream[_resourceBacking] = { rid, autoClose }; const tryClose = () => { if (!autoClose) return; RESOURCE_REGISTRY.unregister(stream); core.tryClose(rid); }; if (autoClose) { RESOURCE_REGISTRY.register(stream, rid, stream); } const underlyingSource = { type: "bytes", async pull(controller) { const v = controller.byobRequest.view; try { if (controller[_readAll] === true) { // fast path for tee'd streams consuming body const chunk = await core.readAll(rid); if (TypedArrayPrototypeGetByteLength(chunk) > 0) { controller.enqueue(chunk); } controller.close(); tryClose(); return; } const bytesRead = await core.read(rid, v); if (bytesRead === 0) { tryClose(); controller.close(); controller.byobRequest.respond(0); } else { controller.byobRequest.respond(bytesRead); } } catch (e) { controller.error(e); tryClose(); } }, cancel() { tryClose(); }, autoAllocateChunkSize: DEFAULT_CHUNK_SIZE, }; initializeReadableStream(stream); setUpReadableByteStreamControllerFromUnderlyingSource( stream, underlyingSource, underlyingSource, 0, ); return stream; } const promiseSymbol = SymbolFor("__promise"); const _isUnref = Symbol("isUnref"); /** * Create a new ReadableStream object that is backed by a Resource that * implements `Resource::read_return`. This readable stream supports being * refed and unrefed by calling `readableStreamForRidUnrefableRef` and * `readableStreamForRidUnrefableUnref` on it. Unrefable streams are not * FastStream compatible. * * @param {number} rid The resource ID to read from. * @returns {ReadableStream} */ function readableStreamForRidUnrefable(rid) { const stream = new ReadableStream(_brand); stream[promiseSymbol] = undefined; stream[_isUnref] = false; stream[_resourceBackingUnrefable] = { rid, autoClose: true }; const underlyingSource = { type: "bytes", async pull(controller) { const v = controller.byobRequest.view; try { const promise = core.read(rid, v); stream[promiseSymbol] = promise; if (stream[_isUnref]) core.unrefOpPromise(promise); const bytesRead = await promise; stream[promiseSymbol] = undefined; if (bytesRead === 0) { core.tryClose(rid); controller.close(); controller.byobRequest.respond(0); } else { controller.byobRequest.respond(bytesRead); } } catch (e) { controller.error(e); core.tryClose(rid); } }, cancel() { core.tryClose(rid); }, autoAllocateChunkSize: DEFAULT_CHUNK_SIZE, }; initializeReadableStream(stream); setUpReadableByteStreamControllerFromUnderlyingSource( stream, underlyingSource, underlyingSource, 0, ); return stream; } function readableStreamIsUnrefable(stream) { return ReflectHas(stream, _isUnref); } function readableStreamForRidUnrefableRef(stream) { if (!readableStreamIsUnrefable(stream)) { throw new TypeError("Not an unrefable stream"); } stream[_isUnref] = false; if (stream[promiseSymbol] !== undefined) { core.refOpPromise(stream[promiseSymbol]); } } function readableStreamForRidUnrefableUnref(stream) { if (!readableStreamIsUnrefable(stream)) { throw new TypeError("Not an unrefable stream"); } stream[_isUnref] = true; if (stream[promiseSymbol] !== undefined) { core.unrefOpPromise(stream[promiseSymbol]); } } function getReadableStreamResourceBacking(stream) { return stream[_resourceBacking]; } function getReadableStreamResourceBackingUnrefable(stream) { return stream[_resourceBackingUnrefable]; } async function readableStreamCollectIntoUint8Array(stream) { const resourceBacking = getReadableStreamResourceBacking(stream) || getReadableStreamResourceBackingUnrefable(stream); const reader = acquireReadableStreamDefaultReader(stream); if (resourceBacking) { // fast path, read whole body in a single op call try { readableStreamDisturb(stream); const promise = op_read_all(resourceBacking.rid); if (readableStreamIsUnrefable(stream)) { stream[promiseSymbol] = promise; if (stream[_isUnref]) core.unrefOpPromise(promise); } const buf = await promise; stream[promiseSymbol] = undefined; readableStreamThrowIfErrored(stream); readableStreamClose(stream); return buf; } catch (err) { readableStreamThrowIfErrored(stream); readableStreamError(stream, err); throw err; } finally { if (resourceBacking.autoClose) { core.tryClose(resourceBacking.rid); } } } // slow path /** @type {Uint8Array[]} */ const chunks = []; let totalLength = 0; // tee'd stream if (stream[_original]) { // One of the branches is consuming the stream // signal controller.pull that we can consume it in a single op stream[_original][_controller][_readAll] = true; } while (true) { const { value: chunk, done } = await reader.read(); if (done) break; if (TypedArrayPrototypeGetSymbolToStringTag(chunk) !== "Uint8Array") { throw new TypeError( "Can't convert value to Uint8Array while consuming the stream", ); } ArrayPrototypePush(chunks, chunk); totalLength += TypedArrayPrototypeGetByteLength(chunk); } const finalBuffer = new Uint8Array(totalLength); let offset = 0; for (let i = 0; i < chunks.length; ++i) { const chunk = chunks[i]; TypedArrayPrototypeSet(finalBuffer, chunk, offset); offset += TypedArrayPrototypeGetByteLength(chunk); } return finalBuffer; } /** * Create a new Writable object that is backed by a Resource that implements * `Resource::write` / `Resource::write_all`. This object contains enough * metadata to allow callers to bypass the JavaScript WritableStream * implementation and write directly to the underlying resource if they so * choose (FastStream). * * @param {number} rid The resource ID to write to. * @param {boolean=} autoClose If the resource should be auto-closed when the stream closes. Defaults to true. * @returns {ReadableStream} */ function writableStreamForRid(rid, autoClose = true) { const stream = new WritableStream(_brand); stream[_resourceBacking] = { rid, autoClose }; const tryClose = () => { if (!autoClose) return; RESOURCE_REGISTRY.unregister(stream); core.tryClose(rid); }; if (autoClose) { RESOURCE_REGISTRY.register(stream, rid, stream); } const underlyingSink = { async write(chunk, controller) { try { await core.writeAll(rid, chunk); } catch (e) { controller.error(e); tryClose(); } }, close() { tryClose(); }, abort() { tryClose(); }, }; initializeWritableStream(stream); setUpWritableStreamDefaultControllerFromUnderlyingSink( stream, underlyingSink, underlyingSink, 1, () => 1, ); return stream; } function getWritableStreamResourceBacking(stream) { return stream[_resourceBacking]; } /* * @param {ReadableStream} stream */ function readableStreamThrowIfErrored(stream) { if (stream[_state] === "errored") { throw stream[_storedError]; } } /** * @param {unknown} value * @returns {value is WritableStream} */ function isWritableStream(value) { return !(typeof value !== "object" || value === null || !ReflectHas(value, _controller)); } /** * @param {WritableStream} stream * @returns {boolean} */ function isWritableStreamLocked(stream) { if (stream[_writer] === undefined) { return false; } return true; } /** * @template T * @param {{ [_queue]: Array>, [_queueTotalSize]: number }} container * @returns {T | _close} */ function peekQueueValue(container) { assert( container[_queue] && typeof container[_queueTotalSize] === "number", ); assert(container[_queue].size); const valueWithSize = container[_queue].peek(); return valueWithSize.value; } /** * @param {ReadableByteStreamController} controller * @returns {void} */ function readableByteStreamControllerCallPullIfNeeded(controller) { const shouldPull = readableByteStreamControllerShouldCallPull(controller); if (!shouldPull) { return; } if (controller[_pulling]) { controller[_pullAgain] = true; return; } assert(controller[_pullAgain] === false); controller[_pulling] = true; /** @type {Promise} */ const pullPromise = controller[_pullAlgorithm](controller); setPromiseIsHandledToTrue( PromisePrototypeThen( pullPromise, () => { controller[_pulling] = false; if (controller[_pullAgain]) { controller[_pullAgain] = false; readableByteStreamControllerCallPullIfNeeded(controller); } }, (e) => { readableByteStreamControllerError(controller, e); }, ), ); } /** * @param {ReadableByteStreamController} controller * @returns {void} */ function readableByteStreamControllerClearAlgorithms(controller) { controller[_pullAlgorithm] = undefined; controller[_cancelAlgorithm] = undefined; } /** * @param {ReadableByteStreamController} controller * @param {any} e */ function readableByteStreamControllerError(controller, e) { /** @type {ReadableStream} */ const stream = controller[_stream]; if (stream[_state] !== "readable") { return; } readableByteStreamControllerClearPendingPullIntos(controller); resetQueue(controller); readableByteStreamControllerClearAlgorithms(controller); readableStreamError(stream, e); } /** * @param {ReadableByteStreamController} controller * @returns {void} */ function readableByteStreamControllerClearPendingPullIntos(controller) { readableByteStreamControllerInvalidateBYOBRequest(controller); controller[_pendingPullIntos] = []; } /** * @param {ReadableByteStreamController} controller * @returns {void} */ function readableByteStreamControllerClose(controller) { /** @type {ReadableStream} */ const stream = controller[_stream]; if (controller[_closeRequested] || stream[_state] !== "readable") { return; } if (controller[_queueTotalSize] > 0) { controller[_closeRequested] = true; return; } if (controller[_pendingPullIntos].length !== 0) { const firstPendingPullInto = controller[_pendingPullIntos][0]; if ( firstPendingPullInto.bytesFilled % firstPendingPullInto.elementSize !== 0 ) { const e = new TypeError( "Insufficient bytes to fill elements in the given buffer", ); readableByteStreamControllerError(controller, e); throw e; } } readableByteStreamControllerClearAlgorithms(controller); readableStreamClose(stream); } /** * @param {ReadableByteStreamController} controller * @param {ArrayBufferView} chunk */ function readableByteStreamControllerEnqueue(controller, chunk) { /** @type {ReadableStream} */ const stream = controller[_stream]; if ( controller[_closeRequested] || controller[_stream][_state] !== "readable" ) { return; } let buffer, byteLength, byteOffset; if (isTypedArray(chunk)) { buffer = TypedArrayPrototypeGetBuffer(/** @type {Uint8Array}} */ (chunk)); byteLength = TypedArrayPrototypeGetByteLength( /** @type {Uint8Array} */ (chunk), ); byteOffset = TypedArrayPrototypeGetByteOffset( /** @type {Uint8Array} */ (chunk), ); } else { buffer = DataViewPrototypeGetBuffer(/** @type {DataView} */ (chunk)); byteLength = DataViewPrototypeGetByteLength( /** @type {DataView} */ (chunk), ); byteOffset = DataViewPrototypeGetByteOffset( /** @type {DataView} */ (chunk), ); } if (isDetachedBuffer(buffer)) { throw new TypeError( "chunk's buffer is detached and so cannot be enqueued", ); } const transferredBuffer = transferArrayBuffer(buffer); if (controller[_pendingPullIntos].length !== 0) { const firstPendingPullInto = controller[_pendingPullIntos][0]; // deno-lint-ignore prefer-primordials if (isDetachedBuffer(firstPendingPullInto.buffer)) { throw new TypeError( "The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk", ); } readableByteStreamControllerInvalidateBYOBRequest(controller); firstPendingPullInto.buffer = transferArrayBuffer( // deno-lint-ignore prefer-primordials firstPendingPullInto.buffer, ); if (firstPendingPullInto.readerType === "none") { readableByteStreamControllerEnqueueDetachedPullIntoToQueue( controller, firstPendingPullInto, ); } } if (readableStreamHasDefaultReader(stream)) { readableByteStreamControllerProcessReadRequestsUsingQueue(controller); if (readableStreamGetNumReadRequests(stream) === 0) { assert(controller[_pendingPullIntos].length === 0); readableByteStreamControllerEnqueueChunkToQueue( controller, transferredBuffer, byteOffset, byteLength, ); } else { assert(controller[_queue].size === 0); if (controller[_pendingPullIntos].length !== 0) { assert(controller[_pendingPullIntos][0].readerType === "default"); readableByteStreamControllerShiftPendingPullInto(controller); } const transferredView = new Uint8Array( transferredBuffer, byteOffset, byteLength, ); readableStreamFulfillReadRequest(stream, transferredView, false); } } else if (readableStreamHasBYOBReader(stream)) { readableByteStreamControllerEnqueueChunkToQueue( controller, transferredBuffer, byteOffset, byteLength, ); readableByteStreamControllerProcessPullIntoDescriptorsUsingQueue( controller, ); } else { assert(isReadableStreamLocked(stream) === false); readableByteStreamControllerEnqueueChunkToQueue( controller, transferredBuffer, byteOffset, byteLength, ); } readableByteStreamControllerCallPullIfNeeded(controller); } /** * @param {ReadableByteStreamController} controller * @param {ArrayBufferLike} buffer * @param {number} byteOffset * @param {number} byteLength * @returns {void} */ function readableByteStreamControllerEnqueueChunkToQueue( controller, buffer, byteOffset, byteLength, ) { controller[_queue].enqueue({ buffer, byteOffset, byteLength }); controller[_queueTotalSize] += byteLength; } /** * @param {ReadableByteStreamController} controller * @param {ArrayBufferLike} buffer * @param {number} byteOffset * @param {number} byteLength * @returns {void} */ function readableByteStreamControllerEnqueueClonedChunkToQueue( controller, buffer, byteOffset, byteLength, ) { let cloneResult; try { if (isArrayBuffer(buffer)) { cloneResult = ArrayBufferPrototypeSlice( buffer, byteOffset, byteOffset + byteLength, ); } else { // TODO(lucacasonato): add SharedArrayBuffer to primordials // deno-lint-ignore prefer-primordials cloneResult = buffer.slice(byteOffset, byteOffset + byteLength); } } catch (e) { readableByteStreamControllerError(controller, e); } readableByteStreamControllerEnqueueChunkToQueue( controller, cloneResult, 0, byteLength, ); } /** * @param {ReadableByteStreamController} controller * @param {PullIntoDescriptor} pullIntoDescriptor * @returns {void} */ function readableByteStreamControllerEnqueueDetachedPullIntoToQueue( controller, pullIntoDescriptor, ) { assert(pullIntoDescriptor.readerType === "none"); if (pullIntoDescriptor.bytesFilled > 0) { readableByteStreamControllerEnqueueClonedChunkToQueue( controller, // deno-lint-ignore prefer-primordials pullIntoDescriptor.buffer, // deno-lint-ignore prefer-primordials pullIntoDescriptor.byteOffset, pullIntoDescriptor.bytesFilled, ); } readableByteStreamControllerShiftPendingPullInto(controller); } /** * @param {ReadableByteStreamController} controller * @returns {ReadableStreamBYOBRequest | null} */ function readableByteStreamControllerGetBYOBRequest(controller) { if ( controller[_byobRequest] === null && controller[_pendingPullIntos].length !== 0 ) { const firstDescriptor = controller[_pendingPullIntos][0]; const view = new Uint8Array( // deno-lint-ignore prefer-primordials firstDescriptor.buffer, // deno-lint-ignore prefer-primordials firstDescriptor.byteOffset + firstDescriptor.bytesFilled, // deno-lint-ignore prefer-primordials firstDescriptor.byteLength - firstDescriptor.bytesFilled, ); const byobRequest = new ReadableStreamBYOBRequest(_brand); byobRequest[_controller] = controller; byobRequest[_view] = view; controller[_byobRequest] = byobRequest; } return controller[_byobRequest]; } /** * @param {ReadableByteStreamController} controller * @returns {number | null} */ function readableByteStreamControllerGetDesiredSize(controller) { const state = controller[_stream][_state]; if (state === "errored") { return null; } if (state === "closed") { return 0; } return controller[_strategyHWM] - controller[_queueTotalSize]; } /** * @param {{ [_queue]: any[], [_queueTotalSize]: number }} container * @returns {void} */ function resetQueue(container) { container[_queue] = new Queue(); container[_queueTotalSize] = 0; } /** * @param {ReadableByteStreamController} controller * @returns {void} */ function readableByteStreamControllerHandleQueueDrain(controller) { assert(controller[_stream][_state] === "readable"); if ( controller[_queueTotalSize] === 0 && controller[_closeRequested] ) { readableByteStreamControllerClearAlgorithms(controller); readableStreamClose(controller[_stream]); } else { readableByteStreamControllerCallPullIfNeeded(controller); } } /** * @param {ReadableByteStreamController} controller * @returns {boolean} */ function readableByteStreamControllerShouldCallPull(controller) { /** @type {ReadableStream} */ const stream = controller[_stream]; if ( stream[_state] !== "readable" || controller[_closeRequested] || !controller[_started] ) { return false; } if ( readableStreamHasDefaultReader(stream) && readableStreamGetNumReadRequests(stream) > 0 ) { return true; } if ( readableStreamHasBYOBReader(stream) && readableStreamGetNumReadIntoRequests(stream) > 0 ) { return true; } const desiredSize = readableByteStreamControllerGetDesiredSize(controller); assert(desiredSize !== null); return desiredSize > 0; } /** * @template R * @param {ReadableStream} stream * @param {ReadRequest} readRequest * @returns {void} */ function readableStreamAddReadRequest(stream, readRequest) { assert(isReadableStreamDefaultReader(stream[_reader])); assert(stream[_state] === "readable"); stream[_reader][_readRequests].enqueue(readRequest); } /** * @param {ReadableStream} stream * @param {ReadIntoRequest} readRequest * @returns {void} */ function readableStreamAddReadIntoRequest(stream, readRequest) { assert(isReadableStreamBYOBReader(stream[_reader])); assert(stream[_state] === "readable" || stream[_state] === "closed"); ArrayPrototypePush(stream[_reader][_readIntoRequests], readRequest); } /** * @template R * @param {ReadableStream} stream * @param {any=} reason * @returns {Promise} */ function readableStreamCancel(stream, reason) { stream[_disturbed] = true; if (stream[_state] === "closed") { return PromiseResolve(undefined); } if (stream[_state] === "errored") { return PromiseReject(stream[_storedError]); } readableStreamClose(stream); const reader = stream[_reader]; if (reader !== undefined && isReadableStreamBYOBReader(reader)) { const readIntoRequests = reader[_readIntoRequests]; reader[_readIntoRequests] = []; for (let i = 0; i < readIntoRequests.length; ++i) { const readIntoRequest = readIntoRequests[i]; readIntoRequest.closeSteps(undefined); } } /** @type {Promise} */ const sourceCancelPromise = stream[_controller][_cancelSteps](reason); return PromisePrototypeThen(sourceCancelPromise, noop); } /** * @template R * @param {ReadableStream} stream * @returns {void} */ function readableStreamClose(stream) { assert(stream[_state] === "readable"); stream[_state] = "closed"; /** @type {ReadableStreamDefaultReader | undefined} */ const reader = stream[_reader]; if (!reader) { return; } if (isReadableStreamDefaultReader(reader)) { /** @type {Array>} */ const readRequests = reader[_readRequests]; while (readRequests.size !== 0) { const readRequest = readRequests.dequeue(); readRequest.closeSteps(); } } // This promise can be double resolved. // See: https://github.com/whatwg/streams/issues/1100 reader[_closedPromise].resolve(undefined); } /** * @template R * @param {ReadableStream} stream * @returns {void} */ function readableStreamDisturb(stream) { stream[_disturbed] = true; } /** @param {ReadableStreamDefaultController} controller */ function readableStreamDefaultControllerCallPullIfNeeded(controller) { const shouldPull = readableStreamDefaultcontrollerShouldCallPull( controller, ); if (shouldPull === false) { return; } if (controller[_pulling] === true) { controller[_pullAgain] = true; return; } assert(controller[_pullAgain] === false); controller[_pulling] = true; const pullPromise = controller[_pullAlgorithm](controller); uponFulfillment(pullPromise, () => { controller[_pulling] = false; if (controller[_pullAgain] === true) { controller[_pullAgain] = false; readableStreamDefaultControllerCallPullIfNeeded(controller); } }); uponRejection(pullPromise, (e) => { readableStreamDefaultControllerError(controller, e); }); } /** * @param {ReadableStreamDefaultController} controller * @returns {boolean} */ function readableStreamDefaultControllerCanCloseOrEnqueue(controller) { const state = controller[_stream][_state]; return controller[_closeRequested] === false && state === "readable"; } /** @param {ReadableStreamDefaultController} controller */ function readableStreamDefaultControllerClearAlgorithms(controller) { controller[_pullAlgorithm] = undefined; controller[_cancelAlgorithm] = undefined; controller[_strategySizeAlgorithm] = undefined; } /** @param {ReadableStreamDefaultController} controller */ function readableStreamDefaultControllerClose(controller) { if ( readableStreamDefaultControllerCanCloseOrEnqueue(controller) === false ) { return; } const stream = controller[_stream]; controller[_closeRequested] = true; if (controller[_queue].size === 0) { readableStreamDefaultControllerClearAlgorithms(controller); readableStreamClose(stream); } } /** * @template R * @param {ReadableStreamDefaultController} controller * @param {R} chunk * @returns {void} */ function readableStreamDefaultControllerEnqueue(controller, chunk) { if ( readableStreamDefaultControllerCanCloseOrEnqueue(controller) === false ) { return; } const stream = controller[_stream]; if ( isReadableStreamLocked(stream) === true && readableStreamGetNumReadRequests(stream) > 0 ) { readableStreamFulfillReadRequest(stream, chunk, false); } else { let chunkSize; try { chunkSize = controller[_strategySizeAlgorithm](chunk); } catch (e) { readableStreamDefaultControllerError(controller, e); throw e; } try { enqueueValueWithSize(controller, chunk, chunkSize); } catch (e) { readableStreamDefaultControllerError(controller, e); throw e; } } readableStreamDefaultControllerCallPullIfNeeded(controller); } /** * @param {ReadableStreamDefaultController} controller * @param {any} e */ function readableStreamDefaultControllerError(controller, e) { const stream = controller[_stream]; if (stream[_state] !== "readable") { return; } resetQueue(controller); readableStreamDefaultControllerClearAlgorithms(controller); readableStreamError(stream, e); } /** * @param {ReadableStreamDefaultController} controller * @returns {number | null} */ function readableStreamDefaultControllerGetDesiredSize(controller) { const state = controller[_stream][_state]; if (state === "errored") { return null; } if (state === "closed") { return 0; } return controller[_strategyHWM] - controller[_queueTotalSize]; } /** @param {ReadableStreamDefaultController} controller */ function readableStreamDefaultcontrollerHasBackpressure(controller) { if (readableStreamDefaultcontrollerShouldCallPull(controller) === true) { return false; } else { return true; } } /** * @param {ReadableStreamDefaultController} controller * @returns {boolean} */ function readableStreamDefaultcontrollerShouldCallPull(controller) { if ( readableStreamDefaultControllerCanCloseOrEnqueue(controller) === false ) { return false; } if (controller[_started] === false) { return false; } const stream = controller[_stream]; if ( isReadableStreamLocked(stream) && readableStreamGetNumReadRequests(stream) > 0 ) { return true; } const desiredSize = readableStreamDefaultControllerGetDesiredSize( controller, ); if (desiredSize > 0) { return true; } assert(desiredSize !== null); return false; } /** * @param {ReadableStreamBYOBReader} reader * @param {ArrayBufferView} view * @param {number} min * @param {ReadIntoRequest} readIntoRequest * @returns {void} */ function readableStreamBYOBReaderRead(reader, view, min, readIntoRequest) { const stream = reader[_stream]; assert(stream); stream[_disturbed] = true; if (stream[_state] === "errored") { readIntoRequest.errorSteps(stream[_storedError]); } else { readableByteStreamControllerPullInto( stream[_controller], view, min, readIntoRequest, ); } } /** * @param {ReadableStreamBYOBReader} reader */ function readableStreamBYOBReaderRelease(reader) { readableStreamReaderGenericRelease(reader); const e = new TypeError("The reader was released."); readableStreamBYOBReaderErrorReadIntoRequests(reader, e); } /** * @param {ReadableStreamBYOBReader} reader * @param {any} e */ function readableStreamDefaultReaderErrorReadRequests(reader, e) { const readRequests = reader[_readRequests]; while (readRequests.size !== 0) { const readRequest = readRequests.dequeue(); readRequest.errorSteps(e); } } /** * @param {ReadableByteStreamController} controller */ function readableByteStreamControllerProcessPullIntoDescriptorsUsingQueue( controller, ) { assert(!controller[_closeRequested]); while (controller[_pendingPullIntos].length !== 0) { if (controller[_queueTotalSize] === 0) { return; } const pullIntoDescriptor = controller[_pendingPullIntos][0]; if ( readableByteStreamControllerFillPullIntoDescriptorFromQueue( controller, pullIntoDescriptor, ) ) { readableByteStreamControllerShiftPendingPullInto(controller); readableByteStreamControllerCommitPullIntoDescriptor( controller[_stream], pullIntoDescriptor, ); } } } /** * @param {ReadableByteStreamController} controller */ function readableByteStreamControllerProcessReadRequestsUsingQueue( controller, ) { const reader = controller[_stream][_reader]; assert(isReadableStreamDefaultReader(reader)); while (reader[_readRequests].size !== 0) { if (controller[_queueTotalSize] === 0) { return; } const readRequest = reader[_readRequests].dequeue(); readableByteStreamControllerFillReadRequestFromQueue( controller, readRequest, ); } } /** * @param {ReadableByteStreamController} controller * @param {ArrayBufferView} view * @param {number} min * @param {ReadIntoRequest} readIntoRequest * @returns {void} */ function readableByteStreamControllerPullInto( controller, view, min, readIntoRequest, ) { const stream = controller[_stream]; let ctor; /** @type {number} */ let elementSize; /** @type {ArrayBufferLike} */ let buffer; /** @type {number} */ let byteLength; /** @type {number} */ let byteOffset; const tag = TypedArrayPrototypeGetSymbolToStringTag(view); if (tag === undefined) { ctor = DataView; elementSize = 1; buffer = DataViewPrototypeGetBuffer(/** @type {DataView} */ (view)); byteLength = DataViewPrototypeGetByteLength(/** @type {DataView} */ (view)); byteOffset = DataViewPrototypeGetByteOffset(/** @type {DataView} */ (view)); } else { switch (tag) { case "Int8Array": ctor = Int8Array; break; case "Uint8Array": ctor = Uint8Array; break; case "Uint8ClampedArray": ctor = Uint8ClampedArray; break; case "Int16Array": ctor = Int16Array; break; case "Uint16Array": ctor = Uint16Array; break; case "Int32Array": ctor = Int32Array; break; case "Uint32Array": ctor = Uint32Array; break; case "Float32Array": ctor = Float32Array; break; case "Float64Array": ctor = Float64Array; break; case "BigInt64Array": ctor = BigInt64Array; break; case "BigUint64Array": ctor = BigUint64Array; break; default: throw new TypeError("unreachable"); } elementSize = ctor.BYTES_PER_ELEMENT; buffer = TypedArrayPrototypeGetBuffer(/** @type {Uint8Array} */ (view)); byteLength = TypedArrayPrototypeGetByteLength( /** @type {Uint8Array} */ (view), ); byteOffset = TypedArrayPrototypeGetByteOffset( /** @type {Uint8Array} */ (view), ); } const minimumFill = min * elementSize; assert(minimumFill >= 0 && minimumFill <= byteLength); assert(minimumFill % elementSize === 0); try { buffer = transferArrayBuffer(buffer); } catch (e) { readIntoRequest.errorSteps(e); return; } /** @type {PullIntoDescriptor} */ const pullIntoDescriptor = { buffer, bufferByteLength: getArrayBufferByteLength(buffer), byteOffset, byteLength, bytesFilled: 0, minimumFill, elementSize, viewConstructor: ctor, readerType: "byob", }; if (controller[_pendingPullIntos].length !== 0) { ArrayPrototypePush(controller[_pendingPullIntos], pullIntoDescriptor); readableStreamAddReadIntoRequest(stream, readIntoRequest); return; } if (stream[_state] === "closed") { const emptyView = new ctor( // deno-lint-ignore prefer-primordials pullIntoDescriptor.buffer, // deno-lint-ignore prefer-primordials pullIntoDescriptor.byteOffset, 0, ); readIntoRequest.closeSteps(emptyView); return; } if (controller[_queueTotalSize] > 0) { if ( readableByteStreamControllerFillPullIntoDescriptorFromQueue( controller, pullIntoDescriptor, ) ) { const filledView = readableByteStreamControllerConvertPullIntoDescriptor( pullIntoDescriptor, ); readableByteStreamControllerHandleQueueDrain(controller); readIntoRequest.chunkSteps(filledView); return; } if (controller[_closeRequested]) { const e = new TypeError( "Insufficient bytes to fill elements in the given buffer", ); readableByteStreamControllerError(controller, e); readIntoRequest.errorSteps(e); return; } } ArrayPrototypePush(controller[_pendingPullIntos], pullIntoDescriptor); readableStreamAddReadIntoRequest(stream, readIntoRequest); readableByteStreamControllerCallPullIfNeeded(controller); } /** * @param {ReadableByteStreamController} controller * @param {number} bytesWritten * @returns {void} */ function readableByteStreamControllerRespond(controller, bytesWritten) { assert(controller[_pendingPullIntos].length !== 0); const firstDescriptor = controller[_pendingPullIntos][0]; const state = controller[_stream][_state]; if (state === "closed") { if (bytesWritten !== 0) { throw new TypeError( "bytesWritten must be 0 when calling respond() on a closed stream", ); } } else { assert(state === "readable"); if (bytesWritten === 0) { throw new TypeError( "bytesWritten must be greater than 0 when calling respond() on a readable stream", ); } if ( (firstDescriptor.bytesFilled + bytesWritten) > // deno-lint-ignore prefer-primordials firstDescriptor.byteLength ) { throw new RangeError("bytesWritten out of range"); } } // deno-lint-ignore prefer-primordials firstDescriptor.buffer = transferArrayBuffer(firstDescriptor.buffer); readableByteStreamControllerRespondInternal(controller, bytesWritten); } /** * @param {ReadableByteStreamController} controller * @param {number} bytesWritten * @param {PullIntoDescriptor} pullIntoDescriptor * @returns {void} */ function readableByteStreamControllerRespondInReadableState( controller, bytesWritten, pullIntoDescriptor, ) { assert( (pullIntoDescriptor.bytesFilled + bytesWritten) <= // deno-lint-ignore prefer-primordials pullIntoDescriptor.byteLength, ); readableByteStreamControllerFillHeadPullIntoDescriptor( controller, bytesWritten, pullIntoDescriptor, ); if (pullIntoDescriptor.readerType === "none") { readableByteStreamControllerEnqueueDetachedPullIntoToQueue( controller, pullIntoDescriptor, ); readableByteStreamControllerProcessPullIntoDescriptorsUsingQueue( controller, ); return; } if (pullIntoDescriptor.bytesFilled < pullIntoDescriptor.minimumFill) { return; } readableByteStreamControllerShiftPendingPullInto(controller); const remainderSize = pullIntoDescriptor.bytesFilled % pullIntoDescriptor.elementSize; if (remainderSize > 0) { // deno-lint-ignore prefer-primordials const end = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled; readableByteStreamControllerEnqueueClonedChunkToQueue( controller, // deno-lint-ignore prefer-primordials pullIntoDescriptor.buffer, end - remainderSize, remainderSize, ); } pullIntoDescriptor.bytesFilled -= remainderSize; readableByteStreamControllerCommitPullIntoDescriptor( controller[_stream], pullIntoDescriptor, ); readableByteStreamControllerProcessPullIntoDescriptorsUsingQueue( controller, ); } /** * @param {ReadableByteStreamController} controller * @param {number} bytesWritten * @returns {void} */ function readableByteStreamControllerRespondInternal( controller, bytesWritten, ) { const firstDescriptor = controller[_pendingPullIntos][0]; // deno-lint-ignore prefer-primordials assert(canTransferArrayBuffer(firstDescriptor.buffer)); readableByteStreamControllerInvalidateBYOBRequest(controller); const state = controller[_stream][_state]; if (state === "closed") { assert(bytesWritten === 0); readableByteStreamControllerRespondInClosedState( controller, firstDescriptor, ); } else { assert(state === "readable"); assert(bytesWritten > 0); readableByteStreamControllerRespondInReadableState( controller, bytesWritten, firstDescriptor, ); } readableByteStreamControllerCallPullIfNeeded(controller); } /** * @param {ReadableByteStreamController} controller */ function readableByteStreamControllerInvalidateBYOBRequest(controller) { if (controller[_byobRequest] === null) { return; } controller[_byobRequest][_controller] = undefined; controller[_byobRequest][_view] = null; controller[_byobRequest] = null; } /** * @param {ReadableByteStreamController} controller * @param {PullIntoDescriptor} firstDescriptor */ function readableByteStreamControllerRespondInClosedState( controller, firstDescriptor, ) { assert(firstDescriptor.bytesFilled % firstDescriptor.elementSize === 0); if (firstDescriptor.readerType === "none") { readableByteStreamControllerShiftPendingPullInto(controller); } const stream = controller[_stream]; if (readableStreamHasBYOBReader(stream)) { while (readableStreamGetNumReadIntoRequests(stream) > 0) { const pullIntoDescriptor = readableByteStreamControllerShiftPendingPullInto(controller); readableByteStreamControllerCommitPullIntoDescriptor( stream, pullIntoDescriptor, ); } } } /** * @template R * @param {ReadableStream} stream * @param {PullIntoDescriptor} pullIntoDescriptor */ function readableByteStreamControllerCommitPullIntoDescriptor( stream, pullIntoDescriptor, ) { assert(stream[_state] !== "errored"); assert(pullIntoDescriptor.readerType !== "none"); let done = false; if (stream[_state] === "closed") { assert( pullIntoDescriptor.bytesFilled % pullIntoDescriptor.elementSize === 0, ); done = true; } const filledView = readableByteStreamControllerConvertPullIntoDescriptor( pullIntoDescriptor, ); if (pullIntoDescriptor.readerType === "default") { readableStreamFulfillReadRequest(stream, filledView, done); } else { assert(pullIntoDescriptor.readerType === "byob"); readableStreamFulfillReadIntoRequest(stream, filledView, done); } } /** * @param {ReadableByteStreamController} controller * @param {ArrayBufferView} view */ function readableByteStreamControllerRespondWithNewView(controller, view) { assert(controller[_pendingPullIntos].length !== 0); let buffer, byteLength, byteOffset; if (isTypedArray(view)) { buffer = TypedArrayPrototypeGetBuffer(/** @type {Uint8Array}} */ (view)); byteLength = TypedArrayPrototypeGetByteLength( /** @type {Uint8Array} */ (view), ); byteOffset = TypedArrayPrototypeGetByteOffset( /** @type {Uint8Array} */ (view), ); } else { buffer = DataViewPrototypeGetBuffer(/** @type {DataView} */ (view)); byteLength = DataViewPrototypeGetByteLength(/** @type {DataView} */ (view)); byteOffset = DataViewPrototypeGetByteOffset(/** @type {DataView} */ (view)); } assert(!isDetachedBuffer(buffer)); const firstDescriptor = controller[_pendingPullIntos][0]; const state = controller[_stream][_state]; if (state === "closed") { if (byteLength !== 0) { throw new TypeError( "The view's length must be 0 when calling respondWithNewView() on a closed stream", ); } } else { assert(state === "readable"); if (byteLength === 0) { throw new TypeError( "The view's length must be greater than 0 when calling respondWithNewView() on a readable stream", ); } } // deno-lint-ignore prefer-primordials if (firstDescriptor.byteOffset + firstDescriptor.bytesFilled !== byteOffset) { throw new RangeError( "The region specified by view does not match byobRequest", ); } if (firstDescriptor.bufferByteLength !== getArrayBufferByteLength(buffer)) { throw new RangeError( "The buffer of view has different capacity than byobRequest", ); } // deno-lint-ignore prefer-primordials if (firstDescriptor.bytesFilled + byteLength > firstDescriptor.byteLength) { throw new RangeError( "The region specified by view is larger than byobRequest", ); } firstDescriptor.buffer = transferArrayBuffer(buffer); readableByteStreamControllerRespondInternal(controller, byteLength); } /** * @param {ReadableByteStreamController} controller * @returns {PullIntoDescriptor} */ function readableByteStreamControllerShiftPendingPullInto(controller) { assert(controller[_byobRequest] === null); return ArrayPrototypeShift(controller[_pendingPullIntos]); } /** * @param {ReadableByteStreamController} controller * @param {PullIntoDescriptor} pullIntoDescriptor * @returns {boolean} */ function readableByteStreamControllerFillPullIntoDescriptorFromQueue( controller, pullIntoDescriptor, ) { const maxBytesToCopy = MathMin( controller[_queueTotalSize], // deno-lint-ignore prefer-primordials pullIntoDescriptor.byteLength - pullIntoDescriptor.bytesFilled, ); const maxBytesFilled = pullIntoDescriptor.bytesFilled + maxBytesToCopy; let totalBytesToCopyRemaining = maxBytesToCopy; let ready = false; assert(pullIntoDescriptor.bytesFilled < pullIntoDescriptor.minimumFill); const maxAlignedBytes = maxBytesFilled - (maxBytesFilled % pullIntoDescriptor.elementSize); if (maxAlignedBytes >= pullIntoDescriptor.minimumFill) { totalBytesToCopyRemaining = maxAlignedBytes - pullIntoDescriptor.bytesFilled; ready = true; } const queue = controller[_queue]; while (totalBytesToCopyRemaining > 0) { const headOfQueue = queue.peek(); const bytesToCopy = MathMin( totalBytesToCopyRemaining, // deno-lint-ignore prefer-primordials headOfQueue.byteLength, ); // deno-lint-ignore prefer-primordials const destStart = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled; const destBuffer = new Uint8Array( // deno-lint-ignore prefer-primordials pullIntoDescriptor.buffer, destStart, bytesToCopy, ); const srcBuffer = new Uint8Array( // deno-lint-ignore prefer-primordials headOfQueue.buffer, // deno-lint-ignore prefer-primordials headOfQueue.byteOffset, bytesToCopy, ); destBuffer.set(srcBuffer); // deno-lint-ignore prefer-primordials if (headOfQueue.byteLength === bytesToCopy) { queue.dequeue(); } else { headOfQueue.byteOffset += bytesToCopy; headOfQueue.byteLength -= bytesToCopy; } controller[_queueTotalSize] -= bytesToCopy; readableByteStreamControllerFillHeadPullIntoDescriptor( controller, bytesToCopy, pullIntoDescriptor, ); totalBytesToCopyRemaining -= bytesToCopy; } if (!ready) { assert(controller[_queueTotalSize] === 0); assert(pullIntoDescriptor.bytesFilled > 0); assert(pullIntoDescriptor.bytesFilled < pullIntoDescriptor.minimumFill); } return ready; } /** * @param {ReadableByteStreamController} controller * @param {ReadRequest} readRequest * @returns {void} */ function readableByteStreamControllerFillReadRequestFromQueue( controller, readRequest, ) { assert(controller[_queueTotalSize] > 0); const entry = controller[_queue].dequeue(); // deno-lint-ignore prefer-primordials controller[_queueTotalSize] -= entry.byteLength; readableByteStreamControllerHandleQueueDrain(controller); const view = new Uint8Array( // deno-lint-ignore prefer-primordials entry.buffer, // deno-lint-ignore prefer-primordials entry.byteOffset, // deno-lint-ignore prefer-primordials entry.byteLength, ); readRequest.chunkSteps(view); } /** * @param {ReadableByteStreamController} controller * @param {number} size * @param {PullIntoDescriptor} pullIntoDescriptor * @returns {void} */ function readableByteStreamControllerFillHeadPullIntoDescriptor( controller, size, pullIntoDescriptor, ) { assert( controller[_pendingPullIntos].length === 0 || controller[_pendingPullIntos][0] === pullIntoDescriptor, ); assert(controller[_byobRequest] === null); pullIntoDescriptor.bytesFilled += size; } /** * @param {PullIntoDescriptor} pullIntoDescriptor * @returns {ArrayBufferView} */ function readableByteStreamControllerConvertPullIntoDescriptor( pullIntoDescriptor, ) { const bytesFilled = pullIntoDescriptor.bytesFilled; const elementSize = pullIntoDescriptor.elementSize; // deno-lint-ignore prefer-primordials assert(bytesFilled <= pullIntoDescriptor.byteLength); assert((bytesFilled % elementSize) === 0); // deno-lint-ignore prefer-primordials const buffer = transferArrayBuffer(pullIntoDescriptor.buffer); return new pullIntoDescriptor.viewConstructor( buffer, // deno-lint-ignore prefer-primordials pullIntoDescriptor.byteOffset, bytesFilled / elementSize, ); } /** * @template R * @param {ReadableStreamDefaultReader} reader * @param {ReadRequest} readRequest * @returns {void} */ function readableStreamDefaultReaderRead(reader, readRequest) { const stream = reader[_stream]; assert(stream); stream[_disturbed] = true; if (stream[_state] === "closed") { readRequest.closeSteps(); } else if (stream[_state] === "errored") { readRequest.errorSteps(stream[_storedError]); } else { assert(stream[_state] === "readable"); stream[_controller][_pullSteps](readRequest); } } /** * @template R * @param {ReadableStreamDefaultReader} reader */ function readableStreamDefaultReaderRelease(reader) { readableStreamReaderGenericRelease(reader); const e = new TypeError("The reader was released."); readableStreamDefaultReaderErrorReadRequests(reader, e); } /** * @template R * @param {ReadableStream} stream * @param {any} e */ function readableStreamError(stream, e) { assert(stream[_state] === "readable"); stream[_state] = "errored"; stream[_storedError] = e; /** @type {ReadableStreamDefaultReader | undefined} */ const reader = stream[_reader]; if (reader === undefined) { return; } /** @type {Deferred} */ const closedPromise = reader[_closedPromise]; closedPromise.reject(e); setPromiseIsHandledToTrue(closedPromise.promise); if (isReadableStreamDefaultReader(reader)) { readableStreamDefaultReaderErrorReadRequests(reader, e); } else { assert(isReadableStreamBYOBReader(reader)); readableStreamBYOBReaderErrorReadIntoRequests(reader, e); } } /** * @template R * @param {ReadableStream} stream * @param {R} chunk * @param {boolean} done */ function readableStreamFulfillReadIntoRequest(stream, chunk, done) { assert(readableStreamHasBYOBReader(stream)); /** @type {ReadableStreamDefaultReader} */ const reader = stream[_reader]; assert(reader[_readIntoRequests].length !== 0); /** @type {ReadIntoRequest} */ const readIntoRequest = ArrayPrototypeShift(reader[_readIntoRequests]); if (done) { readIntoRequest.closeSteps(chunk); } else { readIntoRequest.chunkSteps(chunk); } } /** * @template R * @param {ReadableStream} stream * @param {R} chunk * @param {boolean} done */ function readableStreamFulfillReadRequest(stream, chunk, done) { assert(readableStreamHasDefaultReader(stream) === true); /** @type {ReadableStreamDefaultReader} */ const reader = stream[_reader]; assert(reader[_readRequests].size); /** @type {ReadRequest} */ const readRequest = reader[_readRequests].dequeue(); if (done) { readRequest.closeSteps(); } else { readRequest.chunkSteps(chunk); } } /** * @param {ReadableStream} stream * @return {number} */ function readableStreamGetNumReadIntoRequests(stream) { assert(readableStreamHasBYOBReader(stream) === true); return stream[_reader][_readIntoRequests].length; } /** * @param {ReadableStream} stream * @return {number} */ function readableStreamGetNumReadRequests(stream) { assert(readableStreamHasDefaultReader(stream) === true); return stream[_reader][_readRequests].size; } /** * @param {ReadableStream} stream * @returns {boolean} */ function readableStreamHasBYOBReader(stream) { const reader = stream[_reader]; if (reader === undefined) { return false; } if (isReadableStreamBYOBReader(reader)) { return true; } return false; } /** * @param {ReadableStream} stream * @returns {boolean} */ function readableStreamHasDefaultReader(stream) { const reader = stream[_reader]; if (reader === undefined) { return false; } if (isReadableStreamDefaultReader(reader)) { return true; } return false; } /** * @template T * @param {ReadableStream} source * @param {WritableStream} dest * @param {boolean} preventClose * @param {boolean} preventAbort * @param {boolean} preventCancel * @param {AbortSignal=} signal * @returns {Promise} */ function readableStreamPipeTo( source, dest, preventClose, preventAbort, preventCancel, signal, ) { assert(isReadableStream(source)); assert(isWritableStream(dest)); assert( typeof preventClose === "boolean" && typeof preventAbort === "boolean" && typeof preventCancel === "boolean", ); assert( signal === undefined || ObjectPrototypeIsPrototypeOf(AbortSignalPrototype, signal), ); assert(!isReadableStreamLocked(source)); assert(!isWritableStreamLocked(dest)); // We use acquireReadableStreamDefaultReader even in case of ReadableByteStreamController // as the spec allows us, and the only reason to use BYOBReader is to do some smart things // with it, but the spec does not specify what things, so to simplify we stick to DefaultReader. const reader = acquireReadableStreamDefaultReader(source); const writer = acquireWritableStreamDefaultWriter(dest); source[_disturbed] = true; let shuttingDown = false; let currentWrite = PromiseResolve(undefined); /** @type {Deferred} */ const promise = new Deferred(); /** @type {() => void} */ let abortAlgorithm; if (signal) { abortAlgorithm = () => { const error = signal.reason; /** @type {Array<() => Promise>} */ const actions = []; if (preventAbort === false) { ArrayPrototypePush(actions, () => { if (dest[_state] === "writable") { return writableStreamAbort(dest, error); } else { return PromiseResolve(undefined); } }); } if (preventCancel === false) { ArrayPrototypePush(actions, () => { if (source[_state] === "readable") { return readableStreamCancel(source, error); } else { return PromiseResolve(undefined); } }); } shutdownWithAction( () => SafePromiseAll(ArrayPrototypeMap(actions, (action) => action())), true, error, ); }; if (signal.aborted) { abortAlgorithm(); return promise.promise; } signal[add](abortAlgorithm); } function pipeLoop() { return new Promise((resolveLoop, rejectLoop) => { /** @param {boolean} done */ function next(done) { if (done) { resolveLoop(); } else { uponPromise(pipeStep(), next, rejectLoop); } } next(false); }); } /** @returns {Promise} */ function pipeStep() { if (shuttingDown === true) { return PromiseResolve(true); } return transformPromiseWith(writer[_readyPromise].promise, () => { return new Promise((resolveRead, rejectRead) => { readableStreamDefaultReaderRead( reader, { chunkSteps(chunk) { currentWrite = transformPromiseWith( writableStreamDefaultWriterWrite(writer, chunk), undefined, () => {}, ); resolveRead(false); }, closeSteps() { resolveRead(true); }, errorSteps: rejectRead, }, ); }); }); } isOrBecomesErrored( source, reader[_closedPromise].promise, (storedError) => { if (preventAbort === false) { shutdownWithAction( () => writableStreamAbort(dest, storedError), true, storedError, ); } else { shutdown(true, storedError); } }, ); isOrBecomesErrored(dest, writer[_closedPromise].promise, (storedError) => { if (preventCancel === false) { shutdownWithAction( () => readableStreamCancel(source, storedError), true, storedError, ); } else { shutdown(true, storedError); } }); isOrBecomesClosed(source, reader[_closedPromise].promise, () => { if (preventClose === false) { shutdownWithAction(() => writableStreamDefaultWriterCloseWithErrorPropagation(writer) ); } else { shutdown(); } }); if ( writableStreamCloseQueuedOrInFlight(dest) === true || dest[_state] === "closed" ) { const destClosed = new TypeError( "The destination writable stream closed before all the data could be piped to it.", ); if (preventCancel === false) { shutdownWithAction( () => readableStreamCancel(source, destClosed), true, destClosed, ); } else { shutdown(true, destClosed); } } setPromiseIsHandledToTrue(pipeLoop()); return promise.promise; /** @returns {Promise} */ function waitForWritesToFinish() { const oldCurrentWrite = currentWrite; return transformPromiseWith( currentWrite, () => oldCurrentWrite !== currentWrite ? waitForWritesToFinish() : undefined, ); } /** * @param {ReadableStream | WritableStream} stream * @param {Promise} promise * @param {(e: any) => void} action */ function isOrBecomesErrored(stream, promise, action) { if (stream[_state] === "errored") { action(stream[_storedError]); } else { uponRejection(promise, action); } } /** * @param {ReadableStream} stream * @param {Promise} promise * @param {() => void} action */ function isOrBecomesClosed(stream, promise, action) { if (stream[_state] === "closed") { action(); } else { uponFulfillment(promise, action); } } /** * @param {() => Promise} action * @param {boolean=} originalIsError * @param {any=} originalError */ function shutdownWithAction(action, originalIsError, originalError) { function doTheRest() { uponPromise( action(), () => finalize(originalIsError, originalError), (newError) => finalize(true, newError), ); } if (shuttingDown === true) { return; } shuttingDown = true; if ( dest[_state] === "writable" && writableStreamCloseQueuedOrInFlight(dest) === false ) { uponFulfillment(waitForWritesToFinish(), doTheRest); } else { doTheRest(); } } /** * @param {boolean=} isError * @param {any=} error */ function shutdown(isError, error) { if (shuttingDown) { return; } shuttingDown = true; if ( dest[_state] === "writable" && writableStreamCloseQueuedOrInFlight(dest) === false ) { uponFulfillment( waitForWritesToFinish(), () => finalize(isError, error), ); } else { finalize(isError, error); } } /** * @param {boolean=} isError * @param {any=} error */ function finalize(isError, error) { writableStreamDefaultWriterRelease(writer); readableStreamDefaultReaderRelease(reader); if (signal !== undefined) { signal[remove](abortAlgorithm); } if (isError) { promise.reject(error); } else { promise.resolve(undefined); } } } /** * @param {ReadableStreamGenericReader | ReadableStreamBYOBReader} reader * @param {any} reason * @returns {Promise} */ function readableStreamReaderGenericCancel(reader, reason) { const stream = reader[_stream]; assert(stream !== undefined); return readableStreamCancel(stream, reason); } /** * @template R * @param {ReadableStreamDefaultReader | ReadableStreamBYOBReader} reader * @param {ReadableStream} stream */ function readableStreamReaderGenericInitialize(reader, stream) { reader[_stream] = stream; stream[_reader] = reader; if (stream[_state] === "readable") { reader[_closedPromise] = new Deferred(); } else if (stream[_state] === "closed") { reader[_closedPromise] = new Deferred(); reader[_closedPromise].resolve(undefined); } else { assert(stream[_state] === "errored"); reader[_closedPromise] = new Deferred(); reader[_closedPromise].reject(stream[_storedError]); setPromiseIsHandledToTrue(reader[_closedPromise].promise); } } /** * @template R * @param {ReadableStreamGenericReader | ReadableStreamBYOBReader} reader */ function readableStreamReaderGenericRelease(reader) { const stream = reader[_stream]; assert(stream !== undefined); assert(stream[_reader] === reader); if (stream[_state] === "readable") { reader[_closedPromise].reject( new TypeError( "Reader was released and can no longer be used to monitor the stream's closedness.", ), ); } else { reader[_closedPromise] = new Deferred(); reader[_closedPromise].reject( new TypeError( "Reader was released and can no longer be used to monitor the stream's closedness.", ), ); } setPromiseIsHandledToTrue(reader[_closedPromise].promise); stream[_controller][_releaseSteps](); stream[_reader] = undefined; reader[_stream] = undefined; } /** * @param {ReadableStreamBYOBReader} reader * @param {any} e */ function readableStreamBYOBReaderErrorReadIntoRequests(reader, e) { const readIntoRequests = reader[_readIntoRequests]; reader[_readIntoRequests] = []; for (let i = 0; i < readIntoRequests.length; ++i) { const readIntoRequest = readIntoRequests[i]; readIntoRequest.errorSteps(e); } } /** * @template R * @param {ReadableStream} stream * @param {boolean} cloneForBranch2 * @returns {[ReadableStream, ReadableStream]} */ function readableStreamTee(stream, cloneForBranch2) { assert(isReadableStream(stream)); assert(typeof cloneForBranch2 === "boolean"); if ( ObjectPrototypeIsPrototypeOf( ReadableByteStreamControllerPrototype, stream[_controller], ) ) { return readableByteStreamTee(stream); } else { return readableStreamDefaultTee(stream, cloneForBranch2); } } /** * @template R * @param {ReadableStream} stream * @param {boolean} cloneForBranch2 * @returns {[ReadableStream, ReadableStream]} */ function readableStreamDefaultTee(stream, cloneForBranch2) { assert(isReadableStream(stream)); assert(typeof cloneForBranch2 === "boolean"); const reader = acquireReadableStreamDefaultReader(stream); let reading = false; let readAgain = false; let canceled1 = false; let canceled2 = false; /** @type {any} */ let reason1; /** @type {any} */ let reason2; /** @type {ReadableStream} */ // deno-lint-ignore prefer-const let branch1; /** @type {ReadableStream} */ // deno-lint-ignore prefer-const let branch2; /** @type {Deferred} */ const cancelPromise = new Deferred(); function pullAlgorithm() { if (reading === true) { readAgain = true; return PromiseResolve(undefined); } reading = true; /** @type {ReadRequest} */ const readRequest = { chunkSteps(value) { queueMicrotask(() => { readAgain = false; const value1 = value; let value2 = value; if (canceled2 === false && cloneForBranch2 === true) { try { value2 = structuredClone(value2); } catch (cloneError) { readableStreamDefaultControllerError( branch1[_controller], cloneError, ); readableStreamDefaultControllerError( branch2[_controller], cloneError, ); cancelPromise.resolve(readableStreamCancel(stream, cloneError)); return; } } if (canceled1 === false) { readableStreamDefaultControllerEnqueue( /** @type {ReadableStreamDefaultController} */ branch1[ _controller ], value1, ); } if (canceled2 === false) { readableStreamDefaultControllerEnqueue( /** @type {ReadableStreamDefaultController} */ branch2[ _controller ], value2, ); } reading = false; if (readAgain === true) { pullAlgorithm(); } }); }, closeSteps() { reading = false; if (canceled1 === false) { readableStreamDefaultControllerClose( /** @type {ReadableStreamDefaultController} */ branch1[ _controller ], ); } if (canceled2 === false) { readableStreamDefaultControllerClose( /** @type {ReadableStreamDefaultController} */ branch2[ _controller ], ); } if (canceled1 === false || canceled2 === false) { cancelPromise.resolve(undefined); } }, errorSteps() { reading = false; }, }; readableStreamDefaultReaderRead(reader, readRequest); return PromiseResolve(undefined); } /** * @param {any} reason * @returns {Promise} */ function cancel1Algorithm(reason) { canceled1 = true; reason1 = reason; if (canceled2 === true) { const compositeReason = [reason1, reason2]; const cancelResult = readableStreamCancel(stream, compositeReason); cancelPromise.resolve(cancelResult); } return cancelPromise.promise; } /** * @param {any} reason * @returns {Promise} */ function cancel2Algorithm(reason) { canceled2 = true; reason2 = reason; if (canceled1 === true) { const compositeReason = [reason1, reason2]; const cancelResult = readableStreamCancel(stream, compositeReason); cancelPromise.resolve(cancelResult); } return cancelPromise.promise; } function startAlgorithm() {} branch1 = createReadableStream( startAlgorithm, pullAlgorithm, cancel1Algorithm, ); branch2 = createReadableStream( startAlgorithm, pullAlgorithm, cancel2Algorithm, ); uponRejection(reader[_closedPromise].promise, (r) => { readableStreamDefaultControllerError( /** @type {ReadableStreamDefaultController} */ branch1[ _controller ], r, ); readableStreamDefaultControllerError( /** @type {ReadableStreamDefaultController} */ branch2[ _controller ], r, ); if (canceled1 === false || canceled2 === false) { cancelPromise.resolve(undefined); } }); return [branch1, branch2]; } /** * @template R * @param {ReadableStream} stream * @returns {[ReadableStream, ReadableStream]} */ function readableByteStreamTee(stream) { assert(isReadableStream(stream)); assert( ObjectPrototypeIsPrototypeOf( ReadableByteStreamControllerPrototype, stream[_controller], ), ); let reader = acquireReadableStreamDefaultReader(stream); let reading = false; let readAgainForBranch1 = false; let readAgainForBranch2 = false; let canceled1 = false; let canceled2 = false; let reason1 = undefined; let reason2 = undefined; let branch1 = undefined; let branch2 = undefined; /** @type {Deferred} */ const cancelPromise = new Deferred(); /** * @param {ReadableStreamBYOBReader} thisReader */ function forwardReaderError(thisReader) { PromisePrototypeCatch(thisReader[_closedPromise].promise, (e) => { if (thisReader !== reader) { return; } readableByteStreamControllerError(branch1[_controller], e); readableByteStreamControllerError(branch2[_controller], e); if (!canceled1 || !canceled2) { cancelPromise.resolve(undefined); } }); } function pullWithDefaultReader() { if (isReadableStreamBYOBReader(reader)) { assert(reader[_readIntoRequests].length === 0); readableStreamBYOBReaderRelease(reader); reader = acquireReadableStreamDefaultReader(stream); forwardReaderError(reader); } /** @type {ReadRequest} */ const readRequest = { chunkSteps(chunk) { queueMicrotask(() => { readAgainForBranch1 = false; readAgainForBranch2 = false; const chunk1 = chunk; let chunk2 = chunk; if (!canceled1 && !canceled2) { try { chunk2 = cloneAsUint8Array(chunk); } catch (e) { readableByteStreamControllerError(branch1[_controller], e); readableByteStreamControllerError(branch2[_controller], e); cancelPromise.resolve(readableStreamCancel(stream, e)); return; } } if (!canceled1) { readableByteStreamControllerEnqueue(branch1[_controller], chunk1); } if (!canceled2) { readableByteStreamControllerEnqueue(branch2[_controller], chunk2); } reading = false; if (readAgainForBranch1) { pull1Algorithm(); } else if (readAgainForBranch2) { pull2Algorithm(); } }); }, closeSteps() { reading = false; if (!canceled1) { readableByteStreamControllerClose(branch1[_controller]); } if (!canceled2) { readableByteStreamControllerClose(branch2[_controller]); } if (branch1[_controller][_pendingPullIntos].length !== 0) { readableByteStreamControllerRespond(branch1[_controller], 0); } if (branch2[_controller][_pendingPullIntos].length !== 0) { readableByteStreamControllerRespond(branch2[_controller], 0); } if (!canceled1 || !canceled2) { cancelPromise.resolve(undefined); } }, errorSteps() { reading = false; }, }; readableStreamDefaultReaderRead(reader, readRequest); } function pullWithBYOBReader(view, forBranch2) { if (isReadableStreamDefaultReader(reader)) { assert(reader[_readRequests].size === 0); readableStreamDefaultReaderRelease(reader); reader = acquireReadableStreamBYOBReader(stream); forwardReaderError(reader); } const byobBranch = forBranch2 ? branch2 : branch1; const otherBranch = forBranch2 ? branch1 : branch2; /** @type {ReadIntoRequest} */ const readIntoRequest = { chunkSteps(chunk) { queueMicrotask(() => { readAgainForBranch1 = false; readAgainForBranch2 = false; const byobCanceled = forBranch2 ? canceled2 : canceled1; const otherCanceled = forBranch2 ? canceled1 : canceled2; if (!otherCanceled) { let clonedChunk; try { clonedChunk = cloneAsUint8Array(chunk); } catch (e) { readableByteStreamControllerError(byobBranch[_controller], e); readableByteStreamControllerError(otherBranch[_controller], e); cancelPromise.resolve(readableStreamCancel(stream, e)); return; } if (!byobCanceled) { readableByteStreamControllerRespondWithNewView( byobBranch[_controller], chunk, ); } readableByteStreamControllerEnqueue( otherBranch[_controller], clonedChunk, ); } else if (!byobCanceled) { readableByteStreamControllerRespondWithNewView( byobBranch[_controller], chunk, ); } reading = false; if (readAgainForBranch1) { pull1Algorithm(); } else if (readAgainForBranch2) { pull2Algorithm(); } }); }, closeSteps(chunk) { reading = false; const byobCanceled = forBranch2 ? canceled2 : canceled1; const otherCanceled = forBranch2 ? canceled1 : canceled2; if (!byobCanceled) { readableByteStreamControllerClose(byobBranch[_controller]); } if (!otherCanceled) { readableByteStreamControllerClose(otherBranch[_controller]); } if (chunk !== undefined) { let byteLength; if (isTypedArray(chunk)) { byteLength = TypedArrayPrototypeGetByteLength( /** @type {Uint8Array} */ (chunk), ); } else { byteLength = DataViewPrototypeGetByteLength( /** @type {DataView} */ (chunk), ); } assert(byteLength === 0); if (!byobCanceled) { readableByteStreamControllerRespondWithNewView( byobBranch[_controller], chunk, ); } if ( !otherCanceled && otherBranch[_controller][_pendingPullIntos].length !== 0 ) { readableByteStreamControllerRespond(otherBranch[_controller], 0); } } if (!byobCanceled || !otherCanceled) { cancelPromise.resolve(undefined); } }, errorSteps() { reading = false; }, }; readableStreamBYOBReaderRead(reader, view, 1, readIntoRequest); } function pull1Algorithm() { if (reading) { readAgainForBranch1 = true; return PromiseResolve(undefined); } reading = true; const byobRequest = readableByteStreamControllerGetBYOBRequest( branch1[_controller], ); if (byobRequest === null) { pullWithDefaultReader(); } else { pullWithBYOBReader(byobRequest[_view], false); } return PromiseResolve(undefined); } function pull2Algorithm() { if (reading) { readAgainForBranch2 = true; return PromiseResolve(undefined); } reading = true; const byobRequest = readableByteStreamControllerGetBYOBRequest( branch2[_controller], ); if (byobRequest === null) { pullWithDefaultReader(); } else { pullWithBYOBReader(byobRequest[_view], true); } return PromiseResolve(undefined); } function cancel1Algorithm(reason) { canceled1 = true; reason1 = reason; if (canceled2) { const compositeReason = [reason1, reason2]; const cancelResult = readableStreamCancel(stream, compositeReason); cancelPromise.resolve(cancelResult); } return cancelPromise.promise; } function cancel2Algorithm(reason) { canceled2 = true; reason2 = reason; if (canceled1) { const compositeReason = [reason1, reason2]; const cancelResult = readableStreamCancel(stream, compositeReason); cancelPromise.resolve(cancelResult); } return cancelPromise.promise; } function startAlgorithm() { return undefined; } branch1 = createReadableByteStream( startAlgorithm, pull1Algorithm, cancel1Algorithm, ); branch2 = createReadableByteStream( startAlgorithm, pull2Algorithm, cancel2Algorithm, ); branch1[_original] = stream; branch2[_original] = stream; forwardReaderError(reader); return [branch1, branch2]; } /** * @param {ReadableStream} stream * @param {ReadableByteStreamController} controller * @param {() => void} startAlgorithm * @param {() => Promise} pullAlgorithm * @param {(reason: any) => Promise} cancelAlgorithm * @param {number} highWaterMark * @param {number | undefined} autoAllocateChunkSize */ function setUpReadableByteStreamController( stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, autoAllocateChunkSize, ) { assert(stream[_controller] === undefined); if (autoAllocateChunkSize !== undefined) { assert(NumberIsInteger(autoAllocateChunkSize)); assert(autoAllocateChunkSize >= 0); } controller[_stream] = stream; controller[_pullAgain] = controller[_pulling] = false; controller[_byobRequest] = null; resetQueue(controller); controller[_closeRequested] = controller[_started] = false; controller[_strategyHWM] = highWaterMark; controller[_pullAlgorithm] = pullAlgorithm; controller[_cancelAlgorithm] = cancelAlgorithm; controller[_autoAllocateChunkSize] = autoAllocateChunkSize; controller[_pendingPullIntos] = []; stream[_controller] = controller; const startResult = startAlgorithm(); const startPromise = PromiseResolve(startResult); setPromiseIsHandledToTrue( PromisePrototypeThen( startPromise, () => { controller[_started] = true; assert(controller[_pulling] === false); assert(controller[_pullAgain] === false); readableByteStreamControllerCallPullIfNeeded(controller); }, (r) => { readableByteStreamControllerError(controller, r); }, ), ); } /** * @param {ReadableStream} stream * @param {UnderlyingSource} underlyingSource * @param {UnderlyingSource} underlyingSourceDict * @param {number} highWaterMark */ function setUpReadableByteStreamControllerFromUnderlyingSource( stream, underlyingSource, underlyingSourceDict, highWaterMark, ) { const controller = new ReadableByteStreamController(_brand); /** @type {() => void} */ let startAlgorithm = _defaultStartAlgorithm; /** @type {() => Promise} */ let pullAlgorithm = _defaultPullAlgorithm; /** @type {(reason: any) => Promise} */ let cancelAlgorithm = _defaultCancelAlgorithm; if (underlyingSourceDict.start !== undefined) { startAlgorithm = () => webidl.invokeCallbackFunction( underlyingSourceDict.start, [controller], underlyingSource, webidl.converters.any, "Failed to call 'startAlgorithm' on 'ReadableByteStreamController'", ); } if (underlyingSourceDict.pull !== undefined) { pullAlgorithm = () => webidl.invokeCallbackFunction( underlyingSourceDict.pull, [controller], underlyingSource, webidl.converters["Promise"], "Failed to call 'pullAlgorithm' on 'ReadableByteStreamController'", true, ); } if (underlyingSourceDict.cancel !== undefined) { cancelAlgorithm = (reason) => webidl.invokeCallbackFunction( underlyingSourceDict.cancel, [reason], underlyingSource, webidl.converters["Promise"], "Failed to call 'cancelAlgorithm' on 'ReadableByteStreamController'", true, ); } const autoAllocateChunkSize = underlyingSourceDict["autoAllocateChunkSize"]; if (autoAllocateChunkSize === 0) { throw new TypeError("autoAllocateChunkSize must be greater than 0"); } setUpReadableByteStreamController( stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, autoAllocateChunkSize, ); } /** * @template R * @param {ReadableStream} stream * @param {ReadableStreamDefaultController} controller * @param {(controller: ReadableStreamDefaultController) => void | Promise} startAlgorithm * @param {(controller: ReadableStreamDefaultController) => Promise} pullAlgorithm * @param {(reason: any) => Promise} cancelAlgorithm * @param {number} highWaterMark * @param {(chunk: R) => number} sizeAlgorithm */ function setUpReadableStreamDefaultController( stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm, ) { assert(stream[_controller] === undefined); controller[_stream] = stream; resetQueue(controller); controller[_started] = controller[_closeRequested] = controller[_pullAgain] = controller[_pulling] = false; controller[_strategySizeAlgorithm] = sizeAlgorithm; controller[_strategyHWM] = highWaterMark; controller[_pullAlgorithm] = pullAlgorithm; controller[_cancelAlgorithm] = cancelAlgorithm; stream[_controller] = controller; const startResult = startAlgorithm(controller); const startPromise = PromiseResolve(startResult); uponPromise(startPromise, () => { controller[_started] = true; assert(controller[_pulling] === false); assert(controller[_pullAgain] === false); readableStreamDefaultControllerCallPullIfNeeded(controller); }, (r) => { readableStreamDefaultControllerError(controller, r); }); } /** * @template R * @param {ReadableStream} stream * @param {UnderlyingSource} underlyingSource * @param {UnderlyingSource} underlyingSourceDict * @param {number} highWaterMark * @param {(chunk: R) => number} sizeAlgorithm */ function setUpReadableStreamDefaultControllerFromUnderlyingSource( stream, underlyingSource, underlyingSourceDict, highWaterMark, sizeAlgorithm, ) { const controller = new ReadableStreamDefaultController(_brand); /** @type {() => Promise} */ let startAlgorithm = _defaultStartAlgorithm; /** @type {() => Promise} */ let pullAlgorithm = _defaultPullAlgorithm; /** @type {(reason?: any) => Promise} */ let cancelAlgorithm = _defaultCancelAlgorithm; if (underlyingSourceDict.start !== undefined) { startAlgorithm = () => webidl.invokeCallbackFunction( underlyingSourceDict.start, [controller], underlyingSource, webidl.converters.any, "Failed to call 'startAlgorithm' on 'ReadableStreamDefaultController'", ); } if (underlyingSourceDict.pull !== undefined) { pullAlgorithm = () => webidl.invokeCallbackFunction( underlyingSourceDict.pull, [controller], underlyingSource, webidl.converters["Promise"], "Failed to call 'pullAlgorithm' on 'ReadableStreamDefaultController'", true, ); } if (underlyingSourceDict.cancel !== undefined) { cancelAlgorithm = (reason) => webidl.invokeCallbackFunction( underlyingSourceDict.cancel, [reason], underlyingSource, webidl.converters["Promise"], "Failed to call 'cancelAlgorithm' on 'ReadableStreamDefaultController'", true, ); } setUpReadableStreamDefaultController( stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm, ); } /** * @template R * @param {ReadableStreamBYOBReader} reader * @param {ReadableStream} stream */ function setUpReadableStreamBYOBReader(reader, stream) { if (isReadableStreamLocked(stream)) { throw new TypeError("ReadableStream is locked."); } if ( !(ObjectPrototypeIsPrototypeOf( ReadableByteStreamControllerPrototype, stream[_controller], )) ) { throw new TypeError("Cannot use a BYOB reader with a non-byte stream"); } readableStreamReaderGenericInitialize(reader, stream); reader[_readIntoRequests] = []; } /** * @template R * @param {ReadableStreamDefaultReader} reader * @param {ReadableStream} stream */ function setUpReadableStreamDefaultReader(reader, stream) { if (isReadableStreamLocked(stream)) { throw new TypeError("ReadableStream is locked."); } readableStreamReaderGenericInitialize(reader, stream); reader[_readRequests] = new Queue(); } /** * @template O * @param {TransformStream} stream * @param {TransformStreamDefaultController} controller * @param {(chunk: O, controller: TransformStreamDefaultController) => Promise} transformAlgorithm * @param {(controller: TransformStreamDefaultController) => Promise} flushAlgorithm * @param {(reason: any) => Promise} cancelAlgorithm */ function setUpTransformStreamDefaultController( stream, controller, transformAlgorithm, flushAlgorithm, cancelAlgorithm, ) { assert(ObjectPrototypeIsPrototypeOf(TransformStreamPrototype, stream)); assert(stream[_controller] === undefined); controller[_stream] = stream; stream[_controller] = controller; controller[_transformAlgorithm] = transformAlgorithm; controller[_flushAlgorithm] = flushAlgorithm; controller[_cancelAlgorithm] = cancelAlgorithm; } /** * @template I * @template O * @param {TransformStream} stream * @param {Transformer} transformer * @param {Transformer} transformerDict */ function setUpTransformStreamDefaultControllerFromTransformer( stream, transformer, transformerDict, ) { /** @type {TransformStreamDefaultController} */ const controller = new TransformStreamDefaultController(_brand); /** @type {(chunk: O, controller: TransformStreamDefaultController) => Promise} */ let transformAlgorithm = (chunk) => { try { transformStreamDefaultControllerEnqueue(controller, chunk); } catch (e) { return PromiseReject(e); } return PromiseResolve(undefined); }; /** @type {(controller: TransformStreamDefaultController) => Promise} */ let flushAlgorithm = _defaultFlushAlgorithm; let cancelAlgorithm = _defaultCancelAlgorithm; if (transformerDict.transform !== undefined) { transformAlgorithm = (chunk, controller) => webidl.invokeCallbackFunction( transformerDict.transform, [chunk, controller], transformer, webidl.converters["Promise"], "Failed to call 'transformAlgorithm' on 'TransformStreamDefaultController'", true, ); } if (transformerDict.flush !== undefined) { flushAlgorithm = (controller) => webidl.invokeCallbackFunction( transformerDict.flush, [controller], transformer, webidl.converters["Promise"], "Failed to call 'flushAlgorithm' on 'TransformStreamDefaultController'", true, ); } if (transformerDict.cancel !== undefined) { cancelAlgorithm = (reason) => webidl.invokeCallbackFunction( transformerDict.cancel, [reason], transformer, webidl.converters["Promise"], "Failed to call 'cancelAlgorithm' on 'TransformStreamDefaultController'", true, ); } setUpTransformStreamDefaultController( stream, controller, transformAlgorithm, flushAlgorithm, cancelAlgorithm, ); } /** * @template W * @param {WritableStream} stream * @param {WritableStreamDefaultController} controller * @param {(controller: WritableStreamDefaultController) => Promise} startAlgorithm * @param {(chunk: W, controller: WritableStreamDefaultController) => Promise} writeAlgorithm * @param {() => Promise} closeAlgorithm * @param {(reason?: any) => Promise} abortAlgorithm * @param {number} highWaterMark * @param {(chunk: W) => number} sizeAlgorithm */ function setUpWritableStreamDefaultController( stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm, ) { assert(isWritableStream(stream)); assert(stream[_controller] === undefined); controller[_stream] = stream; stream[_controller] = controller; resetQueue(controller); controller[_signal] = newSignal(); controller[_started] = false; controller[_strategySizeAlgorithm] = sizeAlgorithm; controller[_strategyHWM] = highWaterMark; controller[_writeAlgorithm] = writeAlgorithm; controller[_closeAlgorithm] = closeAlgorithm; controller[_abortAlgorithm] = abortAlgorithm; const backpressure = writableStreamDefaultControllerGetBackpressure( controller, ); writableStreamUpdateBackpressure(stream, backpressure); const startResult = startAlgorithm(controller); const startPromise = resolvePromiseWith(startResult); uponPromise(startPromise, () => { assert(stream[_state] === "writable" || stream[_state] === "erroring"); controller[_started] = true; writableStreamDefaultControllerAdvanceQueueIfNeeded(controller); }, (r) => { assert(stream[_state] === "writable" || stream[_state] === "erroring"); controller[_started] = true; writableStreamDealWithRejection(stream, r); }); } /** * @template W * @param {WritableStream} stream * @param {UnderlyingSink} underlyingSink * @param {UnderlyingSink} underlyingSinkDict * @param {number} highWaterMark * @param {(chunk: W) => number} sizeAlgorithm */ function setUpWritableStreamDefaultControllerFromUnderlyingSink( stream, underlyingSink, underlyingSinkDict, highWaterMark, sizeAlgorithm, ) { const controller = new WritableStreamDefaultController(_brand); /** @type {(controller: WritableStreamDefaultController) => any} */ let startAlgorithm = _defaultStartAlgorithm; /** @type {(chunk: W, controller: WritableStreamDefaultController) => Promise} */ let writeAlgorithm = _defaultWriteAlgorithm; let closeAlgorithm = _defaultCloseAlgorithm; /** @type {(reason?: any) => Promise} */ let abortAlgorithm = _defaultAbortAlgorithm; if (underlyingSinkDict.start !== undefined) { startAlgorithm = () => webidl.invokeCallbackFunction( underlyingSinkDict.start, [controller], underlyingSink, webidl.converters.any, "Failed to call 'startAlgorithm' on 'WritableStreamDefaultController'", ); } if (underlyingSinkDict.write !== undefined) { writeAlgorithm = (chunk) => webidl.invokeCallbackFunction( underlyingSinkDict.write, [chunk, controller], underlyingSink, webidl.converters["Promise"], "Failed to call 'writeAlgorithm' on 'WritableStreamDefaultController'", true, ); } if (underlyingSinkDict.close !== undefined) { closeAlgorithm = () => webidl.invokeCallbackFunction( underlyingSinkDict.close, [], underlyingSink, webidl.converters["Promise"], "Failed to call 'closeAlgorithm' on 'WritableStreamDefaultController'", true, ); } if (underlyingSinkDict.abort !== undefined) { abortAlgorithm = (reason) => webidl.invokeCallbackFunction( underlyingSinkDict.abort, [reason], underlyingSink, webidl.converters["Promise"], "Failed to call 'abortAlgorithm' on 'WritableStreamDefaultController'", true, ); } setUpWritableStreamDefaultController( stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm, ); } /** * @template W * @param {WritableStreamDefaultWriter} writer * @param {WritableStream} stream */ function setUpWritableStreamDefaultWriter(writer, stream) { if (isWritableStreamLocked(stream) === true) { throw new TypeError("The stream is already locked."); } writer[_stream] = stream; stream[_writer] = writer; const state = stream[_state]; if (state === "writable") { if ( writableStreamCloseQueuedOrInFlight(stream) === false && stream[_backpressure] === true ) { writer[_readyPromise] = new Deferred(); } else { writer[_readyPromise] = new Deferred(); writer[_readyPromise].resolve(undefined); } writer[_closedPromise] = new Deferred(); } else if (state === "erroring") { writer[_readyPromise] = new Deferred(); writer[_readyPromise].reject(stream[_storedError]); setPromiseIsHandledToTrue(writer[_readyPromise].promise); writer[_closedPromise] = new Deferred(); } else if (state === "closed") { writer[_readyPromise] = new Deferred(); writer[_readyPromise].resolve(undefined); writer[_closedPromise] = new Deferred(); writer[_closedPromise].resolve(undefined); } else { assert(state === "errored"); const storedError = stream[_storedError]; writer[_readyPromise] = new Deferred(); writer[_readyPromise].reject(storedError); setPromiseIsHandledToTrue(writer[_readyPromise].promise); writer[_closedPromise] = new Deferred(); writer[_closedPromise].reject(storedError); setPromiseIsHandledToTrue(writer[_closedPromise].promise); } } /** @param {TransformStreamDefaultController} controller */ function transformStreamDefaultControllerClearAlgorithms(controller) { controller[_transformAlgorithm] = undefined; controller[_flushAlgorithm] = undefined; controller[_cancelAlgorithm] = undefined; } /** * @template O * @param {TransformStreamDefaultController} controller * @param {O} chunk */ function transformStreamDefaultControllerEnqueue(controller, chunk) { const stream = controller[_stream]; const readableController = stream[_readable][_controller]; if ( readableStreamDefaultControllerCanCloseOrEnqueue( /** @type {ReadableStreamDefaultController} */ readableController, ) === false ) { throw new TypeError("Readable stream is unavailable."); } try { readableStreamDefaultControllerEnqueue( /** @type {ReadableStreamDefaultController} */ readableController, chunk, ); } catch (e) { transformStreamErrorWritableAndUnblockWrite(stream, e); throw stream[_readable][_storedError]; } const backpressure = readableStreamDefaultcontrollerHasBackpressure( /** @type {ReadableStreamDefaultController} */ readableController, ); if (backpressure !== stream[_backpressure]) { assert(backpressure === true); transformStreamSetBackpressure(stream, true); } } /** * @param {TransformStreamDefaultController} controller * @param {any=} e */ function transformStreamDefaultControllerError(controller, e) { transformStreamError(controller[_stream], e); } /** * @template O * @param {TransformStreamDefaultController} controller * @param {any} chunk * @returns {Promise} */ function transformStreamDefaultControllerPerformTransform(controller, chunk) { const transformPromise = controller[_transformAlgorithm](chunk, controller); return transformPromiseWith(transformPromise, undefined, (r) => { transformStreamError(controller[_stream], r); throw r; }); } /** @param {TransformStreamDefaultController} controller */ function transformStreamDefaultControllerTerminate(controller) { const stream = controller[_stream]; const readableController = stream[_readable][_controller]; readableStreamDefaultControllerClose( /** @type {ReadableStreamDefaultController} */ readableController, ); const error = new TypeError("The stream has been terminated."); transformStreamErrorWritableAndUnblockWrite(stream, error); } /** * @template I * @template O * @param {TransformStream} stream * @param {any=} reason * @returns {Promise} */ function transformStreamDefaultSinkAbortAlgorithm(stream, reason) { const controller = stream[_controller]; if (controller[_finishPromise] !== undefined) { return controller[_finishPromise].promise; } const readable = stream[_readable]; controller[_finishPromise] = new Deferred(); const cancelPromise = controller[_cancelAlgorithm](reason); transformStreamDefaultControllerClearAlgorithms(controller); transformPromiseWith(cancelPromise, () => { if (readable[_state] === "errored") { controller[_finishPromise].reject(readable[_storedError]); } else { readableStreamDefaultControllerError(readable[_controller], reason); controller[_finishPromise].resolve(undefined); } }, (r) => { readableStreamDefaultControllerError(readable[_controller], r); controller[_finishPromise].reject(r); }); return controller[_finishPromise].promise; } /** * @template I * @template O * @param {TransformStream} stream * @returns {Promise} */ function transformStreamDefaultSinkCloseAlgorithm(stream) { const controller = stream[_controller]; if (controller[_finishPromise] !== undefined) { return controller[_finishPromise].promise; } const readable = stream[_readable]; controller[_finishPromise] = new Deferred(); const flushPromise = controller[_flushAlgorithm](controller); transformStreamDefaultControllerClearAlgorithms(controller); transformPromiseWith(flushPromise, () => { if (readable[_state] === "errored") { controller[_finishPromise].reject(readable[_storedError]); } else { readableStreamDefaultControllerClose(readable[_controller]); controller[_finishPromise].resolve(undefined); } }, (r) => { readableStreamDefaultControllerError(readable[_controller], r); controller[_finishPromise].reject(r); }); return controller[_finishPromise].promise; } /** * @template I * @template O * @param {TransformStream} stream * @param {I} chunk * @returns {Promise} */ function transformStreamDefaultSinkWriteAlgorithm(stream, chunk) { assert(stream[_writable][_state] === "writable"); const controller = stream[_controller]; if (stream[_backpressure] === true) { const backpressureChangePromise = stream[_backpressureChangePromise]; assert(backpressureChangePromise !== undefined); return transformPromiseWith(backpressureChangePromise.promise, () => { const writable = stream[_writable]; const state = writable[_state]; if (state === "erroring") { throw writable[_storedError]; } assert(state === "writable"); return transformStreamDefaultControllerPerformTransform( controller, chunk, ); }); } return transformStreamDefaultControllerPerformTransform(controller, chunk); } /** * @template I * @template O * @param {TransformStream} stream * @param {any=} reason * @returns {Promise} */ function transformStreamDefaultSourceCancelAlgorithm(stream, reason) { const controller = stream[_controller]; if (controller[_finishPromise] !== undefined) { return controller[_finishPromise].promise; } const writable = stream[_writable]; controller[_finishPromise] = new Deferred(); const cancelPromise = controller[_cancelAlgorithm](reason); transformStreamDefaultControllerClearAlgorithms(controller); transformPromiseWith(cancelPromise, () => { if (writable[_state] === "errored") { controller[_finishPromise].reject(writable[_storedError]); } else { writableStreamDefaultControllerErrorIfNeeded( writable[_controller], reason, ); transformStreamUnblockWrite(stream); controller[_finishPromise].resolve(undefined); } }, (r) => { writableStreamDefaultControllerErrorIfNeeded(writable[_controller], r); transformStreamUnblockWrite(stream); controller[_finishPromise].reject(r); }); return controller[_finishPromise].promise; } /** * @param {TransformStream} stream * @returns {Promise} */ function transformStreamDefaultSourcePullAlgorithm(stream) { assert(stream[_backpressure] === true); assert(stream[_backpressureChangePromise] !== undefined); transformStreamSetBackpressure(stream, false); return stream[_backpressureChangePromise].promise; } /** * @param {TransformStream} stream * @param {any=} e */ function transformStreamError(stream, e) { readableStreamDefaultControllerError( /** @type {ReadableStreamDefaultController} */ stream[_readable][ _controller ], e, ); transformStreamErrorWritableAndUnblockWrite(stream, e); } /** * @param {TransformStream} stream * @param {any=} e */ function transformStreamErrorWritableAndUnblockWrite(stream, e) { transformStreamDefaultControllerClearAlgorithms(stream[_controller]); writableStreamDefaultControllerErrorIfNeeded( stream[_writable][_controller], e, ); transformStreamUnblockWrite(stream); } /** * @param {TransformStream} stream * @param {boolean} backpressure */ function transformStreamSetBackpressure(stream, backpressure) { assert(stream[_backpressure] !== backpressure); if (stream[_backpressureChangePromise] !== undefined) { stream[_backpressureChangePromise].resolve(undefined); } stream[_backpressureChangePromise] = new Deferred(); stream[_backpressure] = backpressure; } /** * @param {TransformStream} stream */ function transformStreamUnblockWrite(stream) { if (stream[_backpressure] === true) { transformStreamSetBackpressure(stream, false); } } /** * @param {WritableStream} stream * @param {any=} reason * @returns {Promise} */ function writableStreamAbort(stream, reason) { const state = stream[_state]; if (state === "closed" || state === "errored") { return PromiseResolve(undefined); } stream[_controller][_signal][signalAbort](reason); if (state === "closed" || state === "errored") { return PromiseResolve(undefined); } if (stream[_pendingAbortRequest] !== undefined) { return stream[_pendingAbortRequest].deferred.promise; } assert(state === "writable" || state === "erroring"); let wasAlreadyErroring = false; if (state === "erroring") { wasAlreadyErroring = true; reason = undefined; } /** Deferred */ const deferred = new Deferred(); stream[_pendingAbortRequest] = { deferred, reason, wasAlreadyErroring, }; if (wasAlreadyErroring === false) { writableStreamStartErroring(stream, reason); } return deferred.promise; } /** * @param {WritableStream} stream * @returns {Promise} */ function writableStreamAddWriteRequest(stream) { assert(isWritableStreamLocked(stream) === true); assert(stream[_state] === "writable"); /** @type {Deferred} */ const deferred = new Deferred(); ArrayPrototypePush(stream[_writeRequests], deferred); return deferred.promise; } /** * @param {WritableStream} stream * @returns {Promise} */ function writableStreamClose(stream) { const state = stream[_state]; if (state === "closed" || state === "errored") { return PromiseReject( new TypeError("Writable stream is closed or errored."), ); } assert(state === "writable" || state === "erroring"); assert(writableStreamCloseQueuedOrInFlight(stream) === false); /** @type {Deferred} */ const deferred = new Deferred(); stream[_closeRequest] = deferred; const writer = stream[_writer]; if ( writer !== undefined && stream[_backpressure] === true && state === "writable" ) { writer[_readyPromise].resolve(undefined); } writableStreamDefaultControllerClose(stream[_controller]); return deferred.promise; } /** * @param {WritableStream} stream * @returns {boolean} */ function writableStreamCloseQueuedOrInFlight(stream) { if ( stream[_closeRequest] === undefined && stream[_inFlightCloseRequest] === undefined ) { return false; } return true; } /** * @param {WritableStream} stream * @param {any=} error */ function writableStreamDealWithRejection(stream, error) { const state = stream[_state]; if (state === "writable") { writableStreamStartErroring(stream, error); return; } assert(state === "erroring"); writableStreamFinishErroring(stream); } /** * @template W * @param {WritableStreamDefaultController} controller */ function writableStreamDefaultControllerAdvanceQueueIfNeeded(controller) { const stream = controller[_stream]; if (controller[_started] === false) { return; } if (stream[_inFlightWriteRequest] !== undefined) { return; } const state = stream[_state]; assert(state !== "closed" && state !== "errored"); if (state === "erroring") { writableStreamFinishErroring(stream); return; } if (controller[_queue].size === 0) { return; } const value = peekQueueValue(controller); if (value === _close) { writableStreamDefaultControllerProcessClose(controller); } else { writableStreamDefaultControllerProcessWrite(controller, value); } } function writableStreamDefaultControllerClearAlgorithms(controller) { controller[_writeAlgorithm] = undefined; controller[_closeAlgorithm] = undefined; controller[_abortAlgorithm] = undefined; controller[_strategySizeAlgorithm] = undefined; } /** @param {WritableStreamDefaultController} controller */ function writableStreamDefaultControllerClose(controller) { enqueueValueWithSize(controller, _close, 0); writableStreamDefaultControllerAdvanceQueueIfNeeded(controller); } /** * @param {WritableStreamDefaultController} controller * @param {any} error */ function writableStreamDefaultControllerError(controller, error) { const stream = controller[_stream]; assert(stream[_state] === "writable"); writableStreamDefaultControllerClearAlgorithms(controller); writableStreamStartErroring(stream, error); } /** * @param {WritableStreamDefaultController} controller * @param {any} error */ function writableStreamDefaultControllerErrorIfNeeded(controller, error) { if (controller[_stream][_state] === "writable") { writableStreamDefaultControllerError(controller, error); } } /** * @param {WritableStreamDefaultController} controller * @returns {boolean} */ function writableStreamDefaultControllerGetBackpressure(controller) { const desiredSize = writableStreamDefaultControllerGetDesiredSize( controller, ); return desiredSize <= 0; } /** * @template W * @param {WritableStreamDefaultController} controller * @param {W} chunk * @returns {number} */ function writableStreamDefaultControllerGetChunkSize(controller, chunk) { let value; try { value = controller[_strategySizeAlgorithm](chunk); } catch (e) { writableStreamDefaultControllerErrorIfNeeded(controller, e); return 1; } return value; } /** * @param {WritableStreamDefaultController} controller * @returns {number} */ function writableStreamDefaultControllerGetDesiredSize(controller) { return controller[_strategyHWM] - controller[_queueTotalSize]; } /** @param {WritableStreamDefaultController} controller */ function writableStreamDefaultControllerProcessClose(controller) { const stream = controller[_stream]; writableStreamMarkCloseRequestInFlight(stream); dequeueValue(controller); assert(controller[_queue].size === 0); const sinkClosePromise = controller[_closeAlgorithm](); writableStreamDefaultControllerClearAlgorithms(controller); uponPromise(sinkClosePromise, () => { writableStreamFinishInFlightClose(stream); }, (reason) => { writableStreamFinishInFlightCloseWithError(stream, reason); }); } /** * @template W * @param {WritableStreamDefaultController} controller * @param {W} chunk */ function writableStreamDefaultControllerProcessWrite(controller, chunk) { const stream = controller[_stream]; writableStreamMarkFirstWriteRequestInFlight(stream); const sinkWritePromise = controller[_writeAlgorithm](chunk, controller); uponPromise(sinkWritePromise, () => { writableStreamFinishInFlightWrite(stream); const state = stream[_state]; assert(state === "writable" || state === "erroring"); dequeueValue(controller); if ( writableStreamCloseQueuedOrInFlight(stream) === false && state === "writable" ) { const backpressure = writableStreamDefaultControllerGetBackpressure( controller, ); writableStreamUpdateBackpressure(stream, backpressure); } writableStreamDefaultControllerAdvanceQueueIfNeeded(controller); }, (reason) => { if (stream[_state] === "writable") { writableStreamDefaultControllerClearAlgorithms(controller); } writableStreamFinishInFlightWriteWithError(stream, reason); }); } /** * @template W * @param {WritableStreamDefaultController} controller * @param {W} chunk * @param {number} chunkSize */ function writableStreamDefaultControllerWrite(controller, chunk, chunkSize) { try { enqueueValueWithSize(controller, chunk, chunkSize); } catch (e) { writableStreamDefaultControllerErrorIfNeeded(controller, e); return; } const stream = controller[_stream]; if ( writableStreamCloseQueuedOrInFlight(stream) === false && stream[_state] === "writable" ) { const backpressure = writableStreamDefaultControllerGetBackpressure( controller, ); writableStreamUpdateBackpressure(stream, backpressure); } writableStreamDefaultControllerAdvanceQueueIfNeeded(controller); } /** * @param {WritableStreamDefaultWriter} writer * @param {any=} reason * @returns {Promise} */ function writableStreamDefaultWriterAbort(writer, reason) { const stream = writer[_stream]; assert(stream !== undefined); return writableStreamAbort(stream, reason); } /** * @param {WritableStreamDefaultWriter} writer * @returns {Promise} */ function writableStreamDefaultWriterClose(writer) { const stream = writer[_stream]; assert(stream !== undefined); return writableStreamClose(stream); } /** * @param {WritableStreamDefaultWriter} writer * @returns {Promise} */ function writableStreamDefaultWriterCloseWithErrorPropagation(writer) { const stream = writer[_stream]; assert(stream !== undefined); const state = stream[_state]; if ( writableStreamCloseQueuedOrInFlight(stream) === true || state === "closed" ) { return PromiseResolve(undefined); } if (state === "errored") { return PromiseReject(stream[_storedError]); } assert(state === "writable" || state === "erroring"); return writableStreamDefaultWriterClose(writer); } /** * @param {WritableStreamDefaultWriter} writer * @param {any=} error */ function writableStreamDefaultWriterEnsureClosedPromiseRejected( writer, error, ) { if (writer[_closedPromise].state === "pending") { writer[_closedPromise].reject(error); } else { writer[_closedPromise] = new Deferred(); writer[_closedPromise].reject(error); } setPromiseIsHandledToTrue(writer[_closedPromise].promise); } /** * @param {WritableStreamDefaultWriter} writer * @param {any=} error */ function writableStreamDefaultWriterEnsureReadyPromiseRejected( writer, error, ) { if (writer[_readyPromise].state === "pending") { writer[_readyPromise].reject(error); } else { writer[_readyPromise] = new Deferred(); writer[_readyPromise].reject(error); } setPromiseIsHandledToTrue(writer[_readyPromise].promise); } /** * @param {WritableStreamDefaultWriter} writer * @returns {number | null} */ function writableStreamDefaultWriterGetDesiredSize(writer) { const stream = writer[_stream]; const state = stream[_state]; if (state === "errored" || state === "erroring") { return null; } if (state === "closed") { return 0; } return writableStreamDefaultControllerGetDesiredSize(stream[_controller]); } /** @param {WritableStreamDefaultWriter} writer */ function writableStreamDefaultWriterRelease(writer) { const stream = writer[_stream]; assert(stream !== undefined); assert(stream[_writer] === writer); const releasedError = new TypeError( "The writer has already been released.", ); writableStreamDefaultWriterEnsureReadyPromiseRejected( writer, releasedError, ); writableStreamDefaultWriterEnsureClosedPromiseRejected( writer, releasedError, ); stream[_writer] = undefined; writer[_stream] = undefined; } /** * @template W * @param {WritableStreamDefaultWriter} writer * @param {W} chunk * @returns {Promise} */ function writableStreamDefaultWriterWrite(writer, chunk) { const stream = writer[_stream]; assert(stream !== undefined); const controller = stream[_controller]; const chunkSize = writableStreamDefaultControllerGetChunkSize( controller, chunk, ); if (stream !== writer[_stream]) { return PromiseReject(new TypeError("Writer's stream is unexpected.")); } const state = stream[_state]; if (state === "errored") { return PromiseReject(stream[_storedError]); } if ( writableStreamCloseQueuedOrInFlight(stream) === true || state === "closed" ) { return PromiseReject( new TypeError("The stream is closing or is closed."), ); } if (state === "erroring") { return PromiseReject(stream[_storedError]); } assert(state === "writable"); const promise = writableStreamAddWriteRequest(stream); writableStreamDefaultControllerWrite(controller, chunk, chunkSize); return promise; } /** @param {WritableStream} stream */ function writableStreamFinishErroring(stream) { assert(stream[_state] === "erroring"); assert(writableStreamHasOperationMarkedInFlight(stream) === false); stream[_state] = "errored"; stream[_controller][_errorSteps](); const storedError = stream[_storedError]; const writeRequests = stream[_writeRequests]; for (let i = 0; i < writeRequests.length; ++i) { const writeRequest = writeRequests[i]; writeRequest.reject(storedError); } stream[_writeRequests] = []; if (stream[_pendingAbortRequest] === undefined) { writableStreamRejectCloseAndClosedPromiseIfNeeded(stream); return; } const abortRequest = stream[_pendingAbortRequest]; stream[_pendingAbortRequest] = undefined; if (abortRequest.wasAlreadyErroring === true) { abortRequest.deferred.reject(storedError); writableStreamRejectCloseAndClosedPromiseIfNeeded(stream); return; } const promise = stream[_controller][_abortSteps](abortRequest.reason); uponPromise(promise, () => { abortRequest.deferred.resolve(undefined); writableStreamRejectCloseAndClosedPromiseIfNeeded(stream); }, (reason) => { abortRequest.deferred.reject(reason); writableStreamRejectCloseAndClosedPromiseIfNeeded(stream); }); } /** @param {WritableStream} stream */ function writableStreamFinishInFlightClose(stream) { assert(stream[_inFlightCloseRequest] !== undefined); stream[_inFlightCloseRequest].resolve(undefined); stream[_inFlightCloseRequest] = undefined; const state = stream[_state]; assert(state === "writable" || state === "erroring"); if (state === "erroring") { stream[_storedError] = undefined; if (stream[_pendingAbortRequest] !== undefined) { stream[_pendingAbortRequest].deferred.resolve(undefined); stream[_pendingAbortRequest] = undefined; } } stream[_state] = "closed"; const writer = stream[_writer]; if (writer !== undefined) { writer[_closedPromise].resolve(undefined); } assert(stream[_pendingAbortRequest] === undefined); assert(stream[_storedError] === undefined); } /** * @param {WritableStream} stream * @param {any=} error */ function writableStreamFinishInFlightCloseWithError(stream, error) { assert(stream[_inFlightCloseRequest] !== undefined); stream[_inFlightCloseRequest].reject(error); stream[_inFlightCloseRequest] = undefined; assert(stream[_state] === "writable" || stream[_state] === "erroring"); if (stream[_pendingAbortRequest] !== undefined) { stream[_pendingAbortRequest].deferred.reject(error); stream[_pendingAbortRequest] = undefined; } writableStreamDealWithRejection(stream, error); } /** @param {WritableStream} stream */ function writableStreamFinishInFlightWrite(stream) { assert(stream[_inFlightWriteRequest] !== undefined); stream[_inFlightWriteRequest].resolve(undefined); stream[_inFlightWriteRequest] = undefined; } /** * @param {WritableStream} stream * @param {any=} error */ function writableStreamFinishInFlightWriteWithError(stream, error) { assert(stream[_inFlightWriteRequest] !== undefined); stream[_inFlightWriteRequest].reject(error); stream[_inFlightWriteRequest] = undefined; assert(stream[_state] === "writable" || stream[_state] === "erroring"); writableStreamDealWithRejection(stream, error); } /** * @param {WritableStream} stream * @returns {boolean} */ function writableStreamHasOperationMarkedInFlight(stream) { if ( stream[_inFlightWriteRequest] === undefined && stream[_inFlightCloseRequest] === undefined ) { return false; } return true; } /** @param {WritableStream} stream */ function writableStreamMarkCloseRequestInFlight(stream) { assert(stream[_inFlightCloseRequest] === undefined); assert(stream[_closeRequest] !== undefined); stream[_inFlightCloseRequest] = stream[_closeRequest]; stream[_closeRequest] = undefined; } /** * @template W * @param {WritableStream} stream */ function writableStreamMarkFirstWriteRequestInFlight(stream) { assert(stream[_inFlightWriteRequest] === undefined); assert(stream[_writeRequests].length); const writeRequest = ArrayPrototypeShift(stream[_writeRequests]); stream[_inFlightWriteRequest] = writeRequest; } /** @param {WritableStream} stream */ function writableStreamRejectCloseAndClosedPromiseIfNeeded(stream) { assert(stream[_state] === "errored"); if (stream[_closeRequest] !== undefined) { assert(stream[_inFlightCloseRequest] === undefined); stream[_closeRequest].reject(stream[_storedError]); stream[_closeRequest] = undefined; } const writer = stream[_writer]; if (writer !== undefined) { writer[_closedPromise].reject(stream[_storedError]); setPromiseIsHandledToTrue(writer[_closedPromise].promise); } } /** * @param {WritableStream} stream * @param {any=} reason */ function writableStreamStartErroring(stream, reason) { assert(stream[_storedError] === undefined); assert(stream[_state] === "writable"); const controller = stream[_controller]; assert(controller !== undefined); stream[_state] = "erroring"; stream[_storedError] = reason; const writer = stream[_writer]; if (writer !== undefined) { writableStreamDefaultWriterEnsureReadyPromiseRejected(writer, reason); } if ( writableStreamHasOperationMarkedInFlight(stream) === false && controller[_started] === true ) { writableStreamFinishErroring(stream); } } /** * @param {WritableStream} stream * @param {boolean} backpressure */ function writableStreamUpdateBackpressure(stream, backpressure) { assert(stream[_state] === "writable"); assert(writableStreamCloseQueuedOrInFlight(stream) === false); const writer = stream[_writer]; if (writer !== undefined && backpressure !== stream[_backpressure]) { if (backpressure === true) { writer[_readyPromise] = new Deferred(); } else { assert(backpressure === false); writer[_readyPromise].resolve(undefined); } } stream[_backpressure] = backpressure; } /** @type {AsyncIterator} */ const asyncIteratorPrototype = ObjectGetPrototypeOf(AsyncGeneratorPrototype); const _iteratorNext = Symbol("[[iteratorNext]]"); const _iteratorFinished = Symbol("[[iteratorFinished]]"); class ReadableStreamAsyncIteratorReadRequest { #reader; #promise; constructor(reader, promise) { this.#reader = reader; this.#promise = promise; } chunkSteps(chunk) { this.#reader[_iteratorNext] = null; this.#promise.resolve({ value: chunk, done: false }); } closeSteps() { this.#reader[_iteratorNext] = null; this.#reader[_iteratorFinished] = true; readableStreamDefaultReaderRelease(this.#reader); this.#promise.resolve({ value: undefined, done: true }); } errorSteps(e) { this.#reader[_iteratorNext] = null; this.#reader[_iteratorFinished] = true; readableStreamDefaultReaderRelease(this.#reader); this.#promise.reject(e); } } /** @type {AsyncIterator} */ const readableStreamAsyncIteratorPrototype = ObjectSetPrototypeOf({ /** @returns {Promise>} */ next() { /** @type {ReadableStreamDefaultReader} */ const reader = this[_reader]; function nextSteps() { if (reader[_iteratorFinished]) { return PromiseResolve({ value: undefined, done: true }); } if (reader[_stream] === undefined) { return PromiseReject( new TypeError( "Cannot get the next iteration result once the reader has been released.", ), ); } /** @type {Deferred>} */ const promise = new Deferred(); // internal values (_iteratorNext & _iteratorFinished) are modified inside // ReadableStreamAsyncIteratorReadRequest methods // see: https://webidl.spec.whatwg.org/#es-default-asynchronous-iterator-object const readRequest = new ReadableStreamAsyncIteratorReadRequest( reader, promise, ); readableStreamDefaultReaderRead(reader, readRequest); return PromisePrototypeThen(promise.promise); } return reader[_iteratorNext] = reader[_iteratorNext] ? PromisePrototypeThen(reader[_iteratorNext], nextSteps, nextSteps) : nextSteps(); }, /** * @param {unknown} arg * @returns {Promise>} */ return(arg) { /** @type {ReadableStreamDefaultReader} */ const reader = this[_reader]; const returnSteps = () => { if (reader[_iteratorFinished]) { return PromiseResolve({ value: arg, done: true }); } reader[_iteratorFinished] = true; if (reader[_stream] === undefined) { return PromiseResolve({ value: undefined, done: true }); } assert(reader[_readRequests].size === 0); if (this[_preventCancel] === false) { const result = readableStreamReaderGenericCancel(reader, arg); readableStreamDefaultReaderRelease(reader); return result; } readableStreamDefaultReaderRelease(reader); return PromiseResolve({ value: undefined, done: true }); }; const returnPromise = reader[_iteratorNext] ? PromisePrototypeThen(reader[_iteratorNext], returnSteps, returnSteps) : returnSteps(); return PromisePrototypeThen( returnPromise, () => ({ value: arg, done: true }), ); }, }, asyncIteratorPrototype); class ByteLengthQueuingStrategy { /** @param {{ highWaterMark: number }} init */ constructor(init) { const prefix = "Failed to construct 'ByteLengthQueuingStrategy'"; webidl.requiredArguments(arguments.length, 1, prefix); init = webidl.converters.QueuingStrategyInit(init, prefix, "Argument 1"); this[_brand] = _brand; this[_globalObject] = globalThis; this[_highWaterMark] = init.highWaterMark; } /** @returns {number} */ get highWaterMark() { webidl.assertBranded(this, ByteLengthQueuingStrategyPrototype); return this[_highWaterMark]; } /** @returns {(chunk: ArrayBufferView) => number} */ get size() { webidl.assertBranded(this, ByteLengthQueuingStrategyPrototype); initializeByteLengthSizeFunction(this[_globalObject]); return WeakMapPrototypeGet(byteSizeFunctionWeakMap, this[_globalObject]); } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf( ByteLengthQueuingStrategyPrototype, this, ), keys: [ "highWaterMark", "size", ], }), inspectOptions, ); } } webidl.configureInterface(ByteLengthQueuingStrategy); const ByteLengthQueuingStrategyPrototype = ByteLengthQueuingStrategy.prototype; /** @type {WeakMap number>} */ const byteSizeFunctionWeakMap = new SafeWeakMap(); function initializeByteLengthSizeFunction(globalObject) { if (WeakMapPrototypeHas(byteSizeFunctionWeakMap, globalObject)) { return; } // deno-lint-ignore prefer-primordials const size = (chunk) => chunk.byteLength; WeakMapPrototypeSet(byteSizeFunctionWeakMap, globalObject, size); } class CountQueuingStrategy { /** @param {{ highWaterMark: number }} init */ constructor(init) { const prefix = "Failed to construct 'CountQueuingStrategy'"; webidl.requiredArguments(arguments.length, 1, prefix); init = webidl.converters.QueuingStrategyInit(init, prefix, "Argument 1"); this[_brand] = _brand; this[_globalObject] = globalThis; this[_highWaterMark] = init.highWaterMark; } /** @returns {number} */ get highWaterMark() { webidl.assertBranded(this, CountQueuingStrategyPrototype); return this[_highWaterMark]; } /** @returns {(chunk: any) => 1} */ get size() { webidl.assertBranded(this, CountQueuingStrategyPrototype); initializeCountSizeFunction(this[_globalObject]); return WeakMapPrototypeGet(countSizeFunctionWeakMap, this[_globalObject]); } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf( CountQueuingStrategyPrototype, this, ), keys: [ "highWaterMark", "size", ], }), inspectOptions, ); } } webidl.configureInterface(CountQueuingStrategy); const CountQueuingStrategyPrototype = CountQueuingStrategy.prototype; /** @type {WeakMap 1>} */ const countSizeFunctionWeakMap = new SafeWeakMap(); /** @param {typeof globalThis} globalObject */ function initializeCountSizeFunction(globalObject) { if (WeakMapPrototypeHas(countSizeFunctionWeakMap, globalObject)) { return; } const size = () => 1; WeakMapPrototypeSet(countSizeFunctionWeakMap, globalObject, size); } async function* createAsyncFromSyncIterator(syncIterator) { // deno-lint-ignore prefer-primordials yield* syncIterator; } // Ref: https://tc39.es/ecma262/#sec-getiterator function getIterator(obj, async = false) { if (async) { if (obj[SymbolAsyncIterator] === undefined) { if (obj[SymbolIterator] === undefined) { throw new TypeError("No iterator found"); } return createAsyncFromSyncIterator(obj[SymbolIterator]()); } else { return obj[SymbolAsyncIterator](); } } else { if (obj[SymbolIterator] === undefined) { throw new TypeError("No iterator found"); } return obj[SymbolIterator](); } } const _resourceBacking = Symbol("[[resourceBacking]]"); // This distinction exists to prevent unrefable streams being used in // regular fast streams that are unaware of refability const _resourceBackingUnrefable = Symbol("[[resourceBackingUnrefable]]"); /** @template R */ class ReadableStream { /** @type {ReadableStreamDefaultController | ReadableByteStreamController} */ [_controller]; /** @type {boolean} */ [_detached]; /** @type {boolean} */ [_disturbed]; /** @type {ReadableStreamDefaultReader | ReadableStreamBYOBReader} */ [_reader]; /** @type {"readable" | "closed" | "errored"} */ [_state]; /** @type {any} */ [_storedError]; /** @type {{ rid: number, autoClose: boolean } | null} */ [_resourceBacking] = null; /** * @param {UnderlyingSource=} underlyingSource * @param {QueuingStrategy=} strategy */ constructor(underlyingSource = undefined, strategy = undefined) { if (underlyingSource === _brand) { this[_brand] = _brand; return; } const prefix = "Failed to construct 'ReadableStream'"; underlyingSource = underlyingSource !== undefined ? webidl.converters.object( underlyingSource, prefix, "Argument 1", ) : null; strategy = strategy !== undefined ? webidl.converters.QueuingStrategy( strategy, prefix, "Argument 2", ) : {}; const underlyingSourceDict = underlyingSource !== undefined ? webidl.converters.UnderlyingSource( underlyingSource, prefix, "underlyingSource", ) : {}; this[_brand] = _brand; initializeReadableStream(this); if (underlyingSourceDict.type === "bytes") { if (strategy.size !== undefined) { throw new RangeError( `${prefix}: When underlying source is "bytes", strategy.size must be undefined.`, ); } const highWaterMark = extractHighWaterMark(strategy, 0); setUpReadableByteStreamControllerFromUnderlyingSource( // @ts-ignore cannot easily assert this is ReadableStream this, underlyingSource, underlyingSourceDict, highWaterMark, ); } else { const sizeAlgorithm = extractSizeAlgorithm(strategy); const highWaterMark = extractHighWaterMark(strategy, 1); setUpReadableStreamDefaultControllerFromUnderlyingSource( this, underlyingSource, underlyingSourceDict, highWaterMark, sizeAlgorithm, ); } } static from(asyncIterable) { webidl.requiredArguments( arguments.length, 1, "Failed to call 'ReadableStream.from'", ); asyncIterable = webidl.converters.any(asyncIterable); const iterator = getIterator(asyncIterable, true); const stream = createReadableStream(noop, async () => { // deno-lint-ignore prefer-primordials const res = await iterator.next(); if (typeof res !== "object") { throw new TypeError("iterator.next value is not an object"); } if (res.done) { readableStreamDefaultControllerClose(stream[_controller]); } else { readableStreamDefaultControllerEnqueue(stream[_controller], res.value); } }, async (reason) => { if (typeof iterator.return === "undefined") { return undefined; } else { // deno-lint-ignore prefer-primordials const res = await iterator.return(reason); if (typeof res !== "object") { throw new TypeError("iterator.return value is not an object"); } else { return undefined; } } }, 0); return stream; } /** @returns {boolean} */ get locked() { webidl.assertBranded(this, ReadableStreamPrototype); return isReadableStreamLocked(this); } /** * @param {any=} reason * @returns {Promise} */ cancel(reason = undefined) { try { webidl.assertBranded(this, ReadableStreamPrototype); if (reason !== undefined) { reason = webidl.converters.any(reason); } } catch (err) { return PromiseReject(err); } if (isReadableStreamLocked(this)) { return PromiseReject( new TypeError("Cannot cancel a locked ReadableStream."), ); } return readableStreamCancel(this, reason); } /** * @param {ReadableStreamGetReaderOptions=} options * @returns {ReadableStreamDefaultReader | ReadableStreamBYOBReader} */ getReader(options = undefined) { webidl.assertBranded(this, ReadableStreamPrototype); const prefix = "Failed to execute 'getReader' on 'ReadableStream'"; if (options !== undefined) { options = webidl.converters.ReadableStreamGetReaderOptions( options, prefix, "Argument 1", ); } else { options = {}; } if (options.mode === undefined) { return acquireReadableStreamDefaultReader(this); } else { assert(options.mode === "byob"); return acquireReadableStreamBYOBReader(this); } } /** * @template T * @param {{ readable: ReadableStream, writable: WritableStream }} transform * @param {PipeOptions=} options * @returns {ReadableStream} */ pipeThrough(transform, options = {}) { webidl.assertBranded(this, ReadableStreamPrototype); const prefix = "Failed to execute 'pipeThrough' on 'ReadableStream'"; webidl.requiredArguments(arguments.length, 1, prefix); transform = webidl.converters.ReadableWritablePair( transform, prefix, "Argument 1", ); options = webidl.converters.StreamPipeOptions( options, prefix, "Argument 2", ); const { readable, writable } = transform; const { preventClose, preventAbort, preventCancel, signal } = options; if (isReadableStreamLocked(this)) { throw new TypeError("ReadableStream is already locked."); } if (isWritableStreamLocked(writable)) { throw new TypeError("Target WritableStream is already locked."); } const promise = readableStreamPipeTo( this, writable, preventClose, preventAbort, preventCancel, signal, ); setPromiseIsHandledToTrue(promise); return readable; } /** * @param {WritableStream} destination * @param {PipeOptions=} options * @returns {Promise} */ pipeTo(destination, options = {}) { try { webidl.assertBranded(this, ReadableStreamPrototype); const prefix = "Failed to execute 'pipeTo' on 'ReadableStream'"; webidl.requiredArguments(arguments.length, 1, prefix); destination = webidl.converters.WritableStream( destination, prefix, "Argument 1", ); options = webidl.converters.StreamPipeOptions( options, prefix, "Argument 2", ); } catch (err) { return PromiseReject(err); } const { preventClose, preventAbort, preventCancel, signal } = options; if (isReadableStreamLocked(this)) { return PromiseReject( new TypeError("ReadableStream is already locked."), ); } if (isWritableStreamLocked(destination)) { return PromiseReject( new TypeError("destination WritableStream is already locked."), ); } return readableStreamPipeTo( this, destination, preventClose, preventAbort, preventCancel, signal, ); } /** @returns {[ReadableStream, ReadableStream]} */ tee() { webidl.assertBranded(this, ReadableStreamPrototype); return readableStreamTee(this, false); } // TODO(lucacasonato): should be moved to webidl crate /** * @param {ReadableStreamIteratorOptions=} options * @returns {AsyncIterableIterator} */ values(options = undefined) { webidl.assertBranded(this, ReadableStreamPrototype); let preventCancel = false; if (options !== undefined) { const prefix = "Failed to execute 'values' on 'ReadableStream'"; options = webidl.converters.ReadableStreamIteratorOptions( options, prefix, "Argument 1", ); preventCancel = options.preventCancel; } /** @type {AsyncIterableIterator} */ const iterator = ObjectCreate(readableStreamAsyncIteratorPrototype); const reader = acquireReadableStreamDefaultReader(this); iterator[_reader] = reader; iterator[_preventCancel] = preventCancel; return iterator; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf( ReadableStreamPrototype, this, ), keys: ["locked"], }), inspectOptions, ); } } // TODO(lucacasonato): should be moved to webidl crate ReadableStream.prototype[SymbolAsyncIterator] = ReadableStream.prototype.values; ObjectDefineProperty(ReadableStream.prototype, SymbolAsyncIterator, { writable: true, enumerable: false, configurable: true, }); webidl.configureInterface(ReadableStream); const ReadableStreamPrototype = ReadableStream.prototype; function errorReadableStream(stream, e) { readableStreamDefaultControllerError(stream[_controller], e); } /** @template R */ class ReadableStreamDefaultReader { /** @type {Deferred} */ [_closedPromise]; /** @type {ReadableStream | undefined} */ [_stream]; /** @type {ReadRequest[]} */ [_readRequests]; /** @param {ReadableStream} stream */ constructor(stream) { if (stream === _brand) { this[_brand] = _brand; return; } const prefix = "Failed to construct 'ReadableStreamDefaultReader'"; webidl.requiredArguments(arguments.length, 1, prefix); stream = webidl.converters.ReadableStream(stream, prefix, "Argument 1"); this[_brand] = _brand; setUpReadableStreamDefaultReader(this, stream); } /** @returns {Promise>} */ read() { try { webidl.assertBranded(this, ReadableStreamDefaultReaderPrototype); } catch (err) { return PromiseReject(err); } if (this[_stream] === undefined) { return PromiseReject( new TypeError("Reader has no associated stream."), ); } /** @type {Deferred>} */ const promise = new Deferred(); /** @type {ReadRequest} */ const readRequest = { chunkSteps(chunk) { promise.resolve({ value: chunk, done: false }); }, closeSteps() { promise.resolve({ value: undefined, done: true }); }, errorSteps(e) { promise.reject(e); }, }; readableStreamDefaultReaderRead(this, readRequest); return promise.promise; } /** @returns {void} */ releaseLock() { webidl.assertBranded(this, ReadableStreamDefaultReaderPrototype); if (this[_stream] === undefined) { return; } readableStreamDefaultReaderRelease(this); } get closed() { try { webidl.assertBranded(this, ReadableStreamDefaultReaderPrototype); } catch (err) { return PromiseReject(err); } return this[_closedPromise].promise; } /** * @param {any} reason * @returns {Promise} */ cancel(reason = undefined) { try { webidl.assertBranded(this, ReadableStreamDefaultReaderPrototype); if (reason !== undefined) { reason = webidl.converters.any(reason); } } catch (err) { return PromiseReject(err); } if (this[_stream] === undefined) { return PromiseReject( new TypeError("Reader has no associated stream."), ); } return readableStreamReaderGenericCancel(this, reason); } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf( ReadableStreamDefaultReaderPrototype, this, ), keys: ["closed"], }), inspectOptions, ); } } webidl.configureInterface(ReadableStreamDefaultReader); const ReadableStreamDefaultReaderPrototype = ReadableStreamDefaultReader.prototype; /** @template R */ class ReadableStreamBYOBReader { /** @type {Deferred} */ [_closedPromise]; /** @type {ReadableStream | undefined} */ [_stream]; /** @type {ReadIntoRequest[]} */ [_readIntoRequests]; /** @param {ReadableStream} stream */ constructor(stream) { if (stream === _brand) { this[_brand] = _brand; return; } const prefix = "Failed to construct 'ReadableStreamBYOBReader'"; webidl.requiredArguments(arguments.length, 1, prefix); stream = webidl.converters.ReadableStream(stream, prefix, "Argument 1"); this[_brand] = _brand; setUpReadableStreamBYOBReader(this, stream); } /** * @param {ArrayBufferView} view * @param {ReadableStreamBYOBReaderReadOptions} options * @returns {Promise} */ read(view, options = {}) { try { webidl.assertBranded(this, ReadableStreamBYOBReaderPrototype); const prefix = "Failed to execute 'read' on 'ReadableStreamBYOBReader'"; view = webidl.converters.ArrayBufferView(view, prefix, "Argument 1"); options = webidl.converters.ReadableStreamBYOBReaderReadOptions( options, prefix, "Argument 2", ); } catch (err) { return PromiseReject(err); } let buffer, byteLength; if (isTypedArray(view)) { buffer = TypedArrayPrototypeGetBuffer(/** @type {Uint8Array} */ (view)); byteLength = TypedArrayPrototypeGetByteLength( /** @type {Uint8Array} */ (view), ); } else { buffer = DataViewPrototypeGetBuffer(/** @type {DataView} */ (view)); byteLength = DataViewPrototypeGetByteLength( /** @type {DataView} */ (view), ); } if (byteLength === 0) { return PromiseReject( new TypeError("view must have non-zero byteLength"), ); } if (getArrayBufferByteLength(buffer) === 0) { if (isDetachedBuffer(buffer)) { return PromiseReject( new TypeError("view's buffer has been detached"), ); } return PromiseReject( new TypeError("view's buffer must have non-zero byteLength"), ); } if (options.min === 0) { return PromiseReject(new TypeError("options.min must be non-zero")); } if (isTypedArray(view)) { if (options.min > TypedArrayPrototypeGetLength(view)) { return PromiseReject( new RangeError("options.min must be smaller or equal to view's size"), ); } } else { if (options.min > DataViewPrototypeGetByteLength(view)) { return PromiseReject( new RangeError("options.min must be smaller or equal to view's size"), ); } } if (this[_stream] === undefined) { return PromiseReject( new TypeError("Reader has no associated stream."), ); } /** @type {Deferred} */ const promise = new Deferred(); /** @type {ReadIntoRequest} */ const readIntoRequest = { chunkSteps(chunk) { promise.resolve({ value: chunk, done: false }); }, closeSteps(chunk) { promise.resolve({ value: chunk, done: true }); }, errorSteps(e) { promise.reject(e); }, }; readableStreamBYOBReaderRead(this, view, options.min, readIntoRequest); return promise.promise; } /** @returns {void} */ releaseLock() { webidl.assertBranded(this, ReadableStreamBYOBReaderPrototype); if (this[_stream] === undefined) { return; } readableStreamBYOBReaderRelease(this); } get closed() { try { webidl.assertBranded(this, ReadableStreamBYOBReaderPrototype); } catch (err) { return PromiseReject(err); } return this[_closedPromise].promise; } /** * @param {any} reason * @returns {Promise} */ cancel(reason = undefined) { try { webidl.assertBranded(this, ReadableStreamBYOBReaderPrototype); if (reason !== undefined) { reason = webidl.converters.any(reason); } } catch (err) { return PromiseReject(err); } if (this[_stream] === undefined) { return PromiseReject( new TypeError("Reader has no associated stream."), ); } return readableStreamReaderGenericCancel(this, reason); } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf( ReadableStreamBYOBReaderPrototype, this, ), keys: ["closed"], }), inspectOptions, ); } } webidl.configureInterface(ReadableStreamBYOBReader); const ReadableStreamBYOBReaderPrototype = ReadableStreamBYOBReader.prototype; class ReadableStreamBYOBRequest { /** @type {ReadableByteStreamController} */ [_controller]; /** @type {ArrayBufferView | null} */ [_view]; /** @returns {ArrayBufferView | null} */ get view() { webidl.assertBranded(this, ReadableStreamBYOBRequestPrototype); return this[_view]; } constructor(brand = undefined) { if (brand !== _brand) { webidl.illegalConstructor(); } this[_brand] = _brand; } respond(bytesWritten) { webidl.assertBranded(this, ReadableStreamBYOBRequestPrototype); const prefix = "Failed to execute 'respond' on 'ReadableStreamBYOBRequest'"; webidl.requiredArguments(arguments.length, 1, prefix); bytesWritten = webidl.converters["unsigned long long"]( bytesWritten, prefix, "Argument 1", { enforceRange: true, }, ); if (this[_controller] === undefined) { throw new TypeError("This BYOB request has been invalidated"); } let buffer, byteLength; if (isTypedArray(this[_view])) { buffer = TypedArrayPrototypeGetBuffer(this[_view]); byteLength = TypedArrayPrototypeGetByteLength(this[_view]); } else { buffer = DataViewPrototypeGetBuffer(this[_view]); byteLength = DataViewPrototypeGetByteLength(this[_view]); } if (isDetachedBuffer(buffer)) { throw new TypeError( "The BYOB request's buffer has been detached and so cannot be used as a response", ); } assert(byteLength > 0); assert(getArrayBufferByteLength(buffer) > 0); readableByteStreamControllerRespond(this[_controller], bytesWritten); } respondWithNewView(view) { webidl.assertBranded(this, ReadableStreamBYOBRequestPrototype); const prefix = "Failed to execute 'respondWithNewView' on 'ReadableStreamBYOBRequest'"; webidl.requiredArguments(arguments.length, 1, prefix); view = webidl.converters.ArrayBufferView(view, prefix, "Argument 1"); if (this[_controller] === undefined) { throw new TypeError("This BYOB request has been invalidated"); } let buffer; if (isTypedArray(view)) { buffer = TypedArrayPrototypeGetBuffer(view); } else { buffer = DataViewPrototypeGetBuffer(view); } if (isDetachedBuffer(buffer)) { throw new TypeError( "The given view's buffer has been detached and so cannot be used as a response", ); } readableByteStreamControllerRespondWithNewView(this[_controller], view); } } webidl.configureInterface(ReadableStreamBYOBRequest); const ReadableStreamBYOBRequestPrototype = ReadableStreamBYOBRequest.prototype; class ReadableByteStreamController { /** @type {number | undefined} */ [_autoAllocateChunkSize]; /** @type {ReadableStreamBYOBRequest | null} */ [_byobRequest]; /** @type {(reason: any) => Promise} */ [_cancelAlgorithm]; /** @type {boolean} */ [_closeRequested]; /** @type {boolean} */ [_pullAgain]; /** @type {(controller: this) => Promise} */ [_pullAlgorithm]; /** @type {boolean} */ [_pulling]; /** @type {PullIntoDescriptor[]} */ [_pendingPullIntos]; /** @type {ReadableByteStreamQueueEntry[]} */ [_queue]; /** @type {number} */ [_queueTotalSize]; /** @type {boolean} */ [_started]; /** @type {number} */ [_strategyHWM]; /** @type {ReadableStream} */ [_stream]; constructor(brand = undefined) { if (brand !== _brand) { webidl.illegalConstructor(); } this[_brand] = _brand; } /** @returns {ReadableStreamBYOBRequest | null} */ get byobRequest() { webidl.assertBranded(this, ReadableByteStreamControllerPrototype); return readableByteStreamControllerGetBYOBRequest(this); } /** @returns {number | null} */ get desiredSize() { webidl.assertBranded(this, ReadableByteStreamControllerPrototype); return readableByteStreamControllerGetDesiredSize(this); } /** @returns {void} */ close() { webidl.assertBranded(this, ReadableByteStreamControllerPrototype); if (this[_closeRequested] === true) { throw new TypeError("Closed already requested."); } if (this[_stream][_state] !== "readable") { throw new TypeError( "ReadableByteStreamController's stream is not in a readable state.", ); } readableByteStreamControllerClose(this); } /** * @param {ArrayBufferView} chunk * @returns {void} */ enqueue(chunk) { webidl.assertBranded(this, ReadableByteStreamControllerPrototype); const prefix = "Failed to execute 'enqueue' on 'ReadableByteStreamController'"; webidl.requiredArguments(arguments.length, 1, prefix); const arg1 = "Argument 1"; chunk = webidl.converters.ArrayBufferView(chunk, prefix, arg1); let buffer, byteLength; if (isTypedArray(chunk)) { buffer = TypedArrayPrototypeGetBuffer(/** @type {Uint8Array} */ (chunk)); byteLength = TypedArrayPrototypeGetByteLength( /** @type {Uint8Array} */ (chunk), ); } else { buffer = DataViewPrototypeGetBuffer(/** @type {DataView} */ (chunk)); byteLength = DataViewPrototypeGetByteLength( /** @type {DataView} */ (chunk), ); } if (byteLength === 0) { throw webidl.makeException( TypeError, "length must be non-zero", prefix, arg1, ); } if (getArrayBufferByteLength(buffer) === 0) { throw webidl.makeException( TypeError, "buffer length must be non-zero", prefix, arg1, ); } if (this[_closeRequested] === true) { throw new TypeError( "Cannot enqueue chunk after a close has been requested.", ); } if (this[_stream][_state] !== "readable") { throw new TypeError( "Cannot enqueue chunk when underlying stream is not readable.", ); } return readableByteStreamControllerEnqueue(this, chunk); } /** * @param {any=} e * @returns {void} */ error(e = undefined) { webidl.assertBranded(this, ReadableByteStreamControllerPrototype); if (e !== undefined) { e = webidl.converters.any(e); } readableByteStreamControllerError(this, e); } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf( ReadableByteStreamControllerPrototype, this, ), keys: ["desiredSize"], }), inspectOptions, ); } /** * @param {any} reason * @returns {Promise} */ [_cancelSteps](reason) { readableByteStreamControllerClearPendingPullIntos(this); resetQueue(this); const result = this[_cancelAlgorithm](reason); readableByteStreamControllerClearAlgorithms(this); return result; } /** * @param {ReadRequest} readRequest * @returns {void} */ [_pullSteps](readRequest) { /** @type {ReadableStream} */ const stream = this[_stream]; assert(readableStreamHasDefaultReader(stream)); if (this[_queueTotalSize] > 0) { assert(readableStreamGetNumReadRequests(stream) === 0); readableByteStreamControllerFillReadRequestFromQueue(this, readRequest); return; } const autoAllocateChunkSize = this[_autoAllocateChunkSize]; if (autoAllocateChunkSize !== undefined) { let buffer; try { buffer = new ArrayBuffer(autoAllocateChunkSize); } catch (e) { readRequest.errorSteps(e); return; } /** @type {PullIntoDescriptor} */ const pullIntoDescriptor = { buffer, bufferByteLength: autoAllocateChunkSize, byteOffset: 0, byteLength: autoAllocateChunkSize, bytesFilled: 0, elementSize: 1, minimumFill: 1, viewConstructor: Uint8Array, readerType: "default", }; ArrayPrototypePush(this[_pendingPullIntos], pullIntoDescriptor); } readableStreamAddReadRequest(stream, readRequest); readableByteStreamControllerCallPullIfNeeded(this); } [_releaseSteps]() { if (this[_pendingPullIntos].length !== 0) { /** @type {PullIntoDescriptor} */ const firstPendingPullInto = this[_pendingPullIntos][0]; firstPendingPullInto.readerType = "none"; this[_pendingPullIntos] = [firstPendingPullInto]; } } } webidl.configureInterface(ReadableByteStreamController); const ReadableByteStreamControllerPrototype = ReadableByteStreamController.prototype; /** @template R */ class ReadableStreamDefaultController { /** @type {(reason: any) => Promise} */ [_cancelAlgorithm]; /** @type {boolean} */ [_closeRequested]; /** @type {boolean} */ [_pullAgain]; /** @type {(controller: this) => Promise} */ [_pullAlgorithm]; /** @type {boolean} */ [_pulling]; /** @type {Array>} */ [_queue]; /** @type {number} */ [_queueTotalSize]; /** @type {boolean} */ [_started]; /** @type {number} */ [_strategyHWM]; /** @type {(chunk: R) => number} */ [_strategySizeAlgorithm]; /** @type {ReadableStream} */ [_stream]; constructor(brand = undefined) { if (brand !== _brand) { webidl.illegalConstructor(); } this[_brand] = _brand; } /** @returns {number | null} */ get desiredSize() { webidl.assertBranded(this, ReadableStreamDefaultControllerPrototype); return readableStreamDefaultControllerGetDesiredSize(this); } /** @returns {void} */ close() { webidl.assertBranded(this, ReadableStreamDefaultControllerPrototype); if (readableStreamDefaultControllerCanCloseOrEnqueue(this) === false) { throw new TypeError("The stream controller cannot close or enqueue."); } readableStreamDefaultControllerClose(this); } /** * @param {R} chunk * @returns {void} */ enqueue(chunk = undefined) { webidl.assertBranded(this, ReadableStreamDefaultControllerPrototype); if (chunk !== undefined) { chunk = webidl.converters.any(chunk); } if (readableStreamDefaultControllerCanCloseOrEnqueue(this) === false) { throw new TypeError("The stream controller cannot close or enqueue."); } readableStreamDefaultControllerEnqueue(this, chunk); } /** * @param {any=} e * @returns {void} */ error(e = undefined) { webidl.assertBranded(this, ReadableStreamDefaultControllerPrototype); if (e !== undefined) { e = webidl.converters.any(e); } readableStreamDefaultControllerError(this, e); } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf( ReadableStreamDefaultControllerPrototype, this, ), keys: ["desiredSize"], }), inspectOptions, ); } /** * @param {any} reason * @returns {Promise} */ [_cancelSteps](reason) { resetQueue(this); const result = this[_cancelAlgorithm](reason); readableStreamDefaultControllerClearAlgorithms(this); return result; } /** * @param {ReadRequest} readRequest * @returns {void} */ [_pullSteps](readRequest) { const stream = this[_stream]; if (this[_queue].size) { const chunk = dequeueValue(this); if (this[_closeRequested] && this[_queue].size === 0) { readableStreamDefaultControllerClearAlgorithms(this); readableStreamClose(stream); } else { readableStreamDefaultControllerCallPullIfNeeded(this); } readRequest.chunkSteps(chunk); } else { readableStreamAddReadRequest(stream, readRequest); readableStreamDefaultControllerCallPullIfNeeded(this); } } [_releaseSteps]() { return; } } webidl.configureInterface(ReadableStreamDefaultController); const ReadableStreamDefaultControllerPrototype = ReadableStreamDefaultController.prototype; /** * @template I * @template O */ class TransformStream { /** @type {boolean} */ [_backpressure]; /** @type {Deferred} */ [_backpressureChangePromise]; /** @type {TransformStreamDefaultController} */ [_controller]; /** @type {boolean} */ [_detached]; /** @type {ReadableStream} */ [_readable]; /** @type {WritableStream} */ [_writable]; /** * @param {Transformer} transformer * @param {QueuingStrategy} writableStrategy * @param {QueuingStrategy} readableStrategy */ constructor( transformer = undefined, writableStrategy = {}, readableStrategy = {}, ) { const prefix = "Failed to construct 'TransformStream'"; if (transformer !== undefined) { transformer = webidl.converters.object(transformer, prefix, "Argument 1"); } writableStrategy = webidl.converters.QueuingStrategy( writableStrategy, prefix, "Argument 2", ); readableStrategy = webidl.converters.QueuingStrategy( readableStrategy, prefix, "Argument 3", ); this[_brand] = _brand; if (transformer === undefined) { transformer = null; } const transformerDict = webidl.converters.Transformer( transformer, prefix, "transformer", ); if (transformerDict.readableType !== undefined) { throw new RangeError( `${prefix}: readableType transformers not supported.`, ); } if (transformerDict.writableType !== undefined) { throw new RangeError( `${prefix}: writableType transformers not supported.`, ); } const readableHighWaterMark = extractHighWaterMark(readableStrategy, 0); const readableSizeAlgorithm = extractSizeAlgorithm(readableStrategy); const writableHighWaterMark = extractHighWaterMark(writableStrategy, 1); const writableSizeAlgorithm = extractSizeAlgorithm(writableStrategy); /** @type {Deferred} */ const startPromise = new Deferred(); initializeTransformStream( this, startPromise, writableHighWaterMark, writableSizeAlgorithm, readableHighWaterMark, readableSizeAlgorithm, ); setUpTransformStreamDefaultControllerFromTransformer( this, transformer, transformerDict, ); if (transformerDict.start) { startPromise.resolve( webidl.invokeCallbackFunction( transformerDict.start, [this[_controller]], transformer, webidl.converters.any, "Failed to call 'start' on 'TransformStreamDefaultController'", ), ); } else { startPromise.resolve(undefined); } } /** @returns {ReadableStream} */ get readable() { webidl.assertBranded(this, TransformStreamPrototype); return this[_readable]; } /** @returns {WritableStream} */ get writable() { webidl.assertBranded(this, TransformStreamPrototype); return this[_writable]; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf( TransformStreamPrototype, this, ), keys: ["readable", "writable"], }), inspectOptions, ); } } webidl.configureInterface(TransformStream); const TransformStreamPrototype = TransformStream.prototype; /** @template O */ class TransformStreamDefaultController { /** @type {(reason: any) => Promise} */ [_cancelAlgorithm]; /** @type {Promise | undefined} */ [_finishPromise]; /** @type {(controller: this) => Promise} */ [_flushAlgorithm]; /** @type {TransformStream} */ [_stream]; /** @type {(chunk: O, controller: this) => Promise} */ [_transformAlgorithm]; constructor(brand = undefined) { if (brand !== _brand) { webidl.illegalConstructor(); } this[_brand] = _brand; } /** @returns {number | null} */ get desiredSize() { webidl.assertBranded(this, TransformStreamDefaultController.prototype); const readableController = this[_stream][_readable][_controller]; return readableStreamDefaultControllerGetDesiredSize( /** @type {ReadableStreamDefaultController} */ readableController, ); } /** * @param {O} chunk * @returns {void} */ enqueue(chunk = undefined) { webidl.assertBranded(this, TransformStreamDefaultController.prototype); if (chunk !== undefined) { chunk = webidl.converters.any(chunk); } transformStreamDefaultControllerEnqueue(this, chunk); } /** * @param {any=} reason * @returns {void} */ error(reason = undefined) { webidl.assertBranded(this, TransformStreamDefaultController.prototype); if (reason !== undefined) { reason = webidl.converters.any(reason); } transformStreamDefaultControllerError(this, reason); } /** @returns {void} */ terminate() { webidl.assertBranded(this, TransformStreamDefaultControllerPrototype); transformStreamDefaultControllerTerminate(this); } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf( TransformStreamDefaultControllerPrototype, this, ), keys: ["desiredSize"], }), inspectOptions, ); } } webidl.configureInterface(TransformStreamDefaultController); const TransformStreamDefaultControllerPrototype = TransformStreamDefaultController.prototype; /** @template W */ class WritableStream { /** @type {boolean} */ [_backpressure]; /** @type {Deferred | undefined} */ [_closeRequest]; /** @type {WritableStreamDefaultController} */ [_controller]; /** @type {boolean} */ [_detached]; /** @type {Deferred | undefined} */ [_inFlightWriteRequest]; /** @type {Deferred | undefined} */ [_inFlightCloseRequest]; /** @type {PendingAbortRequest | undefined} */ [_pendingAbortRequest]; /** @type {"writable" | "closed" | "erroring" | "errored"} */ [_state]; /** @type {any} */ [_storedError]; /** @type {WritableStreamDefaultWriter} */ [_writer]; /** @type {Deferred[]} */ [_writeRequests]; /** * @param {UnderlyingSink=} underlyingSink * @param {QueuingStrategy=} strategy */ constructor(underlyingSink = undefined, strategy = undefined) { if (underlyingSink === _brand) { this[_brand] = _brand; return; } const prefix = "Failed to construct 'WritableStream'"; if (underlyingSink !== undefined) { underlyingSink = webidl.converters.object( underlyingSink, prefix, "Argument 1", ); } strategy = strategy !== undefined ? webidl.converters.QueuingStrategy( strategy, prefix, "Argument 2", ) : {}; this[_brand] = _brand; if (underlyingSink === undefined) { underlyingSink = null; } const underlyingSinkDict = webidl.converters.UnderlyingSink( underlyingSink, prefix, "underlyingSink", ); if (underlyingSinkDict.type != null) { throw new RangeError( `${prefix}: WritableStream does not support 'type' in the underlying sink.`, ); } initializeWritableStream(this); const sizeAlgorithm = extractSizeAlgorithm(strategy); const highWaterMark = extractHighWaterMark(strategy, 1); setUpWritableStreamDefaultControllerFromUnderlyingSink( this, underlyingSink, underlyingSinkDict, highWaterMark, sizeAlgorithm, ); } /** @returns {boolean} */ get locked() { webidl.assertBranded(this, WritableStreamPrototype); return isWritableStreamLocked(this); } /** * @param {any=} reason * @returns {Promise} */ abort(reason = undefined) { try { webidl.assertBranded(this, WritableStreamPrototype); } catch (err) { return PromiseReject(err); } if (reason !== undefined) { reason = webidl.converters.any(reason); } if (isWritableStreamLocked(this)) { return PromiseReject( new TypeError( "The writable stream is locked, therefore cannot be aborted.", ), ); } return writableStreamAbort(this, reason); } /** @returns {Promise} */ close() { try { webidl.assertBranded(this, WritableStreamPrototype); } catch (err) { return PromiseReject(err); } if (isWritableStreamLocked(this)) { return PromiseReject( new TypeError( "The writable stream is locked, therefore cannot be closed.", ), ); } if (writableStreamCloseQueuedOrInFlight(this) === true) { return PromiseReject( new TypeError("The writable stream is already closing."), ); } return writableStreamClose(this); } /** @returns {WritableStreamDefaultWriter} */ getWriter() { webidl.assertBranded(this, WritableStreamPrototype); return acquireWritableStreamDefaultWriter(this); } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf( WritableStreamPrototype, this, ), keys: ["locked"], }), inspectOptions, ); } } webidl.configureInterface(WritableStream); const WritableStreamPrototype = WritableStream.prototype; /** @template W */ class WritableStreamDefaultWriter { /** @type {Deferred} */ [_closedPromise]; /** @type {Deferred} */ [_readyPromise]; /** @type {WritableStream} */ [_stream]; /** * @param {WritableStream} stream */ constructor(stream) { const prefix = "Failed to construct 'WritableStreamDefaultWriter'"; webidl.requiredArguments(arguments.length, 1, prefix); stream = webidl.converters.WritableStream(stream, prefix, "Argument 1"); this[_brand] = _brand; setUpWritableStreamDefaultWriter(this, stream); } /** @returns {Promise} */ get closed() { try { webidl.assertBranded(this, WritableStreamDefaultWriterPrototype); } catch (err) { return PromiseReject(err); } return this[_closedPromise].promise; } /** @returns {number} */ get desiredSize() { webidl.assertBranded(this, WritableStreamDefaultWriterPrototype); if (this[_stream] === undefined) { throw new TypeError( "A writable stream is not associated with the writer.", ); } return writableStreamDefaultWriterGetDesiredSize(this); } /** @returns {Promise} */ get ready() { try { webidl.assertBranded(this, WritableStreamDefaultWriterPrototype); } catch (err) { return PromiseReject(err); } return this[_readyPromise].promise; } /** * @param {any} reason * @returns {Promise} */ abort(reason = undefined) { try { webidl.assertBranded(this, WritableStreamDefaultWriterPrototype); } catch (err) { return PromiseReject(err); } if (reason !== undefined) { reason = webidl.converters.any(reason); } if (this[_stream] === undefined) { return PromiseReject( new TypeError("A writable stream is not associated with the writer."), ); } return writableStreamDefaultWriterAbort(this, reason); } /** @returns {Promise} */ close() { try { webidl.assertBranded(this, WritableStreamDefaultWriterPrototype); } catch (err) { return PromiseReject(err); } const stream = this[_stream]; if (stream === undefined) { return PromiseReject( new TypeError("A writable stream is not associated with the writer."), ); } if (writableStreamCloseQueuedOrInFlight(stream) === true) { return PromiseReject( new TypeError("The associated stream is already closing."), ); } return writableStreamDefaultWriterClose(this); } /** @returns {void} */ releaseLock() { webidl.assertBranded(this, WritableStreamDefaultWriterPrototype); const stream = this[_stream]; if (stream === undefined) { return; } assert(stream[_writer] !== undefined); writableStreamDefaultWriterRelease(this); } /** * @param {W} chunk * @returns {Promise} */ write(chunk = undefined) { try { webidl.assertBranded(this, WritableStreamDefaultWriterPrototype); if (chunk !== undefined) { chunk = webidl.converters.any(chunk); } } catch (err) { return PromiseReject(err); } if (this[_stream] === undefined) { return PromiseReject( new TypeError("A writable stream is not associate with the writer."), ); } return writableStreamDefaultWriterWrite(this, chunk); } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf( WritableStreamDefaultWriterPrototype, this, ), keys: [ "closed", "desiredSize", "ready", ], }), inspectOptions, ); } } webidl.configureInterface(WritableStreamDefaultWriter); const WritableStreamDefaultWriterPrototype = WritableStreamDefaultWriter.prototype; /** @template W */ class WritableStreamDefaultController { /** @type {(reason?: any) => Promise} */ [_abortAlgorithm]; /** @type {() => Promise} */ [_closeAlgorithm]; /** @type {ValueWithSize[]} */ [_queue]; /** @type {number} */ [_queueTotalSize]; /** @type {boolean} */ [_started]; /** @type {number} */ [_strategyHWM]; /** @type {(chunk: W) => number} */ [_strategySizeAlgorithm]; /** @type {WritableStream} */ [_stream]; /** @type {(chunk: W, controller: this) => Promise} */ [_writeAlgorithm]; /** @type {AbortSignal} */ [_signal]; get signal() { webidl.assertBranded(this, WritableStreamDefaultControllerPrototype); return this[_signal]; } constructor(brand = undefined) { if (brand !== _brand) { webidl.illegalConstructor(); } this[_brand] = _brand; } /** * @param {any=} e * @returns {void} */ error(e = undefined) { webidl.assertBranded(this, WritableStreamDefaultControllerPrototype); if (e !== undefined) { e = webidl.converters.any(e); } const state = this[_stream][_state]; if (state !== "writable") { return; } writableStreamDefaultControllerError(this, e); } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf( WritableStreamDefaultControllerPrototype, this, ), keys: ["signal"], }), inspectOptions, ); } /** * @param {any=} reason * @returns {Promise} */ [_abortSteps](reason) { const result = this[_abortAlgorithm](reason); writableStreamDefaultControllerClearAlgorithms(this); return result; } [_errorSteps]() { resetQueue(this); } } webidl.configureInterface(WritableStreamDefaultController); const WritableStreamDefaultControllerPrototype = WritableStreamDefaultController.prototype; /** * @param {ReadableStream} stream */ function createProxy(stream) { return stream.pipeThrough(new TransformStream()); } webidl.converters.ReadableStream = webidl .createInterfaceConverter("ReadableStream", ReadableStream.prototype); webidl.converters.WritableStream = webidl .createInterfaceConverter("WritableStream", WritableStream.prototype); webidl.converters.ReadableStreamType = webidl.createEnumConverter( "ReadableStreamType", ["bytes"], ); webidl.converters.UnderlyingSource = webidl .createDictionaryConverter("UnderlyingSource", [ { key: "start", converter: webidl.converters.Function, }, { key: "pull", converter: webidl.converters.Function, }, { key: "cancel", converter: webidl.converters.Function, }, { key: "type", converter: webidl.converters.ReadableStreamType, }, { key: "autoAllocateChunkSize", converter: (V, prefix, context, opts) => webidl.converters["unsigned long long"](V, prefix, context, { ...opts, enforceRange: true, }), }, ]); webidl.converters.UnderlyingSink = webidl .createDictionaryConverter("UnderlyingSink", [ { key: "start", converter: webidl.converters.Function, }, { key: "write", converter: webidl.converters.Function, }, { key: "close", converter: webidl.converters.Function, }, { key: "abort", converter: webidl.converters.Function, }, { key: "type", converter: webidl.converters.any, }, ]); webidl.converters.Transformer = webidl .createDictionaryConverter("Transformer", [ { key: "start", converter: webidl.converters.Function, }, { key: "transform", converter: webidl.converters.Function, }, { key: "flush", converter: webidl.converters.Function, }, { key: "cancel", converter: webidl.converters.Function, }, { key: "readableType", converter: webidl.converters.any, }, { key: "writableType", converter: webidl.converters.any, }, ]); webidl.converters.QueuingStrategy = webidl .createDictionaryConverter("QueuingStrategy", [ { key: "highWaterMark", converter: webidl.converters["unrestricted double"], }, { key: "size", converter: webidl.converters.Function, }, ]); webidl.converters.QueuingStrategyInit = webidl .createDictionaryConverter("QueuingStrategyInit", [ { key: "highWaterMark", converter: webidl.converters["unrestricted double"], required: true, }, ]); webidl.converters.ReadableStreamIteratorOptions = webidl .createDictionaryConverter("ReadableStreamIteratorOptions", [ { key: "preventCancel", defaultValue: false, converter: webidl.converters.boolean, }, ]); webidl.converters.ReadableStreamReaderMode = webidl .createEnumConverter("ReadableStreamReaderMode", ["byob"]); webidl.converters.ReadableStreamGetReaderOptions = webidl .createDictionaryConverter("ReadableStreamGetReaderOptions", [{ key: "mode", converter: webidl.converters.ReadableStreamReaderMode, }]); webidl.converters.ReadableStreamBYOBReaderReadOptions = webidl .createDictionaryConverter("ReadableStreamBYOBReaderReadOptions", [{ key: "min", converter: (V, prefix, context, opts) => webidl.converters["unsigned long long"](V, prefix, context, { ...opts, enforceRange: true, }), defaultValue: 1, }]); webidl.converters.ReadableWritablePair = webidl .createDictionaryConverter("ReadableWritablePair", [ { key: "readable", converter: webidl.converters.ReadableStream, required: true, }, { key: "writable", converter: webidl.converters.WritableStream, required: true, }, ]); webidl.converters.StreamPipeOptions = webidl .createDictionaryConverter("StreamPipeOptions", [ { key: "preventClose", defaultValue: false, converter: webidl.converters.boolean, }, { key: "preventAbort", defaultValue: false, converter: webidl.converters.boolean, }, { key: "preventCancel", defaultValue: false, converter: webidl.converters.boolean, }, { key: "signal", converter: webidl.converters.AbortSignal }, ]); internals.resourceForReadableStream = resourceForReadableStream; export { // Non-Public _state, // Exposed in global runtime scope ByteLengthQueuingStrategy, CountQueuingStrategy, createProxy, Deferred, errorReadableStream, getReadableStreamResourceBacking, getWritableStreamResourceBacking, isDetachedBuffer, isReadableStreamDisturbed, ReadableByteStreamController, ReadableStream, ReadableStreamBYOBReader, ReadableStreamBYOBRequest, readableStreamClose, readableStreamCollectIntoUint8Array, ReadableStreamDefaultController, ReadableStreamDefaultReader, readableStreamDisturb, readableStreamForRid, readableStreamForRidUnrefable, readableStreamForRidUnrefableRef, readableStreamForRidUnrefableUnref, ReadableStreamPrototype, readableStreamTee, readableStreamThrowIfErrored, resourceForReadableStream, TransformStream, TransformStreamDefaultController, WritableStream, writableStreamClose, WritableStreamDefaultController, WritableStreamDefaultWriter, writableStreamForRid, }; Qdڊext:deno_web/06_streams.jsa bD`M` T`!=La  T  I`bSb1.c.~`Db`b`FbP`D:`gDBB`nD`6`B`Dr`b`2›`D">```b`#`4D`DbF`rBb`4`aBE`qDB `=Y`-DB`BB `>"` 5`bD9`f"`'DB``_`b`DB`B/`D`DB"`DB#`QL`{@`l`DH`u8`eD!`A` D(`Vb`".`3```6D",`YD`%`)`  `DB``HD`!+`bx`D`DDb`DR`D`8D`D3`"`DB%`S`Bq`DB`D`g`D``C`" `"L`$•`b`*t`-` "Q`~[```D"`@`D= `&D`b`b`D7`y`D`A6`cD`#`KD2`_bH`t`D0`]"t``"`'D"`b(`D`9`"``ED`@` "L`zp`"`DB$`RD&` B`J`xDb&`Tn`Db-`Bs`$D"%`f`A`DBw`"#`]``)1``D`"B` DB`D`Da`` `DBS``IDB `;*`X˜`b`"m`B8`A`M `1DI `0M`%D`D``b'` D `B`D"`o`)`D` D`b`?BJ`wD<`Dbk`K`y`D`DbC`!DI`vb0`BD`pD" `O7`db``D1`^bM`|b`B}`B`b`DA `.b`7"`Nb``D``ƒ```[`DW`+DB`D2`DBG`sD`D`9DB>`D`-`"'`UbA`mB `^`bu`b` `M"``"$`D`3D}`q`Db-`ZDB!` `:D`Dq` `<``B `!s`N`&`a``L"`D`D,`D``DB`D`B``"Y`v`B`D` Bl`"`D`"D``D`D`-D;`hK`!be`Y`,Y`DB`=`Db`Gbd`@``+9` <`C`oV`*E `/X`/`5`(`B!`Pb`,b`/`\``b`?`kb`!``+`1```` `>`jD.`[T`(D``J"`)`WN`}`)D``p`*`B<`iDT`D??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????Ib`$L` bS]`5B]`lb]`]` ]` "]` n]`3 ]L`f;` L`;b?` L`b?` L`f` L`fX` L`XQ` L`QB` L`BBZ` L`BZO`  L`O"H`  L`"HT`  L`Tb `  L`b ^`  L`^"_` L`"_"T` L`"T"=` L`"=Z` L`ZK` L`K` L`b` L`b` L`bs` L`bs` L`B` L`B` L`b` L`b` L`` L`` L`` L`B` L`B|`  L`|`! L`"`" L`" L`  DDcdL` DcQ e  Dc +  Dci l  D c   D  c Dc  DBKBKc  Dcp y  D  c D  c D  c$ D  c(R D  cV} D  c D  c D  c D  c D  c"H D  cLc Dc"- DBBc}  DBBc  D""c  `9 a?BKa?a? a? a? a? a? a? a? a? a? a? a? a?"a?a?a?a?Ba?Ba?a?a?a?a?a?"=a?bsa?|a ?ba?a?a?a?a?Ba?"a"?ba?Ba?a?a?a?a!?;a?b?a?Xa?"Ha ?Ka?Oa ?Qa?Ba?fa?BZa?Ta ?b a ?^a ?"Ta?"_a?Za?/b@2  T  I`/ 0b'@ 3  T I`!zb"@ 4  T I`E b@ 5  T I`AB b@6  T I`C b@7  T I`_B b@8  T I`bb@9  T I`cb@:  T I`b!@;  T I`Bb@<  T I`))Hb @=  T I`)*"IbMQ>  T I`+F,Nb+@?  T I`,[-"Qb(@@  T I`-/.BSb+@ A  T I`h/r1Tb@!B  T I`35[b@#C  T I`57`b@$D  T I`7Q9Bbb@%E  T I`9;bb@&F  T I`;<bdb@'G  T I`=?beb!@*H  T I``??"Yb!@+I  T I`:AF(h;׃@@څ@@҈@ĉ@ gb"@,J  T I`QFG^b!@3K  T I`G$HXb@4L  T I`HHpb@5M  T I`CIwIBqb@6N  T I`IUJqb&@7O  T I`J=Krb#@8P  T I`^L+M"tb$@:Q  T I`:PSBwb#@?R  TI`TWd@̫@@ bxb@AS  T I`kl"b"@PT  T I`noBb2@TU  T I`z}}"b@^V  T I`F~~b@_W  T I`F%Bb@`X  T I`•b5@aY  T I`.b4@dZ  T I`c˜b*@e[  T I`eb:@f\  T I`bb*@g]  T I`tb,@h^  T I`ߘbb8@i_  T I`wb>@j`  T I`bbC@ka  T I`=b3@lb  T I`b3@mc  T I`M›b@nd  T I`ӥ#b5@oe  T I`Bb3@pf  T I`mbb%@qg  T I`ܬb)@rh  T I`kjbb@si  T I`S"b8@vj  T I`5b9@yk  T I`Fb7@zl  T I`b-@{m  T I`b/@|n  T I`2"b-@}o  T I`Bb6@~p  T I`Bb7@q  T I`&:"b6@r  T I` jBb%@s  T I`ub(@t  T I`b5@u  T I`-{bbI@v  T I`bbB@w  T I`bb-@x  T I`b,@y  T I`h*b;@z  T I`b4@{  T I`"Bb:@|  T I`b9@}  T I`6b=@~  T I`b7@  T I`#bb9@  T I`gbD@  T I` b=@  T I`  b?@  T I`- ]bb>@  T I` yb(@  T I`b+@  T I`b@  T I`.b-@  T I`db)@  T I`Rb-@  T I`3b)@  T I`b$@  T I`*b'@  TI`C9Hma@@@@@@ @ @ b @c@@b @ bb@  T I`9~:Bb*@  T I`7;=="b.@  T I`=@b+@  T I`ABb6@  TI`D'V$f,@@Ʀ@@ d@Ț@̟@b!@  TI`Vw8jO@۵@ @@@@@@ d@@@d@@@b@  T I`x~fb*@  T I`ƒb>@  T I`֋[b-@  T I` gbA@  T I`Rb&@  T I`1bPb)@  T I`hb.@  T I`NBb=@  T I`ä_b -@  T I`(Bb?@  T I`[b)@  T I`ѹgb8@  T I`" b0@  T I` L"b.@  T I` b9@  T I`j"b2@  T I`Blb1@  T I`u"mb1@  T I`hTbkb1@   T I` ob4@   T I`U-nb2@  T I`fb@  T I`"b4@  T I`-Qpb'@  T I` b$@  T I`Bb@  T I`JHBb&@  T I`eBb,@  T I`bb(@  T I`8B b<@  T I`B!b7@  T I` b-@  T I`B"b-@  T I`ob5@  T I` b7@  T I`"$b4@  T I` q"#b6@  T I`Bb4@   T I`RB b4@#  T I`+b-@&  T I` ,b)@'  T I`b-b)@(  T I`A"b=@)  T I`".b?@*  T I`yB/b>@+  T I`)b0b2@,  T I`Obb+@-  T I`wb)@.  T I`q b%@/  T I` &b*@2  T I`b'b3@3  T I`0)b*@4  T I`Jl*b3@5  T I`1b1@6  T I`"%b/@7  T I`b(b4@8  T I`[3b:@9  T I`|b$@:  T I` b)@;  T I`7263=b)@J  T I`!99@b$@P  T I`:d:"Bb+RQR  T I`:~<bCb@S !LaF T I`b@ b T I`KKbsb"@9! a T I`HYU\|b"@E" a  TI`_1ec@@ bb@I# a TI`Qgkc@@ b&@M$ a T I`>l)mb)@Q% a  T I`VmBnb+@R& a! T I`mnnb)@S' a" T I`q!stAa`)-"AY]a " !!!+b9K&-$ BsBr= "bbA E I M b/b  T4`' L`  M7`KcS f5555(Sbqq`Dar @ a 4 b  4Sb @ bd??? 0  `T ``/ `/ `?  `  aD]H ` ajaj"ajaj`+ } `F] b T  I`B e7/bDԃ  T I`XAb  T I`L3"b  T I`;b  T I` Qaget sizeb  T0`]  7`Kb 0@@e55 5(SbqqB `Da a 4b b"bbbb !"#$%&()B*+,."/B0B1B2B3B4"5"6B7"8"9B:b;b<=>?@ABCDEFG T I`MNI 0bK;   `T ``/ `/ `?  `  aNOD]$ ` ajaj] T  I`VNNv 0/b Ճ<  T I`NOb=  T$` L`"v  7`Kb  b3(Sbqqv`Da;NO a b>  T I` ]-]IbKH ~bB67,Sb @"9Bc??"  `T ``/ `/ `?  `  a"D]< ` ajzaj"{aj{aj]"9 T  I`, { B8 8/b Ճ<  T I`  zb =  T I`!!"{b >  T I`!"{b ?  T,`]  E8`Kb " , d55(SbqqB8`Da " a 4b@  b CiC T I`<#'b @ 0/bA  T  I`(,bC   `T ``/ `/ `?  `  a!,1D]f D a } `F` DW `F` DHcD La T  I`,-; 0/b F  T I`-i.Qcget highWaterMarkbG  T I`./ Qaget sizebH  T I`/1`b(I   `T ``/ `/ `?  `  a837D]f D a } `F` DW `F` DHcD La T  I`34b? 0/b L  T I` 5q5Qcget highWaterMarkbM  T I`5o6 Qaget sizebN  T I`67`b(O CDTSb @mBEEBFFh???????=^  `` ``/ `/ `?  `  a=^eaj D]f6Ha DBIa,aDBJaDG } ` F` D a"KaDba HcD LaH T  I`?kFX9/b ՃT  T I`zFJebU  T I` KuKQb get lockedb X  T I`KzMbbY  T I`NDPHb Z  T I` QTBIb [  T I`|UYBJb\  T I`YLZ"Kb]  T I`Z],b^  T I`]^`b(_  TD`A]  y9`Kd# j555555 5 (SbqqX`Da=^b 4 4 b` ,(bGHG4Sb @md???`k 0  ` T ``/ `/ `?  `  a`kD]f6a DMa M } `F` D aDba HcD La( T  I`aXcO9/b Ճb  T I`cfd @ @ @bc  T I`f|gMb g  T I`gHhQb get closedb h  T I`h`jbbi  T I`jk`b(j  T0`]  9`Kb&  Qe555(SbqqO`Daak a 4bk 4Sb @md???Zlh~ 0  ` T ``/ `/ `?  `  aZlh~D]f6a DMa M } `F` D aDba HcD La( T  I`^mnQ:/b Ճl  T I`{o^ye$ @ @ @@Xbm  T I`y7zMb q  T I`Ez{Qb get closedb r  T I`M{}bbs  T I`A}f~`b(t  T0`]  ]:`Kc&  ܊e555(SbqqQ`Daylh~ a 4bu ,Sb @c??~ 0  `T ``/ `/ `?  `  a~D]< ` ajb`+ } `FOajPaj] T  I`+Bq:/b Ճw  T I` Qaget viewbv  T I`:Obx  T I`PPby  T,`]  :`Kb '  Id55(SbqqB`Da a 4bz Sb @ mBEEBFFP"QQ"RR"Sn?????????????# 0  `T ``/ `/ `?  `  a#D]f6#DaD­ } `F`  `F` D1aD aDaxc DLdT\dl T  I`f:/b Ճ{  T I`ٌeQbget byobRequestb|  T I`&Qbget desiredSizeb}  T I`Hӏb~  T I`#b  T I`: b  T I`7e`b(  T I``b  T I``b   T I``b  T\`w]  E;` Kf/(  p555555 5  5 5 5 5 55(Sbqqf`DaFc 4 4 4 4 b tSb @ mBEEBFFP"QQ"Rl???????????W 0  `T ``/ `/ `?  `  aWD]f6 DaD } `F` D1aD aDaxc DLdHPX` T  I`8BZY;/b Ճ  T I`mQbget desiredSizeb  T I`!Bb  T I`b  T I`O&b!  T I`R`b("  T I`ة|`b#  T I`֪`b $  T I``b%  TT`e]  ;`Ke(*  Sn555555 5  5 5 5 5(SbqqBZ`Da}b 4 4 4 4b& LSb @mBEEBFg?????? 0  ` T ``/ `/ `?  `  aD]fD aD" } ` F`  ` F` DHcD La, T  I`#T;/b Ճ'  T I`YQb get readableb (  T I`KQb get writableb )  T I`w`b(*  T<`8]  -<`Kc* x [h555555 (SbqqT`Da a 4 4b+ LSb @mBEEb g??????! 0  `T ``/ `/ `?  `  a!D]f6 D } `F` D1a bVa D aDa HcD La0 T  I`)b A</b Ճ,  T I`^Qbget desiredSizeb-  T I`Ǿb.  T I`b/  T I`bVb 0  T I``b(1  T8`/]  <`Kc+  3g55555(Sbqqb `DaH a 4 4b2 tSb @ mBEEBFFP"QQ"Rl??????????? 0  `T ``/ `/ `?  `  aD]f6DaDG } `F` DXaD aDaDHcD LaH T  I`^</b Ճ3  T I`KQb get lockedb 4  T I`rb5  T I`b6  T I`iXb 7  T I``b(8  TT`e]  =`Ke', x cn555555 5  5 5 5 5(Sbqq^`Dab 4 4 4 4b9 4Sb @md???- 0  `T ``/ `/ `?  `  a-D]f6DB } `F` ba a DM `F`  `F` DMa D aDa DHcD La4 T  I`+X"T=/b Ճ:  T I`FQb get closedb ;  T I`tQbget desiredSizeb<  T I`{Qb get readyb =  T I`b>  T I`b?  T I`$!Mb @  T I`jAbbA  T I`m`b(B  T0`]  =`Kb-  oe555(Sbqq"T`DaO a 4bC lSb @ mBEEBFFP"QQk??????????| 0  `T ``/ `/ `?  `  a|D]f6 D1aD aD } ` F` DHcDLc<DL T  I`S"_=/b ՃD  T I`DQb get signalb E  T I` ?bF  T I`k`b(G  T I`y`b H  T I``b I  TP`\]  >`Ke%.  'm555555 5  5 5 5(Sbqq"_`Dab 4 4 4 bJ b^X^BB[  ` M`B[ `Le ba ‰Ci‰ ba ‰C ba b‰C ba ‰C ba ‰C T  y`M`G`Fb^`<`;[`+`*`$`#BQb .converter`‰ 0/bKK \  `Le ba ‰C ba b‰C ba ‰C ba ‰C ba ‰Cb] ` Lf ba ‰C ba I‰C ba ]‰C ba b‰C ba B^‰C ba ^‰CB_ `Lb ba W‰Cf ba ‰C_ ` La(ba W‰CGb` ` La(ba "aH‰C=a ` M`Bbb ` La ba bc‰Cc ` La(ba ‰C"a` T4`&L`b^ab\  >`Df0(9--ƀ)3\(SbbpW‰`y```Z`Yb^`O`Nc`+`*`$`#BQb .convertera$ 0 a ` /bKL d  `Lb(ba "‰CG(ba ‰CGBe `Ld(ba "aH‰C(ba "aH‰C(ba "aH‰C ba ‰CbBK|  /`D`h %%%%%%% % % % % %%%%%%%%%%%%%%%%%%% %!%"%#%$%%%&%'%(%)%*%+%,%-%.%/%0%1%2%3%4%5%6%7%8%:%;%<%=%>%?%@%A%B %C %D %E%F%G%H%I%J%K%L%M%N%O%P%Q%R%S%T%U%V%W%X%Y%Z%[%\%]%^%_%`%a%b%c%d%e%f%g%h%i%j%k%l%m%n%o%p%q%r%s%t%u%v%w %x %y%z%{%|%}%~% %%%%%%%%%%%%%%%%%% %%%! %"!%%%%%%%#"%$#%%$%&%%'&%('%)(%*)%+*%,+%-,%.-%/.%0/%10%21%32%43%54%65%76%87%98%:9%;:%<;%=<%>=%?>%@?%A@%BA%CB%DC%ED%FE%GF%HG%‚IH%ÂJI%ĂKJ%łLK%ƂML%ǂNM%ȂON%ɂPO%ʂQP%˂RQ%̂SR%͂TS%΂UT%ςVU%ЂWV%тXW%҂YX%ӂZY%Ԃ[Z%Ղ\[%ւ]\%ׂ^]%؂_^%ق`_%ڂa`%ۂba%܂cb%݂dc%ނed%߂fe%gf%hg%ih%ji%kj%lk%ml%nm%on%po%qp%rq%sr%ts%ut%vu%wv%xw%yx%zy%{z%|{%}|%~}%~%%%%%%%%%%%%%%%%% % % % % %%%%%%%%%%%%%%%%%%% %!%"%#%$%%%&%'%(%)%*%+%,%-%.%/%0ei e%9 h  0-%-%-%-%0-%- %- % -% -% -% -% --%-%-%-%- %-"%-$%-&%-(%-*%-,%-.%-0%-2%-4%-6-8-:%-<->%-@%-B% -D%!-F%"-H%#-J%$-L-N%%-P-R%&-T-V%'-X%(-Z-\%)-^%*-`%+-b%,-d%--f%.-h%/-j%0-l%1-n%2-p%3-r%4-t%5-v%6-x%7-z%8e%e%e%e%緂e+2| 1e%e%e%e+2~ %Ab%Fb%Gb%Hb%Ib%Jb%Kb%Lb%Mb%Nb%Ob%P b%Q b%R b%S b뜽 b%Tb%Ub%Vb%Wb%Xb%Yb%Zb%[b%\b%]b%^b%_b%`b%ab%bb%cb%db%eb%f b%g!b%h"b%i#b%j$b%k%b%l&b1'b%m(b%n)b%o*b%p+b%q,b%r-b%s.b%t/b%u0b%v9-1%wx%y %z%{%|%}%~%2 i%435e+62 % %7 i%8b%9b%:b%;b%b<b%=b%>@@e%e%A?BCDe+E2 %~F)G3HI3Jc%LKMNObtPe+ 19-Q0^ 0-R % i %TSUVObtWe+ 19-Q0^0-R%  i%!Xb%%Yb%&Z%%%%%%%\[St% t%Tt%gt%0t%mt%%t%]^_`abcdObtee+f2 10-R'0-R-g!4#0-R'~h%)`&9-Q0^(0-R1 i%%%kjPt%pt%ht%lmnoOb*tpe+ q2, 1 9-Q0 ^.0 -R0%'r%%%tsPt%pt%it%uvwxOb2tye+ z24 19-Q0^60-R8%({%%}|St%rt%~e+2: 19-Q0^<0-R>%)%%%%%%%% % % % % %Ht%Kt%Lt%Rt%_t%`t%at%]t% dt% et% lt% nt% pt%Ob@tMtbtcte+2B 19-Q0^D0-RF%*%%%%%%%% % % % Lt%Rt%_t%`t%at%dt%et%lt% nt% ot% pt% ObHtMtbtcte+2J 19-Q0^L0-RN%+%%%%%%It%Jt%St% t%ft%st%ObPte+ 2R 1 9-Q0 ^T0 -RV%,%%%%%%Lt%Vt%Wt%pt%qt%ObXte+ %2Z 1 9-Q0 ^\0 -R^%-%%%%%%%% % % % It%Qt%St% t%[t%Zt%\t%0t% mt% ut% vt% Ob`te+2b 1 9-Q0 ^d0 -Rf%.%%%Pt%jt%pt%     Obhte+2j 19-Q0^l0-Rn%/%%%%%%%% % % Ft%Ot%dt%et%lt%nt%ot%pt% tt% kt% ObptGtUte+2r 19-Q0^t0-Rv%09-x9-z0-R_|2~9-x9-z0 -Rf_29-x9-{%_29-x9-{ ~)9-x-3 6 ~)9-x-3 6 ~)9-x-3 6 ~)9-x-3 6 ~)3 6_29-x9-{ ~)9-x-3 6 ~)9-x-3 6 ~)9-x-3 6 ~)9-x-3 6 ~)9-x-3 6_29-x9-{ ~)9-x-3 6 ~)9-x-3 6 ~)9-x-3 6 ~)9-x-3 6 ~)9-x-3 6 ~)9-x-3 6_29-x9-{ ~)9-x-3 6 ~)9-x-3 6_29-x9-{ ~)9-x-3 6_ 2 9-x9-{  ~)9-x-3 6_29-x9-{%_29-x9-{ ~)9-x- 3" 6$_&2(9-x9-{* ~+)3, 6._0229-x9-{4 ~5)9-x-638 6: ~<)9-x-=3? 6:_A2C9-x9-{E ~F)9-x-G3I 6K ~M)9-x-N3P 6K ~R)9-x-S3U 6K ~ W)9-x- X3Z 6K_\2^0 0 2 `  0b-PPPPPPPPPPPPPPPPPPPP @@@@@@@@@@@@@@@@@@ @@@ L   &@ P,@,@@ P,@@ P,@P,P `Y ``Y ``9 &00 Y `,0'0`9 `9 `I Y <@ s&`&0@ ,/bA 7D!7-797A7I70D)1D1191A1I1Q17777}77a6Y1a1i1q1y111111D11111D111D1112 22i627777%2D-2Dq6D8y6D6D92666A266D66I2Q2Y2a2Di2q2y22222222222222662D223 333!3)31393A3I3Q3Y3a3i3q3y333333333333333334 4 8D!4)414946A4DQ4De4Dm4Du4D}4D4444D4D4D44444D44D4D4D4D5 555%5-5556=5E5M5U5]5e5m5u5}555D5D5555555555D5556 666%6-656!8)81898A8]8Di8D8888=6D8888E6DM6U6!9)9D19=9E9M9U9]9e9m9u9699D99999!:):D5:=:I:Q:Y::::::::: ;;;!;);1;9;A;y;;;;;;;;;;< <<!<)<a<i<u<}<<<<<<<<<<=A=I=U=a=m=u=}==========>6=>>D`RD]DH Qd9// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @ts-check /// /// /// /// /// /// /// import { core, primordials } from "ext:core/mod.js"; const { isDataView, isSharedArrayBuffer, isTypedArray, } = core; import { op_encoding_decode, op_encoding_decode_single, op_encoding_decode_utf8, op_encoding_encode_into, op_encoding_new_decoder, op_encoding_normalize_label, } from "ext:core/ops"; const { DataViewPrototypeGetBuffer, DataViewPrototypeGetByteLength, DataViewPrototypeGetByteOffset, ObjectPrototypeIsPrototypeOf, PromiseReject, PromiseResolve, // TODO(lucacasonato): add SharedArrayBuffer to primordials // SharedArrayBufferPrototype, StringPrototypeCharCodeAt, StringPrototypeSlice, SymbolFor, TypedArrayPrototypeGetBuffer, TypedArrayPrototypeGetByteLength, TypedArrayPrototypeGetByteOffset, TypedArrayPrototypeSubarray, Uint32Array, Uint8Array, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; class TextDecoder { /** @type {string} */ #encoding; /** @type {boolean} */ #fatal; /** @type {boolean} */ #ignoreBOM; /** @type {boolean} */ #utf8SinglePass; /** @type {number | null} */ #rid = null; /** * @param {string} label * @param {TextDecoderOptions} options */ constructor(label = "utf-8", options = {}) { const prefix = "Failed to construct 'TextDecoder'"; label = webidl.converters.DOMString(label, prefix, "Argument 1"); options = webidl.converters.TextDecoderOptions( options, prefix, "Argument 2", ); const encoding = op_encoding_normalize_label(label); this.#encoding = encoding; this.#fatal = options.fatal; this.#ignoreBOM = options.ignoreBOM; this.#utf8SinglePass = encoding === "utf-8" && !options.fatal; this[webidl.brand] = webidl.brand; } /** @returns {string} */ get encoding() { webidl.assertBranded(this, TextDecoderPrototype); return this.#encoding; } /** @returns {boolean} */ get fatal() { webidl.assertBranded(this, TextDecoderPrototype); return this.#fatal; } /** @returns {boolean} */ get ignoreBOM() { webidl.assertBranded(this, TextDecoderPrototype); return this.#ignoreBOM; } /** * @param {BufferSource} [input] * @param {TextDecodeOptions} options */ decode(input = new Uint8Array(), options = undefined) { webidl.assertBranded(this, TextDecoderPrototype); const prefix = "Failed to execute 'decode' on 'TextDecoder'"; if (input !== undefined) { input = webidl.converters.BufferSource(input, prefix, "Argument 1", { allowShared: true, }); } let stream = false; if (options !== undefined) { options = webidl.converters.TextDecodeOptions( options, prefix, "Argument 2", ); stream = options.stream; } try { /** @type {ArrayBufferLike} */ let buffer = input; if (isTypedArray(input)) { buffer = TypedArrayPrototypeGetBuffer( /** @type {Uint8Array} */ (input), ); } else if (isDataView(input)) { buffer = DataViewPrototypeGetBuffer(/** @type {DataView} */ (input)); } // Note from spec: implementations are strongly encouraged to use an implementation strategy that avoids this copy. // When doing so they will have to make sure that changes to input do not affect future calls to decode(). if (isSharedArrayBuffer(buffer)) { // We clone the data into a non-shared ArrayBuffer so we can pass it // to Rust. // `input` is now a Uint8Array, and calling the TypedArray constructor // with a TypedArray argument copies the data. if (isTypedArray(input)) { input = new Uint8Array( buffer, TypedArrayPrototypeGetByteOffset( /** @type {Uint8Array} */ (input), ), TypedArrayPrototypeGetByteLength( /** @type {Uint8Array} */ (input), ), ); } else if (isDataView(input)) { input = new Uint8Array( buffer, DataViewPrototypeGetByteOffset(/** @type {DataView} */ (input)), DataViewPrototypeGetByteLength(/** @type {DataView} */ (input)), ); } else { input = new Uint8Array(buffer); } } // Fast path for single pass encoding. if (!stream && this.#rid === null) { // Fast path for utf8 single pass encoding. if (this.#utf8SinglePass) { return op_encoding_decode_utf8(input, this.#ignoreBOM); } return op_encoding_decode_single( input, this.#encoding, this.#fatal, this.#ignoreBOM, ); } if (this.#rid === null) { this.#rid = op_encoding_new_decoder( this.#encoding, this.#fatal, this.#ignoreBOM, ); } return op_encoding_decode(input, this.#rid, stream); } finally { if (!stream && this.#rid !== null) { core.close(this.#rid); this.#rid = null; } } } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(TextDecoderPrototype, this), keys: [ "encoding", "fatal", "ignoreBOM", ], }), inspectOptions, ); } } webidl.configureInterface(TextDecoder); const TextDecoderPrototype = TextDecoder.prototype; class TextEncoder { constructor() { this[webidl.brand] = webidl.brand; } /** @returns {string} */ get encoding() { webidl.assertBranded(this, TextEncoderPrototype); return "utf-8"; } /** * @param {string} input * @returns {Uint8Array} */ encode(input = "") { webidl.assertBranded(this, TextEncoderPrototype); // The WebIDL type of `input` is `USVString`, but `core.encode` already // converts lone surrogates to the replacement character. input = webidl.converters.DOMString( input, "Failed to execute 'encode' on 'TextEncoder'", "Argument 1", ); return core.encode(input); } /** * @param {string} source * @param {Uint8Array} destination * @returns {TextEncoderEncodeIntoResult} */ encodeInto(source, destination) { webidl.assertBranded(this, TextEncoderPrototype); const prefix = "Failed to execute 'encodeInto' on 'TextEncoder'"; // The WebIDL type of `source` is `USVString`, but the ops bindings // already convert lone surrogates to the replacement character. source = webidl.converters.DOMString(source, prefix, "Argument 1"); destination = webidl.converters.Uint8Array( destination, prefix, "Argument 2", { allowShared: true, }, ); op_encoding_encode_into(source, destination, encodeIntoBuf); return { read: encodeIntoBuf[0], written: encodeIntoBuf[1], }; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(TextEncoderPrototype, this), keys: ["encoding"], }), inspectOptions, ); } } const encodeIntoBuf = new Uint32Array(2); webidl.configureInterface(TextEncoder); const TextEncoderPrototype = TextEncoder.prototype; class TextDecoderStream { /** @type {TextDecoder} */ #decoder; /** @type {TransformStream} */ #transform; /** * @param {string} label * @param {TextDecoderOptions} options */ constructor(label = "utf-8", options = {}) { const prefix = "Failed to construct 'TextDecoderStream'"; label = webidl.converters.DOMString(label, prefix, "Argument 1"); options = webidl.converters.TextDecoderOptions( options, prefix, "Argument 2", ); this.#decoder = new TextDecoder(label, options); this.#transform = new TransformStream({ // The transform and flush functions need access to TextDecoderStream's // `this`, so they are defined as functions rather than methods. transform: (chunk, controller) => { try { chunk = webidl.converters.BufferSource(chunk, prefix, "chunk", { allowShared: true, }); const decoded = this.#decoder.decode(chunk, { stream: true }); if (decoded) { controller.enqueue(decoded); } return PromiseResolve(); } catch (err) { return PromiseReject(err); } }, flush: (controller) => { try { const final = this.#decoder.decode(); if (final) { controller.enqueue(final); } return PromiseResolve(); } catch (err) { return PromiseReject(err); } }, cancel: (_reason) => { try { const _ = this.#decoder.decode(); return PromiseResolve(); } catch (err) { return PromiseReject(err); } }, }); this[webidl.brand] = webidl.brand; } /** @returns {string} */ get encoding() { webidl.assertBranded(this, TextDecoderStreamPrototype); return this.#decoder.encoding; } /** @returns {boolean} */ get fatal() { webidl.assertBranded(this, TextDecoderStreamPrototype); return this.#decoder.fatal; } /** @returns {boolean} */ get ignoreBOM() { webidl.assertBranded(this, TextDecoderStreamPrototype); return this.#decoder.ignoreBOM; } /** @returns {ReadableStream} */ get readable() { webidl.assertBranded(this, TextDecoderStreamPrototype); return this.#transform.readable; } /** @returns {WritableStream} */ get writable() { webidl.assertBranded(this, TextDecoderStreamPrototype); return this.#transform.writable; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf( TextDecoderStreamPrototype, this, ), keys: [ "encoding", "fatal", "ignoreBOM", "readable", "writable", ], }), inspectOptions, ); } } webidl.configureInterface(TextDecoderStream); const TextDecoderStreamPrototype = TextDecoderStream.prototype; class TextEncoderStream { /** @type {string | null} */ #pendingHighSurrogate = null; /** @type {TransformStream} */ #transform; constructor() { this.#transform = new TransformStream({ // The transform and flush functions need access to TextEncoderStream's // `this`, so they are defined as functions rather than methods. transform: (chunk, controller) => { try { chunk = webidl.converters.DOMString(chunk); if (chunk === "") { return PromiseResolve(); } if (this.#pendingHighSurrogate !== null) { chunk = this.#pendingHighSurrogate + chunk; } const lastCodeUnit = StringPrototypeCharCodeAt( chunk, chunk.length - 1, ); if (0xD800 <= lastCodeUnit && lastCodeUnit <= 0xDBFF) { this.#pendingHighSurrogate = StringPrototypeSlice(chunk, -1); chunk = StringPrototypeSlice(chunk, 0, -1); } else { this.#pendingHighSurrogate = null; } if (chunk) { controller.enqueue(core.encode(chunk)); } return PromiseResolve(); } catch (err) { return PromiseReject(err); } }, flush: (controller) => { try { if (this.#pendingHighSurrogate !== null) { controller.enqueue(new Uint8Array([0xEF, 0xBF, 0xBD])); } return PromiseResolve(); } catch (err) { return PromiseReject(err); } }, }); this[webidl.brand] = webidl.brand; } /** @returns {string} */ get encoding() { webidl.assertBranded(this, TextEncoderStreamPrototype); return "utf-8"; } /** @returns {ReadableStream} */ get readable() { webidl.assertBranded(this, TextEncoderStreamPrototype); return this.#transform.readable; } /** @returns {WritableStream} */ get writable() { webidl.assertBranded(this, TextEncoderStreamPrototype); return this.#transform.writable; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf( TextEncoderStreamPrototype, this, ), keys: [ "encoding", "readable", "writable", ], }), inspectOptions, ); } } webidl.configureInterface(TextEncoderStream); const TextEncoderStreamPrototype = TextEncoderStream.prototype; webidl.converters.TextDecoderOptions = webidl.createDictionaryConverter( "TextDecoderOptions", [ { key: "fatal", converter: webidl.converters.boolean, defaultValue: false, }, { key: "ignoreBOM", converter: webidl.converters.boolean, defaultValue: false, }, ], ); webidl.converters.TextDecodeOptions = webidl.createDictionaryConverter( "TextDecodeOptions", [ { key: "stream", converter: webidl.converters.boolean, defaultValue: false, }, ], ); /** * @param {Uint8Array} bytes */ function decode(bytes, encoding) { const BOMEncoding = BOMSniff(bytes); if (BOMEncoding !== null) { encoding = BOMEncoding; const start = BOMEncoding === "UTF-8" ? 3 : 2; bytes = TypedArrayPrototypeSubarray(bytes, start); } return new TextDecoder(encoding).decode(bytes); } /** * @param {Uint8Array} bytes */ function BOMSniff(bytes) { if (bytes[0] === 0xEF && bytes[1] === 0xBB && bytes[2] === 0xBF) { return "UTF-8"; } if (bytes[0] === 0xFE && bytes[1] === 0xFF) return "UTF-16BE"; if (bytes[0] === 0xFF && bytes[1] === 0xFE) return "UTF-16LE"; return null; } export { decode, TextDecoder, TextDecoderStream, TextEncoder, TextEncoderStream, }; Qdr˱ ext:deno_web/08_text_encoding.jsa bD`M`" T`MLaQp T  I`u8n9sSb15<">A!bSb"I ikjnBqsv???????????????????????Ib9`L` bS]`B]`b]`"]`O]DL`e` L`e"l` L`"lB` L`Bo` L`o".` L`". L`  DDc,L`  D  c Dc-G D  c0B D  cF_ D  ccz D  c~ D  c D  c Dc` a?a? a? a? a? a? a? a?a?ea?Ba?"la?oa?".a?a?b@!O $Ld T I`'7=8".?b@ N aa  5<">A!bSbBr"E DSb @bffBggBhf?????r  ` T ``/ `/ `?  `  arD]f6Dh } `F` Di `F` ".a D aDj `F` HcD LabffBggBh T`8L`  "b^bgbr ij  !@`DyX- ]    --\-- \ 0b 4- 4- 4m- T4- - 4(SbpFe`Da?c!PP8PD a?b ՃP  T  I`M Qb get encodingb Q  T I`v Qb get fatalb R  T I` S Qb get ignoreBOMb S  T I` ".bT  T I``b(U  T8`/] m@`Kc, pg55555(Sbqqe`Da a 4 4bV    `T ``/ `/ `?  `  aqID]f,a h } `F` D a"ka DHcD La T,` L`  @`Dd--4(SbpGB`Da? a8a?b W  T  I`>Qb get encodingb  X  T I`,b Y  Th`@L`bjbVb^bgbI bBkG k bCBoCBo  @`Ds8-_--\-- ~ )\ 0  `~ ) /3  /3  (Sbpm"k`Da ?cPP&0 a?b  Z  T  I`LG`b( [ ,Sb @l"mc??L*  ` T ``/ `/ `?  `  aL*D]f6Dh } `F` D `F` Di `F` D aD" `F` Dj `F` HcD La l"m T  I`%"l@a?b Ճ \  T I`%#&Qb get encodingb ]  T I`L&&Qb get fatalb ^  T I`&E'Qb get ignoreBOMb _  T I`''Qb get readableb `  T I`*((Qb get writableb a  T I`(J*`b(b  T,`]  qA`Kb   Wd55(Sbqq"l`DaL* a 4bc ,Sb @"p"mc??*l4?  `T ``/ `/ `?  `  a*l4D]fDh } `F` D aD" `F`  `F` DHcD La"p T  I`g+1oAa?b Ճd  T I`911Qb get encodingb e  T I`192Qb get readableb f  T I`t22Qb get writableb g  T I` 3j4`b(h  T,`]  A`Kb  Hd55(Sbqqo`Da*l4 a 4bi b^Br  `Lb(ba i‰C"aH=‰(ba j‰C"aHr ` La(ba N‰C"aH u?`Dh %%%%%%% % % % % %%%%%%%%%%%ei e% h  0-%-%-%0 - %- %- %- % -% -% -% -% --%-%-%-%- -"%e%e%e%e%e% !"#$%b$t&e+ '2(& 1-)(0^*0-*,%,+- . / %b.t0 e+ 1  i0%-)(0^20-*4%133e%44e%5 26789:%b6t;e+ <2(8 1-)(0^:0-*<%=??e%44e%@>ABC%b>tDe+E2(@ 1-)(0^B0-*D%-FF-GHH{IJ ~JK)-FF-KL3LN 6P ~MR)-FF-KS3LU 6P_W2HY-FF-GHN{O[ ~P\)-FF-K]3L_ 6a_c2Ne ?,igPPPPPP,P@P,@PY <0 `a?bAM @5@A@M@Y@a@i@@@@@@!AD)A5AAAMAYAeAmAADAAAAA?}?D`RD]DH %Q%.K// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @ts-check /// /// /// /// /// /// /// /// import { core, primordials } from "ext:core/mod.js"; const { isAnyArrayBuffer, isArrayBuffer, isDataView, isTypedArray, } = core; import { op_blob_create_object_url, op_blob_create_part, op_blob_from_object_url, op_blob_read_part, op_blob_remove_part, op_blob_revoke_object_url, op_blob_slice_part, } from "ext:core/ops"; const { ArrayBufferIsView, ArrayBufferPrototypeGetByteLength, ArrayBufferPrototypeSlice, ArrayPrototypePush, AsyncGeneratorPrototypeNext, DataViewPrototypeGetBuffer, DataViewPrototypeGetByteLength, DataViewPrototypeGetByteOffset, Date, DatePrototypeGetTime, MathMax, MathMin, ObjectPrototypeIsPrototypeOf, RegExpPrototypeTest, SafeFinalizationRegistry, SafeRegExp, StringPrototypeCharAt, StringPrototypeSlice, StringPrototypeToLowerCase, Symbol, SymbolFor, TypeError, TypedArrayPrototypeGetBuffer, TypedArrayPrototypeGetByteLength, TypedArrayPrototypeGetByteOffset, TypedArrayPrototypeSet, Uint8Array, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { ReadableStream } from "ext:deno_web/06_streams.js"; import { URL } from "ext:deno_url/00_url.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; // TODO(lucacasonato): this needs to not be hardcoded and instead depend on // host os. const isWindows = false; /** * @param {string} input * @param {number} position * @returns {{result: string, position: number}} */ function collectCodepointsNotCRLF(input, position) { // See https://w3c.github.io/FileAPI/#convert-line-endings-to-native and // https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points const start = position; for ( let c = StringPrototypeCharAt(input, position); position < input.length && !(c === "\r" || c === "\n"); c = StringPrototypeCharAt(input, ++position) ); return { result: StringPrototypeSlice(input, start, position), position }; } /** * @param {string} s * @returns {string} */ function convertLineEndingsToNative(s) { const nativeLineEnding = isWindows ? "\r\n" : "\n"; let { result, position } = collectCodepointsNotCRLF(s, 0); while (position < s.length) { const codePoint = StringPrototypeCharAt(s, position); if (codePoint === "\r") { result += nativeLineEnding; position++; if ( position < s.length && StringPrototypeCharAt(s, position) === "\n" ) { position++; } } else if (codePoint === "\n") { position++; result += nativeLineEnding; } const { result: token, position: newPosition } = collectCodepointsNotCRLF( s, position, ); position = newPosition; result += token; } return result; } /** @param {(BlobReference | Blob)[]} parts */ async function* toIterator(parts) { for (let i = 0; i < parts.length; ++i) { // deno-lint-ignore prefer-primordials yield* parts[i].stream(); } } /** @typedef {BufferSource | Blob | string} BlobPart */ /** * @param {BlobPart[]} parts * @param {string} endings * @returns {{ parts: (BlobReference|Blob)[], size: number }} */ function processBlobParts(parts, endings) { /** @type {(BlobReference|Blob)[]} */ const processedParts = []; let size = 0; for (let i = 0; i < parts.length; ++i) { const element = parts[i]; if (isArrayBuffer(element)) { const chunk = new Uint8Array(ArrayBufferPrototypeSlice(element, 0)); ArrayPrototypePush(processedParts, BlobReference.fromUint8Array(chunk)); size += ArrayBufferPrototypeGetByteLength(element); } else if (isTypedArray(element)) { const chunk = new Uint8Array( TypedArrayPrototypeGetBuffer(/** @type {Uint8Array} */ (element)), TypedArrayPrototypeGetByteOffset(/** @type {Uint8Array} */ (element)), TypedArrayPrototypeGetByteLength(/** @type {Uint8Array} */ (element)), ); size += TypedArrayPrototypeGetByteLength( /** @type {Uint8Array} */ (element), ); ArrayPrototypePush(processedParts, BlobReference.fromUint8Array(chunk)); } else if (isDataView(element)) { const chunk = new Uint8Array( DataViewPrototypeGetBuffer(/** @type {DataView} */ (element)), DataViewPrototypeGetByteOffset(/** @type {DataView} */ (element)), DataViewPrototypeGetByteLength(/** @type {DataView} */ (element)), ); size += DataViewPrototypeGetByteLength( /** @type {DataView} */ (element), ); ArrayPrototypePush(processedParts, BlobReference.fromUint8Array(chunk)); } else if (ObjectPrototypeIsPrototypeOf(BlobPrototype, element)) { ArrayPrototypePush(processedParts, element); size += element.size; } else if (typeof element === "string") { const chunk = core.encode( endings == "native" ? convertLineEndingsToNative(element) : element, ); size += TypedArrayPrototypeGetByteLength(chunk); ArrayPrototypePush(processedParts, BlobReference.fromUint8Array(chunk)); } else { throw new TypeError("Unreachable code (invalid element type)"); } } return { parts: processedParts, size }; } const NORMALIZE_PATTERN = new SafeRegExp(/^[\x20-\x7E]*$/); /** * @param {string} str * @returns {string} */ function normalizeType(str) { let normalizedType = str; if (!RegExpPrototypeTest(NORMALIZE_PATTERN, str)) { normalizedType = ""; } return StringPrototypeToLowerCase(normalizedType); } /** * Get all Parts as a flat array containing all references * @param {Blob} blob * @param {string[]} bag * @returns {string[]} */ function getParts(blob, bag = []) { const parts = blob[_parts]; for (let i = 0; i < parts.length; ++i) { const part = parts[i]; if (ObjectPrototypeIsPrototypeOf(BlobPrototype, part)) { getParts(part, bag); } else { ArrayPrototypePush(bag, part._id); } } return bag; } const _type = Symbol("Type"); const _size = Symbol("Size"); const _parts = Symbol("Parts"); class Blob { [_type] = ""; [_size] = 0; [_parts]; /** * @param {BlobPart[]} blobParts * @param {BlobPropertyBag} options */ constructor(blobParts = [], options = {}) { const prefix = "Failed to construct 'Blob'"; blobParts = webidl.converters["sequence"]( blobParts, prefix, "Argument 1", ); options = webidl.converters["BlobPropertyBag"]( options, prefix, "Argument 2", ); this[webidl.brand] = webidl.brand; const { parts, size } = processBlobParts( blobParts, options.endings, ); this[_parts] = parts; this[_size] = size; this[_type] = normalizeType(options.type); } /** @returns {number} */ get size() { webidl.assertBranded(this, BlobPrototype); return this[_size]; } /** @returns {string} */ get type() { webidl.assertBranded(this, BlobPrototype); return this[_type]; } /** * @param {number} [start] * @param {number} [end] * @param {string} [contentType] * @returns {Blob} */ slice(start = undefined, end = undefined, contentType = undefined) { webidl.assertBranded(this, BlobPrototype); const prefix = "Failed to execute 'slice' on 'Blob'"; if (start !== undefined) { start = webidl.converters["long long"](start, prefix, "Argument 1", { clamp: true, }); } if (end !== undefined) { end = webidl.converters["long long"](end, prefix, "Argument 2", { clamp: true, }); } if (contentType !== undefined) { contentType = webidl.converters["DOMString"]( contentType, prefix, "Argument 3", ); } // deno-lint-ignore no-this-alias const O = this; /** @type {number} */ let relativeStart; if (start === undefined) { relativeStart = 0; } else { if (start < 0) { relativeStart = MathMax(O.size + start, 0); } else { relativeStart = MathMin(start, O.size); } } /** @type {number} */ let relativeEnd; if (end === undefined) { relativeEnd = O.size; } else { if (end < 0) { relativeEnd = MathMax(O.size + end, 0); } else { relativeEnd = MathMin(end, O.size); } } const span = MathMax(relativeEnd - relativeStart, 0); const blobParts = []; let added = 0; const parts = this[_parts]; for (let i = 0; i < parts.length; ++i) { const part = parts[i]; // don't add the overflow to new blobParts if (added >= span) { // Could maybe be possible to remove variable `added` // and only use relativeEnd? break; } const size = part.size; if (relativeStart && size <= relativeStart) { // Skip the beginning and change the relative // start & end position as we skip the unwanted parts relativeStart -= size; relativeEnd -= size; } else { // deno-lint-ignore prefer-primordials const chunk = part.slice( relativeStart, MathMin(part.size, relativeEnd), ); added += chunk.size; relativeEnd -= part.size; ArrayPrototypePush(blobParts, chunk); relativeStart = 0; // All next sequential parts should start at 0 } } /** @type {string} */ let relativeContentType; if (contentType === undefined) { relativeContentType = ""; } else { relativeContentType = normalizeType(contentType); } const blob = new Blob([], { type: relativeContentType }); blob[_parts] = blobParts; blob[_size] = span; return blob; } /** * @returns {ReadableStream} */ stream() { webidl.assertBranded(this, BlobPrototype); const partIterator = toIterator(this[_parts]); const stream = new ReadableStream({ type: "bytes", /** @param {ReadableByteStreamController} controller */ async pull(controller) { while (true) { const { value, done } = await AsyncGeneratorPrototypeNext( partIterator, ); if (done) { controller.close(); controller.byobRequest?.respond(0); return; } if (TypedArrayPrototypeGetByteLength(value) > 0) { return controller.enqueue(value); } } }, }); return stream; } /** * @returns {Promise} */ async text() { webidl.assertBranded(this, BlobPrototype); const buffer = await this.#u8Array(this.size); return core.decode(buffer); } async #u8Array(size) { const bytes = new Uint8Array(size); const partIterator = toIterator(this[_parts]); let offset = 0; while (true) { const { value, done } = await AsyncGeneratorPrototypeNext( partIterator, ); if (done) break; const byteLength = TypedArrayPrototypeGetByteLength(value); if (byteLength > 0) { TypedArrayPrototypeSet(bytes, value, offset); offset += byteLength; } } return bytes; } /** * @returns {Promise} */ async arrayBuffer() { webidl.assertBranded(this, BlobPrototype); const buf = await this.#u8Array(this.size); return TypedArrayPrototypeGetBuffer(buf); } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(BlobPrototype, this), keys: [ "size", "type", ], }), inspectOptions, ); } } webidl.configureInterface(Blob); const BlobPrototype = Blob.prototype; webidl.converters["Blob"] = webidl.createInterfaceConverter( "Blob", Blob.prototype, ); webidl.converters["BlobPart"] = (V, prefix, context, opts) => { // Union for ((ArrayBuffer or ArrayBufferView) or Blob or USVString) if (typeof V == "object") { if (ObjectPrototypeIsPrototypeOf(BlobPrototype, V)) { return webidl.converters["Blob"](V, prefix, context, opts); } if (isAnyArrayBuffer(V)) { return webidl.converters["ArrayBuffer"](V, prefix, context, opts); } if (ArrayBufferIsView(V)) { return webidl.converters["ArrayBufferView"](V, prefix, context, opts); } } // BlobPart is passed to processBlobParts after conversion, which calls core.encode() // on the string. // core.encode() is equivalent to USVString normalization. return webidl.converters["DOMString"](V, prefix, context, opts); }; webidl.converters["sequence"] = webidl.createSequenceConverter( webidl.converters["BlobPart"], ); webidl.converters["EndingType"] = webidl.createEnumConverter("EndingType", [ "transparent", "native", ]); const blobPropertyBagDictionary = [ { key: "type", converter: webidl.converters["DOMString"], defaultValue: "", }, { key: "endings", converter: webidl.converters["EndingType"], defaultValue: "transparent", }, ]; webidl.converters["BlobPropertyBag"] = webidl.createDictionaryConverter( "BlobPropertyBag", blobPropertyBagDictionary, ); const _Name = Symbol("[[Name]]"); const _LastModified = Symbol("[[LastModified]]"); class File extends Blob { /** @type {string} */ [_Name]; /** @type {number} */ [_LastModified]; /** * @param {BlobPart[]} fileBits * @param {string} fileName * @param {FilePropertyBag} options */ constructor(fileBits, fileName, options = {}) { const prefix = "Failed to construct 'File'"; webidl.requiredArguments(arguments.length, 2, prefix); fileBits = webidl.converters["sequence"]( fileBits, prefix, "Argument 1", ); fileName = webidl.converters["USVString"](fileName, prefix, "Argument 2"); options = webidl.converters["FilePropertyBag"]( options, prefix, "Argument 3", ); super(fileBits, options); /** @type {string} */ this[_Name] = fileName; if (options.lastModified === undefined) { /** @type {number} */ this[_LastModified] = DatePrototypeGetTime(new Date()); } else { /** @type {number} */ this[_LastModified] = options.lastModified; } } /** @returns {string} */ get name() { webidl.assertBranded(this, FilePrototype); return this[_Name]; } /** @returns {number} */ get lastModified() { webidl.assertBranded(this, FilePrototype); return this[_LastModified]; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(FilePrototype, this), keys: [ "name", "size", "type", ], }), inspectOptions, ); } } webidl.configureInterface(File); const FilePrototype = File.prototype; webidl.converters["FilePropertyBag"] = webidl.createDictionaryConverter( "FilePropertyBag", blobPropertyBagDictionary, [ { key: "lastModified", converter: webidl.converters["long long"], }, ], ); // A finalization registry to deallocate a blob part when its JS reference is // garbage collected. const registry = new SafeFinalizationRegistry((uuid) => { op_blob_remove_part(uuid); }); // TODO(lucacasonato): get a better stream from Rust in BlobReference#stream /** * An opaque reference to a blob part in Rust. This could be backed by a file, * in memory storage, or something else. */ class BlobReference { /** * Don't use directly. Use `BlobReference.fromUint8Array`. * @param {string} id * @param {number} size */ constructor(id, size) { this._id = id; this.size = size; registry.register(this, id); } /** * Create a new blob part from a Uint8Array. * * @param {Uint8Array} data * @returns {BlobReference} */ static fromUint8Array(data) { const id = op_blob_create_part(data); return new BlobReference(id, TypedArrayPrototypeGetByteLength(data)); } /** * Create a new BlobReference by slicing this BlobReference. This is a copy * free operation - the sliced reference will still reference the original * underlying bytes. * * @param {number} start * @param {number} end * @returns {BlobReference} */ slice(start, end) { const size = end - start; const id = op_blob_slice_part(this._id, { start, len: size, }); return new BlobReference(id, size); } /** * Read the entire contents of the reference blob. * @returns {AsyncGenerator} */ async *stream() { yield op_blob_read_part(this._id); // let position = 0; // const end = this.size; // while (position !== end) { // const size = MathMin(end - position, 65536); // const chunk = this.slice(position, position + size); // position += chunk.size; // yield op_blob_read_part( chunk._id); // } } } /** * Construct a new Blob object from an object URL. * * This new object will not duplicate data in memory with the original Blob * object from which this URL was created or with other Blob objects created * from the same URL, but they will be different objects. * * The object returned from this function will not be a File object, even if * the original object from which the object URL was constructed was one. This * means that the `name` and `lastModified` properties are lost. * * @param {string} url * @returns {Blob | null} */ function blobFromObjectUrl(url) { const blobData = op_blob_from_object_url(url); if (blobData === null) { return null; } /** @type {BlobReference[]} */ const parts = []; let totalSize = 0; for (let i = 0; i < blobData.parts.length; ++i) { const { uuid, size } = blobData.parts[i]; ArrayPrototypePush(parts, new BlobReference(uuid, size)); totalSize += size; } const blob = webidl.createBranded(Blob); blob[_type] = blobData.media_type; blob[_size] = totalSize; blob[_parts] = parts; return blob; } /** * @param {Blob} blob * @returns {string} */ function createObjectURL(blob) { const prefix = "Failed to execute 'createObjectURL' on 'URL'"; webidl.requiredArguments(arguments.length, 1, prefix); blob = webidl.converters["Blob"](blob, prefix, "Argument 1"); return op_blob_create_object_url(blob.type, getParts(blob)); } /** * @param {string} url * @returns {void} */ function revokeObjectURL(url) { const prefix = "Failed to execute 'revokeObjectURL' on 'URL'"; webidl.requiredArguments(arguments.length, 1, prefix); url = webidl.converters["DOMString"](url, prefix, "Argument 1"); op_blob_revoke_object_url(url); } URL.createObjectURL = createObjectURL; URL.revokeObjectURL = revokeObjectURL; export { Blob, blobFromObjectUrl, BlobPrototype, File, FilePrototype, getParts, }; Qccext:deno_web/09_file.jsa bD`M`  T]`uLah T  I`k buQSb1*125">q!stAAa!B>Sbn= "bI tbuvxy{}B"‰z??????????????????????????????????????????IbK` L` bS]`B]` b]`"t]`&]`G"]`]PL`b` L`bb{` L`b{` L`B` L`B` L`~` L`~ L`  DDc8L`  DXXc  DB B c<? D  c Dcj D  cYr D  cv D  c D  c D  c D  c D  c Dc` a?a? a? a? a? a? a? a? a?Xa?B a?a?~a?ba?b{a?a?Ba?a?Bb!@m  T I` { vABb#@n  T  I` I xbRQo  T I`yb@p  T I`h}b@q  T I`HIb@r  T I`IJb@s 0L`  T I`~b@k e T I`MFQHb@l aa  125">q!stAAa!B>&%Sbn Br= "bI |LSb @mbg??????.(/  `T ``/ `/ `?  `  a.(/D]f6DNa D } `F` D `F` 9a aa "-a DHcD La0b T  I`1+-CBbQt  T I`bb Ճu  T I` [ Qaget sizebv  T I` Qaget typeb w  T I`Vh'9b x  T I`'[*b QT@Nb y  T I`*+"-b Q z  T I`N--bQ{  T I`.&/`b(|  T0` L`I  }C`Kb8@ e5 55(Sbqqb`Da9(/ a 4b}  b^ T  y```b^Qb .BlobPart`/2IABBbK~ zB  `M` `Lb(ba ‰C"aIbg‰(ba z‰C"aBB",Sb @c??m5;  ` T ``/ `/ `?  `  am5;D]fD } `F` D aŒ `F` DHcD La T  I`U6U9CBb Ճ  T I`|99 Qaget nameb  T I`9Q:Qbget lastModifiedb  T I`}:;`b(  T,`]  D`Kb  t /d55(Sbqq`Da5; a 4b B  ` La ba Œ‰Ca T  I`e==IABBbK $Sb @zb?a> D  `` ``/ `/  `?  `  aa> DajD]0 ` aj9ajNaj] T  I`>Y?z=DBb   T I`?n@b  T I`A8B9b  T I`B DNb Q B   1B`DEh %%%%%%% % % % % %%%%%%%%%%%%%%%%%% %!%"%#%$%%%&%'%(%)%*%+%,ei e% h   0 - %- %-%-%0-%- %- % -% -% -% -% -%-%-%-%-%- %-"%-$- &-!(%-"*%-#,%-$.-%0-&2%-'4%-(6%-)8%-*:%-+<%%z,> i?%$-bA%&.bC%'/bE%(0%%%%2e%3%41&t%'t%(t%5 6 7 8 9 :;bGt<e+ %=2>I 1-?K0^M0-@O1-AQ-BS20-@O_U22W-AQC2DY-AQ-E[-AQ-D]^_2Fa-AQ-GcH{Ie%_f2Hh{Jj ~Kk)-AQ-Ll3Mn 6p ~Nr)-AQ-Hs3Mu 6p-AQ-OwP_y2P{Qb}%)Rb%*S%%0UT)t%*t%VW;btXe+ Y2> 1-?K0^0-@1-AQ-OwZ{[ ~\)-AQ-]3M 6\2Z^ i%+_%a`bcde+ %%,0e 2f0 2g AB<mPPPPPPPPPPL` `&,0'0 &`bAj 9BBBBBB-C5CACMCUCDaC%CiCqCyCCCCC DD5DQDYDaDiDBBBD`RD]DH A Q= j@// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @ts-check /// /// /// /// /// /// /// /// import { primordials } from "ext:core/mod.js"; import { op_encode_binary_string } from "ext:core/ops"; const { ArrayPrototypePush, ArrayPrototypeReduce, FunctionPrototypeCall, MapPrototypeGet, MapPrototypeSet, ObjectDefineProperty, ObjectPrototypeIsPrototypeOf, queueMicrotask, SafeArrayIterator, SafeMap, Symbol, SymbolFor, TypedArrayPrototypeSet, TypedArrayPrototypeGetBuffer, TypedArrayPrototypeGetByteLength, TypedArrayPrototypeGetSymbolToStringTag, TypeError, Uint8Array, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; import { forgivingBase64Encode } from "ext:deno_web/00_infra.js"; import { EventTarget, ProgressEvent } from "ext:deno_web/02_event.js"; import { decode, TextDecoder } from "ext:deno_web/08_text_encoding.js"; import { parseMimeType } from "ext:deno_web/01_mimesniff.js"; import { DOMException } from "ext:deno_web/01_dom_exception.js"; const state = Symbol("[[state]]"); const result = Symbol("[[result]]"); const error = Symbol("[[error]]"); const aborted = Symbol("[[aborted]]"); const handlerSymbol = Symbol("eventHandlers"); class FileReader extends EventTarget { /** @type {"empty" | "loading" | "done"} */ [state] = "empty"; /** @type {null | string | ArrayBuffer} */ [result] = null; /** @type {null | DOMException} */ [error] = null; /** @type {null | {aborted: boolean}} */ [aborted] = null; /** * @param {Blob} blob * @param {{kind: "ArrayBuffer" | "Text" | "DataUrl" | "BinaryString", encoding?: string}} readtype */ #readOperation(blob, readtype) { // 1. If fr's state is "loading", throw an InvalidStateError DOMException. if (this[state] === "loading") { throw new DOMException( "Invalid FileReader state.", "InvalidStateError", ); } // 2. Set fr's state to "loading". this[state] = "loading"; // 3. Set fr's result to null. this[result] = null; // 4. Set fr's error to null. this[error] = null; // We set this[aborted] to a new object, and keep track of it in a // separate variable, so if a new read operation starts while there are // remaining tasks from a previous aborted operation, the new operation // will run while the tasks from the previous one are still aborted. const abortedState = this[aborted] = { aborted: false }; // 5. Let stream be the result of calling get stream on blob. const stream /*: ReadableStream*/ = blob.stream(); // 6. Let reader be the result of getting a reader from stream. const reader = stream.getReader(); // 7. Let bytes be an empty byte sequence. /** @type {Uint8Array[]} */ const chunks = []; // 8. Let chunkPromise be the result of reading a chunk from stream with reader. let chunkPromise = reader.read(); // 9. Let isFirstChunk be true. let isFirstChunk = true; // 10 in parallel while true (async () => { while (!abortedState.aborted) { // 1. Wait for chunkPromise to be fulfilled or rejected. try { const chunk = await chunkPromise; if (abortedState.aborted) return; // 2. If chunkPromise is fulfilled, and isFirstChunk is true, queue a task to fire a progress event called loadstart at fr. if (isFirstChunk) { // TODO(lucacasonato): this is wrong, should be HTML "queue a task" queueMicrotask(() => { if (abortedState.aborted) return; // fire a progress event for loadstart const ev = new ProgressEvent("loadstart", {}); this.dispatchEvent(ev); }); } // 3. Set isFirstChunk to false. isFirstChunk = false; // 4. If chunkPromise is fulfilled with an object whose done property is false // and whose value property is a Uint8Array object, run these steps: if ( !chunk.done && TypedArrayPrototypeGetSymbolToStringTag(chunk.value) === "Uint8Array" ) { ArrayPrototypePush(chunks, chunk.value); // TODO(bartlomieju): (only) If roughly 50ms have passed since last progress { const size = ArrayPrototypeReduce( chunks, (p, i) => p + TypedArrayPrototypeGetByteLength(i), 0, ); const ev = new ProgressEvent("progress", { loaded: size, }); // TODO(lucacasonato): this is wrong, should be HTML "queue a task" queueMicrotask(() => { if (abortedState.aborted) return; this.dispatchEvent(ev); }); } chunkPromise = reader.read(); } // 5 Otherwise, if chunkPromise is fulfilled with an object whose done property is true, queue a task to run the following steps and abort this algorithm: else if (chunk.done === true) { // TODO(lucacasonato): this is wrong, should be HTML "queue a task" queueMicrotask(() => { if (abortedState.aborted) return; // 1. Set fr's state to "done". this[state] = "done"; // 2. Let result be the result of package data given bytes, type, blob's type, and encodingName. const size = ArrayPrototypeReduce( chunks, (p, i) => p + TypedArrayPrototypeGetByteLength(i), 0, ); const bytes = new Uint8Array(size); let offs = 0; for (let i = 0; i < chunks.length; ++i) { const chunk = chunks[i]; TypedArrayPrototypeSet(bytes, chunk, offs); offs += TypedArrayPrototypeGetByteLength(chunk); } switch (readtype.kind) { case "ArrayBuffer": { this[result] = TypedArrayPrototypeGetBuffer(bytes); break; } case "BinaryString": this[result] = op_encode_binary_string(bytes); break; case "Text": { let decoder = undefined; if (readtype.encoding) { try { decoder = new TextDecoder(readtype.encoding); } catch { // don't care about the error } } if (decoder === undefined) { const mimeType = parseMimeType(blob.type); if (mimeType) { const charset = MapPrototypeGet( mimeType.parameters, "charset", ); if (charset) { try { decoder = new TextDecoder(charset); } catch { // don't care about the error } } } } if (decoder === undefined) { decoder = new TextDecoder(); } this[result] = decode(bytes, decoder.encoding); break; } case "DataUrl": { const mediaType = blob.type || "application/octet-stream"; this[result] = `data:${mediaType};base64,${ forgivingBase64Encode(bytes) }`; break; } } // 4.2 Fire a progress event called load at the fr. { const ev = new ProgressEvent("load", { lengthComputable: true, loaded: size, total: size, }); this.dispatchEvent(ev); } // 5. If fr's state is not "loading", fire a progress event called loadend at the fr. //Note: Event handler for the load or error events could have started another load, if that happens the loadend event for this load is not fired. if (this[state] !== "loading") { const ev = new ProgressEvent("loadend", { lengthComputable: true, loaded: size, total: size, }); this.dispatchEvent(ev); } }); break; } } catch (err) { // TODO(lucacasonato): this is wrong, should be HTML "queue a task" queueMicrotask(() => { if (abortedState.aborted) return; // chunkPromise rejected this[state] = "done"; this[error] = err; { const ev = new ProgressEvent("error", {}); this.dispatchEvent(ev); } //If fr's state is not "loading", fire a progress event called loadend at fr. //Note: Event handler for the error event could have started another load, if that happens the loadend event for this load is not fired. if (this[state] !== "loading") { const ev = new ProgressEvent("loadend", {}); this.dispatchEvent(ev); } }); break; } } })(); } #getEventHandlerFor(name) { webidl.assertBranded(this, FileReaderPrototype); const maybeMap = this[handlerSymbol]; if (!maybeMap) return null; return MapPrototypeGet(maybeMap, name)?.handler ?? null; } #setEventHandlerFor(name, value) { webidl.assertBranded(this, FileReaderPrototype); if (!this[handlerSymbol]) { this[handlerSymbol] = new SafeMap(); } let handlerWrapper = MapPrototypeGet(this[handlerSymbol], name); if (handlerWrapper) { handlerWrapper.handler = value; } else { handlerWrapper = makeWrappedHandler(value); this.addEventListener(name, handlerWrapper); } MapPrototypeSet(this[handlerSymbol], name, handlerWrapper); } constructor() { super(); this[webidl.brand] = webidl.brand; } /** @returns {number} */ get readyState() { webidl.assertBranded(this, FileReaderPrototype); switch (this[state]) { case "empty": return FileReader.EMPTY; case "loading": return FileReader.LOADING; case "done": return FileReader.DONE; default: throw new TypeError("Invalid state"); } } get result() { webidl.assertBranded(this, FileReaderPrototype); return this[result]; } get error() { webidl.assertBranded(this, FileReaderPrototype); return this[error]; } abort() { webidl.assertBranded(this, FileReaderPrototype); // If context object's state is "empty" or if context object's state is "done" set context object's result to null and terminate this algorithm. if ( this[state] === "empty" || this[state] === "done" ) { this[result] = null; return; } // If context object's state is "loading" set context object's state to "done" and set context object's result to null. if (this[state] === "loading") { this[state] = "done"; this[result] = null; } // If there are any tasks from the context object on the file reading task source in an affiliated task queue, then remove those tasks from that task queue. // Terminate the algorithm for the read method being processed. if (this[aborted] !== null) { this[aborted].aborted = true; } // Fire a progress event called abort at the context object. const ev = new ProgressEvent("abort", {}); this.dispatchEvent(ev); // If context object's state is not "loading", fire a progress event called loadend at the context object. if (this[state] !== "loading") { const ev = new ProgressEvent("loadend", {}); this.dispatchEvent(ev); } } /** @param {Blob} blob */ readAsArrayBuffer(blob) { webidl.assertBranded(this, FileReaderPrototype); const prefix = "Failed to execute 'readAsArrayBuffer' on 'FileReader'"; webidl.requiredArguments(arguments.length, 1, prefix); this.#readOperation(blob, { kind: "ArrayBuffer" }); } /** @param {Blob} blob */ readAsBinaryString(blob) { webidl.assertBranded(this, FileReaderPrototype); const prefix = "Failed to execute 'readAsBinaryString' on 'FileReader'"; webidl.requiredArguments(arguments.length, 1, prefix); // alias for readAsArrayBuffer this.#readOperation(blob, { kind: "BinaryString" }); } /** @param {Blob} blob */ readAsDataURL(blob) { webidl.assertBranded(this, FileReaderPrototype); const prefix = "Failed to execute 'readAsDataURL' on 'FileReader'"; webidl.requiredArguments(arguments.length, 1, prefix); // alias for readAsArrayBuffer this.#readOperation(blob, { kind: "DataUrl" }); } /** * @param {Blob} blob * @param {string} [encoding] */ readAsText(blob, encoding = undefined) { webidl.assertBranded(this, FileReaderPrototype); const prefix = "Failed to execute 'readAsText' on 'FileReader'"; webidl.requiredArguments(arguments.length, 1, prefix); if (encoding !== undefined) { encoding = webidl.converters["DOMString"](encoding, prefix, "Argument 2"); } // alias for readAsArrayBuffer this.#readOperation(blob, { kind: "Text", encoding }); } get onerror() { return this.#getEventHandlerFor("error"); } set onerror(value) { this.#setEventHandlerFor("error", value); } get onloadstart() { return this.#getEventHandlerFor("loadstart"); } set onloadstart(value) { this.#setEventHandlerFor("loadstart", value); } get onload() { return this.#getEventHandlerFor("load"); } set onload(value) { this.#setEventHandlerFor("load", value); } get onloadend() { return this.#getEventHandlerFor("loadend"); } set onloadend(value) { this.#setEventHandlerFor("loadend", value); } get onprogress() { return this.#getEventHandlerFor("progress"); } set onprogress(value) { this.#setEventHandlerFor("progress", value); } get onabort() { return this.#getEventHandlerFor("abort"); } set onabort(value) { this.#setEventHandlerFor("abort", value); } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(FileReaderPrototype, this), keys: [ "error", "readyState", "result", ], }), inspectOptions, ); } } webidl.configureInterface(FileReader); const FileReaderPrototype = FileReader.prototype; ObjectDefineProperty(FileReader, "EMPTY", { writable: false, enumerable: true, configurable: false, value: 0, }); ObjectDefineProperty(FileReader, "LOADING", { writable: false, enumerable: true, configurable: false, value: 1, }); ObjectDefineProperty(FileReader, "DONE", { writable: false, enumerable: true, configurable: false, value: 2, }); ObjectDefineProperty(FileReader.prototype, "EMPTY", { writable: false, enumerable: true, configurable: false, value: 0, }); ObjectDefineProperty(FileReader.prototype, "LOADING", { writable: false, enumerable: true, configurable: false, value: 1, }); ObjectDefineProperty(FileReader.prototype, "DONE", { writable: false, enumerable: true, configurable: false, value: 2, }); function makeWrappedHandler(handler) { function wrappedHandler(...args) { if (typeof wrappedHandler.handler !== "function") { return; } return FunctionPrototypeCall( wrappedHandler.handler, this, ...new SafeArrayIterator(args), ); } wrappedHandler.handler = handler; return wrappedHandler; } export { FileReader }; Qd Vext:deno_web/10_filereader.jsa bD`M`$ Ty`)LaHp T I`?Q@b ~@beSb1Aia!/!$b"= I !N1bbv???????????????????????Ibj@`,L`  bS]`B]`b]`"]`:n]`]`]` B]`KB]`]L`` L` L`  DDc0L`  Dllct Dc Dc Deec Dc2 D".".c D==cez D c DBoBoc6C Dc` a? a?a?=a?a?a?".a?ea?Boa?la?a?yDb@"  Laa Aia!/!$ Brb"=dSb @ mBEj?????????o;D  `T ``/ `/ `?  `  ao;D]!f@#D" } `F` Da D a` Da Da D a` DB a` D aD" a`  $D1 ` F` DŸ a` DbaDBa N `F` D" a` DHcD Lal T  I`*&EyDb  T I`&'b  T I`')b  T I`))b Ճ  T I`*T+Qbget readyStateb  T I`b++Qb get resultb   T I`+,Qb get errorb   T I`#,0b  T I`,1,2b  T I`^23Bb  T I`34b   T I`56bb   T I`67Qb get onerrorb   T I`7Y7Qb set onerrorb   T I`l77Qbget onloadstartb  T I`77Qbset onloadstartb  T I`8:8Qb get onloadb   T I`G88Qb set onloadb   T I`88Qb get onloadendb   T I`89Qb set onloadendb   T I`)9b9Qbget onprogressb  T I`s99Qbset onprogressb  T I`99Qb get onabortb   T I`:?:Qb set onabortb   T I`k:;`b(  T4`' L`  YF`Kc4f5555(Sbqq`Da; a 4 b!  0bHGH`0bHGH`B0bHGH`0bHGH`0bHGH`0bHGH`  D`Da(h %%%%%%% % % % % %%%%%%%%%%%ei e% h  0-%-%-%- %- %- - %- % -% -% ---% -% -%-%- %-"%b$%b&%b(%b*%b,%%%%%% e% %!%"%0#$t%t%t%t%%&'() * + , - ./01߂2ނ3݂4܂5ۂ6ڂ7ق89b.tׂ:e+ % ;2<0 1-=20^40->6%0?~@8)`90A~B;)`<0C~D>)`?0->6?~EA)`B0->6A~FD)`E0->6C~GG)`H«D$gJPPPPPP@@ @L&L&L&yDbA QEDYEaEiEqE}EEEEEEEEEEEEEFFF)F5FAFMFUFDDD`RD]DH Q_r&// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. /// import { primordials } from "ext:core/mod.js"; const { Error, ObjectDefineProperties, SafeWeakMap, Symbol, SymbolFor, SymbolToStringTag, TypeError, WeakMapPrototypeGet, WeakMapPrototypeSet, } = primordials; import { URL } from "ext:deno_url/00_url.js"; import { DOMException } from "ext:deno_web/01_dom_exception.js"; const locationConstructorKey = Symbol("locationConstructorKey"); // The differences between the definitions of `Location` and `WorkerLocation` // are because of the `LegacyUnforgeable` attribute only specified upon // `Location`'s properties. See: // - https://html.spec.whatwg.org/multipage/history.html#the-location-interface // - https://heycam.github.io/webidl/#LegacyUnforgeable class Location { constructor(href = null, key = null) { if (key != locationConstructorKey) { throw new TypeError("Illegal constructor."); } const url = new URL(href); url.username = ""; url.password = ""; ObjectDefineProperties(this, { hash: { get() { return url.hash; }, set() { throw new DOMException( `Cannot set "location.hash".`, "NotSupportedError", ); }, enumerable: true, }, host: { get() { return url.host; }, set() { throw new DOMException( `Cannot set "location.host".`, "NotSupportedError", ); }, enumerable: true, }, hostname: { get() { return url.hostname; }, set() { throw new DOMException( `Cannot set "location.hostname".`, "NotSupportedError", ); }, enumerable: true, }, href: { get() { return url.href; }, set() { throw new DOMException( `Cannot set "location.href".`, "NotSupportedError", ); }, enumerable: true, }, origin: { get() { return url.origin; }, enumerable: true, }, pathname: { get() { return url.pathname; }, set() { throw new DOMException( `Cannot set "location.pathname".`, "NotSupportedError", ); }, enumerable: true, }, port: { get() { return url.port; }, set() { throw new DOMException( `Cannot set "location.port".`, "NotSupportedError", ); }, enumerable: true, }, protocol: { get() { return url.protocol; }, set() { throw new DOMException( `Cannot set "location.protocol".`, "NotSupportedError", ); }, enumerable: true, }, search: { get() { return url.search; }, set() { throw new DOMException( `Cannot set "location.search".`, "NotSupportedError", ); }, enumerable: true, }, ancestorOrigins: { get() { // TODO(nayeemrmn): Replace with a `DOMStringList` instance. return { length: 0, item: () => null, contains: () => false, }; }, enumerable: true, }, assign: { value: function assign() { throw new DOMException( `Cannot call "location.assign()".`, "NotSupportedError", ); }, enumerable: true, }, reload: { value: function reload() { throw new DOMException( `Cannot call "location.reload()".`, "NotSupportedError", ); }, enumerable: true, }, replace: { value: function replace() { throw new DOMException( `Cannot call "location.replace()".`, "NotSupportedError", ); }, enumerable: true, }, toString: { value: function toString() { return url.href; }, enumerable: true, }, [SymbolFor("Deno.privateCustomInspect")]: { value: function (inspect, inspectOptions) { return `${this.constructor.name} ${ inspect({ hash: this.hash, host: this.host, hostname: this.hostname, href: this.href, origin: this.origin, pathname: this.pathname, port: this.port, protocol: this.protocol, search: this.search, }, inspectOptions) }`; }, }, }); } } ObjectDefineProperties(Location.prototype, { [SymbolToStringTag]: { value: "Location", configurable: true, }, }); const workerLocationUrls = new SafeWeakMap(); class WorkerLocation { constructor(href = null, key = null) { if (key != locationConstructorKey) { throw new TypeError("Illegal constructor."); } const url = new URL(href); url.username = ""; url.password = ""; WeakMapPrototypeSet(workerLocationUrls, this, url); } } ObjectDefineProperties(WorkerLocation.prototype, { hash: { get() { const url = WeakMapPrototypeGet(workerLocationUrls, this); if (url == null) { throw new TypeError("Illegal invocation."); } return url.hash; }, configurable: true, enumerable: true, }, host: { get() { const url = WeakMapPrototypeGet(workerLocationUrls, this); if (url == null) { throw new TypeError("Illegal invocation."); } return url.host; }, configurable: true, enumerable: true, }, hostname: { get() { const url = WeakMapPrototypeGet(workerLocationUrls, this); if (url == null) { throw new TypeError("Illegal invocation."); } return url.hostname; }, configurable: true, enumerable: true, }, href: { get() { const url = WeakMapPrototypeGet(workerLocationUrls, this); if (url == null) { throw new TypeError("Illegal invocation."); } return url.href; }, configurable: true, enumerable: true, }, origin: { get() { const url = WeakMapPrototypeGet(workerLocationUrls, this); if (url == null) { throw new TypeError("Illegal invocation."); } return url.origin; }, configurable: true, enumerable: true, }, pathname: { get() { const url = WeakMapPrototypeGet(workerLocationUrls, this); if (url == null) { throw new TypeError("Illegal invocation."); } return url.pathname; }, configurable: true, enumerable: true, }, port: { get() { const url = WeakMapPrototypeGet(workerLocationUrls, this); if (url == null) { throw new TypeError("Illegal invocation."); } return url.port; }, configurable: true, enumerable: true, }, protocol: { get() { const url = WeakMapPrototypeGet(workerLocationUrls, this); if (url == null) { throw new TypeError("Illegal invocation."); } return url.protocol; }, configurable: true, enumerable: true, }, search: { get() { const url = WeakMapPrototypeGet(workerLocationUrls, this); if (url == null) { throw new TypeError("Illegal invocation."); } return url.search; }, configurable: true, enumerable: true, }, toString: { value: function toString() { const url = WeakMapPrototypeGet(workerLocationUrls, this); if (url == null) { throw new TypeError("Illegal invocation."); } return url.href; }, configurable: true, enumerable: true, writable: true, }, [SymbolToStringTag]: { value: "WorkerLocation", configurable: true, }, [SymbolFor("Deno.privateCustomInspect")]: { value: function (inspect, inspectOptions) { return `${this.constructor.name} ${ inspect({ hash: this.hash, host: this.host, hostname: this.hostname, href: this.href, origin: this.origin, pathname: this.pathname, port: this.port, protocol: this.protocol, search: this.search, }, inspectOptions) }`; }, }, }); let location = undefined; let workerLocation = undefined; function setLocationHref(href) { location = new Location(href, locationConstructorKey); workerLocation = new WorkerLocation(href, locationConstructorKey); } function getLocationHref() { return location?.href; } const locationConstructorDescriptor = { value: Location, configurable: true, writable: true, }; const workerLocationConstructorDescriptor = { value: WorkerLocation, configurable: true, writable: true, }; const locationDescriptor = { get() { return location; }, set() { throw new DOMException(`Cannot set "location".`, "NotSupportedError"); }, enumerable: true, }; const workerLocationDescriptor = { get() { if (workerLocation == null) { throw new Error( `Assertion: "globalThis.location" must be defined in a worker.`, ); } return workerLocation; }, configurable: true, enumerable: true, }; export { getLocationHref, locationConstructorDescriptor, locationDescriptor, setLocationHref, workerLocationConstructorDescriptor, workerLocationDescriptor, }; QdT ext:deno_web/12_location.jsa bD`M`, TE`GLaCE0L`  T  I`""Sb1   Br= bB"k????????????Ib&`L` bS]`&]`uB]`]PL`` L`` L`` L`` L`§` L`§B` L`B]L`  Dllc DB B cjm Dc` a?B a?la?a?a?a?§a?a?Ba?Fb@' a T I`""Fb@( ea  $ Brxb  `T ``/ `/ `?  `  aRFD] ` aj] T I`pD\u @ @ @ @ @ @@@@@@@@@@@@@@@ @!!@"& @BFFb   bBG  `T ``/ `/ `?  `  a"D] ` aj] T  I` FFb  `b CBCCbCC"C"CCQC1 C(bCGG T I`hb (bCGG T I`eb B(bCGG T I`f!b (bCGG T I`gb b(bCGG T I`fb (bCGG T I`i$b! "(bCGG T I`j!b" "(bCGG T I`k&b# (bCGG T I`n'b$ Q0bCGGG T  I`=FFb% 1  bGbC T y`  Qa.value` !b @& (bCGG(bCGG(bCCG T  I`##FFb)  T I`#E$b* (bCGG T I`$:%b+   F`D-Xh %%%%%%% % % % % %ei h  0-%-%--- %- - %- %- %b% e+ %  -~) t~)7c i% e+ %  -~ ~!)3" 3$~&)3' 3)~+)3, 3 .~!0)"31 3#3~$5)%36 3&8~':)(3; 3)=~*?)+3@ 3,B~-D). 3E 3/G~0I)1 3J 32L~3N)4 35O 36Q t~7S)7T8bVt~9X): 35Y 7[c]% %~;_) 35` 1~ 3f?3@h 1~Aj)B3k 1 0jmPPP0'@ L`2& 00 L`2&0@& L& 00bA G D5GEGQG]GiGuGGGGGGGFFGGGD`RD]DH MQI7(// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @ts-check /// /// /// /// import { core, primordials } from "ext:core/mod.js"; import { op_message_port_create_entangled, op_message_port_post_message, op_message_port_recv_message, } from "ext:core/ops"; const { ArrayBufferPrototypeGetByteLength, ArrayPrototypeFilter, ArrayPrototypeIncludes, ArrayPrototypePush, ObjectPrototypeIsPrototypeOf, Symbol, SymbolFor, SymbolIterator, TypeError, } = primordials; const { InterruptedPrototype, isArrayBuffer, } = core; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; import { defineEventHandler, EventTarget, MessageEvent, setEventTargetData, setIsTrusted, } from "ext:deno_web/02_event.js"; import { isDetachedBuffer } from "ext:deno_web/06_streams.js"; import { DOMException } from "ext:deno_web/01_dom_exception.js"; class MessageChannel { /** @type {MessagePort} */ #port1; /** @type {MessagePort} */ #port2; constructor() { this[webidl.brand] = webidl.brand; const { 0: port1Id, 1: port2Id } = opCreateEntangledMessagePort(); const port1 = createMessagePort(port1Id); const port2 = createMessagePort(port2Id); this.#port1 = port1; this.#port2 = port2; } get port1() { webidl.assertBranded(this, MessageChannelPrototype); return this.#port1; } get port2() { webidl.assertBranded(this, MessageChannelPrototype); return this.#port2; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(MessageChannelPrototype, this), keys: [ "port1", "port2", ], }), inspectOptions, ); } } webidl.configureInterface(MessageChannel); const MessageChannelPrototype = MessageChannel.prototype; const _id = Symbol("id"); const _enabled = Symbol("enabled"); /** * @param {number} id * @returns {MessagePort} */ function createMessagePort(id) { const port = webidl.createBranded(MessagePort); port[core.hostObjectBrand] = core.hostObjectBrand; setEventTargetData(port); port[_id] = id; return port; } class MessagePort extends EventTarget { /** @type {number | null} */ [_id] = null; /** @type {boolean} */ [_enabled] = false; constructor() { super(); webidl.illegalConstructor(); } /** * @param {any} message * @param {object[] | StructuredSerializeOptions} transferOrOptions */ postMessage(message, transferOrOptions = {}) { webidl.assertBranded(this, MessagePortPrototype); const prefix = "Failed to execute 'postMessage' on 'MessagePort'"; webidl.requiredArguments(arguments.length, 1, prefix); message = webidl.converters.any(message); let options; if ( webidl.type(transferOrOptions) === "Object" && transferOrOptions !== undefined && transferOrOptions[SymbolIterator] !== undefined ) { const transfer = webidl.converters["sequence"]( transferOrOptions, prefix, "Argument 2", ); options = { transfer }; } else { options = webidl.converters.StructuredSerializeOptions( transferOrOptions, prefix, "Argument 2", ); } const { transfer } = options; if (ArrayPrototypeIncludes(transfer, this)) { throw new DOMException("Can not transfer self", "DataCloneError"); } const data = serializeJsMessageData(message, transfer); if (this[_id] === null) return; op_message_port_post_message(this[_id], data); } start() { webidl.assertBranded(this, MessagePortPrototype); if (this[_enabled]) return; (async () => { this[_enabled] = true; while (true) { if (this[_id] === null) break; let data; try { data = await op_message_port_recv_message( this[_id], ); } catch (err) { if (ObjectPrototypeIsPrototypeOf(InterruptedPrototype, err)) break; throw err; } if (data === null) break; let message, transferables; try { const v = deserializeJsMessageData(data); message = v[0]; transferables = v[1]; } catch (err) { const event = new MessageEvent("messageerror", { data: err }); setIsTrusted(event, true); this.dispatchEvent(event); return; } const event = new MessageEvent("message", { data: message, ports: ArrayPrototypeFilter( transferables, (t) => ObjectPrototypeIsPrototypeOf(MessagePortPrototype, t), ), }); setIsTrusted(event, true); this.dispatchEvent(event); } this[_enabled] = false; })(); } close() { webidl.assertBranded(this, MessagePortPrototype); if (this[_id] !== null) { core.close(this[_id]); this[_id] = null; } } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(MessagePortPrototype, this), keys: [ "onmessage", "onmessageerror", ], }), inspectOptions, ); } } defineEventHandler(MessagePort.prototype, "message", function (self) { self.start(); }); defineEventHandler(MessagePort.prototype, "messageerror"); webidl.configureInterface(MessagePort); const MessagePortPrototype = MessagePort.prototype; /** * @returns {[number, number]} */ function opCreateEntangledMessagePort() { return op_message_port_create_entangled(); } /** * @param {messagePort.MessageData} messageData * @returns {[any, object[]]} */ function deserializeJsMessageData(messageData) { /** @type {object[]} */ const transferables = []; const arrayBufferIdsInTransferables = []; const transferredArrayBuffers = []; let options; if (messageData.transferables.length > 0) { const hostObjects = []; for (let i = 0; i < messageData.transferables.length; ++i) { const transferable = messageData.transferables[i]; switch (transferable.kind) { case "messagePort": { const port = createMessagePort(transferable.data); ArrayPrototypePush(transferables, port); ArrayPrototypePush(hostObjects, port); break; } case "arrayBuffer": { ArrayPrototypePush(transferredArrayBuffers, transferable.data); const index = ArrayPrototypePush(transferables, null); ArrayPrototypePush(arrayBufferIdsInTransferables, index); break; } default: throw new TypeError("Unreachable"); } } options = { hostObjects, transferredArrayBuffers, }; } const data = core.deserialize(messageData.data, options); for (let i = 0; i < arrayBufferIdsInTransferables.length; ++i) { const id = arrayBufferIdsInTransferables[i]; transferables[id] = transferredArrayBuffers[i]; } return [data, transferables]; } /** * @param {any} data * @param {object[]} transferables * @returns {messagePort.MessageData} */ function serializeJsMessageData(data, transferables) { let options; const transferredArrayBuffers = []; if (transferables.length > 0) { const hostObjects = []; for (let i = 0, j = 0; i < transferables.length; i++) { const t = transferables[i]; if (isArrayBuffer(t)) { if ( ArrayBufferPrototypeGetByteLength(t) === 0 && isDetachedBuffer(t) ) { throw new DOMException( `ArrayBuffer at index ${j} is already detached`, "DataCloneError", ); } j++; ArrayPrototypePush(transferredArrayBuffers, t); } else if (ObjectPrototypeIsPrototypeOf(MessagePortPrototype, t)) { ArrayPrototypePush(hostObjects, t); } } options = { hostObjects, transferredArrayBuffers, }; } const serializedData = core.serialize(data, options, (err) => { throw new DOMException(err, "DataCloneError"); }); /** @type {messagePort.Transferable[]} */ const serializedTransferables = []; let arrayBufferI = 0; for (let i = 0; i < transferables.length; ++i) { const transferable = transferables[i]; if (ObjectPrototypeIsPrototypeOf(MessagePortPrototype, transferable)) { webidl.assertBranded(transferable, MessagePortPrototype); const id = transferable[_id]; if (id === null) { throw new DOMException( "Can not transfer disentangled message port", "DataCloneError", ); } transferable[_id] = null; ArrayPrototypePush(serializedTransferables, { kind: "messagePort", data: id, }); } else if (isArrayBuffer(transferable)) { ArrayPrototypePush(serializedTransferables, { kind: "arrayBuffer", data: transferredArrayBuffers[arrayBufferI], }); arrayBufferI++; } else { throw new DOMException("Value not transferable", "DataCloneError"); } } return { data: serializedData, transferables: serializedTransferables, }; } webidl.converters.StructuredSerializeOptions = webidl .createDictionaryConverter( "StructuredSerializeOptions", [ { key: "transfer", converter: webidl.converters["sequence"], get defaultValue() { return []; }, }, ], ); function structuredClone(value, options) { const prefix = "Failed to execute 'structuredClone'"; webidl.requiredArguments(arguments.length, 1, prefix); options = webidl.converters.StructuredSerializeOptions( options, prefix, "Argument 2", ); const messageData = serializeJsMessageData(value, options.transfer); return deserializeJsMessageData(messageData)[0]; } export { deserializeJsMessageData, MessageChannel, MessagePort, MessagePortPrototype, serializeJsMessageData, structuredClone, }; Qd} %H f@PPP@ @@,P@0'0,HbA HHIIIHMIUI]IDeImIuIIHHHDIHD`RD]DH ]QYjrm// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @ts-check /// /// /// import { primordials } from "ext:core/mod.js"; import { op_compression_finish, op_compression_new, op_compression_write, } from "ext:core/ops"; const { SymbolFor, ObjectPrototypeIsPrototypeOf, TypedArrayPrototypeGetByteLength, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; import { TransformStream } from "ext:deno_web/06_streams.js"; webidl.converters.CompressionFormat = webidl.createEnumConverter( "CompressionFormat", [ "deflate", "deflate-raw", "gzip", ], ); class CompressionStream { #transform; constructor(format) { const prefix = "Failed to construct 'CompressionStream'"; webidl.requiredArguments(arguments.length, 1, prefix); format = webidl.converters.CompressionFormat(format, prefix, "Argument 1"); const rid = op_compression_new(format, false); this.#transform = new TransformStream({ transform(chunk, controller) { chunk = webidl.converters.BufferSource(chunk, prefix, "chunk"); const output = op_compression_write( rid, chunk, ); maybeEnqueue(controller, output); }, flush(controller) { const output = op_compression_finish(rid, true); maybeEnqueue(controller, output); }, cancel: (_reason) => { op_compression_finish(rid, false); }, }); this[webidl.brand] = webidl.brand; } get readable() { webidl.assertBranded(this, CompressionStreamPrototype); return this.#transform.readable; } get writable() { webidl.assertBranded(this, CompressionStreamPrototype); return this.#transform.writable; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf( CompressionStreamPrototype, this, ), keys: [ "readable", "writable", ], }), inspectOptions, ); } } webidl.configureInterface(CompressionStream); const CompressionStreamPrototype = CompressionStream.prototype; class DecompressionStream { #transform; constructor(format) { const prefix = "Failed to construct 'DecompressionStream'"; webidl.requiredArguments(arguments.length, 1, prefix); format = webidl.converters.CompressionFormat(format, prefix, "Argument 1"); const rid = op_compression_new(format, true); this.#transform = new TransformStream({ transform(chunk, controller) { chunk = webidl.converters.BufferSource(chunk, prefix, "chunk"); const output = op_compression_write( rid, chunk, ); maybeEnqueue(controller, output); }, flush(controller) { const output = op_compression_finish(rid, true); maybeEnqueue(controller, output); }, cancel: (_reason) => { op_compression_finish(rid, false); }, }); this[webidl.brand] = webidl.brand; } get readable() { webidl.assertBranded(this, DecompressionStreamPrototype); return this.#transform.readable; } get writable() { webidl.assertBranded(this, DecompressionStreamPrototype); return this.#transform.writable; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf( DecompressionStreamPrototype, this, ), keys: [ "readable", "writable", ], }), inspectOptions, ); } } function maybeEnqueue(controller, output) { if (output && TypedArrayPrototypeGetByteLength(output) > 0) { controller.enqueue(output); } } webidl.configureInterface(DecompressionStream); const DecompressionStreamPrototype = DecompressionStream.prototype; export { CompressionStream, DecompressionStream }; Qdext:deno_web/14_compression.jsa bD`PM` T`WLa = T  I`Sb1!e??????Ib`L` bS]`B]`mb]`"]`K"t]`] L`b` L`bB` L`B L`  DDc L` DTTcv Dc)C D  c!6 D  c:L D  cPd Dc`a? a? a? a?a?Ta?ba?Ba?Ib@ Lba Br!b^B  `M`"$Sb @"mb?@ I  `T ``/ `/ `?  `  a@ D]f D aD" } `F`  `F` DHcD La"m T I`vc @ @bAJIb Ճ  T  I`&Qb get readableb   T I`6Qb get writableb   T I` `b(  T(` ]  J` Ka  -c5(Sbqqb`DaX  a b  $Sb @"mb? jI  `T ``/ `/ `?  `  a jD]f D aD" } `F`  `F` DHcD La T I` c @@BJIb Ճ  T  I` t Qb get readableb   T I` Qb get writableb   T I`h`b(  T(` ]  J` KaM  .c5(SbqqB`Da j a b  I`Dhh %%%%%ei e% h  0--%-%- -  { %_ 2 e%bte+2 1-0^0-%e%bt e+ 2 1-0^0-% Ic! P0 ` IbA eJDqJ}JJJJDJJJJID`RD]DH yQuB|<// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { primordials } from "ext:core/mod.js"; const { ArrayPrototypeFilter, ArrayPrototypeFind, ArrayPrototypePush, ArrayPrototypeReverse, ArrayPrototypeSlice, ObjectKeys, ObjectPrototypeIsPrototypeOf, ReflectHas, Symbol, SymbolFor, TypeError, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { structuredClone } from "ext:deno_web/02_structured_clone.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; import { EventTarget } from "ext:deno_web/02_event.js"; import { opNow } from "ext:deno_web/02_timers.js"; import { DOMException } from "ext:deno_web/01_dom_exception.js"; const illegalConstructorKey = Symbol("illegalConstructorKey"); let performanceEntries = []; let timeOrigin; webidl.converters["PerformanceMarkOptions"] = webidl .createDictionaryConverter( "PerformanceMarkOptions", [ { key: "detail", converter: webidl.converters.any, }, { key: "startTime", converter: webidl.converters.DOMHighResTimeStamp, }, ], ); webidl.converters["DOMString or DOMHighResTimeStamp"] = ( V, prefix, context, opts, ) => { if (webidl.type(V) === "Number" && V !== null) { return webidl.converters.DOMHighResTimeStamp(V, prefix, context, opts); } return webidl.converters.DOMString(V, prefix, context, opts); }; webidl.converters["PerformanceMeasureOptions"] = webidl .createDictionaryConverter( "PerformanceMeasureOptions", [ { key: "detail", converter: webidl.converters.any, }, { key: "start", converter: webidl.converters["DOMString or DOMHighResTimeStamp"], }, { key: "duration", converter: webidl.converters.DOMHighResTimeStamp, }, { key: "end", converter: webidl.converters["DOMString or DOMHighResTimeStamp"], }, ], ); webidl.converters["DOMString or PerformanceMeasureOptions"] = ( V, prefix, context, opts, ) => { if (webidl.type(V) === "Object" && V !== null) { return webidl.converters["PerformanceMeasureOptions"]( V, prefix, context, opts, ); } return webidl.converters.DOMString(V, prefix, context, opts); }; function setTimeOrigin(origin) { timeOrigin = origin; } function findMostRecent( name, type, ) { return ArrayPrototypeFind( ArrayPrototypeReverse(ArrayPrototypeSlice(performanceEntries)), (entry) => entry.name === name && entry.entryType === type, ); } function convertMarkToTimestamp(mark) { if (typeof mark === "string") { const entry = findMostRecent(mark, "mark"); if (!entry) { throw new DOMException( `Cannot find mark: "${mark}".`, "SyntaxError", ); } return entry.startTime; } if (mark < 0) { throw new TypeError("Mark cannot be negative."); } return mark; } function filterByNameType( name, type, ) { return ArrayPrototypeFilter( performanceEntries, (entry) => (name ? entry.name === name : true) && (type ? entry.entryType === type : true), ); } const now = opNow; const _name = Symbol("[[name]]"); const _entryType = Symbol("[[entryType]]"); const _startTime = Symbol("[[startTime]]"); const _duration = Symbol("[[duration]]"); class PerformanceEntry { [_name] = ""; [_entryType] = ""; [_startTime] = 0; [_duration] = 0; get name() { webidl.assertBranded(this, PerformanceEntryPrototype); return this[_name]; } get entryType() { webidl.assertBranded(this, PerformanceEntryPrototype); return this[_entryType]; } get startTime() { webidl.assertBranded(this, PerformanceEntryPrototype); return this[_startTime]; } get duration() { webidl.assertBranded(this, PerformanceEntryPrototype); return this[_duration]; } constructor( name = null, entryType = null, startTime = null, duration = null, key = undefined, ) { if (key !== illegalConstructorKey) { webidl.illegalConstructor(); } this[webidl.brand] = webidl.brand; this[_name] = name; this[_entryType] = entryType; this[_startTime] = startTime; this[_duration] = duration; } toJSON() { webidl.assertBranded(this, PerformanceEntryPrototype); return { name: this[_name], entryType: this[_entryType], startTime: this[_startTime], duration: this[_duration], }; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf( PerformanceEntryPrototype, this, ), keys: [ "name", "entryType", "startTime", "duration", ], }), inspectOptions, ); } } webidl.configureInterface(PerformanceEntry); const PerformanceEntryPrototype = PerformanceEntry.prototype; const _detail = Symbol("[[detail]]"); class PerformanceMark extends PerformanceEntry { [_detail] = null; get detail() { webidl.assertBranded(this, PerformanceMarkPrototype); return this[_detail]; } get entryType() { webidl.assertBranded(this, PerformanceMarkPrototype); return "mark"; } constructor( name, options = {}, ) { const prefix = "Failed to construct 'PerformanceMark'"; webidl.requiredArguments(arguments.length, 1, prefix); name = webidl.converters.DOMString(name, prefix, "Argument 1"); options = webidl.converters.PerformanceMarkOptions( options, prefix, "Argument 2", ); const { detail = null, startTime = now() } = options; super(name, "mark", startTime, 0, illegalConstructorKey); this[webidl.brand] = webidl.brand; if (startTime < 0) { throw new TypeError("startTime cannot be negative"); } this[_detail] = structuredClone(detail); } toJSON() { webidl.assertBranded(this, PerformanceMarkPrototype); return { name: this.name, entryType: this.entryType, startTime: this.startTime, duration: this.duration, detail: this.detail, }; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(PerformanceMarkPrototype, this), keys: [ "name", "entryType", "startTime", "duration", "detail", ], }), inspectOptions, ); } } webidl.configureInterface(PerformanceMark); const PerformanceMarkPrototype = PerformanceMark.prototype; class PerformanceMeasure extends PerformanceEntry { [_detail] = null; get detail() { webidl.assertBranded(this, PerformanceMeasurePrototype); return this[_detail]; } get entryType() { webidl.assertBranded(this, PerformanceMeasurePrototype); return "measure"; } constructor( name = null, startTime = null, duration = null, detail = null, key = undefined, ) { if (key !== illegalConstructorKey) { webidl.illegalConstructor(); } super(name, "measure", startTime, duration, key); this[webidl.brand] = webidl.brand; this[_detail] = structuredClone(detail); } toJSON() { webidl.assertBranded(this, PerformanceMeasurePrototype); return { name: this.name, entryType: this.entryType, startTime: this.startTime, duration: this.duration, detail: this.detail, }; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf( PerformanceMeasurePrototype, this, ), keys: [ "name", "entryType", "startTime", "duration", "detail", ], }), inspectOptions, ); } } webidl.configureInterface(PerformanceMeasure); const PerformanceMeasurePrototype = PerformanceMeasure.prototype; class Performance extends EventTarget { constructor(key = null) { if (key != illegalConstructorKey) { webidl.illegalConstructor(); } super(); this[webidl.brand] = webidl.brand; } get timeOrigin() { webidl.assertBranded(this, PerformancePrototype); return timeOrigin; } clearMarks(markName = undefined) { webidl.assertBranded(this, PerformancePrototype); if (markName !== undefined) { markName = webidl.converters.DOMString( markName, "Failed to execute 'clearMarks' on 'Performance'", "Argument 1", ); performanceEntries = ArrayPrototypeFilter( performanceEntries, (entry) => !(entry.name === markName && entry.entryType === "mark"), ); } else { performanceEntries = ArrayPrototypeFilter( performanceEntries, (entry) => entry.entryType !== "mark", ); } } clearMeasures(measureName = undefined) { webidl.assertBranded(this, PerformancePrototype); if (measureName !== undefined) { measureName = webidl.converters.DOMString( measureName, "Failed to execute 'clearMeasures' on 'Performance'", "Argument 1", ); performanceEntries = ArrayPrototypeFilter( performanceEntries, (entry) => !(entry.name === measureName && entry.entryType === "measure"), ); } else { performanceEntries = ArrayPrototypeFilter( performanceEntries, (entry) => entry.entryType !== "measure", ); } } getEntries() { webidl.assertBranded(this, PerformancePrototype); return filterByNameType(); } getEntriesByName( name, type = undefined, ) { webidl.assertBranded(this, PerformancePrototype); const prefix = "Failed to execute 'getEntriesByName' on 'Performance'"; webidl.requiredArguments(arguments.length, 1, prefix); name = webidl.converters.DOMString(name, prefix, "Argument 1"); if (type !== undefined) { type = webidl.converters.DOMString(type, prefix, "Argument 2"); } return filterByNameType(name, type); } getEntriesByType(type) { webidl.assertBranded(this, PerformancePrototype); const prefix = "Failed to execute 'getEntriesByName' on 'Performance'"; webidl.requiredArguments(arguments.length, 1, prefix); type = webidl.converters.DOMString(type, prefix, "Argument 1"); return filterByNameType(undefined, type); } mark( markName, markOptions = {}, ) { webidl.assertBranded(this, PerformancePrototype); const prefix = "Failed to execute 'mark' on 'Performance'"; webidl.requiredArguments(arguments.length, 1, prefix); markName = webidl.converters.DOMString(markName, prefix, "Argument 1"); markOptions = webidl.converters.PerformanceMarkOptions( markOptions, prefix, "Argument 2", ); // 3.1.1.1 If the global object is a Window object and markName uses the // same name as a read only attribute in the PerformanceTiming interface, // throw a SyntaxError. - not implemented const entry = new PerformanceMark(markName, markOptions); // 3.1.1.7 Queue entry - not implemented ArrayPrototypePush(performanceEntries, entry); return entry; } measure( measureName, startOrMeasureOptions = {}, endMark = undefined, ) { webidl.assertBranded(this, PerformancePrototype); const prefix = "Failed to execute 'measure' on 'Performance'"; webidl.requiredArguments(arguments.length, 1, prefix); measureName = webidl.converters.DOMString( measureName, prefix, "Argument 1", ); startOrMeasureOptions = webidl.converters ["DOMString or PerformanceMeasureOptions"]( startOrMeasureOptions, prefix, "Argument 2", ); if (endMark !== undefined) { endMark = webidl.converters.DOMString(endMark, prefix, "Argument 3"); } if ( startOrMeasureOptions && typeof startOrMeasureOptions === "object" && ObjectKeys(startOrMeasureOptions).length > 0 ) { if (endMark) { throw new TypeError("Options cannot be passed with endMark."); } if ( !ReflectHas(startOrMeasureOptions, "start") && !ReflectHas(startOrMeasureOptions, "end") ) { throw new TypeError( "A start or end mark must be supplied in options.", ); } if ( ReflectHas(startOrMeasureOptions, "start") && ReflectHas(startOrMeasureOptions, "duration") && ReflectHas(startOrMeasureOptions, "end") ) { throw new TypeError( "Cannot specify start, end, and duration together in options.", ); } } let endTime; if (endMark) { endTime = convertMarkToTimestamp(endMark); } else if ( typeof startOrMeasureOptions === "object" && ReflectHas(startOrMeasureOptions, "end") ) { endTime = convertMarkToTimestamp(startOrMeasureOptions.end); } else if ( typeof startOrMeasureOptions === "object" && ReflectHas(startOrMeasureOptions, "start") && ReflectHas(startOrMeasureOptions, "duration") ) { const start = convertMarkToTimestamp(startOrMeasureOptions.start); const duration = convertMarkToTimestamp(startOrMeasureOptions.duration); endTime = start + duration; } else { endTime = now(); } let startTime; if ( typeof startOrMeasureOptions === "object" && ReflectHas(startOrMeasureOptions, "start") ) { startTime = convertMarkToTimestamp(startOrMeasureOptions.start); } else if ( typeof startOrMeasureOptions === "object" && ReflectHas(startOrMeasureOptions, "end") && ReflectHas(startOrMeasureOptions, "duration") ) { const end = convertMarkToTimestamp(startOrMeasureOptions.end); const duration = convertMarkToTimestamp(startOrMeasureOptions.duration); startTime = end - duration; } else if (typeof startOrMeasureOptions === "string") { startTime = convertMarkToTimestamp(startOrMeasureOptions); } else { startTime = 0; } const entry = new PerformanceMeasure( measureName, startTime, endTime - startTime, typeof startOrMeasureOptions === "object" ? startOrMeasureOptions.detail ?? null : null, illegalConstructorKey, ); ArrayPrototypePush(performanceEntries, entry); return entry; } now() { webidl.assertBranded(this, PerformancePrototype); return now(); } toJSON() { webidl.assertBranded(this, PerformancePrototype); return { timeOrigin: this.timeOrigin, }; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(PerformancePrototype, this), keys: ["timeOrigin"], }), inspectOptions, ); } } webidl.configureInterface(Performance); const PerformancePrototype = Performance.prototype; webidl.converters["Performance"] = webidl.createInterfaceConverter( "Performance", PerformancePrototype, ); const performance = new Performance(illegalConstructorKey); export { Performance, performance, PerformanceEntry, PerformanceMark, PerformanceMeasure, setTimeOrigin, }; QdnJ5vext:deno_web/15_performance.jsa bD`M`- TM`QuLa[ T  I`~ ; BSb1f![A_ab !K= BB_O"bBy??????????????????????????Ib<`$L` bS]`hb]`]`"]`]`Q]`B]`]PL`` L`` L`B` L`Bb` L`b` L`` L` L`  DDcu{ L` Dllc Dc>I Dc  Dcv{ DcU` D""c` a?"a?a?a?a?la?a?a?Ba?ba?a?a?Kb@  T I`\ =Kb@  T I` b@ (L` T I`B e b@ f%a f![A_ab !K Brb^B¿  `Lb ba ‰C‰ ba ‰CBw T  y`2`,`+b^`!b`IbK b" `Ld ba ‰C ba ‰C ba b‰C ba B‰C T `8`2`1b^`'`) IbK B"""3@ 66 ~$B) --C3E 66_G2I -‚%2&K0'%(bM%)bO%*bQ%+bS%,%%%%.-t%t%t%t%/012 3 4bUt5 e+6 27W 1 -8Y0^[0-9]%:b_%;%0= <t%>?@4batAe+ B27c 1 -8Y0^e0-9g%C%0EDt%FGH4bitIe+ J27k 1 -8Y0^m0-9o%0LMKNOPQRST U!V"W#4bqtX$e+ 1 -8Y0^s0-9u% - -YwZ_y2Z{0 i}1 4k&PPP@&`,s``  bA KLK5KDKKDMLYLeLqLEL}LLLLLLLLLAMMM9MYMaMiMMMMDMDMMMMMMN ND`RD]DH E QA 'v// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { primordials } from "ext:core/mod.js"; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { DOMException } from "ext:deno_web/01_dom_exception.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; const { ObjectPrototypeIsPrototypeOf, Symbol, SymbolFor, TypedArrayPrototypeGetLength, TypedArrayPrototypeGetSymbolToStringTag, Uint8ClampedArray, } = primordials; webidl.converters["PredefinedColorSpace"] = webidl.createEnumConverter( "PredefinedColorSpace", [ "srgb", "display-p3", ], ); webidl.converters["ImageDataSettings"] = webidl.createDictionaryConverter( "ImageDataSettings", [ { key: "colorSpace", converter: webidl.converters["PredefinedColorSpace"] }, ], ); const _data = Symbol("[[data]]"); const _width = Symbol("[[width]]"); const _height = Symbol("[[height]]"); class ImageData { /** @type {number} */ [_width]; /** @type {height} */ [_height]; /** @type {Uint8Array} */ [_data]; /** @type {'srgb' | 'display-p3'} */ #colorSpace; constructor(arg0, arg1, arg2 = undefined, arg3 = undefined) { webidl.requiredArguments( arguments.length, 2, 'Failed to construct "ImageData"', ); this[webidl.brand] = webidl.brand; let sourceWidth; let sourceHeight; let data; let settings; const prefix = "Failed to construct 'ImageData'"; // Overload: new ImageData(data, sw [, sh [, settings ] ]) if ( arguments.length > 3 || TypedArrayPrototypeGetSymbolToStringTag(arg0) === "Uint8ClampedArray" ) { data = webidl.converters.Uint8ClampedArray(arg0, prefix, "Argument 1"); sourceWidth = webidl.converters["unsigned long"]( arg1, prefix, "Argument 2", ); const dataLength = TypedArrayPrototypeGetLength(data); if (webidl.type(arg2) !== "Undefined") { sourceHeight = webidl.converters["unsigned long"]( arg2, prefix, "Argument 3", ); } settings = webidl.converters["ImageDataSettings"]( arg3, prefix, "Argument 4", ); if (dataLength === 0) { throw new DOMException( "Failed to construct 'ImageData': The input data has zero elements.", "InvalidStateError", ); } if (dataLength % 4 !== 0) { throw new DOMException( "Failed to construct 'ImageData': The input data length is not a multiple of 4.", "InvalidStateError", ); } if (sourceWidth < 1) { throw new DOMException( "Failed to construct 'ImageData': The source width is zero or not a number.", "IndexSizeError", ); } if (webidl.type(sourceHeight) !== "Undefined" && sourceHeight < 1) { throw new DOMException( "Failed to construct 'ImageData': The source height is zero or not a number.", "IndexSizeError", ); } if (dataLength / 4 % sourceWidth !== 0) { throw new DOMException( "Failed to construct 'ImageData': The input data length is not a multiple of (4 * width).", "IndexSizeError", ); } if ( webidl.type(sourceHeight) !== "Undefined" && (sourceWidth * sourceHeight * 4 !== dataLength) ) { throw new DOMException( "Failed to construct 'ImageData': The input data length is not equal to (4 * width * height).", "IndexSizeError", ); } if (webidl.type(sourceHeight) === "Undefined") { this[_height] = dataLength / 4 / sourceWidth; } else { this[_height] = sourceHeight; } this.#colorSpace = settings.colorSpace ?? "srgb"; this[_width] = sourceWidth; this[_data] = data; return; } // Overload: new ImageData(sw, sh [, settings]) sourceWidth = webidl.converters["unsigned long"]( arg0, prefix, "Argument 1", ); sourceHeight = webidl.converters["unsigned long"]( arg1, prefix, "Argument 2", ); settings = webidl.converters["ImageDataSettings"]( arg2, prefix, "Argument 3", ); if (sourceWidth < 1) { throw new DOMException( "Failed to construct 'ImageData': The source width is zero or not a number.", "IndexSizeError", ); } if (sourceHeight < 1) { throw new DOMException( "Failed to construct 'ImageData': The source height is zero or not a number.", "IndexSizeError", ); } this.#colorSpace = settings.colorSpace ?? "srgb"; this[_width] = sourceWidth; this[_height] = sourceHeight; this[_data] = new Uint8ClampedArray(sourceWidth * sourceHeight * 4); } get width() { webidl.assertBranded(this, ImageDataPrototype); return this[_width]; } get height() { webidl.assertBranded(this, ImageDataPrototype); return this[_height]; } get data() { webidl.assertBranded(this, ImageDataPrototype); return this[_data]; } get colorSpace() { webidl.assertBranded(this, ImageDataPrototype); return this.#colorSpace; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(ImageDataPrototype, this), keys: [ "data", "width", "height", "colorSpace", ], }), inspectOptions, ); } } const ImageDataPrototype = ImageData.prototype; export { _data, _height, _width, ImageData, ImageDataPrototype }; Qd^%6ext:deno_web/16_image_data.jsa bD`(M` T`xLa$7Lea ! BrbM b^B  `M`B ` La ba "‰C‰ /// /// /// import { primordials } from "ext:core/mod.js"; import { op_webgpu_surface_configure, op_webgpu_surface_create, op_webgpu_surface_get_current_texture, op_webgpu_surface_present, } from "ext:core/ops"; const { ObjectPrototypeIsPrototypeOf, Symbol, SymbolFor, TypeError, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; import { loadWebGPU } from "ext:deno_webgpu/00_init.js"; const _surfaceRid = Symbol("[[surfaceRid]]"); const _configuration = Symbol("[[configuration]]"); const _canvas = Symbol("[[canvas]]"); const _currentTexture = Symbol("[[currentTexture]]"); const _present = Symbol("[[present]]"); class GPUCanvasContext { /** @type {number} */ [_surfaceRid]; [_configuration]; [_canvas]; /** @type {GPUTexture | undefined} */ [_currentTexture]; get canvas() { webidl.assertBranded(this, GPUCanvasContextPrototype); return this[_canvas]; } constructor() { webidl.illegalConstructor(); } configure(configuration) { webidl.assertBranded(this, GPUCanvasContextPrototype); const prefix = "Failed to execute 'configure' on 'GPUCanvasContext'"; webidl.requiredArguments(arguments.length, 1, { prefix }); configuration = webidl.converters.GPUCanvasConfiguration(configuration, { prefix, context: "Argument 1", }); const { _device, assertDevice } = loadWebGPU(); this[_device] = configuration.device[_device]; this[_configuration] = configuration; const device = assertDevice(this, { prefix, context: "configuration.device", }); const { err } = op_webgpu_surface_configure({ surfaceRid: this[_surfaceRid], deviceRid: device.rid, format: configuration.format, viewFormats: configuration.viewFormats, usage: configuration.usage, width: configuration.width, height: configuration.height, alphaMode: configuration.alphaMode, }); device.pushError(err); } unconfigure() { const { _device } = loadWebGPU(); webidl.assertBranded(this, GPUCanvasContextPrototype); this[_configuration] = null; this[_device] = null; } getCurrentTexture() { webidl.assertBranded(this, GPUCanvasContextPrototype); const prefix = "Failed to execute 'getCurrentTexture' on 'GPUCanvasContext'"; if (this[_configuration] === null) { throw new DOMException("context is not configured.", "InvalidStateError"); } const { createGPUTexture, assertDevice } = loadWebGPU(); const device = assertDevice(this, { prefix, context: "this" }); if (this[_currentTexture]) { return this[_currentTexture]; } const { rid } = op_webgpu_surface_get_current_texture( device.rid, this[_surfaceRid], ); const texture = createGPUTexture( { size: { width: this[_configuration].width, height: this[_configuration].height, depthOrArrayLayers: 1, }, mipLevelCount: 1, sampleCount: 1, dimension: "2d", format: this[_configuration].format, usage: this[_configuration].usage, }, device, rid, ); device.trackResource(texture); this[_currentTexture] = texture; return texture; } // Required to present the texture; browser don't need this. [_present]() { const { assertDevice } = loadWebGPU(); webidl.assertBranded(this, GPUCanvasContextPrototype); const prefix = "Failed to execute 'present' on 'GPUCanvasContext'"; const device = assertDevice(this[_currentTexture], { prefix, context: "this", }); op_webgpu_surface_present(device.rid, this[_surfaceRid]); this[_currentTexture].destroy(); this[_currentTexture] = undefined; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(GPUCanvasContextPrototype, this), keys: [ "canvas", ], }), inspectOptions, ); } } const GPUCanvasContextPrototype = GPUCanvasContext.prototype; function createCanvasContext(options) { // lazy load webgpu if needed const canvasContext = webidl.createBranded(GPUCanvasContext); canvasContext[_surfaceRid] = options.surfaceRid; canvasContext[_canvas] = options.canvas; return canvasContext; } // External webgpu surfaces // TODO(@littledivy): This will extend `OffscreenCanvas` when we add it. class UnsafeWindowSurface { #ctx; #surfaceRid; constructor(system, win, display) { this.#surfaceRid = op_webgpu_surface_create(system, win, display); } getContext(context) { if (context !== "webgpu") { throw new TypeError("Only 'webgpu' context is supported."); } this.#ctx = createCanvasContext({ surfaceRid: this.#surfaceRid }); return this.#ctx; } present() { this.#ctx[_present](); } } export { GPUCanvasContext, UnsafeWindowSurface }; QdVuext:deno_webgpu/02_surface.jsa bD`@M` T`La$I T  I`Sb1 != ""B"Bi??????????Ib`L` bS]`=B]`b]`g"]`b]`] L`"` L`""` L`" L`  DDc[a$L` Dc D""c D ! !c[v D % %cz D ) )c D - -c Dc*5` a? !a? %a? )a? -a?a?"a?"a?"a?mOb@  Lba ! Br /// /// /// /// /// /// import { primordials } from "ext:core/mod.js"; const { ArrayIsArray, ArrayPrototypePush, ArrayPrototypeSort, ArrayPrototypeJoin, ArrayPrototypeSplice, ObjectFromEntries, ObjectHasOwn, ObjectPrototypeIsPrototypeOf, RegExpPrototypeTest, Symbol, SymbolFor, SymbolIterator, StringPrototypeReplaceAll, StringPrototypeCharCodeAt, TypeError, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { byteLowerCase, collectHttpQuotedString, collectSequenceOfCodepoints, HTTP_TAB_OR_SPACE_PREFIX_RE, HTTP_TAB_OR_SPACE_SUFFIX_RE, HTTP_TOKEN_CODE_POINT_RE, httpTrim, } from "ext:deno_web/00_infra.js"; const _headerList = Symbol("header list"); const _iterableHeaders = Symbol("iterable headers"); const _iterableHeadersCache = Symbol("iterable headers cache"); const _guard = Symbol("guard"); const _brand = webidl.brand; /** * @typedef Header * @type {[string, string]} */ /** * @typedef HeaderList * @type {Header[]} */ /** * @param {string} potentialValue * @returns {string} */ function normalizeHeaderValue(potentialValue) { return httpTrim(potentialValue); } /** * @param {Headers} headers * @param {HeadersInit} object */ function fillHeaders(headers, object) { if (ArrayIsArray(object)) { for (let i = 0; i < object.length; ++i) { const header = object[i]; if (header.length !== 2) { throw new TypeError( `Invalid header. Length must be 2, but is ${header.length}`, ); } appendHeader(headers, header[0], header[1]); } } else { for (const key in object) { if (!ObjectHasOwn(object, key)) { continue; } appendHeader(headers, key, object[key]); } } } function checkForInvalidValueChars(value) { for (let i = 0; i < value.length; i++) { const c = StringPrototypeCharCodeAt(value, i); if (c === 0x0a || c === 0x0d || c === 0x00) { return false; } } return true; } let HEADER_NAME_CACHE = {}; let HEADER_CACHE_SIZE = 0; const HEADER_NAME_CACHE_SIZE_BOUNDARY = 4096; function checkHeaderNameForHttpTokenCodePoint(name) { const fromCache = HEADER_NAME_CACHE[name]; if (fromCache !== undefined) { return fromCache; } const valid = RegExpPrototypeTest(HTTP_TOKEN_CODE_POINT_RE, name); if (HEADER_CACHE_SIZE > HEADER_NAME_CACHE_SIZE_BOUNDARY) { HEADER_NAME_CACHE = {}; HEADER_CACHE_SIZE = 0; } HEADER_CACHE_SIZE++; HEADER_NAME_CACHE[name] = valid; return valid; } /** * https://fetch.spec.whatwg.org/#concept-headers-append * @param {Headers} headers * @param {string} name * @param {string} value */ function appendHeader(headers, name, value) { // 1. value = normalizeHeaderValue(value); // 2. if (!checkHeaderNameForHttpTokenCodePoint(name)) { throw new TypeError("Header name is not valid."); } if (!checkForInvalidValueChars(value)) { throw new TypeError("Header value is not valid."); } // 3. if (headers[_guard] == "immutable") { throw new TypeError("Headers are immutable."); } // 7. const list = headers[_headerList]; const lowercaseName = byteLowerCase(name); for (let i = 0; i < list.length; i++) { if (byteLowerCase(list[i][0]) === lowercaseName) { name = list[i][0]; break; } } ArrayPrototypePush(list, [name, value]); } /** * https://fetch.spec.whatwg.org/#concept-header-list-get * @param {HeaderList} list * @param {string} name */ function getHeader(list, name) { const lowercaseName = byteLowerCase(name); const entries = []; for (let i = 0; i < list.length; i++) { if (byteLowerCase(list[i][0]) === lowercaseName) { ArrayPrototypePush(entries, list[i][1]); } } if (entries.length === 0) { return null; } else { return ArrayPrototypeJoin(entries, "\x2C\x20"); } } /** * https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split * @param {HeaderList} list * @param {string} name * @returns {string[] | null} */ function getDecodeSplitHeader(list, name) { const initialValue = getHeader(list, name); if (initialValue === null) return null; const input = initialValue; let position = 0; const values = []; let value = ""; while (position < initialValue.length) { // 7.1. collect up to " or , const res = collectSequenceOfCodepoints( initialValue, position, (c) => c !== "\u0022" && c !== "\u002C", ); value += res.result; position = res.position; if (position < initialValue.length) { if (input[position] === "\u0022") { const res = collectHttpQuotedString(input, position, false); value += res.result; position = res.position; if (position < initialValue.length) { continue; } } else { if (input[position] !== "\u002C") throw new TypeError("Unreachable"); position += 1; } } value = StringPrototypeReplaceAll(value, HTTP_TAB_OR_SPACE_PREFIX_RE, ""); value = StringPrototypeReplaceAll(value, HTTP_TAB_OR_SPACE_SUFFIX_RE, ""); ArrayPrototypePush(values, value); value = ""; } return values; } class Headers { /** @type {HeaderList} */ [_headerList] = []; /** @type {"immutable" | "request" | "request-no-cors" | "response" | "none"} */ [_guard]; get [_iterableHeaders]() { const list = this[_headerList]; if ( this[_guard] === "immutable" && this[_iterableHeadersCache] !== undefined ) { return this[_iterableHeadersCache]; } // The order of steps are not similar to the ones suggested by the // spec but produce the same result. const seenHeaders = {}; const entries = []; for (let i = 0; i < list.length; ++i) { const entry = list[i]; const name = byteLowerCase(entry[0]); const value = entry[1]; if (value === null) throw new TypeError("Unreachable"); // The following if statement is not spec compliant. // `set-cookie` is the only header that can not be concatenated, // so must be given to the user as multiple headers. // The else block of the if statement is spec compliant again. if (name === "set-cookie") { ArrayPrototypePush(entries, [name, value]); } else { // The following code has the same behaviour as getHeader() // at the end of loop. But it avoids looping through the entire // list to combine multiple values with same header name. It // instead gradually combines them as they are found. const seenHeaderIndex = seenHeaders[name]; if (seenHeaderIndex !== undefined) { const entryValue = entries[seenHeaderIndex][1]; entries[seenHeaderIndex][1] = entryValue.length > 0 ? entryValue + "\x2C\x20" + value : value; } else { seenHeaders[name] = entries.length; // store header index in entries array ArrayPrototypePush(entries, [name, value]); } } } ArrayPrototypeSort( entries, (a, b) => { const akey = a[0]; const bkey = b[0]; if (akey > bkey) return 1; if (akey < bkey) return -1; return 0; }, ); this[_iterableHeadersCache] = entries; return entries; } /** @param {HeadersInit} [init] */ constructor(init = undefined) { if (init === _brand) { this[_brand] = _brand; return; } const prefix = "Failed to construct 'Headers'"; if (init !== undefined) { init = webidl.converters["HeadersInit"](init, prefix, "Argument 1"); } this[_brand] = _brand; this[_guard] = "none"; if (init !== undefined) { fillHeaders(this, init); } } /** * @param {string} name * @param {string} value */ append(name, value) { webidl.assertBranded(this, HeadersPrototype); const prefix = "Failed to execute 'append' on 'Headers'"; webidl.requiredArguments(arguments.length, 2, prefix); name = webidl.converters["ByteString"](name, prefix, "Argument 1"); value = webidl.converters["ByteString"](value, prefix, "Argument 2"); appendHeader(this, name, value); } /** * @param {string} name */ delete(name) { webidl.assertBranded(this, HeadersPrototype); const prefix = "Failed to execute 'delete' on 'Headers'"; webidl.requiredArguments(arguments.length, 1, prefix); name = webidl.converters["ByteString"](name, prefix, "Argument 1"); if (!checkHeaderNameForHttpTokenCodePoint(name)) { throw new TypeError("Header name is not valid."); } if (this[_guard] == "immutable") { throw new TypeError("Headers are immutable."); } const list = this[_headerList]; const lowercaseName = byteLowerCase(name); for (let i = 0; i < list.length; i++) { if (byteLowerCase(list[i][0]) === lowercaseName) { ArrayPrototypeSplice(list, i, 1); i--; } } } /** * @param {string} name */ get(name) { webidl.assertBranded(this, HeadersPrototype); const prefix = "Failed to execute 'get' on 'Headers'"; webidl.requiredArguments(arguments.length, 1, prefix); name = webidl.converters["ByteString"](name, prefix, "Argument 1"); if (!checkHeaderNameForHttpTokenCodePoint(name)) { throw new TypeError("Header name is not valid."); } const list = this[_headerList]; return getHeader(list, name); } getSetCookie() { webidl.assertBranded(this, HeadersPrototype); const list = this[_headerList]; const entries = []; for (let i = 0; i < list.length; i++) { if (byteLowerCase(list[i][0]) === "set-cookie") { ArrayPrototypePush(entries, list[i][1]); } } return entries; } /** * @param {string} name */ has(name) { webidl.assertBranded(this, HeadersPrototype); const prefix = "Failed to execute 'has' on 'Headers'"; webidl.requiredArguments(arguments.length, 1, prefix); name = webidl.converters["ByteString"](name, prefix, "Argument 1"); if (!checkHeaderNameForHttpTokenCodePoint(name)) { throw new TypeError("Header name is not valid."); } const list = this[_headerList]; const lowercaseName = byteLowerCase(name); for (let i = 0; i < list.length; i++) { if (byteLowerCase(list[i][0]) === lowercaseName) { return true; } } return false; } /** * @param {string} name * @param {string} value */ set(name, value) { webidl.assertBranded(this, HeadersPrototype); const prefix = "Failed to execute 'set' on 'Headers'"; webidl.requiredArguments(arguments.length, 2, prefix); name = webidl.converters["ByteString"](name, prefix, "Argument 1"); value = webidl.converters["ByteString"](value, prefix, "Argument 2"); value = normalizeHeaderValue(value); // 2. if (!checkHeaderNameForHttpTokenCodePoint(name)) { throw new TypeError("Header name is not valid."); } if (!checkForInvalidValueChars(value)) { throw new TypeError("Header value is not valid."); } if (this[_guard] == "immutable") { throw new TypeError("Headers are immutable."); } const list = this[_headerList]; const lowercaseName = byteLowerCase(name); let added = false; for (let i = 0; i < list.length; i++) { if (byteLowerCase(list[i][0]) === lowercaseName) { if (!added) { list[i][1] = value; added = true; } else { ArrayPrototypeSplice(list, i, 1); i--; } } } if (!added) { ArrayPrototypePush(list, [name, value]); } } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { if (ObjectPrototypeIsPrototypeOf(HeadersPrototype, this)) { return `${this.constructor.name} ${ inspect(ObjectFromEntries(this), inspectOptions) }`; } else { return `${this.constructor.name} ${inspect({}, inspectOptions)}`; } } } webidl.mixinPairIterable("Headers", Headers, _iterableHeaders, 0, 1); webidl.configureInterface(Headers); const HeadersPrototype = Headers.prototype; webidl.converters["HeadersInit"] = (V, prefix, context, opts) => { // Union for (sequence> or record) if (webidl.type(V) === "Object" && V !== null) { if (V[SymbolIterator] !== undefined) { return webidl.converters["sequence>"]( V, prefix, context, opts, ); } return webidl.converters["record"]( V, prefix, context, opts, ); } throw webidl.makeException( TypeError, "The provided value is not of type '(sequence> or record)'", prefix, context, ); }; webidl.converters["Headers"] = webidl.createInterfaceConverter( "Headers", Headers.prototype, ); /** * @param {HeaderList} list * @param {"immutable" | "request" | "request-no-cors" | "response" | "none"} guard * @returns {Headers} */ function headersFromHeaderList(list, guard) { const headers = new Headers(_brand); headers[_headerList] = list; headers[_guard] = guard; return headers; } /** * @param {Headers} headers * @returns {HeaderList} */ function headerListFromHeaders(headers) { return headers[_headerList]; } /** * @param {Headers} headers * @returns {"immutable" | "request" | "request-no-cors" | "response" | "none"} */ function guardFromHeaders(headers) { return headers[_guard]; } /** * @param {Headers} headers * @returns {[string, string][]} */ function headersEntries(headers) { return headers[_iterableHeaders]; } export { fillHeaders, getDecodeSplitHeader, getHeader, guardFromHeaders, headerListFromHeaders, Headers, headersEntries, headersFromHeaderList, }; Qdext:deno_fetch/20_headers.jsa b D`lM` T1`La3 T  I` Sb1TAab!cb !B>aS= bH""bz???????????????????????????Ib7`L` bS]`b]`/n]`]hL`` L`` L`` L`"` L`"` L`b` L`b` L`` L` L`  DDc#)(L` DB2B2c Db3b3c DB-B-c DB;B;cZg D;;ck Db8b8c DDDc Dc`a?B;a?;a?b8a?B2a?b3a?B-a?Da?a?"a?a?a?a?ba?a?a?Pb@  T I`I "Pb"@  T I` Y b-@  T I` b@ `L` T I`c[b@ a T I`."b@ a T I`Nb@ b T8`,L`bH  mQ`Dg0 i 4 4 (SbqA`Da4>5 a8b@ a T  I`55bb@ a T I`V6}6b@ a T I`6 7b@ aa TAab!cb !B> BraS= ""BB,Sb @c??W0  `T ``/ `/ `?  `  aW0D]f6a a Da DaDa  aa DHcDLb4 T\`x(L` bHBdb^bb   Q`DpH- ]  m 4 -- \ 4 4 0c(SbpF`Da4QbPb Ճ !  T  I`f`b "  T I` v!b #  T I`!{$b $  T I`$a&b%  T I`q&'b &  T I`'-*b'  T I`u*/b(  T I`./U0`b()  T,`]  R`Kb d}55(Sbqq`DaW0Q aPb*  b^ T  y```b^Qb .HeadersInit`13IPbK+ b  P`Dh %%%%%%% % % % % %%%%%%%%%%%%%%%ei e% h  0- %- %- %- %- %- %- % -% -% ---% -% -%-%b%b %b"%b$%-&%% % %%%t%t%t !"#$ % & 'b(t( e+) 2** 1-+,,0 \.--00^20-.4%-/6‚0218-/6-2:,0-.4_<2,>  f@PPPPP@@ @P,P,PbA PQQ5Q=QEQYQaQDQDQQQQQQQR R%RiQQQQD`RD]DH -Q)R\B:// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @ts-check /// /// /// /// /// /// /// import { core, primordials } from "ext:core/mod.js"; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { Blob, BlobPrototype, File, FilePrototype, } from "ext:deno_web/09_file.js"; const { ArrayPrototypePush, ArrayPrototypeSlice, ArrayPrototypeSplice, MapPrototypeGet, MapPrototypeSet, MathRandom, ObjectFreeze, ObjectFromEntries, ObjectPrototypeIsPrototypeOf, SafeMap, SafeRegExp, Symbol, SymbolFor, StringFromCharCode, StringPrototypeCharCodeAt, StringPrototypeTrim, StringPrototypeSlice, StringPrototypeSplit, StringPrototypeReplace, StringPrototypeIndexOf, StringPrototypePadStart, StringPrototypeCodePointAt, StringPrototypeReplaceAll, TypeError, TypedArrayPrototypeSubarray, Uint8Array, } = primordials; const entryList = Symbol("entry list"); /** * @param {string} name * @param {string | Blob} value * @param {string | undefined} filename * @returns {FormDataEntry} */ function createEntry(name, value, filename) { if ( ObjectPrototypeIsPrototypeOf(BlobPrototype, value) && !ObjectPrototypeIsPrototypeOf(FilePrototype, value) ) { value = new File([value], "blob", { type: value.type }); } if ( ObjectPrototypeIsPrototypeOf(FilePrototype, value) && filename !== undefined ) { value = new File([value], filename, { type: value.type, lastModified: value.lastModified, }); } return { name, // @ts-expect-error because TS is not smart enough value, }; } /** * @typedef FormDataEntry * @property {string} name * @property {FormDataEntryValue} value */ class FormData { /** @type {FormDataEntry[]} */ [entryList] = []; /** @param {void} form */ constructor(form) { if (form !== undefined) { webidl.illegalConstructor(); } this[webidl.brand] = webidl.brand; } /** * @param {string} name * @param {string | Blob} valueOrBlobValue * @param {string} [filename] * @returns {void} */ append(name, valueOrBlobValue, filename) { webidl.assertBranded(this, FormDataPrototype); const prefix = "Failed to execute 'append' on 'FormData'"; webidl.requiredArguments(arguments.length, 2, prefix); name = webidl.converters["USVString"](name, prefix, "Argument 1"); if (ObjectPrototypeIsPrototypeOf(BlobPrototype, valueOrBlobValue)) { valueOrBlobValue = webidl.converters["Blob"]( valueOrBlobValue, prefix, "Argument 2", ); if (filename !== undefined) { filename = webidl.converters["USVString"]( filename, prefix, "Argument 3", ); } } else { valueOrBlobValue = webidl.converters["USVString"]( valueOrBlobValue, prefix, "Argument 2", ); } const entry = createEntry(name, valueOrBlobValue, filename); ArrayPrototypePush(this[entryList], entry); } /** * @param {string} name * @returns {void} */ delete(name) { webidl.assertBranded(this, FormDataPrototype); const prefix = "Failed to execute 'name' on 'FormData'"; webidl.requiredArguments(arguments.length, 1, prefix); name = webidl.converters["USVString"](name, prefix, "Argument 1"); const list = this[entryList]; for (let i = 0; i < list.length; i++) { if (list[i].name === name) { ArrayPrototypeSplice(list, i, 1); i--; } } } /** * @param {string} name * @returns {FormDataEntryValue | null} */ get(name) { webidl.assertBranded(this, FormDataPrototype); const prefix = "Failed to execute 'get' on 'FormData'"; webidl.requiredArguments(arguments.length, 1, prefix); name = webidl.converters["USVString"](name, prefix, "Argument 1"); const entries = this[entryList]; for (let i = 0; i < entries.length; ++i) { const entry = entries[i]; if (entry.name === name) return entry.value; } return null; } /** * @param {string} name * @returns {FormDataEntryValue[]} */ getAll(name) { webidl.assertBranded(this, FormDataPrototype); const prefix = "Failed to execute 'getAll' on 'FormData'"; webidl.requiredArguments(arguments.length, 1, prefix); name = webidl.converters["USVString"](name, prefix, "Argument 1"); const returnList = []; const entries = this[entryList]; for (let i = 0; i < entries.length; ++i) { const entry = entries[i]; if (entry.name === name) ArrayPrototypePush(returnList, entry.value); } return returnList; } /** * @param {string} name * @returns {boolean} */ has(name) { webidl.assertBranded(this, FormDataPrototype); const prefix = "Failed to execute 'has' on 'FormData'"; webidl.requiredArguments(arguments.length, 1, prefix); name = webidl.converters["USVString"](name, prefix, "Argument 1"); const entries = this[entryList]; for (let i = 0; i < entries.length; ++i) { const entry = entries[i]; if (entry.name === name) return true; } return false; } /** * @param {string} name * @param {string | Blob} valueOrBlobValue * @param {string} [filename] * @returns {void} */ set(name, valueOrBlobValue, filename) { webidl.assertBranded(this, FormDataPrototype); const prefix = "Failed to execute 'set' on 'FormData'"; webidl.requiredArguments(arguments.length, 2, prefix); name = webidl.converters["USVString"](name, prefix, "Argument 1"); if (ObjectPrototypeIsPrototypeOf(BlobPrototype, valueOrBlobValue)) { valueOrBlobValue = webidl.converters["Blob"]( valueOrBlobValue, prefix, "Argument 2", ); if (filename !== undefined) { filename = webidl.converters["USVString"]( filename, prefix, "Argument 3", ); } } else { valueOrBlobValue = webidl.converters["USVString"]( valueOrBlobValue, prefix, "Argument 2", ); } const entry = createEntry(name, valueOrBlobValue, filename); const list = this[entryList]; let added = false; for (let i = 0; i < list.length; i++) { if (list[i].name === name) { if (!added) { list[i] = entry; added = true; } else { ArrayPrototypeSplice(list, i, 1); i--; } } } if (!added) { ArrayPrototypePush(list, entry); } } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { if (ObjectPrototypeIsPrototypeOf(FormDataPrototype, this)) { return `${this.constructor.name} ${ inspect(ObjectFromEntries(this), inspectOptions) }`; } else { return `${this.constructor.name} ${inspect({}, inspectOptions)}`; } } } webidl.mixinPairIterable("FormData", FormData, entryList, "name", "value"); webidl.configureInterface(FormData); const FormDataPrototype = FormData.prototype; const ESCAPE_FILENAME_PATTERN = new SafeRegExp(/\r?\n|\r/g); const ESCAPE_PATTERN = new SafeRegExp(/([\n\r"])/g); const ESCAPE_MAP = ObjectFreeze({ "\n": "%0A", "\r": "%0D", '"': "%22", }); function escape(str, isFilename) { return StringPrototypeReplace( isFilename ? str : StringPrototypeReplace(str, ESCAPE_FILENAME_PATTERN, "\r\n"), ESCAPE_PATTERN, (c) => ESCAPE_MAP[c], ); } const FORM_DETA_SERIALIZE_PATTERN = new SafeRegExp(/\r(?!\n)|(?} */ function parseContentDisposition(value) { /** @type {Map} */ const params = new SafeMap(); // Forced to do so for some Map constructor param mismatch const values = ArrayPrototypeSlice(StringPrototypeSplit(value, ";"), 1); for (let i = 0; i < values.length; i++) { const entries = StringPrototypeSplit(StringPrototypeTrim(values[i]), "="); if (entries.length > 1) { MapPrototypeSet( params, entries[0], StringPrototypeReplace(entries[1], QUOTE_CONTENT_PATTERN, "$1"), ); } } return params; } /** * Decodes a string containing UTF-8 mistakenly decoded as Latin-1 and * decodes it correctly. * @param {string} latin1String * @returns {string} */ function decodeLatin1StringAsUtf8(latin1String) { const buffer = new Uint8Array(latin1String.length); for (let i = 0; i < latin1String.length; i++) { buffer[i] = StringPrototypeCharCodeAt(latin1String, i); } return core.decode(buffer); } const CRLF = "\r\n"; const LF = StringPrototypeCodePointAt(CRLF, 1); const CR = StringPrototypeCodePointAt(CRLF, 0); class MultipartParser { /** * @param {Uint8Array} body * @param {string | undefined} boundary */ constructor(body, boundary) { if (!boundary) { throw new TypeError("multipart/form-data must provide a boundary"); } this.boundary = `--${boundary}`; this.body = body; this.boundaryChars = core.encode(this.boundary); } /** * @param {string} headersText * @returns {{ headers: Headers, disposition: Map }} */ #parseHeaders(headersText) { const headers = new Headers(); const rawHeaders = StringPrototypeSplit(headersText, "\r\n"); for (let i = 0; i < rawHeaders.length; ++i) { const rawHeader = rawHeaders[i]; const sepIndex = StringPrototypeIndexOf(rawHeader, ":"); if (sepIndex < 0) { continue; // Skip this header } const key = StringPrototypeSlice(rawHeader, 0, sepIndex); const value = StringPrototypeSlice(rawHeader, sepIndex + 1); headers.set(key, value); } const disposition = parseContentDisposition( headers.get("Content-Disposition") ?? "", ); return { headers, disposition }; } /** * @returns {FormData} */ parse() { // To have fields body must be at least 2 boundaries + \r\n + -- // on the last boundary. if (this.body.length < (this.boundary.length * 2) + 4) { const decodedBody = core.decode(this.body); const lastBoundary = this.boundary + "--"; // check if it's an empty valid form data if ( decodedBody === lastBoundary || decodedBody === lastBoundary + "\r\n" ) { return new FormData(); } throw new TypeError("Unable to parse body as form data."); } const formData = new FormData(); let headerText = ""; let boundaryIndex = 0; let state = 0; let fileStart = 0; for (let i = 0; i < this.body.length; i++) { const byte = this.body[i]; const prevByte = this.body[i - 1]; const isNewLine = byte === LF && prevByte === CR; if (state === 1) { headerText += StringFromCharCode(byte); } if (state === 0 && isNewLine) { state = 1; } else if ( state === 1 ) { if ( isNewLine && this.body[i + 1] === CR && this.body[i + 2] === LF ) { // end of the headers section state = 2; fileStart = i + 3; // After \r\n } } else if (state === 2) { if (this.boundaryChars[boundaryIndex] !== byte) { boundaryIndex = 0; } else { boundaryIndex++; } if (boundaryIndex >= this.boundary.length) { const { headers, disposition } = this.#parseHeaders(headerText); const content = TypedArrayPrototypeSubarray( this.body, fileStart, i - boundaryIndex - 1, ); // https://fetch.spec.whatwg.org/#ref-for-dom-body-formdata // These are UTF-8 decoded as if it was Latin-1. // TODO(@andreubotella): Maybe we shouldn't be parsing entry headers // as Latin-1. const latin1Filename = MapPrototypeGet(disposition, "filename"); const latin1Name = MapPrototypeGet(disposition, "name"); state = 3; // Reset boundaryIndex = 0; headerText = ""; if (!latin1Name) { continue; // Skip, unknown name } const name = decodeLatin1StringAsUtf8(latin1Name); if (latin1Filename) { const blob = new Blob([content], { type: headers.get("Content-Type") || "application/octet-stream", }); formData.append( name, blob, decodeLatin1StringAsUtf8(latin1Filename), ); } else { formData.append(name, core.decode(content)); } } } else if (state === 3 && isNewLine) { state = 1; } } return formData; } } /** * @param {Uint8Array} body * @param {string | undefined} boundary * @returns {FormData} */ function parseFormData(body, boundary) { const parser = new MultipartParser(body, boundary); return parser.parse(); } /** * @param {FormDataEntry[]} entries * @returns {FormData} */ function formDataFromEntries(entries) { const fd = new FormData(); fd[entryList] = entries; return fd; } webidl.converters["FormData"] = webidl .createInterfaceConverter("FormData", FormDataPrototype); export { FormData, formDataFromEntries, FormDataPrototype, formDataToBlob, parseFormData, }; Qdf ext:deno_fetch/21_formdata.jsa b!D`\M` T}`LaE T  I`ixSb1$Aac?b !!$LSjb"d`Y_a= I  BQBR bBB????????????????????????????????????IbB:`L` bS]`b]`]`G]DL`"` L`"b ` L`b ` L`` L`` L` L`  DDc L` Dbbc Db{b{c% Dc)- DBBc1> D  c Dc` a?a?ba?b{a?a?Ba?"a?b a?a?a?a?ERb@0  T I`yCiRb@ 1  T I`#&b @2  T I`&'bb!@3 4Lb  T I`$Z#b@ - a T I`_88b@. a T I`#9u9b@/ aa Aac?b !!$% BrLSjb"d`Y_bTa"$Sb @b?  ` T ``/ `/ `?  `  aD]f6aa Da Da D aa D a HcD La( T  I`P"RERb Ճ4  T I`\ b5  T I`4 b6  T I`Ab7  T I`SM b8  T I`Ib9  T I`b:  T I``b( ;  T(` ]  QS`Kb ?c}5(Sbqq"`Da ab <  ""  (b" Bb " bB,Sb @"c??&(7iR  `T ``/ `/ `?  `  a&(7D]$ ` ajB`aj] T  I`*,"iSERb =  T I`()b >  T I`,7B`b? b^  YR`Deh %%%%%% % % % % %%%%%%%%%%%%%%%%%%% %!%"%#%$%%%&ei e% h  0- %- %- %- %- %- % - -% -% -% ----% -%-%- %-"%-$%-&%-(%-*-,%- .%-!0%-"2%#b4%$%&%t%'()*+ , -b6t. e+ / 208 1-1:2034\<-5>0^@0-6B1z7D iE%z8G iH%~9J)bK%z:M iN%z;P iQ% <%## cS%$# cU%%=?e%@ %A>Be+ %&-CW-DY20_[22] iR(h_PPPPPPPP@,P@L&L&L bA, aR SSS%S-S5S=SESMSRDRRRS}SSRRD`RD]DH QO7// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @ts-check /// /// /// /// /// /// /// /// /// import { core, primordials } from "ext:core/mod.js"; const { isAnyArrayBuffer, isArrayBuffer, } = core; const { ArrayBufferIsView, ArrayPrototypeMap, DataViewPrototypeGetBuffer, DataViewPrototypeGetByteLength, DataViewPrototypeGetByteOffset, JSONParse, ObjectDefineProperties, ObjectPrototypeIsPrototypeOf, TypedArrayPrototypeGetBuffer, TypedArrayPrototypeGetByteLength, TypedArrayPrototypeGetByteOffset, TypedArrayPrototypeGetSymbolToStringTag, TypedArrayPrototypeSlice, TypeError, Uint8Array, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { parseUrlEncoded, URLSearchParamsPrototype, } from "ext:deno_url/00_url.js"; import { formDataFromEntries, FormDataPrototype, formDataToBlob, parseFormData, } from "ext:deno_fetch/21_formdata.js"; import * as mimesniff from "ext:deno_web/01_mimesniff.js"; import { BlobPrototype } from "ext:deno_web/09_file.js"; import { createProxy, errorReadableStream, isReadableStreamDisturbed, readableStreamClose, readableStreamCollectIntoUint8Array, readableStreamDisturb, ReadableStreamPrototype, readableStreamTee, readableStreamThrowIfErrored, } from "ext:deno_web/06_streams.js"; /** * @param {Uint8Array | string} chunk * @returns {Uint8Array} */ function chunkToU8(chunk) { return typeof chunk === "string" ? core.encode(chunk) : chunk; } /** * @param {Uint8Array | string} chunk * @returns {string} */ function chunkToString(chunk) { return typeof chunk === "string" ? chunk : core.decode(chunk); } class InnerBody { /** * @param {ReadableStream | { body: Uint8Array | string, consumed: boolean }} stream */ constructor(stream) { /** @type {ReadableStream | { body: Uint8Array | string, consumed: boolean }} */ this.streamOrStatic = stream ?? { body: new Uint8Array(), consumed: false }; /** @type {null | Uint8Array | string | Blob | FormData} */ this.source = null; /** @type {null | number} */ this.length = null; } get stream() { if ( !ObjectPrototypeIsPrototypeOf( ReadableStreamPrototype, this.streamOrStatic, ) ) { const { body, consumed } = this.streamOrStatic; if (consumed) { this.streamOrStatic = new ReadableStream(); this.streamOrStatic.getReader(); readableStreamDisturb(this.streamOrStatic); readableStreamClose(this.streamOrStatic); } else { this.streamOrStatic = new ReadableStream({ start(controller) { controller.enqueue(chunkToU8(body)); controller.close(); }, }); } } return this.streamOrStatic; } /** * https://fetch.spec.whatwg.org/#body-unusable * @returns {boolean} */ unusable() { if ( ObjectPrototypeIsPrototypeOf( ReadableStreamPrototype, this.streamOrStatic, ) ) { return this.streamOrStatic.locked || isReadableStreamDisturbed(this.streamOrStatic); } return this.streamOrStatic.consumed; } /** * @returns {boolean} */ consumed() { if ( ObjectPrototypeIsPrototypeOf( ReadableStreamPrototype, this.streamOrStatic, ) ) { return isReadableStreamDisturbed(this.streamOrStatic); } return this.streamOrStatic.consumed; } /** * https://fetch.spec.whatwg.org/#concept-body-consume-body * @returns {Promise} */ consume() { if (this.unusable()) throw new TypeError("Body already consumed."); if ( ObjectPrototypeIsPrototypeOf( ReadableStreamPrototype, this.streamOrStatic, ) ) { readableStreamThrowIfErrored(this.stream); return readableStreamCollectIntoUint8Array(this.stream); } else { this.streamOrStatic.consumed = true; return this.streamOrStatic.body; } } cancel(error) { if ( ObjectPrototypeIsPrototypeOf( ReadableStreamPrototype, this.streamOrStatic, ) ) { this.streamOrStatic.cancel(error); } else { this.streamOrStatic.consumed = true; } } error(error) { if ( ObjectPrototypeIsPrototypeOf( ReadableStreamPrototype, this.streamOrStatic, ) ) { errorReadableStream(this.streamOrStatic, error); } else { this.streamOrStatic.consumed = true; } } /** * @returns {InnerBody} */ clone() { const { 0: out1, 1: out2 } = readableStreamTee(this.stream, true); this.streamOrStatic = out1; const second = new InnerBody(out2); second.source = core.deserialize(core.serialize(this.source)); second.length = this.length; return second; } /** * @returns {InnerBody} */ createProxy() { let proxyStreamOrStatic; if ( ObjectPrototypeIsPrototypeOf( ReadableStreamPrototype, this.streamOrStatic, ) ) { proxyStreamOrStatic = createProxy(this.streamOrStatic); } else { proxyStreamOrStatic = { ...this.streamOrStatic }; this.streamOrStatic.consumed = true; } const proxy = new InnerBody(proxyStreamOrStatic); proxy.source = this.source; proxy.length = this.length; return proxy; } } /** * @param {any} prototype * @param {symbol} bodySymbol * @param {symbol} mimeTypeSymbol * @returns {void} */ function mixinBody(prototype, bodySymbol, mimeTypeSymbol) { async function consumeBody(object, type) { webidl.assertBranded(object, prototype); const body = object[bodySymbol] !== null ? await object[bodySymbol].consume() : new Uint8Array(); const mimeType = type === "Blob" || type === "FormData" ? object[mimeTypeSymbol] : null; return packageData(body, type, mimeType); } /** @type {PropertyDescriptorMap} */ const mixin = { body: { /** * @returns {ReadableStream | null} */ get() { webidl.assertBranded(this, prototype); if (this[bodySymbol] === null) { return null; } else { return this[bodySymbol].stream; } }, configurable: true, enumerable: true, }, bodyUsed: { /** * @returns {boolean} */ get() { webidl.assertBranded(this, prototype); if (this[bodySymbol] !== null) { return this[bodySymbol].consumed(); } return false; }, configurable: true, enumerable: true, }, arrayBuffer: { /** @returns {Promise} */ value: function arrayBuffer() { return consumeBody(this, "ArrayBuffer"); }, writable: true, configurable: true, enumerable: true, }, blob: { /** @returns {Promise} */ value: function blob() { return consumeBody(this, "Blob"); }, writable: true, configurable: true, enumerable: true, }, formData: { /** @returns {Promise} */ value: function formData() { return consumeBody(this, "FormData"); }, writable: true, configurable: true, enumerable: true, }, json: { /** @returns {Promise} */ value: function json() { return consumeBody(this, "JSON"); }, writable: true, configurable: true, enumerable: true, }, text: { /** @returns {Promise} */ value: function text() { return consumeBody(this, "text"); }, writable: true, configurable: true, enumerable: true, }, }; return ObjectDefineProperties(prototype, mixin); } /** * https://fetch.spec.whatwg.org/#concept-body-package-data * @param {Uint8Array | string} bytes * @param {"ArrayBuffer" | "Blob" | "FormData" | "JSON" | "text"} type * @param {MimeType | null} [mimeType] */ function packageData(bytes, type, mimeType) { switch (type) { case "ArrayBuffer": return TypedArrayPrototypeGetBuffer(chunkToU8(bytes)); case "Blob": return new Blob([bytes], { type: mimeType !== null ? mimesniff.serializeMimeType(mimeType) : "", }); case "FormData": { if (mimeType !== null) { const essence = mimesniff.essence(mimeType); if (essence === "multipart/form-data") { const boundary = mimeType.parameters.get("boundary"); if (boundary === null) { throw new TypeError( "Missing boundary parameter in mime type of multipart formdata.", ); } return parseFormData(chunkToU8(bytes), boundary); } else if (essence === "application/x-www-form-urlencoded") { // TODO(@AaronO): pass as-is with StringOrBuffer in op-layer const entries = parseUrlEncoded(chunkToU8(bytes)); return formDataFromEntries( ArrayPrototypeMap( entries, (x) => ({ name: x[0], value: x[1] }), ), ); } throw new TypeError("Body can not be decoded as form data"); } throw new TypeError("Missing content type"); } case "JSON": return JSONParse(chunkToString(bytes)); case "text": return chunkToString(bytes); } } /** * @param {BodyInit} object * @returns {{body: InnerBody, contentType: string | null}} */ function extractBody(object) { /** @type {ReadableStream | { body: Uint8Array | string, consumed: boolean }} */ let stream; let source = null; let length = null; let contentType = null; if (typeof object === "string") { source = object; contentType = "text/plain;charset=UTF-8"; } else if (ObjectPrototypeIsPrototypeOf(BlobPrototype, object)) { stream = object.stream(); source = object; length = object.size; if (object.type.length !== 0) { contentType = object.type; } } else if (ArrayBufferIsView(object)) { const tag = TypedArrayPrototypeGetSymbolToStringTag(object); if (tag !== undefined) { // TypedArray if (tag !== "Uint8Array") { // TypedArray, unless it's Uint8Array object = new Uint8Array( TypedArrayPrototypeGetBuffer(/** @type {Uint8Array} */ (object)), TypedArrayPrototypeGetByteOffset(/** @type {Uint8Array} */ (object)), TypedArrayPrototypeGetByteLength(/** @type {Uint8Array} */ (object)), ); } } else { // DataView object = new Uint8Array( DataViewPrototypeGetBuffer(/** @type {DataView} */ (object)), DataViewPrototypeGetByteOffset(/** @type {DataView} */ (object)), DataViewPrototypeGetByteLength(/** @type {DataView} */ (object)), ); } source = TypedArrayPrototypeSlice(object); } else if (isArrayBuffer(object)) { source = TypedArrayPrototypeSlice(new Uint8Array(object)); } else if (ObjectPrototypeIsPrototypeOf(FormDataPrototype, object)) { const res = formDataToBlob(object); stream = res.stream(); source = res; length = res.size; contentType = res.type; } else if ( ObjectPrototypeIsPrototypeOf(URLSearchParamsPrototype, object) ) { // TODO(@satyarohith): not sure what primordial here. // deno-lint-ignore prefer-primordials source = object.toString(); contentType = "application/x-www-form-urlencoded;charset=UTF-8"; } else if (ObjectPrototypeIsPrototypeOf(ReadableStreamPrototype, object)) { stream = object; if (object.locked || isReadableStreamDisturbed(object)) { throw new TypeError("ReadableStream is locked or disturbed"); } } if (typeof source === "string") { // WARNING: this deviates from spec (expects length to be set) // https://fetch.spec.whatwg.org/#bodyinit > 7. // no observable side-effect for users so far, but could change stream = { body: source, consumed: false }; length = null; // NOTE: string length != byte length } else if (TypedArrayPrototypeGetSymbolToStringTag(source) === "Uint8Array") { stream = { body: source, consumed: false }; length = TypedArrayPrototypeGetByteLength(source); } const body = new InnerBody(stream); body.source = source; body.length = length; return { body, contentType }; } webidl.converters["BodyInit_DOMString"] = (V, prefix, context, opts) => { // Union for (ReadableStream or Blob or ArrayBufferView or ArrayBuffer or FormData or URLSearchParams or USVString) if (ObjectPrototypeIsPrototypeOf(ReadableStreamPrototype, V)) { return webidl.converters["ReadableStream"](V, prefix, context, opts); } else if (ObjectPrototypeIsPrototypeOf(BlobPrototype, V)) { return webidl.converters["Blob"](V, prefix, context, opts); } else if (ObjectPrototypeIsPrototypeOf(FormDataPrototype, V)) { return webidl.converters["FormData"](V, prefix, context, opts); } else if (ObjectPrototypeIsPrototypeOf(URLSearchParamsPrototype, V)) { return webidl.converters["URLSearchParams"](V, prefix, context, opts); } if (typeof V === "object") { if (isAnyArrayBuffer(V)) { return webidl.converters["ArrayBuffer"](V, prefix, context, opts); } if (ArrayBufferIsView(V)) { return webidl.converters["ArrayBufferView"](V, prefix, context, opts); } } // BodyInit conversion is passed to extractBody(), which calls core.encode(). // core.encode() will UTF-8 encode strings with replacement, being equivalent to the USV normalization. // Therefore we can convert to DOMString instead of USVString and avoid a costly redundant conversion. return webidl.converters["DOMString"](V, prefix, context, opts); }; webidl.converters["BodyInit_DOMString?"] = webidl.createNullableConverter( webidl.converters["BodyInit_DOMString"], ); export { extractBody, InnerBody, mixinBody }; Qd&=ext:deno_fetch/22_body.jsa b"D`pM` T`La*z T  I`^Sb112qA2 !"= I bb B&u??????????????????????Ib7`$L` bS]`b]`3&]`]` B]`G]`"t]`],L`  ` L` '` L`'B$` L`B$L`  DDc'- DbDc8APL` Db{b{cp} Db b c D"H"HcE\ D  cq D  c DZZc DKKc Dc Dc Dbsbsc Dc Dbbc^m Dc Dc DBBc( Dc,A Dc`q DBBcu` a?a?ba? a?a?b a?a?a?b{a?Za?Ka?bsa?a?Ba?a?"Ha?a?Ba? a?B$a?'a?Sb@C  T I`b Sb@D  T I` ,&B&b@E $La T|`tL`HSbqAB%$%cR?B$`Da  T  I`R%qTbMQHbCB]CCb~CC"'C"-C(bCGG T I`8Sb(bCGG T I`|.bB]0bCGGG T  I`qTb0bCGGG T I`b~b b~0bCGGG T I`b0bCGGG T I`Y"'b "'0bCGGG T I`.d"-b "-   iT`Dx  % % %%~~)Â3 3~)Â3 3 ~ ) 3 3 ~)Â3  3~)Â3  3~)Â3  3~)Â3 3" c$d&s2& 00 L`2Sb@ A a  T I`&1'Sb@B aa  12qA2 !"= I $Sb @ b?  ` T ``/ `/ `?  `  aD]x `  aj N`+  } `F!ajb!aj""ajbaj1aj"aj Zaj ] T  I`  TSb F  T I` b @Qb get streamb G  T I` !bH  T I`,b!bI  T I`4""bJ  T I`>-bb K  T I`63b L  T I`bp"b M  T I`Zb  N b^ T y`$``b^`(`17ISbKO (x(  S`Dxh %%%%%%% % % % % %%%%%%%%%ei e% e% h  0-%- %0 - %- %- %- %- % -% -% -% -% -%-%-%-%-%- %%‚ !" # $ e+ %1-%"Ă& 2'$-%"-(&-%"-'(^*2), d.PPPPPP P,SbA@ SQTTUDUU%U-U5U=UEUeTuTTTTTTTTYTDTMUD`RD]DH QS// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @ts-check /// /// /// /// /// /// /// /// import { core, primordials } from "ext:core/mod.js"; import { SymbolDispose } from "ext:deno_web/00_infra.js"; import { op_fetch_custom_client } from "ext:core/ops"; const { internalRidSymbol } = core; const { ObjectDefineProperty } = primordials; /** * @param {Deno.CreateHttpClientOptions} options * @returns {HttpClient} */ function createHttpClient(options) { options.caCerts ??= []; return new HttpClient( op_fetch_custom_client( options, ), ); } class HttpClient { #rid; /** * @param {number} rid */ constructor(rid) { ObjectDefineProperty(this, internalRidSymbol, { enumerable: false, value: rid, }); this.#rid = rid; } close() { core.close(this.#rid); } [SymbolDispose]() { core.tryClose(this.#rid); } } const HttpClientPrototype = HttpClient.prototype; export { createHttpClient, HttpClient, HttpClientPrototype }; QdF ext:deno_fetch/22_http_client.jsa b#D` M` Tt`PLa'L` T  I`,B)Sb1&a??IbS`L` bS]`n]`B]`]],L` )` L`)B*` L`B*B)` L`B)]L`  DbKbKc D  c D 1 1c?U Dc` a?a?bKa? 1a?B)a?)a?B*a?mUb@Q ca  &$Sb @Bhb?U  `T ``/ `/ `?  `  aD]Pf a D aHcD LaBh T  I`z)UmUb ՃR  T I`bS bK T I``bT  T(` ]   V` Ka  c5(Sbqq)`Da a bU   U`DvPh %%ei h  0-%0-%  e%  ‚ 0 te+2 10-1 U amUbAP UUUUVD`RD]DH Q;// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @ts-check /// /// /// /// /// /// /// import { core, primordials } from "ext:core/mod.js"; const { ArrayPrototypeMap, ArrayPrototypeSlice, ArrayPrototypeSplice, ObjectKeys, ObjectPrototypeIsPrototypeOf, RegExpPrototypeExec, StringPrototypeStartsWith, Symbol, SymbolFor, TypeError, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { assert } from "ext:deno_web/00_infra.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; import { byteUpperCase, HTTP_TOKEN_CODE_POINT_RE, } from "ext:deno_web/00_infra.js"; import { URL } from "ext:deno_url/00_url.js"; import { extractBody, mixinBody } from "ext:deno_fetch/22_body.js"; import { getLocationHref } from "ext:deno_web/12_location.js"; import { extractMimeType } from "ext:deno_web/01_mimesniff.js"; import { blobFromObjectUrl } from "ext:deno_web/09_file.js"; import { fillHeaders, getDecodeSplitHeader, guardFromHeaders, headerListFromHeaders, headersFromHeaderList, } from "ext:deno_fetch/20_headers.js"; import { HttpClientPrototype } from "ext:deno_fetch/22_http_client.js"; import * as abortSignal from "ext:deno_web/03_abort_signal.js"; const { internalRidSymbol } = core; const _request = Symbol("request"); const _headers = Symbol("headers"); const _getHeaders = Symbol("get headers"); const _headersCache = Symbol("headers cache"); const _signal = Symbol("signal"); const _mimeType = Symbol("mime type"); const _body = Symbol("body"); const _url = Symbol("url"); const _method = Symbol("method"); const _brand = webidl.brand; /** * @param {(() => string)[]} urlList * @param {string[]} urlListProcessed */ function processUrlList(urlList, urlListProcessed) { for (let i = 0; i < urlList.length; i++) { if (urlListProcessed[i] === undefined) { urlListProcessed[i] = urlList[i](); } } return urlListProcessed; } /** * @typedef InnerRequest * @property {() => string} method * @property {() => string} url * @property {() => string} currentUrl * @property {() => [string, string][]} headerList * @property {null | typeof __window.bootstrap.fetchBody.InnerBody} body * @property {"follow" | "error" | "manual"} redirectMode * @property {number} redirectCount * @property {(() => string)[]} urlList * @property {string[]} urlListProcessed * @property {number | null} clientRid NOTE: non standard extension for `Deno.HttpClient`. * @property {Blob | null} blobUrlEntry */ /** * @param {string} method * @param {string | () => string} url * @param {() => [string, string][]} headerList * @param {typeof __window.bootstrap.fetchBody.InnerBody} body * @param {boolean} maybeBlob * @returns {InnerRequest} */ function newInnerRequest(method, url, headerList, body, maybeBlob) { let blobUrlEntry = null; if ( maybeBlob && typeof url === "string" && StringPrototypeStartsWith(url, "blob:") ) { blobUrlEntry = blobFromObjectUrl(url); } return { methodInner: method, get method() { return this.methodInner; }, set method(value) { this.methodInner = value; }, headerListInner: null, get headerList() { if (this.headerListInner === null) { try { this.headerListInner = headerList(); } catch { throw new TypeError("cannot read headers: request closed"); } } return this.headerListInner; }, set headerList(value) { this.headerListInner = value; }, body, redirectMode: "follow", redirectCount: 0, urlList: [typeof url === "string" ? () => url : url], urlListProcessed: [], clientRid: null, blobUrlEntry, url() { if (this.urlListProcessed[0] === undefined) { try { this.urlListProcessed[0] = this.urlList[0](); } catch { throw new TypeError("cannot read url: request closed"); } } return this.urlListProcessed[0]; }, currentUrl() { const currentIndex = this.urlList.length - 1; if (this.urlListProcessed[currentIndex] === undefined) { try { this.urlListProcessed[currentIndex] = this.urlList[currentIndex](); } catch { throw new TypeError("cannot read url: request closed"); } } return this.urlListProcessed[currentIndex]; }, }; } /** * https://fetch.spec.whatwg.org/#concept-request-clone * @param {InnerRequest} request * @param {boolean} skipBody * @returns {InnerRequest} */ function cloneInnerRequest(request, skipBody = false) { const headerList = ArrayPrototypeMap( request.headerList, (x) => [x[0], x[1]], ); let body = null; if (request.body !== null && !skipBody) { body = request.body.clone(); } return { method: request.method, headerList, body, redirectMode: request.redirectMode, redirectCount: request.redirectCount, urlList: [() => request.url()], urlListProcessed: [request.url()], clientRid: request.clientRid, blobUrlEntry: request.blobUrlEntry, url() { if (this.urlListProcessed[0] === undefined) { try { this.urlListProcessed[0] = this.urlList[0](); } catch { throw new TypeError("cannot read url: request closed"); } } return this.urlListProcessed[0]; }, currentUrl() { const currentIndex = this.urlList.length - 1; if (this.urlListProcessed[currentIndex] === undefined) { try { this.urlListProcessed[currentIndex] = this.urlList[currentIndex](); } catch { throw new TypeError("cannot read url: request closed"); } } return this.urlListProcessed[currentIndex]; }, }; } // method => normalized method const KNOWN_METHODS = { "DELETE": "DELETE", "delete": "DELETE", "GET": "GET", "get": "GET", "HEAD": "HEAD", "head": "HEAD", "OPTIONS": "OPTIONS", "options": "OPTIONS", "PATCH": "PATCH", "patch": "PATCH", "POST": "POST", "post": "POST", "PUT": "PUT", "put": "PUT", }; /** * @param {string} m * @returns {string} */ function validateAndNormalizeMethod(m) { if (RegExpPrototypeExec(HTTP_TOKEN_CODE_POINT_RE, m) === null) { throw new TypeError("Method is not valid."); } const upperCase = byteUpperCase(m); if ( upperCase === "CONNECT" || upperCase === "TRACE" || upperCase === "TRACK" ) { throw new TypeError("Method is forbidden."); } return upperCase; } class Request { /** @type {InnerRequest} */ [_request]; /** @type {Headers} */ [_headersCache]; [_getHeaders]; /** @type {Headers} */ get [_headers]() { if (this[_headersCache] === undefined) { this[_headersCache] = this[_getHeaders](); } return this[_headersCache]; } set [_headers](value) { this[_headersCache] = value; } /** @type {AbortSignal} */ [_signal]; get [_mimeType]() { const values = getDecodeSplitHeader( headerListFromHeaders(this[_headers]), "Content-Type", ); return extractMimeType(values); } get [_body]() { return this[_request].body; } /** * https://fetch.spec.whatwg.org/#dom-request * @param {RequestInfo} input * @param {RequestInit} init */ constructor(input, init = {}) { if (input === _brand) { this[_brand] = _brand; return; } const prefix = "Failed to construct 'Request'"; webidl.requiredArguments(arguments.length, 1, prefix); input = webidl.converters["RequestInfo_DOMString"]( input, prefix, "Argument 1", ); init = webidl.converters["RequestInit"](init, prefix, "Argument 2"); this[_brand] = _brand; /** @type {InnerRequest} */ let request; const baseURL = getLocationHref(); // 4. let signal = null; // 5. if (typeof input === "string") { const parsedURL = new URL(input, baseURL); request = newInnerRequest( "GET", parsedURL.href, () => [], null, true, ); } else { // 6. if (!ObjectPrototypeIsPrototypeOf(RequestPrototype, input)) { throw new TypeError("Unreachable"); } const originalReq = input[_request]; // fold in of step 12 from below request = cloneInnerRequest(originalReq, true); request.redirectCount = 0; // reset to 0 - cloneInnerRequest copies the value signal = input[_signal]; } // 12. is folded into the else statement of step 6 above. // 22. if (init.redirect !== undefined) { request.redirectMode = init.redirect; } // 25. if (init.method !== undefined) { const method = init.method; // fast path: check for known methods request.method = KNOWN_METHODS[method] ?? validateAndNormalizeMethod(method); } // 26. if (init.signal !== undefined) { signal = init.signal; } // NOTE: non standard extension. This handles Deno.HttpClient parameter if (init.client !== undefined) { if ( init.client !== null && !ObjectPrototypeIsPrototypeOf(HttpClientPrototype, init.client) ) { throw webidl.makeException( TypeError, "`client` must be a Deno.HttpClient", prefix, "Argument 2", ); } request.clientRid = init.client?.[internalRidSymbol] ?? null; } // 28. this[_request] = request; // 29. const signals = signal !== null ? [signal] : []; // 30. this[_signal] = abortSignal.createDependentAbortSignal(signals, prefix); // 31. this[_headers] = headersFromHeaderList(request.headerList, "request"); // 33. if (init.headers || ObjectKeys(init).length > 0) { const headerList = headerListFromHeaders(this[_headers]); const headers = init.headers ?? ArrayPrototypeSlice( headerList, 0, headerList.length, ); if (headerList.length !== 0) { ArrayPrototypeSplice(headerList, 0, headerList.length); } fillHeaders(this[_headers], headers); } // 34. let inputBody = null; if (ObjectPrototypeIsPrototypeOf(RequestPrototype, input)) { inputBody = input[_body]; } // 35. if ( (request.method === "GET" || request.method === "HEAD") && ((init.body !== undefined && init.body !== null) || inputBody !== null) ) { throw new TypeError("Request with GET/HEAD method cannot have body."); } // 36. let initBody = null; // 37. if (init.body !== undefined && init.body !== null) { const res = extractBody(init.body); initBody = res.body; if (res.contentType !== null && !this[_headers].has("content-type")) { this[_headers].append("Content-Type", res.contentType); } } // 38. const inputOrInitBody = initBody ?? inputBody; // 40. let finalBody = inputOrInitBody; // 41. if (initBody === null && inputBody !== null) { if (input[_body] && input[_body].unusable()) { throw new TypeError("Input request's body is unusable."); } finalBody = inputBody.createProxy(); } // 42. request.body = finalBody; } get method() { webidl.assertBranded(this, RequestPrototype); if (this[_method]) { return this[_method]; } this[_method] = this[_request].method; return this[_method]; } get url() { webidl.assertBranded(this, RequestPrototype); if (this[_url]) { return this[_url]; } this[_url] = this[_request].url(); return this[_url]; } get headers() { webidl.assertBranded(this, RequestPrototype); return this[_headers]; } get redirect() { webidl.assertBranded(this, RequestPrototype); return this[_request].redirectMode; } get signal() { webidl.assertBranded(this, RequestPrototype); return this[_signal]; } clone() { const prefix = "Failed to call 'Request.clone'"; webidl.assertBranded(this, RequestPrototype); if (this[_body] && this[_body].unusable()) { throw new TypeError("Body is unusable."); } const clonedReq = cloneInnerRequest(this[_request]); assert(this[_signal] !== null); const clonedSignal = abortSignal.createDependentAbortSignal( [this[_signal]], prefix, ); return fromInnerRequest( clonedReq, clonedSignal, guardFromHeaders(this[_headers]), ); } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(RequestPrototype, this), keys: [ "bodyUsed", "headers", "method", "redirect", "url", ], }), inspectOptions, ); } } webidl.configureInterface(Request); const RequestPrototype = Request.prototype; mixinBody(RequestPrototype, _body, _mimeType); webidl.converters["Request"] = webidl.createInterfaceConverter( "Request", RequestPrototype, ); webidl.converters["RequestInfo_DOMString"] = (V, prefix, context, opts) => { // Union for (Request or USVString) if (typeof V == "object") { if (ObjectPrototypeIsPrototypeOf(RequestPrototype, V)) { return webidl.converters["Request"](V, prefix, context, opts); } } // Passed to new URL(...) which implicitly converts DOMString -> USVString return webidl.converters["DOMString"](V, prefix, context, opts); }; webidl.converters["RequestRedirect"] = webidl.createEnumConverter( "RequestRedirect", [ "follow", "error", "manual", ], ); webidl.converters["RequestInit"] = webidl.createDictionaryConverter( "RequestInit", [ { key: "method", converter: webidl.converters["ByteString"] }, { key: "headers", converter: webidl.converters["HeadersInit"] }, { key: "body", converter: webidl.createNullableConverter( webidl.converters["BodyInit_DOMString"], ), }, { key: "redirect", converter: webidl.converters["RequestRedirect"] }, { key: "signal", converter: webidl.createNullableConverter( webidl.converters["AbortSignal"], ), }, { key: "client", converter: webidl.converters.any }, ], ); /** * @param {Request} request * @returns {InnerRequest} */ function toInnerRequest(request) { return request[_request]; } /** * @param {InnerRequest} inner * @param {AbortSignal} signal * @param {"request" | "immutable" | "request-no-cors" | "response" | "none"} guard * @returns {Request} */ function fromInnerRequest(inner, signal, guard) { const request = new Request(_brand); request[_request] = inner; request[_signal] = signal; request[_getHeaders] = () => headersFromHeaderList(inner.headerList, guard); return request; } export { fromInnerRequest, newInnerRequest, processUrlList, Request, RequestPrototype, toInnerRequest, }; Qdkext:deno_fetch/23_request.jsa b$D`M`" T`j1LaJz T I`c*,@,/@b8Sb1acb !B6g= -&b."//0;22B3bHb8b9=v???????????????????????Ib;`8L`  bS]`b]`n]`"]`G&]`*]`+]`TB]`]`b,]`m"-]`]`]PL`>` L`>?` L`?D` L`Db5` L`b54` L`4BG` L`BGL`  DDc D-Dc PL` DB-B-c DB*B*c  DB B c D c Dc D":":ct D  c Dc%? D''c Dttc| Dc  Dc  Dc=L Dc "2 Dbbc 6K Dc Od DB$B$c Dc` a?a?a?a?":a?B-a?B a?'a?B$a?a?ta?a?a?a?a?ba?a?B*a?4a?b5a?>a??a?BGa?Da?%Vb@ [  T  I`]=MVb#@\ @L` T I` 4b@W a T I` _ f/@@@@!@!$@b5b@X c T I`r99BGb@Y a T I`f:B;Db@ Z aa acb !B6g Br= &.B0123b999B:B:B:::B:;;/;b;b;;b;"<"<<"<<<B=<1W%Vb Ճ]  T I`K`b^  T I``b_  T I`T`b`  T I`)`b a  T I`)--Qb get methodb b  T I`-. Qaget urlbc  T I`./Qb get headersb d  T I`/r/Qb get redirectb e  T I`//Qb get signalb f  T I`/1"bg  T I`2x3`b(h  T4`&]  W`Kc L f5555(Sbqq>`Daz3 a 4 bi  B$b^> T  y`'`!` b^`D`46IMV%VbKj DB"E  `M`E1FBbF ` Lf ba 3‰Cbh‰ ba B‰Cb ba ‰Cx( ba B‰C ba ‰Cb ba F‰C  9V`Dh %%%%%%% % % %%%%%%%%%%%%ei e% e% h  0-%-%- %- %- %- %- % ---% 0-% b%b%b%b%b%b b"%b$%b&% -(%~*)%%%%% t%t%t%t!t"t% t#t$%&' ( ) ߂* +b+t݂, e+-2.- 1 -//0^10-031010`5 -27 -3940_;24= -27526? -27 -7A8{9C%_D28F -27 -:H;{L3?N 6P ~@R) -27-AS3?U 6P ~BW) -CX -27-DZ^\3?^ 6P ~E`) -27-8a3?c 6P ~Fe) -CX -27-Gf^h3?j 6P ~Hl) -27-Im3?o 6P_q2;s 0juPPP@@@P ` `Y <0 Y&`bAV  WWDAVDViWqWyWWaWDWWWWWWWWWW%WDD`RD]DH Q~jP3// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @ts-check /// /// /// /// /// /// /// /// import { core, primordials } from "ext:core/mod.js"; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; import { byteLowerCase, HTTP_TAB_OR_SPACE, regexMatcher, serializeJSValueToJSONString, } from "ext:deno_web/00_infra.js"; import { extractBody, mixinBody } from "ext:deno_fetch/22_body.js"; import { getLocationHref } from "ext:deno_web/12_location.js"; import { extractMimeType } from "ext:deno_web/01_mimesniff.js"; import { URL } from "ext:deno_url/00_url.js"; import { fillHeaders, getDecodeSplitHeader, guardFromHeaders, headerListFromHeaders, headersFromHeaderList, } from "ext:deno_fetch/20_headers.js"; const { ArrayPrototypeMap, ArrayPrototypePush, ObjectDefineProperties, ObjectPrototypeIsPrototypeOf, RangeError, RegExpPrototypeExec, SafeArrayIterator, SafeRegExp, Symbol, SymbolFor, TypeError, } = primordials; const VCHAR = ["\x21-\x7E"]; const OBS_TEXT = ["\x80-\xFF"]; const REASON_PHRASE = [ ...new SafeArrayIterator(HTTP_TAB_OR_SPACE), ...new SafeArrayIterator(VCHAR), ...new SafeArrayIterator(OBS_TEXT), ]; const REASON_PHRASE_MATCHER = regexMatcher(REASON_PHRASE); const REASON_PHRASE_RE = new SafeRegExp(`^[${REASON_PHRASE_MATCHER}]*$`); const _response = Symbol("response"); const _headers = Symbol("headers"); const _mimeType = Symbol("mime type"); const _body = Symbol("body"); const _brand = webidl.brand; /** * @typedef InnerResponse * @property {"basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"} type * @property {() => string | null} url * @property {string[]} urlList * @property {number} status * @property {string} statusMessage * @property {[string, string][]} headerList * @property {null | typeof __window.bootstrap.fetchBody.InnerBody} body * @property {boolean} aborted * @property {string} [error] */ /** * @param {number} status * @returns {boolean} */ function nullBodyStatus(status) { return status === 101 || status === 204 || status === 205 || status === 304; } /** * @param {number} status * @returns {boolean} */ function redirectStatus(status) { return status === 301 || status === 302 || status === 303 || status === 307 || status === 308; } /** * https://fetch.spec.whatwg.org/#concept-response-clone * @param {InnerResponse} response * @returns {InnerResponse} */ function cloneInnerResponse(response) { const urlList = [...new SafeArrayIterator(response.urlList)]; const headerList = ArrayPrototypeMap( response.headerList, (x) => [x[0], x[1]], ); let body = null; if (response.body !== null) { body = response.body.clone(); } return { type: response.type, body, headerList, urlList, status: response.status, statusMessage: response.statusMessage, aborted: response.aborted, url() { if (this.urlList.length == 0) return null; return this.urlList[this.urlList.length - 1]; }, }; } /** * @returns {InnerResponse} */ function newInnerResponse(status = 200, statusMessage = "") { return { type: "default", body: null, headerList: [], urlList: [], status, statusMessage, aborted: false, url() { if (this.urlList.length == 0) return null; return this.urlList[this.urlList.length - 1]; }, }; } /** * @param {string} error * @returns {InnerResponse} */ function networkError(error) { const resp = newInnerResponse(0); resp.type = "error"; resp.error = error; return resp; } /** * @returns {InnerResponse} */ function abortedNetworkError() { const resp = networkError("aborted"); resp.aborted = true; return resp; } /** * https://fetch.spec.whatwg.org#initialize-a-response * @param {Response} response * @param {ResponseInit} init * @param {{ body: fetchBody.InnerBody, contentType: string | null } | null} bodyWithType */ function initializeAResponse(response, init, bodyWithType) { // 1. if ((init.status < 200 || init.status > 599) && init.status != 101) { throw new RangeError( `The status provided (${init.status}) is not equal to 101 and outside the range [200, 599].`, ); } // 2. if ( init.statusText && RegExpPrototypeExec(REASON_PHRASE_RE, init.statusText) === null ) { throw new TypeError("Status text is not valid."); } // 3. response[_response].status = init.status; // 4. response[_response].statusMessage = init.statusText; // 5. /** @type {headers.Headers} */ const headers = response[_headers]; if (init.headers) { fillHeaders(headers, init.headers); } // 6. if (bodyWithType !== null) { if (nullBodyStatus(response[_response].status)) { throw new TypeError( "Response with null body status cannot have body", ); } const { body, contentType } = bodyWithType; response[_response].body = body; if (contentType !== null) { let hasContentType = false; const list = headerListFromHeaders(headers); for (let i = 0; i < list.length; i++) { if (byteLowerCase(list[i][0]) === "content-type") { hasContentType = true; break; } } if (!hasContentType) { ArrayPrototypePush(list, ["Content-Type", contentType]); } } } } class Response { get [_mimeType]() { const values = getDecodeSplitHeader( headerListFromHeaders(this[_headers]), "Content-Type", ); return extractMimeType(values); } get [_body]() { return this[_response].body; } /** * @returns {Response} */ static error() { const inner = newInnerResponse(0); inner.type = "error"; const response = webidl.createBranded(Response); response[_response] = inner; response[_headers] = headersFromHeaderList( response[_response].headerList, "immutable", ); return response; } /** * @param {string} url * @param {number} status * @returns {Response} */ static redirect(url, status = 302) { const prefix = "Failed to call 'Response.redirect'"; url = webidl.converters["USVString"](url, prefix, "Argument 1"); status = webidl.converters["unsigned short"](status, prefix, "Argument 2"); const baseURL = getLocationHref(); const parsedURL = new URL(url, baseURL); if (!redirectStatus(status)) { throw new RangeError("Invalid redirect status code."); } const inner = newInnerResponse(status); inner.type = "default"; ArrayPrototypePush(inner.headerList, ["Location", parsedURL.href]); const response = webidl.createBranded(Response); response[_response] = inner; response[_headers] = headersFromHeaderList( response[_response].headerList, "immutable", ); return response; } /** * @param {any} data * @param {ResponseInit} init * @returns {Response} */ static json(data = undefined, init = {}) { const prefix = "Failed to call 'Response.json'"; data = webidl.converters.any(data); init = webidl.converters["ResponseInit_fast"](init, prefix, "Argument 2"); const str = serializeJSValueToJSONString(data); const res = extractBody(str); res.contentType = "application/json"; const response = webidl.createBranded(Response); response[_response] = newInnerResponse(); response[_headers] = headersFromHeaderList( response[_response].headerList, "response", ); initializeAResponse(response, init, res); return response; } /** * @param {BodyInit | null} body * @param {ResponseInit} init */ constructor(body = null, init = undefined) { if (body === _brand) { this[_brand] = _brand; return; } const prefix = "Failed to construct 'Response'"; body = webidl.converters["BodyInit_DOMString?"](body, prefix, "Argument 1"); init = webidl.converters["ResponseInit_fast"](init, prefix, "Argument 2"); this[_response] = newInnerResponse(); this[_headers] = headersFromHeaderList( this[_response].headerList, "response", ); let bodyWithType = null; if (body !== null) { bodyWithType = extractBody(body); } initializeAResponse(this, init, bodyWithType); this[_brand] = _brand; } /** * @returns {"basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"} */ get type() { webidl.assertBranded(this, ResponsePrototype); return this[_response].type; } /** * @returns {string} */ get url() { webidl.assertBranded(this, ResponsePrototype); const url = this[_response].url(); if (url === null) return ""; const newUrl = new URL(url); newUrl.hash = ""; return newUrl.href; } /** * @returns {boolean} */ get redirected() { webidl.assertBranded(this, ResponsePrototype); return this[_response].urlList.length > 1; } /** * @returns {number} */ get status() { webidl.assertBranded(this, ResponsePrototype); return this[_response].status; } /** * @returns {boolean} */ get ok() { webidl.assertBranded(this, ResponsePrototype); const status = this[_response].status; return status >= 200 && status <= 299; } /** * @returns {string} */ get statusText() { webidl.assertBranded(this, ResponsePrototype); return this[_response].statusMessage; } /** * @returns {Headers} */ get headers() { webidl.assertBranded(this, ResponsePrototype); return this[_headers]; } /** * @returns {Response} */ clone() { webidl.assertBranded(this, ResponsePrototype); if (this[_body] && this[_body].unusable()) { throw new TypeError("Body is unusable."); } const second = webidl.createBranded(Response); const newRes = cloneInnerResponse(this[_response]); second[_response] = newRes; second[_headers] = headersFromHeaderList( newRes.headerList, guardFromHeaders(this[_headers]), ); return second; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(ResponsePrototype, this), keys: [ "body", "bodyUsed", "headers", "ok", "redirected", "status", "statusText", "url", ], }), inspectOptions, ); } } webidl.configureInterface(Response); ObjectDefineProperties(Response, { json: { enumerable: true }, redirect: { enumerable: true }, error: { enumerable: true }, }); const ResponsePrototype = Response.prototype; mixinBody(ResponsePrototype, _body, _mimeType); webidl.converters["Response"] = webidl.createInterfaceConverter( "Response", ResponsePrototype, ); webidl.converters["ResponseInit"] = webidl.createDictionaryConverter( "ResponseInit", [{ key: "status", defaultValue: 200, converter: webidl.converters["unsigned short"], }, { key: "statusText", defaultValue: "", converter: webidl.converters["ByteString"], }, { key: "headers", converter: webidl.converters["HeadersInit"], }], ); webidl.converters["ResponseInit_fast"] = function ( init, prefix, context, opts, ) { if (init === undefined || init === null) { return { status: 200, statusText: "", headers: undefined }; } // Fast path, if not a proxy if (typeof init === "object" && !core.isProxy(init)) { // Not a proxy fast path const status = init.status !== undefined ? webidl.converters["unsigned short"](init.status) : 200; const statusText = init.statusText !== undefined ? webidl.converters["ByteString"](init.statusText) : ""; const headers = init.headers !== undefined ? webidl.converters["HeadersInit"](init.headers) : undefined; return { status, statusText, headers }; } // Slow default path return webidl.converters["ResponseInit"](init, prefix, context, opts); }; /** * @param {Response} response * @returns {InnerResponse} */ function toInnerResponse(response) { return response[_response]; } /** * @param {InnerResponse} inner * @param {"request" | "immutable" | "request-no-cors" | "response" | "none"} guard * @returns {Response} */ function fromInnerResponse(inner, guard) { const response = new Response(_brand); response[_response] = inner; response[_headers] = headersFromHeaderList(inner.headerList, guard); return response; } export { abortedNetworkError, fromInnerResponse, networkError, newInnerResponse, nullBodyStatus, redirectStatus, Response, ResponsePrototype, toInnerResponse, }; Qdn}ext:deno_fetch/23_response.jsa b%D`|M` T`!!LaF[ T I`? v b @LSb1A!9B6= bJJ"/2bHLOn???????????????IbP3`,L`  bS]`b]`"]`^n]`*]`)+]`fB]`&]`b,]`p]tL`Q` L`QQ` L`QBO` L`BOU` L`UbN` L`bNbM` L`bMK` L`KBL` L`BLbU`  L`bU L`  DDc LL` D++c DB B c DB;B;c D  c Dc<V D''c  Dttc Dc  Dc ! DcO^ Dc%5 Dbbc9N DcRg DB$B$c! Dc DB.B.c D"E"Ec` a?a?a?B;a?+a?B.a?"Ea?'a?B$a?a?ta?B a?a?a?a?ba?a?Ka?BLa?bMa?bNa?BOa?Qa?Qa?bUa ?Ua?5Xb@s  T  I`(O]Xb@ t dL` T I` Kb@l a T I`1 BLb@m a T<`4 L`IPbF5  `]4 `]CMCbHCM T I`ib  %Y`Dh     ~ 3 33 (Sbq@bM`Da ]X a5Xb@n a T  I`4bNb@o a T I`5BOb@ p c T I` 171bUb@q a  T@`: L`QbHJ"/5 iY`Di(0 i  4 0-c4 (SbqAU`Da12 a 8P8b@r aa A !9B6% Br=   ` M`H ` M`B0+ B.-5bKB2$Sb @Qb?*]X  `x ` `/  `/ `?  `  a*1aj Baj"'aj D]ff  DR } ` F`  HD ` F` D"aD ` F`  `F`  abS `F` B `F` D ` F` HcDLc H T`-86) P(@0bA x8C8C iD% bF% bH% bJbL%- N%!%#" t$t%&'()* + , ߂- ނ. ݂/܂01bPtڂ2e+ %1-3R0^T0~4VcW0-5Y1060`[-7]-8_90_a29c-7]-:e;{i3?k 6m ~@o)-7]-Ap3?r 6m ~Bt)-7]-Cu3?w 6m_y2;{-7]D2E} 4kPPP0'@P.@Pp @@PL   `Y bAk YYQXD!Y9YMYUYYYYYYYYZZZ)Z5ZAZMZYZaZZ]YeYD`RD]DH Qn5// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @ts-check /// /// /// /// /// /// /// /// import { core, primordials } from "ext:core/mod.js"; import { op_fetch, op_fetch_send, op_wasm_streaming_feed, op_wasm_streaming_set_url, } from "ext:core/ops"; const { ArrayPrototypePush, ArrayPrototypeSplice, ArrayPrototypeFilter, ArrayPrototypeIncludes, Error, ObjectPrototypeIsPrototypeOf, Promise, PromisePrototypeThen, PromisePrototypeCatch, SafeArrayIterator, String, StringPrototypeStartsWith, StringPrototypeToLowerCase, TypeError, TypedArrayPrototypeGetSymbolToStringTag, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { byteLowerCase } from "ext:deno_web/00_infra.js"; import { errorReadableStream, getReadableStreamResourceBacking, readableStreamForRid, ReadableStreamPrototype, resourceForReadableStream, } from "ext:deno_web/06_streams.js"; import { extractBody, InnerBody } from "ext:deno_fetch/22_body.js"; import { processUrlList, toInnerRequest } from "ext:deno_fetch/23_request.js"; import { abortedNetworkError, fromInnerResponse, networkError, nullBodyStatus, redirectStatus, toInnerResponse, } from "ext:deno_fetch/23_response.js"; import * as abortSignal from "ext:deno_web/03_abort_signal.js"; const REQUEST_BODY_HEADER_NAMES = [ "content-encoding", "content-language", "content-location", "content-type", ]; /** * @param {number} rid * @returns {Promise<{ status: number, statusText: string, headers: [string, string][], url: string, responseRid: number, error: string? }>} */ function opFetchSend(rid) { return op_fetch_send(rid); } /** * @param {number} responseBodyRid * @param {AbortSignal} [terminator] * @returns {ReadableStream} */ function createResponseBodyStream(responseBodyRid, terminator) { const readable = readableStreamForRid(responseBodyRid); function onAbort() { errorReadableStream(readable, terminator.reason); core.tryClose(responseBodyRid); } // TODO(lucacasonato): clean up registration terminator[abortSignal.add](onAbort); return readable; } /** * @param {InnerRequest} req * @param {boolean} recursive * @param {AbortSignal} terminator * @returns {Promise} */ async function mainFetch(req, recursive, terminator) { if (req.blobUrlEntry !== null) { if (req.method !== "GET") { throw new TypeError("Blob URL fetch only supports GET method."); } const body = new InnerBody(req.blobUrlEntry.stream()); terminator[abortSignal.add](() => body.error(terminator.reason)); processUrlList(req.urlList, req.urlListProcessed); return { headerList: [ ["content-length", String(req.blobUrlEntry.size)], ["content-type", req.blobUrlEntry.type], ], status: 200, statusMessage: "OK", body, type: "basic", url() { if (this.urlList.length == 0) return null; return this.urlList[this.urlList.length - 1]; }, urlList: recursive ? [] : [...new SafeArrayIterator(req.urlListProcessed)], }; } /** @type {ReadableStream | Uint8Array | null} */ let reqBody = null; let reqRid = null; if (req.body) { const stream = req.body.streamOrStatic; const body = stream.body; if (TypedArrayPrototypeGetSymbolToStringTag(body) === "Uint8Array") { reqBody = body; } else if (typeof body === "string") { reqBody = core.encode(body); } else if (ObjectPrototypeIsPrototypeOf(ReadableStreamPrototype, stream)) { const resourceBacking = getReadableStreamResourceBacking(stream); if (resourceBacking) { reqRid = resourceBacking.rid; } else { reqRid = resourceForReadableStream(stream, req.body.length); } } else { throw TypeError("invalid body"); } } const { requestRid, cancelHandleRid } = op_fetch( req.method, req.currentUrl(), req.headerList, req.clientRid, reqBody !== null || reqRid !== null, reqBody, reqRid, ); function onAbort() { if (cancelHandleRid !== null) { core.tryClose(cancelHandleRid); } } terminator[abortSignal.add](onAbort); let resp; try { resp = await opFetchSend(requestRid); } catch (err) { if (terminator.aborted) return; throw err; } finally { if (cancelHandleRid !== null) { core.tryClose(cancelHandleRid); } } // Re-throw any body errors if (resp.error) { throw new TypeError("body failed", { cause: new Error(resp.error) }); } if (terminator.aborted) return abortedNetworkError(); processUrlList(req.urlList, req.urlListProcessed); /** @type {InnerResponse} */ const response = { headerList: resp.headers, status: resp.status, body: null, statusMessage: resp.statusText, type: "basic", url() { if (this.urlList.length == 0) return null; return this.urlList[this.urlList.length - 1]; }, urlList: req.urlListProcessed, }; if (redirectStatus(resp.status)) { switch (req.redirectMode) { case "error": core.close(resp.responseRid); return networkError( "Encountered redirect while redirect mode is set to 'error'", ); case "follow": core.close(resp.responseRid); return httpRedirectFetch(req, response, terminator); case "manual": break; } } if (nullBodyStatus(response.status)) { core.close(resp.responseRid); } else { if (req.method === "HEAD" || req.method === "CONNECT") { response.body = null; core.close(resp.responseRid); } else { response.body = new InnerBody( createResponseBodyStream(resp.responseRid, terminator), ); } } if (recursive) return response; if (response.urlList.length === 0) { processUrlList(req.urlList, req.urlListProcessed); response.urlList = [...new SafeArrayIterator(req.urlListProcessed)]; } return response; } /** * @param {InnerRequest} request * @param {InnerResponse} response * @param {AbortSignal} terminator * @returns {Promise} */ function httpRedirectFetch(request, response, terminator) { const locationHeaders = ArrayPrototypeFilter( response.headerList, (entry) => byteLowerCase(entry[0]) === "location", ); if (locationHeaders.length === 0) { return response; } const locationURL = new URL( locationHeaders[0][1], response.url() ?? undefined, ); if (locationURL.hash === "") { locationURL.hash = request.currentUrl().hash; } if (locationURL.protocol !== "https:" && locationURL.protocol !== "http:") { return networkError("Can not redirect to a non HTTP(s) url"); } if (request.redirectCount === 20) { return networkError("Maximum number of redirects (20) reached"); } request.redirectCount++; if ( response.status !== 303 && request.body !== null && request.body.source === null ) { return networkError( "Can not redeliver a streaming request body after a redirect", ); } if ( ((response.status === 301 || response.status === 302) && request.method === "POST") || (response.status === 303 && request.method !== "GET" && request.method !== "HEAD") ) { request.method = "GET"; request.body = null; for (let i = 0; i < request.headerList.length; i++) { if ( ArrayPrototypeIncludes( REQUEST_BODY_HEADER_NAMES, byteLowerCase(request.headerList[i][0]), ) ) { ArrayPrototypeSplice(request.headerList, i, 1); i--; } } } if (request.body !== null) { const res = extractBody(request.body.source); request.body = res.body; } ArrayPrototypePush(request.urlList, () => locationURL.href); return mainFetch(request, true, terminator); } /** * @param {RequestInfo} input * @param {RequestInit} init */ function fetch(input, init = {}) { // There is an async dispatch later that causes a stack trace disconnect. // We reconnect it by assigning the result of that dispatch to `opPromise`, // awaiting `opPromise` in an inner function also named `fetch()` and // returning the result from that. let opPromise = undefined; // 1. const result = new Promise((resolve, reject) => { const prefix = "Failed to call 'fetch'"; webidl.requiredArguments(arguments.length, 1, prefix); // 2. const requestObject = new Request(input, init); // 3. const request = toInnerRequest(requestObject); // 4. if (requestObject.signal.aborted) { reject(abortFetch(request, null, requestObject.signal.reason)); return; } // 7. let responseObject = null; // 9. let locallyAborted = false; // 10. function onabort() { locallyAborted = true; reject( abortFetch(request, responseObject, requestObject.signal.reason), ); } requestObject.signal[abortSignal.add](onabort); if (!requestObject.headers.has("Accept")) { ArrayPrototypePush(request.headerList, ["Accept", "*/*"]); } if (!requestObject.headers.has("Accept-Language")) { ArrayPrototypePush(request.headerList, ["Accept-Language", "*"]); } // 12. opPromise = PromisePrototypeCatch( PromisePrototypeThen( mainFetch(request, false, requestObject.signal), (response) => { // 12.1. if (locallyAborted) return; // 12.2. if (response.aborted) { reject( abortFetch( request, responseObject, requestObject.signal.reason, ), ); requestObject.signal[abortSignal.remove](onabort); return; } // 12.3. if (response.type === "error") { const err = new TypeError( "Fetch failed: " + (response.error ?? "unknown error"), ); reject(err); requestObject.signal[abortSignal.remove](onabort); return; } responseObject = fromInnerResponse(response, "immutable"); resolve(responseObject); requestObject.signal[abortSignal.remove](onabort); }, ), (err) => { reject(err); requestObject.signal[abortSignal.remove](onabort); }, ); }); if (opPromise) { PromisePrototypeCatch(result, () => {}); return (async function fetch() { await opPromise; return result; })(); } return result; } function abortFetch(request, responseObject, error) { if (request.body !== null) { // Cancel the body if we haven't taken it as a resource yet if (!request.body.streamOrStatic.locked) { request.body.cancel(error); } } if (responseObject !== null) { const response = toInnerResponse(responseObject); if (response.body !== null) response.body.error(error); } return error; } /** * Handle the Response argument to the WebAssembly streaming APIs, after * resolving if it was passed as a promise. This function should be registered * through `Deno.core.setWasmStreamingCallback`. * * @param {any} source The source parameter that the WebAssembly streaming API * was called with. If it was called with a Promise, `source` is the resolved * value of that promise. * @param {number} rid An rid that represents the wasm streaming resource. */ function handleWasmStreaming(source, rid) { // This implements part of // https://webassembly.github.io/spec/web-api/#compile-a-potential-webassembly-response try { const res = webidl.converters["Response"]( source, "Failed to call 'WebAssembly.compileStreaming'", "Argument 1", ); // 2.3. // The spec is ambiguous here, see // https://github.com/WebAssembly/spec/issues/1138. The WPT tests expect // the raw value of the Content-Type attribute lowercased. We ignore this // for file:// because file fetches don't have a Content-Type. if (!StringPrototypeStartsWith(res.url, "file://")) { const contentType = res.headers.get("Content-Type"); if ( typeof contentType !== "string" || StringPrototypeToLowerCase(contentType) !== "application/wasm" ) { throw new TypeError("Invalid WebAssembly content type."); } } // 2.5. if (!res.ok) { throw new TypeError(`HTTP status code ${res.status}`); } // Pass the resolved URL to v8. op_wasm_streaming_set_url(rid, res.url); if (res.body !== null) { // 2.6. // Rather than consuming the body as an ArrayBuffer, this passes each // chunk to the feed as soon as it's available. PromisePrototypeThen( (async () => { const reader = res.body.getReader(); while (true) { const { value: chunk, done } = await reader.read(); if (done) break; op_wasm_streaming_feed(rid, chunk); } })(), // 2.7 () => core.close(rid), // 2.8 (err) => core.abortWasmStreaming(rid, err), ); } else { // 2.7 core.close(rid); } } catch (err) { // 2.8 core.abortWasmStreaming(rid, err); } } export { fetch, handleWasmStreaming, mainFetch }; Qdr̊mext:deno_fetch/26_fetch.jsa b&D`hM` T`lLa} T  I`ZSb1Acfc !!!+gn= -XZB[b`bcu??????????????????????Ib5`,L`  bS]`B]`eb]`n]`<"t]`*]`8V]`BW]`']`e],L` b` L`bd` L`dB]` L`B]L`  DDc D-DcT_`L` D  c'0 D"H"Hc DBOBOc DB;B;c'4 D  c DKKccv D''c% DUUc Dcz DbNbNc DKKc D 5 5c  D 9 9c% D = =c)? D A AcC\ Dc D44c^l Dbbc DBLBLc  D||c DBGBGcn| DbUbUc` a?a? 5a? 9a? =a? Aa?B;a?Ka?a?ba?"Ha?|a?'a? a?4a?BGa?BOa?Ua?bNa?Ka?BLa?bUa?B]a?ba?da?Zb@  T I` b @ B[Zb!@  T  I`4 b`b@  T I`*i,bcb@ ,L`  TI`i e#@"#@()@B]bMQ a TI` *cGH@ bb@ a T I`].X5db@ aa Acfc !!!+gn=   `M`XBYYBZ  Z`D h %%%%%%% % % % % %%%%%%%%%ei e% e% h  0- %- %- %- %- %- %- % -% -% -% -% -%-%-%-%{%% ZcPPPPPZbA Zy[D[D[D[D[[DD`RD]DH UQQօ2=*// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. /// import { primordials } from "ext:core/mod.js"; import { op_utf8_to_byte_string } from "ext:core/ops"; const { ArrayPrototypeFind, Number, NumberIsFinite, NumberIsNaN, ObjectDefineProperties, ObjectPrototypeIsPrototypeOf, Promise, StringPrototypeEndsWith, StringPrototypeIncludes, StringPrototypeIndexOf, StringPrototypeSlice, StringPrototypeSplit, StringPrototypeStartsWith, StringPrototypeToLowerCase, Symbol, SymbolFor, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; import { URL } from "ext:deno_url/00_url.js"; import { DOMException } from "ext:deno_web/01_dom_exception.js"; import { defineEventHandler, EventTarget, setIsTrusted, } from "ext:deno_web/02_event.js"; import { TransformStream } from "ext:deno_web/06_streams.js"; import { TextDecoderStream } from "ext:deno_web/08_text_encoding.js"; import { getLocationHref } from "ext:deno_web/12_location.js"; import { newInnerRequest } from "ext:deno_fetch/23_request.js"; import { mainFetch } from "ext:deno_fetch/26_fetch.js"; // Copied from https://github.com/denoland/deno_std/blob/e0753abe0c8602552862a568348c046996709521/streams/text_line_stream.ts#L20-L74 export class TextLineStream extends TransformStream { #allowCR; #buf = ""; constructor(options) { super({ transform: (chunk, controller) => this.#handle(chunk, controller), flush: (controller) => { if (this.#buf.length > 0) { if ( this.#allowCR && this.#buf[this.#buf.length - 1] === "\r" ) controller.enqueue(StringPrototypeSlice(this.#buf, 0, -1)); else controller.enqueue(this.#buf); } }, }); this.#allowCR = options?.allowCR ?? false; } #handle(chunk, controller) { chunk = this.#buf + chunk; for (;;) { const lfIndex = StringPrototypeIndexOf(chunk, "\n"); if (this.#allowCR) { const crIndex = StringPrototypeIndexOf(chunk, "\r"); if ( crIndex !== -1 && crIndex !== (chunk.length - 1) && (lfIndex === -1 || (lfIndex - 1) > crIndex) ) { controller.enqueue(StringPrototypeSlice(chunk, 0, crIndex)); chunk = StringPrototypeSlice(chunk, crIndex + 1); continue; } } if (lfIndex !== -1) { let crOrLfIndex = lfIndex; if (chunk[lfIndex - 1] === "\r") { crOrLfIndex--; } controller.enqueue(StringPrototypeSlice(chunk, 0, crOrLfIndex)); chunk = StringPrototypeSlice(chunk, lfIndex + 1); continue; } break; } this.#buf = chunk; } } const CONNECTING = 0; const OPEN = 1; const CLOSED = 2; const _url = Symbol("[[url]]"); const _withCredentials = Symbol("[[withCredentials]]"); const _readyState = Symbol("[[readyState]]"); const _reconnectionTime = Symbol("[[reconnectionTime]]"); const _lastEventID = Symbol("[[lastEventID]]"); const _abortController = Symbol("[[abortController]]"); const _loop = Symbol("[[loop]]"); class EventSource extends EventTarget { /** @type {AbortController} */ [_abortController] = new AbortController(); /** @type {number} */ [_reconnectionTime] = 5000; /** @type {string} */ [_lastEventID] = ""; /** @type {number} */ [_readyState] = CONNECTING; get readyState() { webidl.assertBranded(this, EventSourcePrototype); return this[_readyState]; } get CONNECTING() { webidl.assertBranded(this, EventSourcePrototype); return CONNECTING; } get OPEN() { webidl.assertBranded(this, EventSourcePrototype); return OPEN; } get CLOSED() { webidl.assertBranded(this, EventSourcePrototype); return CLOSED; } /** @type {string} */ [_url]; get url() { webidl.assertBranded(this, EventSourcePrototype); return this[_url]; } /** @type {boolean} */ [_withCredentials]; get withCredentials() { webidl.assertBranded(this, EventSourcePrototype); return this[_withCredentials]; } constructor(url, eventSourceInitDict = {}) { super(); this[webidl.brand] = webidl.brand; const prefix = "Failed to construct 'EventSource'"; webidl.requiredArguments(arguments.length, 1, { prefix, }); url = webidl.converters.USVString(url, { prefix, context: "Argument 1", }); eventSourceInitDict = webidl.converters.EventSourceInit( eventSourceInitDict, { prefix, context: "Argument 2", }, ); try { url = new URL(url, getLocationHref()).href; } catch (e) { throw new DOMException(e.message, "SyntaxError"); } this[_url] = url; this[_withCredentials] = eventSourceInitDict.withCredentials; this[_loop](); } close() { webidl.assertBranded(this, EventSourcePrototype); this[_abortController].abort(); this[_readyState] = CLOSED; } async [_loop]() { let lastEventIDValue = ""; while (this[_readyState] !== CLOSED) { const lastEventIDValueCopy = lastEventIDValue; lastEventIDValue = ""; const req = newInnerRequest( "GET", this[_url], () => lastEventIDValueCopy === "" ? [ ["accept", "text/event-stream"], ] : [ ["accept", "text/event-stream"], [ "Last-Event-Id", op_utf8_to_byte_string(lastEventIDValueCopy), ], ], null, false, ); /** @type {InnerResponse} */ const res = await mainFetch(req, true, this[_abortController].signal); const contentType = ArrayPrototypeFind( res.headerList, (header) => StringPrototypeToLowerCase(header[0]) === "content-type", ); if (res.type === "error") { if (res.aborted) { this[_readyState] = CLOSED; this.dispatchEvent(new Event("error")); break; } else { if (this[_readyState] === CLOSED) { this[_abortController].abort(); break; } this[_readyState] = CONNECTING; this.dispatchEvent(new Event("error")); await new Promise((res) => setTimeout(res, this[_reconnectionTime])); if (this[_readyState] !== CONNECTING) { continue; } if (this[_lastEventID] !== "") { lastEventIDValue = this[_lastEventID]; } continue; } } else if ( res.status !== 200 || !StringPrototypeIncludes( contentType?.[1].toLowerCase(), "text/event-stream", ) ) { this[_readyState] = CLOSED; this.dispatchEvent(new Event("error")); break; } if (this[_readyState] !== CLOSED) { this[_readyState] = OPEN; this.dispatchEvent(new Event("open")); let data = ""; let eventType = ""; let lastEventID = this[_lastEventID]; for await ( // deno-lint-ignore prefer-primordials const chunk of res.body.stream .pipeThrough(new TextDecoderStream()) .pipeThrough(new TextLineStream({ allowCR: true })) ) { if (chunk === "") { this[_lastEventID] = lastEventID; if (data === "") { eventType = ""; continue; } if (StringPrototypeEndsWith(data, "\n")) { data = StringPrototypeSlice(data, 0, -1); } const event = new MessageEvent(eventType || "message", { data, origin: res.url(), lastEventId: this[_lastEventID], }); setIsTrusted(event, true); data = ""; eventType = ""; if (this[_readyState] !== CLOSED) { this.dispatchEvent(event); } } else if (StringPrototypeStartsWith(chunk, ":")) { continue; } else { let field = chunk; let value = ""; if (StringPrototypeIncludes(chunk, ":")) { ({ 0: field, 1: value } = StringPrototypeSplit(chunk, ":")); if (StringPrototypeStartsWith(value, " ")) { value = StringPrototypeSlice(value, 1); } } switch (field) { case "event": { eventType = value; break; } case "data": { data += value + "\n"; break; } case "id": { if (!StringPrototypeIncludes(value, "\0")) { lastEventID = value; } break; } case "retry": { const reconnectionTime = Number(value); if ( !NumberIsNaN(reconnectionTime) && NumberIsFinite(reconnectionTime) ) { this[_reconnectionTime] = reconnectionTime; } break; } } } if (this[_abortController].signal.aborted) { break; } } if (this[_readyState] === CLOSED) { this[_abortController].abort(); break; } this[_readyState] = CONNECTING; this.dispatchEvent(new Event("error")); await new Promise((res) => setTimeout(res, this[_reconnectionTime])); if (this[_readyState] !== CONNECTING) { continue; } if (this[_lastEventID] !== "") { lastEventIDValue = this[_lastEventID]; } } } } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(EventSourcePrototype, this), keys: [ "readyState", "url", "withCredentials", "onopen", "onmessage", "onerror", ], }), inspectOptions, ); } } const EventSourcePrototype = EventSource.prototype; ObjectDefineProperties(EventSource, { CONNECTING: { value: 0, }, OPEN: { value: 1, }, CLOSED: { value: 2, }, }); defineEventHandler(EventSource.prototype, "open"); defineEventHandler(EventSource.prototype, "message"); defineEventHandler(EventSource.prototype, "error"); webidl.converters.EventSourceInit = webidl.createDictionaryConverter( "EventSourceInit", [ { key: "withCredentials", defaultValue: false, converter: webidl.converters.boolean, }, ], ); export { EventSource }; Qd"v ext:deno_fetch/27_eventsource.jsa b'D`\M` T`LaBsLba ![ !!UbXYb"dgn BrC ~?D)-;?-@E3AG 6I_K2=M [$gOPPPPP,@@@,P `[bA \D\\\\]]])]\5]=]DE]M]D`RD]DH Qn.9#// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { primordials } from "ext:core/mod.js"; import { op_cache_delete, op_cache_match, op_cache_put, op_cache_storage_delete, op_cache_storage_has, op_cache_storage_open, } from "ext:core/ops"; const { ArrayPrototypePush, ObjectPrototypeIsPrototypeOf, StringPrototypeSplit, StringPrototypeTrim, Symbol, SymbolFor, TypeError, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { Request, RequestPrototype, toInnerRequest, } from "ext:deno_fetch/23_request.js"; import { toInnerResponse } from "ext:deno_fetch/23_response.js"; import { URLPrototype } from "ext:deno_url/00_url.js"; import { getHeader } from "ext:deno_fetch/20_headers.js"; import { getReadableStreamResourceBacking, readableStreamForRid, resourceForReadableStream, } from "ext:deno_web/06_streams.js"; class CacheStorage { constructor() { webidl.illegalConstructor(); } async open(cacheName) { webidl.assertBranded(this, CacheStoragePrototype); const prefix = "Failed to execute 'open' on 'CacheStorage'"; webidl.requiredArguments(arguments.length, 1, prefix); cacheName = webidl.converters["DOMString"](cacheName, prefix, "Argument 1"); const cacheId = await op_cache_storage_open(cacheName); const cache = webidl.createBranded(Cache); cache[_id] = cacheId; return cache; } async has(cacheName) { webidl.assertBranded(this, CacheStoragePrototype); const prefix = "Failed to execute 'has' on 'CacheStorage'"; webidl.requiredArguments(arguments.length, 1, prefix); cacheName = webidl.converters["DOMString"](cacheName, prefix, "Argument 1"); return await op_cache_storage_has(cacheName); } async delete(cacheName) { webidl.assertBranded(this, CacheStoragePrototype); const prefix = "Failed to execute 'delete' on 'CacheStorage'"; webidl.requiredArguments(arguments.length, 1, prefix); cacheName = webidl.converters["DOMString"](cacheName, prefix, "Argument 1"); return await op_cache_storage_delete(cacheName); } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return `${this.constructor.name} ${inspect({}, inspectOptions)}`; } } const _matchAll = Symbol("[[matchAll]]"); const _id = Symbol("id"); class Cache { /** @type {number} */ [_id]; constructor() { webidl.illegalConstructor(); } /** See https://w3c.github.io/ServiceWorker/#dom-cache-put */ async put(request, response) { webidl.assertBranded(this, CachePrototype); const prefix = "Failed to execute 'put' on 'Cache'"; webidl.requiredArguments(arguments.length, 2, prefix); request = webidl.converters["RequestInfo_DOMString"]( request, prefix, "Argument 1", ); response = webidl.converters["Response"](response, prefix, "Argument 2"); // Step 1. let innerRequest = null; // Step 2. if (ObjectPrototypeIsPrototypeOf(RequestPrototype, request)) { innerRequest = toInnerRequest(request); } else { // Step 3. innerRequest = toInnerRequest(new Request(request)); } // Step 4. const reqUrl = new URL(innerRequest.url()); if (reqUrl.protocol !== "http:" && reqUrl.protocol !== "https:") { throw new TypeError( "Request url protocol must be 'http:' or 'https:'", ); } if (innerRequest.method !== "GET") { throw new TypeError("Request method must be GET"); } // Step 5. const innerResponse = toInnerResponse(response); // Step 6. if (innerResponse.status === 206) { throw new TypeError("Response status must not be 206"); } // Step 7. const varyHeader = getHeader(innerResponse.headerList, "vary"); if (varyHeader) { const fieldValues = StringPrototypeSplit(varyHeader, ","); for (let i = 0; i < fieldValues.length; ++i) { const field = fieldValues[i]; if (StringPrototypeTrim(field) === "*") { throw new TypeError("Vary header must not contain '*'"); } } } // Step 8. if (innerResponse.body !== null && innerResponse.body.unusable()) { throw new TypeError("Response body is already used"); } const stream = innerResponse.body?.stream; let rid = null; if (stream) { const resourceBacking = getReadableStreamResourceBacking( innerResponse.body?.stream, ); if (resourceBacking) { rid = resourceBacking.rid; } else { rid = resourceForReadableStream(stream, innerResponse.body?.length); } } // Remove fragment from request URL before put. reqUrl.hash = ""; // Step 9-11. // Step 12-19: TODO(@satyarohith): do the insertion in background. await op_cache_put( { cacheId: this[_id], // deno-lint-ignore prefer-primordials requestUrl: reqUrl.toString(), responseHeaders: innerResponse.headerList, requestHeaders: innerRequest.headerList, responseStatus: innerResponse.status, responseStatusText: innerResponse.statusMessage, responseRid: rid, }, ); } /** See https://w3c.github.io/ServiceWorker/#cache-match */ async match(request, options) { webidl.assertBranded(this, CachePrototype); const prefix = "Failed to execute 'match' on 'Cache'"; webidl.requiredArguments(arguments.length, 1, prefix); request = webidl.converters["RequestInfo_DOMString"]( request, prefix, "Argument 1", ); const p = await this[_matchAll](request, options); if (p.length > 0) { return p[0]; } else { return undefined; } } /** See https://w3c.github.io/ServiceWorker/#cache-delete */ async delete(request, _options) { webidl.assertBranded(this, CachePrototype); const prefix = "Failed to execute 'delete' on 'Cache'"; webidl.requiredArguments(arguments.length, 1, prefix); request = webidl.converters["RequestInfo_DOMString"]( request, prefix, "Argument 1", ); // Step 1. let r = null; // Step 2. if (ObjectPrototypeIsPrototypeOf(RequestPrototype, request)) { r = request; if (request.method !== "GET") { return false; } } else if ( typeof request === "string" || ObjectPrototypeIsPrototypeOf(URLPrototype, request) ) { r = new Request(request); } return await op_cache_delete({ cacheId: this[_id], requestUrl: r.url, }); } /** See https://w3c.github.io/ServiceWorker/#cache-matchall * * Note: the function is private as we don't want to expose * this API to the public yet. * * The function will return an array of responses. */ async [_matchAll](request, _options) { // Step 1. let r = null; // Step 2. if (ObjectPrototypeIsPrototypeOf(RequestPrototype, request)) { r = request; if (request.method !== "GET") { return []; } } else if ( typeof request === "string" || ObjectPrototypeIsPrototypeOf(URLPrototype, request) ) { r = new Request(request); } // Step 5. const responses = []; // Step 5.2 if (r === null) { // Step 5.3 // Note: we have to return all responses in the cache when // the request is null. // We deviate from the spec here and return an empty array // as we don't expose matchAll() API. return responses; } else { // Remove the fragment from the request URL. const url = new URL(r.url); url.hash = ""; const innerRequest = toInnerRequest(r); const matchResult = await op_cache_match( { cacheId: this[_id], // deno-lint-ignore prefer-primordials requestUrl: url.toString(), requestHeaders: innerRequest.headerList, }, ); if (matchResult) { const { 0: meta, 1: responseBodyRid } = matchResult; let body = null; if (responseBodyRid !== null) { body = readableStreamForRid(responseBodyRid); } const response = new Response( body, { headers: meta.responseHeaders, status: meta.responseStatus, statusText: meta.responseStatusText, }, ); ArrayPrototypePush(responses, response); } } // Step 5.4-5.5: don't apply in this context. return responses; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return `${this.constructor.name} ${inspect({}, inspectOptions)}`; } } webidl.configureInterface(CacheStorage); webidl.configureInterface(Cache); const CacheStoragePrototype = CacheStorage.prototype; const CachePrototype = Cache.prototype; let cacheStorageStorage; function cacheStorage() { if (!cacheStorageStorage) { cacheStorageStorage = webidl.createBranded(CacheStorage); } return cacheStorageStorage; } export { Cache, CacheStorage, cacheStorage }; QdVwext:deno_cache/01_cache.jsa b(D`@M` T`gLa!ILb T  I`" #eSb1 A!"dj= y"xz"j???????????Ib9#`(L` bS]`gB]` b]`V]`7BW]`w&]`b,]`"t]`r],L` y` L`y"w` L`"w` L` L`  DDcHL` D>>c D??c  Dbbc D""c Dc4 D I Ic D M Mc D Q Qc D U Uc D Y Yc D ] ]c DcT_ Dbbc8L D||cPi DBGBGc . DbUbUc`o`a? Ia? Ma? Qa? Ua? Ya? ]a?>a??a?BGa?bUa?ba?"a?a?ba?|a?"wa?ya?a?]b@ a a A!"dj Br  `T ``/ `/ `?  `  aD]fa DBva  aDa HcD La T  I`"w]]b   T I`Bvb Q  T I`b Q  T I`Eb Q  T I`q`b( bz$Sb @b? !  ` T ``/ `/ `?  `  a !D]f6bNa DB=a Da D aDHcDLb$ T  I`\ y}^]b Ճ  T I` 2B=b Q  T I`<bNb Q  T I`b Q  T I`y!`bΑ  T I`D!!`b(  T(` ]  ^`Kb I t c5(Sbqqy`Da+ ! a b   ]`Dh %%%%%% % % % % ei e% h  0-%-%-%-%- - - %  bte+ 1b% b% % t% t bt e+  2 1-0^-0^0- % 0- % % ]c" PP@@]bA U^]^e^m^u^^^^^^^^]D`RD]DH Q]x\?// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. /// import { core, primordials } from "ext:core/mod.js"; const { isAnyArrayBuffer, isArrayBuffer, } = core; import { op_ws_check_permission_and_cancel_handle, op_ws_close, op_ws_create, op_ws_get_buffer, op_ws_get_buffer_as_string, op_ws_get_buffered_amount, op_ws_get_error, op_ws_next_event, op_ws_send_binary, op_ws_send_binary_ab, op_ws_send_ping, op_ws_send_text, } from "ext:core/ops"; const { ArrayBufferIsView, ArrayPrototypeJoin, ArrayPrototypeMap, ArrayPrototypeSome, ErrorPrototypeToString, ObjectDefineProperties, ObjectPrototypeIsPrototypeOf, PromisePrototypeCatch, PromisePrototypeThen, RegExpPrototypeExec, SafeSet, SetPrototypeGetSize, String, StringPrototypeEndsWith, StringPrototypeToLowerCase, Symbol, SymbolFor, SymbolIterator, TypedArrayPrototypeGetByteLength, Uint8Array, } = primordials; import { URL } from "ext:deno_url/00_url.js"; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; import { HTTP_TOKEN_CODE_POINT_RE } from "ext:deno_web/00_infra.js"; import { DOMException } from "ext:deno_web/01_dom_exception.js"; import { CloseEvent, defineEventHandler, dispatch, ErrorEvent, Event, EventTarget, MessageEvent, setIsTrusted, } from "ext:deno_web/02_event.js"; import { Blob, BlobPrototype } from "ext:deno_web/09_file.js"; import { getLocationHref } from "ext:deno_web/12_location.js"; webidl.converters["sequence or DOMString"] = ( V, prefix, context, opts, ) => { // Union for (sequence or DOMString) if (webidl.type(V) === "Object" && V !== null) { if (V[SymbolIterator] !== undefined) { return webidl.converters["sequence"](V, prefix, context, opts); } } return webidl.converters.DOMString(V, prefix, context, opts); }; webidl.converters["WebSocketSend"] = (V, prefix, context, opts) => { // Union for (Blob or ArrayBufferView or ArrayBuffer or USVString) if (ObjectPrototypeIsPrototypeOf(BlobPrototype, V)) { return webidl.converters["Blob"](V, prefix, context, opts); } if (typeof V === "object") { if (isAnyArrayBuffer(V)) { return webidl.converters["ArrayBuffer"](V, prefix, context, opts); } if (ArrayBufferIsView(V)) { return webidl.converters["ArrayBufferView"](V, prefix, context, opts); } } return webidl.converters["USVString"](V, prefix, context, opts); }; /** role */ const SERVER = 0; const CLIENT = 1; /** state */ const CONNECTING = 0; const OPEN = 1; const CLOSING = 2; const CLOSED = 3; const _readyState = Symbol("[[readyState]]"); const _url = Symbol("[[url]]"); const _rid = Symbol("[[rid]]"); const _role = Symbol("[[role]]"); const _extensions = Symbol("[[extensions]]"); const _protocol = Symbol("[[protocol]]"); const _binaryType = Symbol("[[binaryType]]"); const _eventLoop = Symbol("[[eventLoop]]"); const _server = Symbol("[[server]]"); const _idleTimeoutDuration = Symbol("[[idleTimeout]]"); const _idleTimeoutTimeout = Symbol("[[idleTimeoutTimeout]]"); const _serverHandleIdleTimeout = Symbol("[[serverHandleIdleTimeout]]"); class WebSocket extends EventTarget { constructor(url, protocols = []) { super(); this[webidl.brand] = webidl.brand; this[_rid] = undefined; this[_role] = undefined; this[_readyState] = CONNECTING; this[_extensions] = ""; this[_protocol] = ""; this[_url] = ""; this[_binaryType] = "blob"; this[_idleTimeoutDuration] = 0; this[_idleTimeoutTimeout] = undefined; const prefix = "Failed to construct 'WebSocket'"; webidl.requiredArguments(arguments.length, 1, prefix); url = webidl.converters.USVString(url, prefix, "Argument 1"); protocols = webidl.converters["sequence or DOMString"]( protocols, prefix, "Argument 2", ); let wsURL; try { wsURL = new URL(url, getLocationHref()); } catch (e) { throw new DOMException(e.message, "SyntaxError"); } if (wsURL.protocol === "http:") { wsURL.protocol = "ws:"; } else if (wsURL.protocol === "https:") { wsURL.protocol = "wss:"; } if (wsURL.protocol !== "ws:" && wsURL.protocol !== "wss:") { throw new DOMException( "Only ws & wss schemes are allowed in a WebSocket URL.", "SyntaxError", ); } if (wsURL.hash !== "" || StringPrototypeEndsWith(wsURL.href, "#")) { throw new DOMException( "Fragments are not allowed in a WebSocket URL.", "SyntaxError", ); } this[_url] = wsURL.href; this[_role] = CLIENT; op_ws_check_permission_and_cancel_handle( "WebSocket.abort()", this[_url], false, ); if (typeof protocols === "string") { protocols = [protocols]; } if ( protocols.length !== SetPrototypeGetSize( new SafeSet( ArrayPrototypeMap(protocols, (p) => StringPrototypeToLowerCase(p)), ), ) ) { throw new DOMException( "Can't supply multiple times the same protocol.", "SyntaxError", ); } if ( ArrayPrototypeSome( protocols, (protocol) => RegExpPrototypeExec(HTTP_TOKEN_CODE_POINT_RE, protocol) === null, ) ) { throw new DOMException( "Invalid protocol value.", "SyntaxError", ); } PromisePrototypeThen( op_ws_create( "new WebSocket()", wsURL.href, ArrayPrototypeJoin(protocols, ", "), ), (create) => { this[_rid] = create.rid; this[_extensions] = create.extensions; this[_protocol] = create.protocol; if (this[_readyState] === CLOSING) { PromisePrototypeThen( op_ws_close(this[_rid]), () => { this[_readyState] = CLOSED; const errEvent = new ErrorEvent("error"); this.dispatchEvent(errEvent); const event = new CloseEvent("close"); this.dispatchEvent(event); core.tryClose(this[_rid]); }, ); } else { this[_readyState] = OPEN; const event = new Event("open"); this.dispatchEvent(event); this[_eventLoop](); } }, (err) => { this[_readyState] = CLOSED; const errorEv = new ErrorEvent( "error", { error: err, message: ErrorPrototypeToString(err) }, ); this.dispatchEvent(errorEv); const closeEv = new CloseEvent("close"); this.dispatchEvent(closeEv); }, ); } get readyState() { webidl.assertBranded(this, WebSocketPrototype); return this[_readyState]; } get CONNECTING() { webidl.assertBranded(this, WebSocketPrototype); return CONNECTING; } get OPEN() { webidl.assertBranded(this, WebSocketPrototype); return OPEN; } get CLOSING() { webidl.assertBranded(this, WebSocketPrototype); return CLOSING; } get CLOSED() { webidl.assertBranded(this, WebSocketPrototype); return CLOSED; } get extensions() { webidl.assertBranded(this, WebSocketPrototype); return this[_extensions]; } get protocol() { webidl.assertBranded(this, WebSocketPrototype); return this[_protocol]; } get url() { webidl.assertBranded(this, WebSocketPrototype); return this[_url]; } get binaryType() { webidl.assertBranded(this, WebSocketPrototype); return this[_binaryType]; } set binaryType(value) { webidl.assertBranded(this, WebSocketPrototype); value = webidl.converters.DOMString( value, "Failed to set 'binaryType' on 'WebSocket'", ); if (value === "blob" || value === "arraybuffer") { this[_binaryType] = value; } } get bufferedAmount() { webidl.assertBranded(this, WebSocketPrototype); if (this[_readyState] === OPEN) { return op_ws_get_buffered_amount(this[_rid]); } else { return 0; } } send(data) { webidl.assertBranded(this, WebSocketPrototype); const prefix = "Failed to execute 'send' on 'WebSocket'"; webidl.requiredArguments(arguments.length, 1, prefix); data = webidl.converters.WebSocketSend(data, prefix, "Argument 1"); if (this[_readyState] !== OPEN) { throw new DOMException("readyState not OPEN", "InvalidStateError"); } if (ArrayBufferIsView(data)) { op_ws_send_binary(this[_rid], data); } else if (isArrayBuffer(data)) { op_ws_send_binary(this[_rid], new Uint8Array(data)); } else if (ObjectPrototypeIsPrototypeOf(BlobPrototype, data)) { PromisePrototypeThen( // deno-lint-ignore prefer-primordials data.slice().arrayBuffer(), (ab) => op_ws_send_binary_ab(this[_rid], ab), ); } else { const string = String(data); op_ws_send_text( this[_rid], string, ); } } close(code = undefined, reason = undefined) { webidl.assertBranded(this, WebSocketPrototype); const prefix = "Failed to execute 'close' on 'WebSocket'"; if (code !== undefined) { code = webidl.converters["unsigned short"](code, prefix, "Argument 1", { clamp: true, }); } if (reason !== undefined) { reason = webidl.converters.USVString(reason, prefix, "Argument 2"); } if (!this[_server]) { if ( code !== undefined && !(code === 1000 || (3000 <= code && code < 5000)) ) { throw new DOMException( "The close code must be either 1000 or in the range of 3000 to 4999.", "InvalidAccessError", ); } } if ( reason !== undefined && TypedArrayPrototypeGetByteLength(core.encode(reason)) > 123 ) { throw new DOMException( "The close reason may not be longer than 123 bytes.", "SyntaxError", ); } if (this[_readyState] === CONNECTING) { this[_readyState] = CLOSING; } else if (this[_readyState] === OPEN) { this[_readyState] = CLOSING; PromisePrototypeCatch( op_ws_close( this[_rid], code, reason, ), (err) => { this[_readyState] = CLOSED; const errorEv = new ErrorEvent("error", { error: err, message: ErrorPrototypeToString(err), }); this.dispatchEvent(errorEv); const closeEv = new CloseEvent("close"); this.dispatchEvent(closeEv); core.tryClose(this[_rid]); }, ); } } async [_eventLoop]() { const rid = this[_rid]; while (this[_readyState] !== CLOSED) { const kind = await op_ws_next_event(rid); switch (kind) { case 0: { /* string */ this[_serverHandleIdleTimeout](); const event = new MessageEvent("message", { data: op_ws_get_buffer_as_string(rid), origin: this[_url], }); setIsTrusted(event, true); dispatch(this, event); break; } case 1: { /* binary */ this[_serverHandleIdleTimeout](); // deno-lint-ignore prefer-primordials const buffer = op_ws_get_buffer(rid).buffer; let data; if (this.binaryType === "blob") { data = new Blob([buffer]); } else { data = buffer; } const event = new MessageEvent("message", { data, origin: this[_url], }); setIsTrusted(event, true); dispatch(this, event); break; } case 2: { /* pong */ this[_serverHandleIdleTimeout](); break; } case 3: { /* error */ this[_readyState] = CLOSED; const errorEv = new ErrorEvent("error", { message: op_ws_get_error(rid), }); this.dispatchEvent(errorEv); const closeEv = new CloseEvent("close"); this.dispatchEvent(closeEv); core.tryClose(rid); break; } default: { /* close */ const code = kind; const reason = code == 1005 ? "" : op_ws_get_error(rid); const prevState = this[_readyState]; this[_readyState] = CLOSED; clearTimeout(this[_idleTimeoutTimeout]); if (prevState === OPEN) { try { await op_ws_close( rid, code, reason, ); } catch { // ignore failures } } const event = new CloseEvent("close", { wasClean: true, code: code, reason, }); this.dispatchEvent(event); core.tryClose(rid); break; } } } } [_serverHandleIdleTimeout]() { if (this[_idleTimeoutDuration]) { clearTimeout(this[_idleTimeoutTimeout]); this[_idleTimeoutTimeout] = setTimeout(async () => { if (this[_readyState] === OPEN) { await PromisePrototypeCatch(op_ws_send_ping(this[_rid]), () => {}); this[_idleTimeoutTimeout] = setTimeout(async () => { if (this[_readyState] === OPEN) { this[_readyState] = CLOSING; const reason = "No response from ping frame."; await PromisePrototypeCatch( op_ws_close(this[_rid], 1001, reason), () => {}, ); this[_readyState] = CLOSED; const errEvent = new ErrorEvent("error", { message: reason, }); this.dispatchEvent(errEvent); const event = new CloseEvent("close", { wasClean: false, code: 1001, reason, }); this.dispatchEvent(event); core.tryClose(this[_rid]); } else { clearTimeout(this[_idleTimeoutTimeout]); } }, (this[_idleTimeoutDuration] / 2) * 1000); } else { clearTimeout(this[_idleTimeoutTimeout]); } }, (this[_idleTimeoutDuration] / 2) * 1000); } } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(WebSocketPrototype, this), keys: [ "url", "readyState", "extensions", "protocol", "binaryType", "bufferedAmount", "onmessage", "onerror", "onclose", "onopen", ], }), inspectOptions, ); } } ObjectDefineProperties(WebSocket, { CONNECTING: { value: 0, }, OPEN: { value: 1, }, CLOSING: { value: 2, }, CLOSED: { value: 3, }, }); defineEventHandler(WebSocket.prototype, "message"); defineEventHandler(WebSocket.prototype, "error"); defineEventHandler(WebSocket.prototype, "close"); defineEventHandler(WebSocket.prototype, "open"); webidl.configureInterface(WebSocket); const WebSocketPrototype = WebSocket.prototype; function createWebSocketBranded() { const socket = webidl.createBranded(WebSocket); socket[_rid] = undefined; socket[_role] = undefined; socket[_readyState] = CONNECTING; socket[_extensions] = ""; socket[_protocol] = ""; socket[_url] = ""; // We use ArrayBuffer for server websockets for backwards compatibility // and performance reasons. // // https://github.com/denoland/deno/issues/15340#issuecomment-1872353134 socket[_binaryType] = "arraybuffer"; socket[_idleTimeoutDuration] = 0; socket[_idleTimeoutTimeout] = undefined; return socket; } export { _eventLoop, _idleTimeoutDuration, _idleTimeoutTimeout, _protocol, _readyState, _rid, _role, _server, _serverHandleIdleTimeout, createWebSocketBranded, SERVER, WebSocket, }; Qe6)<"ext:deno_websocket/01_websocket.jsa b)D`M`  T`-LaI@Lk    T  I`m<>Sb112q!Ai!!+B6%HUnI "iiBj2""B|?????????????????????????????Ib\?`0L`  bS]`B]`&]`b]`1"]`|n]`B]`]`]`+]`%]L`$` L`Œ` L`Œ"` L`"` L`"` L`""` L`"k` L`k` L`b`  L`b"`  L`"b`  L`b`  L` L`  DDc%+|L` Dbbc Db{b{c Dc/9 Dllc Dc_i D""cmr Dcv DB-B-c Dc DB B c D  c DcZt Dc=O DcS[ Dc  D a ac D e ec"- D i ic1= D m mcAQ D q qcUo D u ucs D y yc D } }c D  c D  c D  c D  c Dc D††c`) a?a? aa? ea? ia? ma? qa? ua? ya? }a? a? a? a? a?B a?a?B-a?la?a?a?a?a?"a?a?a?†a?ba?b{a?a?a?ka?a?ba ?"a?"a?"a ?a?"a?ba ?Œa?a ?^b@ a a  12q!Ai !!+B6%HUn Brb^ T y`2`,`+b^`!B`}I_bK B T  ```b^``% IbK blbjƒŠ  `T ``/ `/ `?  `  a :D]ff  } ` F` " `F` Di `F` Dbaj `F` D"i `F` D ` F` aD `F` DB `F` D ab a ` D ` F` HcDLc@HP T  I` Œ_^b   T I`Qbget readyStateb  T I` `Qbget CONNECTINGb  T I`k Qaget OPENb  T I`Qb get CLOSINGb   T I`#rQb get CLOSEDb   T I`Qbget extensionsb  T I`FQb get protocolb   T I`Q Qaget urlb  T I`Qbget binaryTypeb  T I`!0Qbset binaryTypeb  T I`FQcget bufferedAmountb  T I` #bb  T I`# *b  T I`!*"3`bΑ  T I`@3}8`b  T I`8:`b( 0b"ib`ib`Bb`jb`Y1Bv  ^`Dyh %%%%%%% % % % % %%%%%%%%%%%%%%%%%ei e% h  0-%-%0-%- %- %- %- % - -% -% -% -% -%-%-%-%- %-"-$-&%-(%-*%-,2.-,2 0 1 % % % % %!b21"b4%#b61$b81 %b:%&b<1'b>%(b@1)bB1 *bD1+bF1,bH1 0./-0123456 7 8 9 : ;<0t=0 t>?bJt߂@e+ 10~ALcM0B0-CODcQ00-COEcS00-COFcU00-COGcW-HY0^[0-CO% _(h]PPPPPPP @@@@0  ^bA _`i`Dq`}```````````D`Da aDa _D`RD]DH !QvI*2// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. /// import { core, primordials } from "ext:core/mod.js"; import { op_ws_check_permission_and_cancel_handle, op_ws_close, op_ws_create, op_ws_get_buffer, op_ws_get_buffer_as_string, op_ws_get_error, op_ws_next_event, op_ws_send_binary_async, op_ws_send_text_async, } from "ext:core/ops"; const { ArrayPrototypeJoin, ArrayPrototypeMap, DateNow, Error, ObjectPrototypeIsPrototypeOf, PromisePrototypeCatch, PromisePrototypeThen, SafeSet, SetPrototypeGetSize, StringPrototypeEndsWith, StringPrototypeToLowerCase, Symbol, SymbolFor, TypeError, TypedArrayPrototypeGetByteLength, TypedArrayPrototypeGetSymbolToStringTag, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; import { Deferred, writableStreamClose } from "ext:deno_web/06_streams.js"; import { DOMException } from "ext:deno_web/01_dom_exception.js"; import { add, remove } from "ext:deno_web/03_abort_signal.js"; import { fillHeaders, headerListFromHeaders, headersFromHeaderList, } from "ext:deno_fetch/20_headers.js"; webidl.converters.WebSocketStreamOptions = webidl.createDictionaryConverter( "WebSocketStreamOptions", [ { key: "protocols", converter: webidl.converters["sequence"], get defaultValue() { return []; }, }, { key: "signal", converter: webidl.converters.AbortSignal, }, { key: "headers", converter: webidl.converters.HeadersInit, }, ], ); webidl.converters.WebSocketCloseInfo = webidl.createDictionaryConverter( "WebSocketCloseInfo", [ { key: "code", converter: webidl.converters["unsigned short"], }, { key: "reason", converter: webidl.converters.USVString, defaultValue: "", }, ], ); const CLOSE_RESPONSE_TIMEOUT = 5000; const _rid = Symbol("[[rid]]"); const _url = Symbol("[[url]]"); const _opened = Symbol("[[opened]]"); const _closed = Symbol("[[closed]]"); const _earlyClose = Symbol("[[earlyClose]]"); const _closeSent = Symbol("[[closeSent]]"); class WebSocketStream { [_rid]; [_url]; get url() { webidl.assertBranded(this, WebSocketStreamPrototype); return this[_url]; } constructor(url, options) { this[webidl.brand] = webidl.brand; const prefix = "Failed to construct 'WebSocketStream'"; webidl.requiredArguments(arguments.length, 1, prefix); url = webidl.converters.USVString(url, prefix, "Argument 1"); options = webidl.converters.WebSocketStreamOptions( options, prefix, "Argument 2", ); const wsURL = new URL(url); if (wsURL.protocol !== "ws:" && wsURL.protocol !== "wss:") { throw new DOMException( "Only ws & wss schemes are allowed in a WebSocket URL.", "SyntaxError", ); } if (wsURL.hash !== "" || StringPrototypeEndsWith(wsURL.href, "#")) { throw new DOMException( "Fragments are not allowed in a WebSocket URL.", "SyntaxError", ); } this[_url] = wsURL.href; if ( options.protocols.length !== SetPrototypeGetSize( new SafeSet( ArrayPrototypeMap( options.protocols, (p) => StringPrototypeToLowerCase(p), ), ), ) ) { throw new DOMException( "Can't supply multiple times the same protocol.", "SyntaxError", ); } const headers = headersFromHeaderList([], "request"); if (options.headers !== undefined) { fillHeaders(headers, options.headers); } const cancelRid = op_ws_check_permission_and_cancel_handle( "WebSocketStream.abort()", this[_url], true, ); if (options.signal?.aborted) { core.close(cancelRid); const err = options.signal.reason; this[_opened].reject(err); this[_closed].reject(err); } else { const abort = () => { core.close(cancelRid); }; options.signal?.[add](abort); PromisePrototypeThen( op_ws_create( "new WebSocketStream()", this[_url], options.protocols ? ArrayPrototypeJoin(options.protocols, ", ") : "", cancelRid, headerListFromHeaders(headers), ), (create) => { options.signal?.[remove](abort); if (this[_earlyClose]) { PromisePrototypeThen( op_ws_close(create.rid), () => { PromisePrototypeThen( (async () => { while (true) { const kind = await op_ws_next_event(create.rid); if (kind > 5) { /* close */ break; } } })(), () => { const err = new DOMException( "Closed while connecting", "NetworkError", ); this[_opened].reject(err); this[_closed].reject(err); }, ); }, () => { const err = new DOMException( "Closed while connecting", "NetworkError", ); this[_opened].reject(err); this[_closed].reject(err); }, ); } else { this[_rid] = create.rid; const writable = new WritableStream({ write: async (chunk) => { if (typeof chunk === "string") { await op_ws_send_text_async(this[_rid], chunk); } else if ( TypedArrayPrototypeGetSymbolToStringTag(chunk) === "Uint8Array" ) { await op_ws_send_binary_async(this[_rid], chunk); } else { throw new TypeError( "A chunk may only be either a string or an Uint8Array", ); } }, close: async (reason) => { try { this.close(reason?.code !== undefined ? reason : {}); } catch (_) { this.close(); } await this.closed; }, abort: async (reason) => { try { this.close(reason?.code !== undefined ? reason : {}); } catch (_) { this.close(); } await this.closed; }, }); const pull = async (controller) => { // Remember that this pull method may be re-entered before it has completed const kind = await op_ws_next_event(this[_rid]); switch (kind) { case 0: /* string */ controller.enqueue(op_ws_get_buffer_as_string(this[_rid])); break; case 1: { /* binary */ controller.enqueue(op_ws_get_buffer(this[_rid])); break; } case 2: { /* pong */ break; } case 3: { /* error */ const err = new Error(op_ws_get_error(this[_rid])); this[_closed].reject(err); controller.error(err); core.tryClose(this[_rid]); break; } case 1005: { /* closed */ this[_closed].resolve({ code: 1005, reason: "" }); core.tryClose(this[_rid]); break; } default: { /* close */ const reason = op_ws_get_error(this[_rid]); this[_closed].resolve({ code: kind, reason, }); core.tryClose(this[_rid]); break; } } if ( this[_closeSent].state === "fulfilled" && this[_closed].state === "pending" ) { if ( DateNow() - await this[_closeSent].promise <= CLOSE_RESPONSE_TIMEOUT ) { return pull(controller); } const error = op_ws_get_error(this[_rid]); this[_closed].reject(new Error(error)); core.tryClose(this[_rid]); } }; const readable = new ReadableStream({ start: (controller) => { PromisePrototypeThen(this.closed, () => { try { controller.close(); } catch (_) { // needed to ignore warnings & assertions } try { PromisePrototypeCatch( writableStreamClose(writable), () => {}, ); } catch (_) { // needed to ignore warnings & assertions } }); PromisePrototypeThen(this[_closeSent].promise, () => { if (this[_closed].state === "pending") { return pull(controller); } }); }, pull, cancel: async (reason) => { try { this.close(reason?.code !== undefined ? reason : {}); } catch (_) { this.close(); } await this.closed; }, }); this[_opened].resolve({ readable, writable, extensions: create.extensions ?? "", protocol: create.protocol ?? "", }); } }, (err) => { if (ObjectPrototypeIsPrototypeOf(core.InterruptedPrototype, err)) { // The signal was aborted. err = options.signal.reason; } else { core.tryClose(cancelRid); } this[_opened].reject(err); this[_closed].reject(err); }, ); } } [_opened] = new Deferred(); get opened() { webidl.assertBranded(this, WebSocketStreamPrototype); return this[_opened].promise; } [_earlyClose] = false; [_closed] = new Deferred(); [_closeSent] = new Deferred(); get closed() { webidl.assertBranded(this, WebSocketStreamPrototype); return this[_closed].promise; } close(closeInfo) { webidl.assertBranded(this, WebSocketStreamPrototype); closeInfo = webidl.converters.WebSocketCloseInfo( closeInfo, "Failed to execute 'close' on 'WebSocketStream'", "Argument 1", ); if ( closeInfo.code && !(closeInfo.code === 1000 || (3000 <= closeInfo.code && closeInfo.code < 5000)) ) { throw new DOMException( "The close code must be either 1000 or in the range of 3000 to 4999.", "InvalidAccessError", ); } const encoder = new TextEncoder(); if ( closeInfo.reason && TypedArrayPrototypeGetByteLength(encoder.encode(closeInfo.reason)) > 123 ) { throw new DOMException( "The close reason may not be longer than 123 bytes.", "SyntaxError", ); } let code = closeInfo.code; if (closeInfo.reason && code === undefined) { code = 1000; } if (this[_opened].state === "pending") { this[_earlyClose] = true; } else if (this[_closed].state === "pending") { PromisePrototypeThen( op_ws_close(this[_rid], code, closeInfo.reason), () => { setTimeout(() => { this[_closeSent].resolve(DateNow()); }, 0); }, (err) => { this[_rid] && core.tryClose(this[_rid]); this[_closed].reject(err); }, ); } } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(WebSocketStreamPrototype, this), keys: [ "closed", "opened", "url", ], }), inspectOptions, ); } } const WebSocketStreamPrototype = WebSocketStream.prototype; export { WebSocketStream }; Qe(ext:deno_websocket/02_websocketstream.jsa b*D`|M` Ty`La:m Laa ! !!+%HUn Br= b^B  `Lc(ba B‰C"aC"‰"a T$`]  ia`Db}(SbqOQbget defaultValue`DaSb1!!!+%HUn2bBB™v???????????????????????Ib*2`(L` bS]`B]`b]`<"]`"t]`B]`]`Rb,]`]L`B` L`B L`  DDc06XL` Dllc  Dc Dc?B D  c Dce Dc Dbbc Dc D a ac D e ec D i ic D m mc  D q qc8 D y yc<K D } }cO_ D  ccz D  c~ Dc DBBcDJ Dc` a?a? aa? ea? ia? ma? qa? ya? }a? a? a?a?a?a?la?a?Ba?a?ba?a?Ba? a9ab  ba ‰Cb ba B‰CbB  `Lb ba q‰C`(ba ‰C"aIibj–—˜LSb @mBEEBFg??????1ya  `T ``/ `/ `?  `  a1D]f6Da DM } ` F` D aDb `F` D `F` HcD La4 T  I`n )B%b9ab Ճ  T I` _  Qaget urlb  T I`)+*Qb get openedb   T I`**Qb get closedb   T I`*j0b  T I`01`b(  TL`R L`  b`KdG ,ԅ T  :l550i550i 5 0i5(SbqqB`Da1b 4@ 4@ b   Ma`Dah %%%%%%% % % % % %%%%%%%%%%%ei e% h  0-%-%-%-%- %- %- % - % - % -% -% ---%-%-%- -"{$ ~%)- -&3( e 6* ~,)- --3/ 6* ~ 1)- -!234 6*_628- -""{#: ~$;)- -%<3> 6@ ~&B)- -'C3E 6@_G2"I %(bK%)bM%*bO%+bQ%,bS%-bU%.%%%%%%0/t%t%1t%2t%t%t%345bWt6e+728Y 10-9[% ya(h]PPPPPPs`,0'0`9abA eaUbMbDabmbybDbbD`RD]DH I QE $?// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. /// import { primordials } from "ext:core/mod.js"; import { op_webstorage_clear, op_webstorage_get, op_webstorage_iterate_keys, op_webstorage_key, op_webstorage_length, op_webstorage_remove, op_webstorage_set, } from "ext:core/ops"; const { Symbol, SymbolFor, ObjectFromEntries, ObjectEntries, ReflectDefineProperty, ReflectDeleteProperty, ReflectGet, ReflectHas, Proxy, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; const _persistent = Symbol("[[persistent]]"); class Storage { [_persistent]; constructor() { webidl.illegalConstructor(); } get length() { webidl.assertBranded(this, StoragePrototype); return op_webstorage_length(this[_persistent]); } key(index) { webidl.assertBranded(this, StoragePrototype); const prefix = "Failed to execute 'key' on 'Storage'"; webidl.requiredArguments(arguments.length, 1, prefix); index = webidl.converters["unsigned long"](index, prefix, "Argument 1"); return op_webstorage_key(index, this[_persistent]); } setItem(key, value) { webidl.assertBranded(this, StoragePrototype); const prefix = "Failed to execute 'setItem' on 'Storage'"; webidl.requiredArguments(arguments.length, 2, prefix); key = webidl.converters.DOMString(key, prefix, "Argument 1"); value = webidl.converters.DOMString(value, prefix, "Argument 2"); op_webstorage_set(key, value, this[_persistent]); } getItem(key) { webidl.assertBranded(this, StoragePrototype); const prefix = "Failed to execute 'getItem' on 'Storage'"; webidl.requiredArguments(arguments.length, 1, prefix); key = webidl.converters.DOMString(key, prefix, "Argument 1"); return op_webstorage_get(key, this[_persistent]); } removeItem(key) { webidl.assertBranded(this, StoragePrototype); const prefix = "Failed to execute 'removeItem' on 'Storage'"; webidl.requiredArguments(arguments.length, 1, prefix); key = webidl.converters.DOMString(key, prefix, "Argument 1"); op_webstorage_remove(key, this[_persistent]); } clear() { webidl.assertBranded(this, StoragePrototype); op_webstorage_clear(this[_persistent]); } } const StoragePrototype = Storage.prototype; function createStorage(persistent) { const storage = webidl.createBranded(Storage); storage[_persistent] = persistent; const proxy = new Proxy(storage, { deleteProperty(target, key) { if (typeof key === "symbol") { return ReflectDeleteProperty(target, key); } target.removeItem(key); return true; }, defineProperty(target, key, descriptor) { if (typeof key === "symbol") { return ReflectDefineProperty(target, key, descriptor); } target.setItem(key, descriptor.value); return true; }, get(target, key, receiver) { if (typeof key === "symbol") { return target[key]; } if (ReflectHas(target, key)) { return ReflectGet(target, key, receiver); } return target.getItem(key) ?? undefined; }, set(target, key, value) { if (typeof key === "symbol") { return ReflectDefineProperty(target, key, { value, configurable: true, }); } target.setItem(key, value); return true; }, has(target, key) { if (ReflectHas(target, key)) { return true; } return typeof key === "string" && typeof target.getItem(key) === "string"; }, ownKeys() { return op_webstorage_iterate_keys(persistent); }, getOwnPropertyDescriptor(target, key) { if (ReflectHas(target, key)) { return undefined; } const value = target.getItem(key); if (value === null) { return undefined; } return { value, enumerable: true, configurable: true, writable: true, }; }, }); storage[SymbolFor("Deno.privateCustomInspect")] = function ( inspect, inspectOptions, ) { return `${this.constructor.name} ${ inspect({ ...ObjectFromEntries(ObjectEntries(proxy)), length: this.length, }, inspectOptions) }`; }; return proxy; } let localStorageStorage; function localStorage() { if (!localStorageStorage) { localStorageStorage = createStorage(true); } return localStorageStorage; } let sessionStorageStorage; function sessionStorage() { if (!sessionStorageStorage) { sessionStorageStorage = createStorage(false); } return sessionStorageStorage; } export { localStorage, sessionStorage, Storage }; QeBr$ext:deno_webstorage/01_webstorage.jsa b+D`XM` T`xLaU T I`T (h; @@@@ @@ @ ! @žSb1Brb  HJK1žm??????????????Ib`L` bS]`B]`bb]`8],L` ` L`"` L`"B` L`B L`  DDc,2(L` D  c D  c D  c D  c D  c, D  c0D D  cHY Dc` a? a? a? a? a? a? a? a?a?"a?Ba?bb@ $La T  I`&"bb@ a  T I`KBb@ a a  Brb  HJK"$Sb @b?   ` T ``/ `/ `?  `  a D]` ` aj`+ } `Fa ajajaj Baj aj ] T  I`=cbb Ճ  T I`\Qb get lengthb   T I`ca b  T I`&b  T I`1ab  T I`oBb   T I` b  T(` ]  c` Ka  3c5(Sbqq`Da  a b   b`Dxh %%%%%%% % % % %%%ei e% h  0--%-%- %- %- %- %- % -% b% % t%e+ 2 10-% %% bb PPP,PbbA Uc]cicqcyccccbD-c5cD`RD]DH rQn*// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @ts-check /// /// /// /// import { core, primordials } from "ext:core/mod.js"; const { isArrayBuffer, isTypedArray, isDataView, } = core; import { op_crypto_base64url_decode, op_crypto_base64url_encode, op_crypto_decrypt, op_crypto_derive_bits, op_crypto_derive_bits_x25519, op_crypto_encrypt, op_crypto_export_key, op_crypto_export_pkcs8_ed25519, op_crypto_export_pkcs8_x25519, op_crypto_export_spki_ed25519, op_crypto_export_spki_x25519, op_crypto_generate_ed25519_keypair, op_crypto_generate_key, op_crypto_generate_x25519_keypair, op_crypto_get_random_values, op_crypto_import_key, op_crypto_import_pkcs8_ed25519, op_crypto_import_pkcs8_x25519, op_crypto_import_spki_ed25519, op_crypto_import_spki_x25519, op_crypto_jwk_x_ed25519, op_crypto_random_uuid, op_crypto_sign_ed25519, op_crypto_sign_key, op_crypto_subtle_digest, op_crypto_unwrap_key, op_crypto_verify_ed25519, op_crypto_verify_key, op_crypto_wrap_key, } from "ext:core/ops"; const { ArrayBufferIsView, ArrayBufferPrototypeGetByteLength, ArrayBufferPrototypeSlice, ArrayPrototypeEvery, ArrayPrototypeFilter, ArrayPrototypeFind, ArrayPrototypeIncludes, DataViewPrototypeGetBuffer, DataViewPrototypeGetByteLength, DataViewPrototypeGetByteOffset, JSONParse, JSONStringify, MathCeil, ObjectAssign, ObjectHasOwn, ObjectPrototypeIsPrototypeOf, SafeArrayIterator, SafeWeakMap, StringFromCharCode, StringPrototypeCharCodeAt, StringPrototypeToLowerCase, StringPrototypeToUpperCase, Symbol, SymbolFor, SyntaxError, TypeError, TypedArrayPrototypeGetBuffer, TypedArrayPrototypeGetByteLength, TypedArrayPrototypeGetByteOffset, TypedArrayPrototypeGetSymbolToStringTag, TypedArrayPrototypeSlice, Uint8Array, WeakMapPrototypeGet, WeakMapPrototypeSet, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; import { DOMException } from "ext:deno_web/01_dom_exception.js"; const supportedNamedCurves = ["P-256", "P-384", "P-521"]; const recognisedUsages = [ "encrypt", "decrypt", "sign", "verify", "deriveKey", "deriveBits", "wrapKey", "unwrapKey", ]; const simpleAlgorithmDictionaries = { AesGcmParams: { iv: "BufferSource", additionalData: "BufferSource" }, RsaHashedKeyGenParams: { hash: "HashAlgorithmIdentifier" }, EcKeyGenParams: {}, HmacKeyGenParams: { hash: "HashAlgorithmIdentifier" }, RsaPssParams: {}, EcdsaParams: { hash: "HashAlgorithmIdentifier" }, HmacImportParams: { hash: "HashAlgorithmIdentifier" }, HkdfParams: { hash: "HashAlgorithmIdentifier", salt: "BufferSource", info: "BufferSource", }, Pbkdf2Params: { hash: "HashAlgorithmIdentifier", salt: "BufferSource" }, RsaOaepParams: { label: "BufferSource" }, RsaHashedImportParams: { hash: "HashAlgorithmIdentifier" }, EcKeyImportParams: {}, }; const supportedAlgorithms = { "digest": { "SHA-1": null, "SHA-256": null, "SHA-384": null, "SHA-512": null, }, "generateKey": { "RSASSA-PKCS1-v1_5": "RsaHashedKeyGenParams", "RSA-PSS": "RsaHashedKeyGenParams", "RSA-OAEP": "RsaHashedKeyGenParams", "ECDSA": "EcKeyGenParams", "ECDH": "EcKeyGenParams", "AES-CTR": "AesKeyGenParams", "AES-CBC": "AesKeyGenParams", "AES-GCM": "AesKeyGenParams", "AES-KW": "AesKeyGenParams", "HMAC": "HmacKeyGenParams", "X25519": null, "Ed25519": null, }, "sign": { "RSASSA-PKCS1-v1_5": null, "RSA-PSS": "RsaPssParams", "ECDSA": "EcdsaParams", "HMAC": null, "Ed25519": null, }, "verify": { "RSASSA-PKCS1-v1_5": null, "RSA-PSS": "RsaPssParams", "ECDSA": "EcdsaParams", "HMAC": null, "Ed25519": null, }, "importKey": { "RSASSA-PKCS1-v1_5": "RsaHashedImportParams", "RSA-PSS": "RsaHashedImportParams", "RSA-OAEP": "RsaHashedImportParams", "ECDSA": "EcKeyImportParams", "ECDH": "EcKeyImportParams", "HMAC": "HmacImportParams", "HKDF": null, "PBKDF2": null, "AES-CTR": null, "AES-CBC": null, "AES-GCM": null, "AES-KW": null, "Ed25519": null, "X25519": null, }, "deriveBits": { "HKDF": "HkdfParams", "PBKDF2": "Pbkdf2Params", "ECDH": "EcdhKeyDeriveParams", "X25519": "EcdhKeyDeriveParams", }, "encrypt": { "RSA-OAEP": "RsaOaepParams", "AES-CBC": "AesCbcParams", "AES-GCM": "AesGcmParams", "AES-CTR": "AesCtrParams", }, "decrypt": { "RSA-OAEP": "RsaOaepParams", "AES-CBC": "AesCbcParams", "AES-GCM": "AesGcmParams", "AES-CTR": "AesCtrParams", }, "get key length": { "AES-CBC": "AesDerivedKeyParams", "AES-CTR": "AesDerivedKeyParams", "AES-GCM": "AesDerivedKeyParams", "AES-KW": "AesDerivedKeyParams", "HMAC": "HmacImportParams", "HKDF": null, "PBKDF2": null, }, "wrapKey": { "AES-KW": null, }, "unwrapKey": { "AES-KW": null, }, }; const aesJwkAlg = { "AES-CTR": { 128: "A128CTR", 192: "A192CTR", 256: "A256CTR", }, "AES-CBC": { 128: "A128CBC", 192: "A192CBC", 256: "A256CBC", }, "AES-GCM": { 128: "A128GCM", 192: "A192GCM", 256: "A256GCM", }, "AES-KW": { 128: "A128KW", 192: "A192KW", 256: "A256KW", }, }; // See https://www.w3.org/TR/WebCryptoAPI/#dfn-normalize-an-algorithm // 18.4.4 function normalizeAlgorithm(algorithm, op) { if (typeof algorithm == "string") { return normalizeAlgorithm({ name: algorithm }, op); } // 1. const registeredAlgorithms = supportedAlgorithms[op]; // 2. 3. const initialAlg = webidl.converters.Algorithm( algorithm, "Failed to normalize algorithm", "passed algorithm", ); // 4. let algName = initialAlg.name; // 5. let desiredType = undefined; for (const key in registeredAlgorithms) { if (!ObjectHasOwn(registeredAlgorithms, key)) { continue; } if ( StringPrototypeToUpperCase(key) === StringPrototypeToUpperCase(algName) ) { algName = key; desiredType = registeredAlgorithms[key]; } } if (desiredType === undefined) { throw new DOMException( "Unrecognized algorithm name", "NotSupportedError", ); } // Fast path everything below if the registered dictionary is "None". if (desiredType === null) { return { name: algName }; } // 6. const normalizedAlgorithm = webidl.converters[desiredType]( algorithm, "Failed to normalize algorithm", "passed algorithm", ); // 7. normalizedAlgorithm.name = algName; // 9. const dict = simpleAlgorithmDictionaries[desiredType]; // 10. for (const member in dict) { if (!ObjectHasOwn(dict, member)) { continue; } const idlType = dict[member]; const idlValue = normalizedAlgorithm[member]; // 3. if (idlType === "BufferSource" && idlValue) { normalizedAlgorithm[member] = copyBuffer(idlValue); } else if (idlType === "HashAlgorithmIdentifier") { normalizedAlgorithm[member] = normalizeAlgorithm(idlValue, "digest"); } else if (idlType === "AlgorithmIdentifier") { // TODO(lucacasonato): implement throw new TypeError("unimplemented"); } } return normalizedAlgorithm; } /** * @param {ArrayBufferView | ArrayBuffer} input * @returns {Uint8Array} */ function copyBuffer(input) { if (isTypedArray(input)) { return TypedArrayPrototypeSlice( new Uint8Array( TypedArrayPrototypeGetBuffer(/** @type {Uint8Array} */ (input)), TypedArrayPrototypeGetByteOffset(/** @type {Uint8Array} */ (input)), TypedArrayPrototypeGetByteLength(/** @type {Uint8Array} */ (input)), ), ); } else if (isDataView(input)) { return TypedArrayPrototypeSlice( new Uint8Array( DataViewPrototypeGetBuffer(/** @type {DataView} */ (input)), DataViewPrototypeGetByteOffset(/** @type {DataView} */ (input)), DataViewPrototypeGetByteLength(/** @type {DataView} */ (input)), ), ); } // ArrayBuffer return TypedArrayPrototypeSlice( new Uint8Array( input, 0, ArrayBufferPrototypeGetByteLength(input), ), ); } const _handle = Symbol("[[handle]]"); const _algorithm = Symbol("[[algorithm]]"); const _extractable = Symbol("[[extractable]]"); const _usages = Symbol("[[usages]]"); const _type = Symbol("[[type]]"); class CryptoKey { /** @type {string} */ [_type]; /** @type {boolean} */ [_extractable]; /** @type {object} */ [_algorithm]; /** @type {string[]} */ [_usages]; /** @type {object} */ [_handle]; constructor() { webidl.illegalConstructor(); } /** @returns {string} */ get type() { webidl.assertBranded(this, CryptoKeyPrototype); return this[_type]; } /** @returns {boolean} */ get extractable() { webidl.assertBranded(this, CryptoKeyPrototype); return this[_extractable]; } /** @returns {string[]} */ get usages() { webidl.assertBranded(this, CryptoKeyPrototype); // TODO(lucacasonato): return a SameObject copy return this[_usages]; } /** @returns {object} */ get algorithm() { webidl.assertBranded(this, CryptoKeyPrototype); // TODO(lucacasonato): return a SameObject copy return this[_algorithm]; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(CryptoKeyPrototype, this), keys: [ "type", "extractable", "algorithm", "usages", ], }), inspectOptions, ); } } webidl.configureInterface(CryptoKey); const CryptoKeyPrototype = CryptoKey.prototype; /** * @param {string} type * @param {boolean} extractable * @param {string[]} usages * @param {object} algorithm * @param {object} handle * @returns */ function constructKey(type, extractable, usages, algorithm, handle) { const key = webidl.createBranded(CryptoKey); key[_type] = type; key[_extractable] = extractable; key[_usages] = usages; key[_algorithm] = algorithm; key[_handle] = handle; return key; } // https://w3c.github.io/webcrypto/#concept-usage-intersection /** * @param {string[]} a * @param {string[]} b * @returns */ function usageIntersection(a, b) { return ArrayPrototypeFilter( a, (i) => ArrayPrototypeIncludes(b, i), ); } // TODO(lucacasonato): this should be moved to rust /** @type {WeakMap} */ const KEY_STORE = new SafeWeakMap(); function getKeyLength(algorithm) { switch (algorithm.name) { case "AES-CBC": case "AES-CTR": case "AES-GCM": case "AES-KW": { // 1. if (!ArrayPrototypeIncludes([128, 192, 256], algorithm.length)) { throw new DOMException( "length must be 128, 192, or 256", "OperationError", ); } // 2. return algorithm.length; } case "HMAC": { // 1. let length; if (algorithm.length === undefined) { switch (algorithm.hash.name) { case "SHA-1": length = 512; break; case "SHA-256": length = 512; break; case "SHA-384": length = 1024; break; case "SHA-512": length = 1024; break; default: throw new DOMException( "Unrecognized hash algorithm", "NotSupportedError", ); } } else if (algorithm.length !== 0) { length = algorithm.length; } else { throw new TypeError("Invalid length."); } // 2. return length; } case "HKDF": { // 1. return null; } case "PBKDF2": { // 1. return null; } default: throw new TypeError("unreachable"); } } class SubtleCrypto { constructor() { webidl.illegalConstructor(); } /** * @param {string} algorithm * @param {BufferSource} data * @returns {Promise} */ async digest(algorithm, data) { webidl.assertBranded(this, SubtleCryptoPrototype); const prefix = "Failed to execute 'digest' on 'SubtleCrypto'"; webidl.requiredArguments(arguments.length, 2, prefix); algorithm = webidl.converters.AlgorithmIdentifier( algorithm, prefix, "Argument 1", ); data = webidl.converters.BufferSource(data, prefix, "Argument 2"); data = copyBuffer(data); algorithm = normalizeAlgorithm(algorithm, "digest"); const result = await op_crypto_subtle_digest( algorithm.name, data, ); return TypedArrayPrototypeGetBuffer(result); } /** * @param {string} algorithm * @param {CryptoKey} key * @param {BufferSource} data * @returns {Promise} */ async encrypt(algorithm, key, data) { webidl.assertBranded(this, SubtleCryptoPrototype); const prefix = "Failed to execute 'encrypt' on 'SubtleCrypto'"; webidl.requiredArguments(arguments.length, 3, prefix); algorithm = webidl.converters.AlgorithmIdentifier( algorithm, prefix, "Argument 1", ); key = webidl.converters.CryptoKey(key, prefix, "Argument 2"); data = webidl.converters.BufferSource(data, prefix, "Argument 3"); // 2. data = copyBuffer(data); // 3. const normalizedAlgorithm = normalizeAlgorithm(algorithm, "encrypt"); // 8. if (normalizedAlgorithm.name !== key[_algorithm].name) { throw new DOMException( "Encryption algorithm doesn't match key algorithm.", "InvalidAccessError", ); } // 9. if (!ArrayPrototypeIncludes(key[_usages], "encrypt")) { throw new DOMException( "Key does not support the 'encrypt' operation.", "InvalidAccessError", ); } return await encrypt(normalizedAlgorithm, key, data); } /** * @param {string} algorithm * @param {CryptoKey} key * @param {BufferSource} data * @returns {Promise} */ async decrypt(algorithm, key, data) { webidl.assertBranded(this, SubtleCryptoPrototype); const prefix = "Failed to execute 'decrypt' on 'SubtleCrypto'"; webidl.requiredArguments(arguments.length, 3, prefix); algorithm = webidl.converters.AlgorithmIdentifier( algorithm, prefix, "Argument 1", ); key = webidl.converters.CryptoKey(key, prefix, "Argument 2"); data = webidl.converters.BufferSource(data, prefix, "Argument 3"); // 2. data = copyBuffer(data); // 3. const normalizedAlgorithm = normalizeAlgorithm(algorithm, "decrypt"); // 8. if (normalizedAlgorithm.name !== key[_algorithm].name) { throw new DOMException( "Decryption algorithm doesn't match key algorithm.", "OperationError", ); } // 9. if (!ArrayPrototypeIncludes(key[_usages], "decrypt")) { throw new DOMException( "Key does not support the 'decrypt' operation.", "InvalidAccessError", ); } const handle = key[_handle]; const keyData = WeakMapPrototypeGet(KEY_STORE, handle); switch (normalizedAlgorithm.name) { case "RSA-OAEP": { // 1. if (key[_type] !== "private") { throw new DOMException( "Key type not supported", "InvalidAccessError", ); } // 2. if (normalizedAlgorithm.label) { normalizedAlgorithm.label = copyBuffer(normalizedAlgorithm.label); } else { normalizedAlgorithm.label = new Uint8Array(); } // 3-5. const hashAlgorithm = key[_algorithm].hash.name; const plainText = await op_crypto_decrypt({ key: keyData, algorithm: "RSA-OAEP", hash: hashAlgorithm, label: normalizedAlgorithm.label, }, data); // 6. return TypedArrayPrototypeGetBuffer(plainText); } case "AES-CBC": { normalizedAlgorithm.iv = copyBuffer(normalizedAlgorithm.iv); // 1. if (TypedArrayPrototypeGetByteLength(normalizedAlgorithm.iv) !== 16) { throw new DOMException( "Counter must be 16 bytes", "OperationError", ); } const plainText = await op_crypto_decrypt({ key: keyData, algorithm: "AES-CBC", iv: normalizedAlgorithm.iv, length: key[_algorithm].length, }, data); // 6. return TypedArrayPrototypeGetBuffer(plainText); } case "AES-CTR": { normalizedAlgorithm.counter = copyBuffer(normalizedAlgorithm.counter); // 1. if ( TypedArrayPrototypeGetByteLength(normalizedAlgorithm.counter) !== 16 ) { throw new DOMException( "Counter vector must be 16 bytes", "OperationError", ); } // 2. if ( normalizedAlgorithm.length === 0 || normalizedAlgorithm.length > 128 ) { throw new DOMException( "Counter length must not be 0 or greater than 128", "OperationError", ); } // 3. const cipherText = await op_crypto_decrypt({ key: keyData, algorithm: "AES-CTR", keyLength: key[_algorithm].length, counter: normalizedAlgorithm.counter, ctrLength: normalizedAlgorithm.length, }, data); // 4. return TypedArrayPrototypeGetBuffer(cipherText); } case "AES-GCM": { normalizedAlgorithm.iv = copyBuffer(normalizedAlgorithm.iv); // 1. if (normalizedAlgorithm.tagLength === undefined) { normalizedAlgorithm.tagLength = 128; } else if ( !ArrayPrototypeIncludes( [32, 64, 96, 104, 112, 120, 128], normalizedAlgorithm.tagLength, ) ) { throw new DOMException( "Invalid tag length", "OperationError", ); } // 2. if ( TypedArrayPrototypeGetByteLength(data) < normalizedAlgorithm.tagLength / 8 ) { throw new DOMException( "Tag length overflows ciphertext", "OperationError", ); } // 3. We only support 96-bit and 128-bit nonce. if ( ArrayPrototypeIncludes( [12, 16], TypedArrayPrototypeGetByteLength(normalizedAlgorithm.iv), ) === undefined ) { throw new DOMException( "Initialization vector length not supported", "NotSupportedError", ); } // 4. if (normalizedAlgorithm.additionalData !== undefined) { // NOTE: over the size of Number.MAX_SAFE_INTEGER is not available in V8 // if (normalizedAlgorithm.additionalData.byteLength > (2 ** 64) - 1) { // throw new DOMException( // "Additional data too large", // "OperationError", // ); // } normalizedAlgorithm.additionalData = copyBuffer( normalizedAlgorithm.additionalData, ); } // 5-8. const plaintext = await op_crypto_decrypt({ key: keyData, algorithm: "AES-GCM", length: key[_algorithm].length, iv: normalizedAlgorithm.iv, additionalData: normalizedAlgorithm.additionalData || null, tagLength: normalizedAlgorithm.tagLength, }, data); // 9. return TypedArrayPrototypeGetBuffer(plaintext); } default: throw new DOMException("Not implemented", "NotSupportedError"); } } /** * @param {string} algorithm * @param {CryptoKey} key * @param {BufferSource} data * @returns {Promise} */ async sign(algorithm, key, data) { webidl.assertBranded(this, SubtleCryptoPrototype); const prefix = "Failed to execute 'sign' on 'SubtleCrypto'"; webidl.requiredArguments(arguments.length, 3, prefix); algorithm = webidl.converters.AlgorithmIdentifier( algorithm, prefix, "Argument 1", ); key = webidl.converters.CryptoKey(key, prefix, "Argument 2"); data = webidl.converters.BufferSource(data, prefix, "Argument 3"); // 1. data = copyBuffer(data); // 2. const normalizedAlgorithm = normalizeAlgorithm(algorithm, "sign"); const handle = key[_handle]; const keyData = WeakMapPrototypeGet(KEY_STORE, handle); // 8. if (normalizedAlgorithm.name !== key[_algorithm].name) { throw new DOMException( "Signing algorithm doesn't match key algorithm.", "InvalidAccessError", ); } // 9. if (!ArrayPrototypeIncludes(key[_usages], "sign")) { throw new DOMException( "Key does not support the 'sign' operation.", "InvalidAccessError", ); } switch (normalizedAlgorithm.name) { case "RSASSA-PKCS1-v1_5": { // 1. if (key[_type] !== "private") { throw new DOMException( "Key type not supported", "InvalidAccessError", ); } // 2. const hashAlgorithm = key[_algorithm].hash.name; const signature = await op_crypto_sign_key({ key: keyData, algorithm: "RSASSA-PKCS1-v1_5", hash: hashAlgorithm, }, data); return TypedArrayPrototypeGetBuffer(signature); } case "RSA-PSS": { // 1. if (key[_type] !== "private") { throw new DOMException( "Key type not supported", "InvalidAccessError", ); } // 2. const hashAlgorithm = key[_algorithm].hash.name; const signature = await op_crypto_sign_key({ key: keyData, algorithm: "RSA-PSS", hash: hashAlgorithm, saltLength: normalizedAlgorithm.saltLength, }, data); return TypedArrayPrototypeGetBuffer(signature); } case "ECDSA": { // 1. if (key[_type] !== "private") { throw new DOMException( "Key type not supported", "InvalidAccessError", ); } // 2. const hashAlgorithm = normalizedAlgorithm.hash.name; const namedCurve = key[_algorithm].namedCurve; if (!ArrayPrototypeIncludes(supportedNamedCurves, namedCurve)) { throw new DOMException("Curve not supported", "NotSupportedError"); } if ( (key[_algorithm].namedCurve === "P-256" && hashAlgorithm !== "SHA-256") || (key[_algorithm].namedCurve === "P-384" && hashAlgorithm !== "SHA-384") ) { throw new DOMException( "Not implemented", "NotSupportedError", ); } const signature = await op_crypto_sign_key({ key: keyData, algorithm: "ECDSA", hash: hashAlgorithm, namedCurve, }, data); return TypedArrayPrototypeGetBuffer(signature); } case "HMAC": { const hashAlgorithm = key[_algorithm].hash.name; const signature = await op_crypto_sign_key({ key: keyData, algorithm: "HMAC", hash: hashAlgorithm, }, data); return TypedArrayPrototypeGetBuffer(signature); } case "Ed25519": { // 1. if (key[_type] !== "private") { throw new DOMException( "Key type not supported", "InvalidAccessError", ); } // https://briansmith.org/rustdoc/src/ring/ec/curve25519/ed25519/signing.rs.html#260 const SIGNATURE_LEN = 32 * 2; // ELEM_LEN + SCALAR_LEN const signature = new Uint8Array(SIGNATURE_LEN); if (!op_crypto_sign_ed25519(keyData, data, signature)) { throw new DOMException( "Failed to sign", "OperationError", ); } return TypedArrayPrototypeGetBuffer(signature); } } throw new TypeError("unreachable"); } /** * @param {string} format * @param {BufferSource} keyData * @param {string} algorithm * @param {boolean} extractable * @param {KeyUsages[]} keyUsages * @returns {Promise} */ // deno-lint-ignore require-await async importKey(format, keyData, algorithm, extractable, keyUsages) { webidl.assertBranded(this, SubtleCryptoPrototype); const prefix = "Failed to execute 'importKey' on 'SubtleCrypto'"; webidl.requiredArguments(arguments.length, 4, prefix); format = webidl.converters.KeyFormat(format, prefix, "Argument 1"); keyData = webidl.converters["BufferSource or JsonWebKey"]( keyData, prefix, "Argument 2", ); algorithm = webidl.converters.AlgorithmIdentifier( algorithm, prefix, "Argument 3", ); extractable = webidl.converters.boolean(extractable, prefix, "Argument 4"); keyUsages = webidl.converters["sequence"]( keyUsages, prefix, "Argument 5", ); // 2. if (format !== "jwk") { if (ArrayBufferIsView(keyData) || isArrayBuffer(keyData)) { keyData = copyBuffer(keyData); } else { throw new TypeError("keyData is a JsonWebKey"); } } else { if (ArrayBufferIsView(keyData) || isArrayBuffer(keyData)) { throw new TypeError("keyData is not a JsonWebKey"); } } const normalizedAlgorithm = normalizeAlgorithm(algorithm, "importKey"); const algorithmName = normalizedAlgorithm.name; switch (algorithmName) { case "HMAC": { return importKeyHMAC( format, normalizedAlgorithm, keyData, extractable, keyUsages, ); } case "ECDH": case "ECDSA": { return importKeyEC( format, normalizedAlgorithm, keyData, extractable, keyUsages, ); } case "RSASSA-PKCS1-v1_5": case "RSA-PSS": case "RSA-OAEP": { return importKeyRSA( format, normalizedAlgorithm, keyData, extractable, keyUsages, ); } case "HKDF": { return importKeyHKDF(format, keyData, extractable, keyUsages); } case "PBKDF2": { return importKeyPBKDF2(format, keyData, extractable, keyUsages); } case "AES-CTR": case "AES-CBC": case "AES-GCM": { return importKeyAES( format, normalizedAlgorithm, keyData, extractable, keyUsages, ["encrypt", "decrypt", "wrapKey", "unwrapKey"], ); } case "AES-KW": { return importKeyAES( format, normalizedAlgorithm, keyData, extractable, keyUsages, ["wrapKey", "unwrapKey"], ); } case "X25519": { return importKeyX25519( format, keyData, extractable, keyUsages, ); } case "Ed25519": { return importKeyEd25519( format, keyData, extractable, keyUsages, ); } default: throw new DOMException("Not implemented", "NotSupportedError"); } } /** * @param {string} format * @param {CryptoKey} key * @returns {Promise} */ // deno-lint-ignore require-await async exportKey(format, key) { webidl.assertBranded(this, SubtleCryptoPrototype); const prefix = "Failed to execute 'exportKey' on 'SubtleCrypto'"; webidl.requiredArguments(arguments.length, 2, prefix); format = webidl.converters.KeyFormat(format, prefix, "Argument 1"); key = webidl.converters.CryptoKey(key, prefix, "Argument 2"); const handle = key[_handle]; // 2. const innerKey = WeakMapPrototypeGet(KEY_STORE, handle); const algorithmName = key[_algorithm].name; let result; switch (algorithmName) { case "HMAC": { result = exportKeyHMAC(format, key, innerKey); break; } case "RSASSA-PKCS1-v1_5": case "RSA-PSS": case "RSA-OAEP": { result = exportKeyRSA(format, key, innerKey); break; } case "ECDH": case "ECDSA": { result = exportKeyEC(format, key, innerKey); break; } case "Ed25519": { result = exportKeyEd25519(format, key, innerKey); break; } case "X25519": { result = exportKeyX25519(format, key, innerKey); break; } case "AES-CTR": case "AES-CBC": case "AES-GCM": case "AES-KW": { result = exportKeyAES(format, key, innerKey); break; } default: throw new DOMException("Not implemented", "NotSupportedError"); } if (key.extractable === false) { throw new DOMException( "Key is not extractable", "InvalidAccessError", ); } return result; } /** * @param {AlgorithmIdentifier} algorithm * @param {CryptoKey} baseKey * @param {number | null} length * @returns {Promise} */ async deriveBits(algorithm, baseKey, length) { webidl.assertBranded(this, SubtleCryptoPrototype); const prefix = "Failed to execute 'deriveBits' on 'SubtleCrypto'"; webidl.requiredArguments(arguments.length, 3, prefix); algorithm = webidl.converters.AlgorithmIdentifier( algorithm, prefix, "Argument 1", ); baseKey = webidl.converters.CryptoKey(baseKey, prefix, "Argument 2"); if (length !== null) { length = webidl.converters["unsigned long"](length, prefix, "Argument 3"); } // 2. const normalizedAlgorithm = normalizeAlgorithm(algorithm, "deriveBits"); // 4-6. const result = await deriveBits(normalizedAlgorithm, baseKey, length); // 7. if (normalizedAlgorithm.name !== baseKey[_algorithm].name) { throw new DOMException("Invalid algorithm name", "InvalidAccessError"); } // 8. if (!ArrayPrototypeIncludes(baseKey[_usages], "deriveBits")) { throw new DOMException( "baseKey usages does not contain `deriveBits`", "InvalidAccessError", ); } // 9-10. return result; } /** * @param {AlgorithmIdentifier} algorithm * @param {CryptoKey} baseKey * @param {number} length * @returns {Promise} */ async deriveKey( algorithm, baseKey, derivedKeyType, extractable, keyUsages, ) { webidl.assertBranded(this, SubtleCryptoPrototype); const prefix = "Failed to execute 'deriveKey' on 'SubtleCrypto'"; webidl.requiredArguments(arguments.length, 5, prefix); algorithm = webidl.converters.AlgorithmIdentifier( algorithm, prefix, "Argument 1", ); baseKey = webidl.converters.CryptoKey(baseKey, prefix, "Argument 2"); derivedKeyType = webidl.converters.AlgorithmIdentifier( derivedKeyType, prefix, "Argument 3", ); extractable = webidl.converters["boolean"]( extractable, prefix, "Argument 4", ); keyUsages = webidl.converters["sequence"]( keyUsages, prefix, "Argument 5", ); // 2-3. const normalizedAlgorithm = normalizeAlgorithm(algorithm, "deriveBits"); // 4-5. const normalizedDerivedKeyAlgorithmImport = normalizeAlgorithm( derivedKeyType, "importKey", ); // 6-7. const normalizedDerivedKeyAlgorithmLength = normalizeAlgorithm( derivedKeyType, "get key length", ); // 8-10. // 11. if (normalizedAlgorithm.name !== baseKey[_algorithm].name) { throw new DOMException( "Invalid algorithm name", "InvalidAccessError", ); } // 12. if (!ArrayPrototypeIncludes(baseKey[_usages], "deriveKey")) { throw new DOMException( "baseKey usages does not contain `deriveKey`", "InvalidAccessError", ); } // 13. const length = getKeyLength(normalizedDerivedKeyAlgorithmLength); // 14. const secret = await deriveBits( normalizedAlgorithm, baseKey, length, ); // 15. const result = await this.importKey( "raw", secret, normalizedDerivedKeyAlgorithmImport, extractable, keyUsages, ); // 16. if ( ArrayPrototypeIncludes(["private", "secret"], result[_type]) && keyUsages.length == 0 ) { throw new SyntaxError("Invalid key usages"); } // 17. return result; } /** * @param {string} algorithm * @param {CryptoKey} key * @param {BufferSource} signature * @param {BufferSource} data * @returns {Promise} */ async verify(algorithm, key, signature, data) { webidl.assertBranded(this, SubtleCryptoPrototype); const prefix = "Failed to execute 'verify' on 'SubtleCrypto'"; webidl.requiredArguments(arguments.length, 4, prefix); algorithm = webidl.converters.AlgorithmIdentifier( algorithm, prefix, "Argument 1", ); key = webidl.converters.CryptoKey(key, prefix, "Argument 2"); signature = webidl.converters.BufferSource(signature, prefix, "Argument 3"); data = webidl.converters.BufferSource(data, prefix, "Argument 4"); // 2. signature = copyBuffer(signature); // 3. data = copyBuffer(data); const normalizedAlgorithm = normalizeAlgorithm(algorithm, "verify"); const handle = key[_handle]; const keyData = WeakMapPrototypeGet(KEY_STORE, handle); if (normalizedAlgorithm.name !== key[_algorithm].name) { throw new DOMException( "Verifying algorithm doesn't match key algorithm.", "InvalidAccessError", ); } if (!ArrayPrototypeIncludes(key[_usages], "verify")) { throw new DOMException( "Key does not support the 'verify' operation.", "InvalidAccessError", ); } switch (normalizedAlgorithm.name) { case "RSASSA-PKCS1-v1_5": { if (key[_type] !== "public") { throw new DOMException( "Key type not supported", "InvalidAccessError", ); } const hashAlgorithm = key[_algorithm].hash.name; return await op_crypto_verify_key({ key: keyData, algorithm: "RSASSA-PKCS1-v1_5", hash: hashAlgorithm, signature, }, data); } case "RSA-PSS": { if (key[_type] !== "public") { throw new DOMException( "Key type not supported", "InvalidAccessError", ); } const hashAlgorithm = key[_algorithm].hash.name; return await op_crypto_verify_key({ key: keyData, algorithm: "RSA-PSS", hash: hashAlgorithm, signature, saltLength: normalizedAlgorithm.saltLength, }, data); } case "HMAC": { const hash = key[_algorithm].hash.name; return await op_crypto_verify_key({ key: keyData, algorithm: "HMAC", hash, signature, }, data); } case "ECDSA": { // 1. if (key[_type] !== "public") { throw new DOMException( "Key type not supported", "InvalidAccessError", ); } // 2. const hash = normalizedAlgorithm.hash.name; if ( (key[_algorithm].namedCurve === "P-256" && hash !== "SHA-256") || (key[_algorithm].namedCurve === "P-384" && hash !== "SHA-384") ) { throw new DOMException( "Not implemented", "NotSupportedError", ); } // 3-8. return await op_crypto_verify_key({ key: keyData, algorithm: "ECDSA", hash, signature, namedCurve: key[_algorithm].namedCurve, }, data); } case "Ed25519": { // 1. if (key[_type] !== "public") { throw new DOMException( "Key type not supported", "InvalidAccessError", ); } return op_crypto_verify_ed25519(keyData, data, signature); } } throw new TypeError("unreachable"); } /** * @param {string} algorithm * @param {boolean} extractable * @param {KeyUsage[]} keyUsages * @returns {Promise} */ async wrapKey(format, key, wrappingKey, wrapAlgorithm) { webidl.assertBranded(this, SubtleCryptoPrototype); const prefix = "Failed to execute 'wrapKey' on 'SubtleCrypto'"; webidl.requiredArguments(arguments.length, 4, prefix); format = webidl.converters.KeyFormat(format, prefix, "Argument 1"); key = webidl.converters.CryptoKey(key, prefix, "Argument 2"); wrappingKey = webidl.converters.CryptoKey( wrappingKey, prefix, "Argument 3", ); wrapAlgorithm = webidl.converters.AlgorithmIdentifier( wrapAlgorithm, prefix, "Argument 4", ); let normalizedAlgorithm; try { // 2. normalizedAlgorithm = normalizeAlgorithm(wrapAlgorithm, "wrapKey"); } catch (_) { // 3. normalizedAlgorithm = normalizeAlgorithm(wrapAlgorithm, "encrypt"); } // 8. if (normalizedAlgorithm.name !== wrappingKey[_algorithm].name) { throw new DOMException( "Wrapping algorithm doesn't match key algorithm.", "InvalidAccessError", ); } // 9. if (!ArrayPrototypeIncludes(wrappingKey[_usages], "wrapKey")) { throw new DOMException( "Key does not support the 'wrapKey' operation.", "InvalidAccessError", ); } // 10. NotSupportedError will be thrown in step 12. // 11. if (key[_extractable] === false) { throw new DOMException( "Key is not extractable", "InvalidAccessError", ); } // 12. const exportedKey = await this.exportKey(format, key); let bytes; // 13. if (format !== "jwk") { bytes = new Uint8Array(exportedKey); } else { const jwk = JSONStringify(exportedKey); const ret = new Uint8Array(jwk.length); for (let i = 0; i < jwk.length; i++) { ret[i] = StringPrototypeCharCodeAt(jwk, i); } bytes = ret; } // 14-15. if ( supportedAlgorithms["wrapKey"][normalizedAlgorithm.name] !== undefined ) { const handle = wrappingKey[_handle]; const keyData = WeakMapPrototypeGet(KEY_STORE, handle); switch (normalizedAlgorithm.name) { case "AES-KW": { const cipherText = await op_crypto_wrap_key({ key: keyData, algorithm: normalizedAlgorithm.name, }, bytes); // 4. return TypedArrayPrototypeGetBuffer(cipherText); } default: { throw new DOMException( "Not implemented", "NotSupportedError", ); } } } else if ( supportedAlgorithms["encrypt"][normalizedAlgorithm.name] !== undefined ) { // must construct a new key, since keyUsages is ["wrapKey"] and not ["encrypt"] return await encrypt( normalizedAlgorithm, constructKey( wrappingKey[_type], wrappingKey[_extractable], ["encrypt"], wrappingKey[_algorithm], wrappingKey[_handle], ), bytes, ); } else { throw new DOMException( "Algorithm not supported", "NotSupportedError", ); } } /** * @param {string} format * @param {BufferSource} wrappedKey * @param {CryptoKey} unwrappingKey * @param {AlgorithmIdentifier} unwrapAlgorithm * @param {AlgorithmIdentifier} unwrappedKeyAlgorithm * @param {boolean} extractable * @param {KeyUsage[]} keyUsages * @returns {Promise} */ async unwrapKey( format, wrappedKey, unwrappingKey, unwrapAlgorithm, unwrappedKeyAlgorithm, extractable, keyUsages, ) { webidl.assertBranded(this, SubtleCryptoPrototype); const prefix = "Failed to execute 'unwrapKey' on 'SubtleCrypto'"; webidl.requiredArguments(arguments.length, 7, prefix); format = webidl.converters.KeyFormat(format, prefix, "Argument 1"); wrappedKey = webidl.converters.BufferSource( wrappedKey, prefix, "Argument 2", ); unwrappingKey = webidl.converters.CryptoKey( unwrappingKey, prefix, "Argument 3", ); unwrapAlgorithm = webidl.converters.AlgorithmIdentifier( unwrapAlgorithm, prefix, "Argument 4", ); unwrappedKeyAlgorithm = webidl.converters.AlgorithmIdentifier( unwrappedKeyAlgorithm, prefix, "Argument 5", ); extractable = webidl.converters.boolean(extractable, prefix, "Argument 6"); keyUsages = webidl.converters["sequence"]( keyUsages, prefix, "Argument 7", ); // 2. wrappedKey = copyBuffer(wrappedKey); let normalizedAlgorithm; try { // 3. normalizedAlgorithm = normalizeAlgorithm(unwrapAlgorithm, "unwrapKey"); } catch (_) { // 4. normalizedAlgorithm = normalizeAlgorithm(unwrapAlgorithm, "decrypt"); } // 6. const normalizedKeyAlgorithm = normalizeAlgorithm( unwrappedKeyAlgorithm, "importKey", ); // 11. if (normalizedAlgorithm.name !== unwrappingKey[_algorithm].name) { throw new DOMException( "Unwrapping algorithm doesn't match key algorithm.", "InvalidAccessError", ); } // 12. if (!ArrayPrototypeIncludes(unwrappingKey[_usages], "unwrapKey")) { throw new DOMException( "Key does not support the 'unwrapKey' operation.", "InvalidAccessError", ); } // 13. let key; if ( supportedAlgorithms["unwrapKey"][normalizedAlgorithm.name] !== undefined ) { const handle = unwrappingKey[_handle]; const keyData = WeakMapPrototypeGet(KEY_STORE, handle); switch (normalizedAlgorithm.name) { case "AES-KW": { const plainText = await op_crypto_unwrap_key({ key: keyData, algorithm: normalizedAlgorithm.name, }, wrappedKey); // 4. key = TypedArrayPrototypeGetBuffer(plainText); break; } default: { throw new DOMException( "Not implemented", "NotSupportedError", ); } } } else if ( supportedAlgorithms["decrypt"][normalizedAlgorithm.name] !== undefined ) { // must construct a new key, since keyUsages is ["unwrapKey"] and not ["decrypt"] key = await this.decrypt( normalizedAlgorithm, constructKey( unwrappingKey[_type], unwrappingKey[_extractable], ["decrypt"], unwrappingKey[_algorithm], unwrappingKey[_handle], ), wrappedKey, ); } else { throw new DOMException( "Algorithm not supported", "NotSupportedError", ); } let bytes; // 14. if (format !== "jwk") { bytes = key; } else { const k = new Uint8Array(key); let str = ""; for (let i = 0; i < k.length; i++) { str += StringFromCharCode(k[i]); } bytes = JSONParse(str); } // 15. const result = await this.importKey( format, bytes, normalizedKeyAlgorithm, extractable, keyUsages, ); // 16. if ( (result[_type] == "secret" || result[_type] == "private") && keyUsages.length == 0 ) { throw new SyntaxError("Invalid key type."); } // 17. result[_extractable] = extractable; // 18. result[_usages] = usageIntersection(keyUsages, recognisedUsages); // 19. return result; } /** * @param {string} algorithm * @param {boolean} extractable * @param {KeyUsage[]} keyUsages * @returns {Promise} */ async generateKey(algorithm, extractable, keyUsages) { webidl.assertBranded(this, SubtleCryptoPrototype); const prefix = "Failed to execute 'generateKey' on 'SubtleCrypto'"; webidl.requiredArguments(arguments.length, 3, prefix); algorithm = webidl.converters.AlgorithmIdentifier( algorithm, prefix, "Argument 1", ); extractable = webidl.converters["boolean"]( extractable, prefix, "Argument 2", ); keyUsages = webidl.converters["sequence"]( keyUsages, prefix, "Argument 3", ); const usages = keyUsages; const normalizedAlgorithm = normalizeAlgorithm(algorithm, "generateKey"); const result = await generateKey( normalizedAlgorithm, extractable, usages, ); if (ObjectPrototypeIsPrototypeOf(CryptoKeyPrototype, result)) { const type = result[_type]; if ((type === "secret" || type === "private") && usages.length === 0) { throw new DOMException("Invalid key usages", "SyntaxError"); } } else if ( ObjectPrototypeIsPrototypeOf(CryptoKeyPrototype, result.privateKey) ) { if (result.privateKey[_usages].length === 0) { throw new DOMException("Invalid key usages", "SyntaxError"); } } return result; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return `${this.constructor.name} ${inspect({}, inspectOptions)}`; } } const SubtleCryptoPrototype = SubtleCrypto.prototype; async function generateKey(normalizedAlgorithm, extractable, usages) { const algorithmName = normalizedAlgorithm.name; switch (algorithmName) { case "RSASSA-PKCS1-v1_5": case "RSA-PSS": { // 1. if ( ArrayPrototypeFind( usages, (u) => !ArrayPrototypeIncludes(["sign", "verify"], u), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } // 2. const keyData = await op_crypto_generate_key( { algorithm: "RSA", modulusLength: normalizedAlgorithm.modulusLength, publicExponent: normalizedAlgorithm.publicExponent, }, ); const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, { type: "private", data: keyData, }); // 4-8. const algorithm = { name: algorithmName, modulusLength: normalizedAlgorithm.modulusLength, publicExponent: normalizedAlgorithm.publicExponent, hash: normalizedAlgorithm.hash, }; // 9-13. const publicKey = constructKey( "public", true, usageIntersection(usages, ["verify"]), algorithm, handle, ); // 14-18. const privateKey = constructKey( "private", extractable, usageIntersection(usages, ["sign"]), algorithm, handle, ); // 19-22. return { publicKey, privateKey }; } case "RSA-OAEP": { if ( ArrayPrototypeFind( usages, (u) => !ArrayPrototypeIncludes([ "encrypt", "decrypt", "wrapKey", "unwrapKey", ], u), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } // 2. const keyData = await op_crypto_generate_key( { algorithm: "RSA", modulusLength: normalizedAlgorithm.modulusLength, publicExponent: normalizedAlgorithm.publicExponent, }, ); const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, { type: "private", data: keyData, }); // 4-8. const algorithm = { name: algorithmName, modulusLength: normalizedAlgorithm.modulusLength, publicExponent: normalizedAlgorithm.publicExponent, hash: normalizedAlgorithm.hash, }; // 9-13. const publicKey = constructKey( "public", true, usageIntersection(usages, ["encrypt", "wrapKey"]), algorithm, handle, ); // 14-18. const privateKey = constructKey( "private", extractable, usageIntersection(usages, ["decrypt", "unwrapKey"]), algorithm, handle, ); // 19-22. return { publicKey, privateKey }; } case "ECDSA": { const namedCurve = normalizedAlgorithm.namedCurve; // 1. if ( ArrayPrototypeFind( usages, (u) => !ArrayPrototypeIncludes(["sign", "verify"], u), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } // 2-3. const handle = {}; if ( ArrayPrototypeIncludes( supportedNamedCurves, namedCurve, ) ) { const keyData = await op_crypto_generate_key({ algorithm: "EC", namedCurve, }); WeakMapPrototypeSet(KEY_STORE, handle, { type: "private", data: keyData, }); } else { throw new DOMException("Curve not supported", "NotSupportedError"); } // 4-6. const algorithm = { name: algorithmName, namedCurve, }; // 7-11. const publicKey = constructKey( "public", true, usageIntersection(usages, ["verify"]), algorithm, handle, ); // 12-16. const privateKey = constructKey( "private", extractable, usageIntersection(usages, ["sign"]), algorithm, handle, ); // 17-20. return { publicKey, privateKey }; } case "ECDH": { const namedCurve = normalizedAlgorithm.namedCurve; // 1. if ( ArrayPrototypeFind( usages, (u) => !ArrayPrototypeIncludes(["deriveKey", "deriveBits"], u), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } // 2-3. const handle = {}; if ( ArrayPrototypeIncludes( supportedNamedCurves, namedCurve, ) ) { const keyData = await op_crypto_generate_key({ algorithm: "EC", namedCurve, }); WeakMapPrototypeSet(KEY_STORE, handle, { type: "private", data: keyData, }); } else { throw new DOMException("Curve not supported", "NotSupportedError"); } // 4-6. const algorithm = { name: algorithmName, namedCurve, }; // 7-11. const publicKey = constructKey( "public", true, usageIntersection(usages, []), algorithm, handle, ); // 12-16. const privateKey = constructKey( "private", extractable, usageIntersection(usages, ["deriveKey", "deriveBits"]), algorithm, handle, ); // 17-20. return { publicKey, privateKey }; } case "AES-CTR": case "AES-CBC": case "AES-GCM": { // 1. if ( ArrayPrototypeFind( usages, (u) => !ArrayPrototypeIncludes([ "encrypt", "decrypt", "wrapKey", "unwrapKey", ], u), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } return generateKeyAES(normalizedAlgorithm, extractable, usages); } case "AES-KW": { // 1. if ( ArrayPrototypeFind( usages, (u) => !ArrayPrototypeIncludes(["wrapKey", "unwrapKey"], u), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } return generateKeyAES(normalizedAlgorithm, extractable, usages); } case "X25519": { if ( ArrayPrototypeFind( usages, (u) => !ArrayPrototypeIncludes(["deriveKey", "deriveBits"], u), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } const privateKeyData = new Uint8Array(32); const publicKeyData = new Uint8Array(32); op_crypto_generate_x25519_keypair(privateKeyData, publicKeyData); const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, privateKeyData); const publicHandle = {}; WeakMapPrototypeSet(KEY_STORE, publicHandle, publicKeyData); const algorithm = { name: algorithmName, }; const publicKey = constructKey( "public", true, usageIntersection(usages, []), algorithm, publicHandle, ); const privateKey = constructKey( "private", extractable, usageIntersection(usages, ["deriveKey", "deriveBits"]), algorithm, handle, ); return { publicKey, privateKey }; } case "Ed25519": { if ( ArrayPrototypeFind( usages, (u) => !ArrayPrototypeIncludes(["sign", "verify"], u), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } const ED25519_SEED_LEN = 32; const ED25519_PUBLIC_KEY_LEN = 32; const privateKeyData = new Uint8Array(ED25519_SEED_LEN); const publicKeyData = new Uint8Array(ED25519_PUBLIC_KEY_LEN); if ( !op_crypto_generate_ed25519_keypair(privateKeyData, publicKeyData) ) { throw new DOMException("Failed to generate key", "OperationError"); } const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, privateKeyData); const publicHandle = {}; WeakMapPrototypeSet(KEY_STORE, publicHandle, publicKeyData); const algorithm = { name: algorithmName, }; const publicKey = constructKey( "public", true, usageIntersection(usages, ["verify"]), algorithm, publicHandle, ); const privateKey = constructKey( "private", extractable, usageIntersection(usages, ["sign"]), algorithm, handle, ); return { publicKey, privateKey }; } case "HMAC": { // 1. if ( ArrayPrototypeFind( usages, (u) => !ArrayPrototypeIncludes(["sign", "verify"], u), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } // 2. let length; if (normalizedAlgorithm.length === undefined) { length = null; } else if (normalizedAlgorithm.length !== 0) { length = normalizedAlgorithm.length; } else { throw new DOMException("Invalid length", "OperationError"); } // 3-4. const keyData = await op_crypto_generate_key({ algorithm: "HMAC", hash: normalizedAlgorithm.hash.name, length, }); const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, { type: "secret", data: keyData, }); // 6-10. const algorithm = { name: algorithmName, hash: { name: normalizedAlgorithm.hash.name, }, length: TypedArrayPrototypeGetByteLength(keyData) * 8, }; // 5, 11-13. const key = constructKey( "secret", extractable, usages, algorithm, handle, ); // 14. return key; } } } function importKeyEd25519( format, keyData, extractable, keyUsages, ) { switch (format) { case "raw": { // 1. if ( ArrayPrototypeFind( keyUsages, (u) => !ArrayPrototypeIncludes(["verify"], u), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, keyData); // 2-3. const algorithm = { name: "Ed25519", }; // 4-6. return constructKey( "public", extractable, usageIntersection(keyUsages, recognisedUsages), algorithm, handle, ); } case "spki": { // 1. if ( ArrayPrototypeFind( keyUsages, (u) => !ArrayPrototypeIncludes(["verify"], u), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } const publicKeyData = new Uint8Array(32); if (!op_crypto_import_spki_ed25519(keyData, publicKeyData)) { throw new DOMException("Invalid key data", "DataError"); } const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, publicKeyData); const algorithm = { name: "Ed25519", }; return constructKey( "public", extractable, usageIntersection(keyUsages, recognisedUsages), algorithm, handle, ); } case "pkcs8": { // 1. if ( ArrayPrototypeFind( keyUsages, (u) => !ArrayPrototypeIncludes(["sign"], u), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } const privateKeyData = new Uint8Array(32); if (!op_crypto_import_pkcs8_ed25519(keyData, privateKeyData)) { throw new DOMException("Invalid key data", "DataError"); } const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, privateKeyData); const algorithm = { name: "Ed25519", }; return constructKey( "private", extractable, usageIntersection(keyUsages, recognisedUsages), algorithm, handle, ); } case "jwk": { // 1. const jwk = keyData; // 2. if (jwk.d !== undefined) { if ( ArrayPrototypeFind( keyUsages, (u) => !ArrayPrototypeIncludes( ["sign"], u, ), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } } else { if ( ArrayPrototypeFind( keyUsages, (u) => !ArrayPrototypeIncludes( ["verify"], u, ), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } } // 3. if (jwk.kty !== "OKP") { throw new DOMException("Invalid key type", "DataError"); } // 4. if (jwk.crv !== "Ed25519") { throw new DOMException("Invalid curve", "DataError"); } // 5. if ( keyUsages.length > 0 && jwk.use !== undefined && jwk.use !== "sig" ) { throw new DOMException("Invalid key usage", "DataError"); } // 6. if (jwk.key_ops !== undefined) { if ( ArrayPrototypeFind( jwk.key_ops, (u) => !ArrayPrototypeIncludes(recognisedUsages, u), ) !== undefined ) { throw new DOMException( "'key_ops' property of JsonWebKey is invalid", "DataError", ); } if ( !ArrayPrototypeEvery( jwk.key_ops, (u) => ArrayPrototypeIncludes(keyUsages, u), ) ) { throw new DOMException( "'key_ops' property of JsonWebKey is invalid", "DataError", ); } } // 7. if (jwk.ext !== undefined && jwk.ext === false && extractable) { throw new DOMException("Invalid key extractability", "DataError"); } // 8. if (jwk.d !== undefined) { // https://www.rfc-editor.org/rfc/rfc8037#section-2 let privateKeyData; try { privateKeyData = op_crypto_base64url_decode(jwk.d); } catch (_) { throw new DOMException("invalid private key data", "DataError"); } const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, privateKeyData); const algorithm = { name: "Ed25519", }; return constructKey( "private", extractable, usageIntersection(keyUsages, recognisedUsages), algorithm, handle, ); } else { // https://www.rfc-editor.org/rfc/rfc8037#section-2 let publicKeyData; try { publicKeyData = op_crypto_base64url_decode(jwk.x); } catch (_) { throw new DOMException("invalid public key data", "DataError"); } const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, publicKeyData); const algorithm = { name: "Ed25519", }; return constructKey( "public", extractable, usageIntersection(keyUsages, recognisedUsages), algorithm, handle, ); } } default: throw new DOMException("Not implemented", "NotSupportedError"); } } function importKeyX25519( format, keyData, extractable, keyUsages, ) { switch (format) { case "raw": { // 1. if (keyUsages.length > 0) { throw new DOMException("Invalid key usages", "SyntaxError"); } const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, keyData); // 2-3. const algorithm = { name: "X25519", }; // 4-6. return constructKey( "public", extractable, [], algorithm, handle, ); } case "spki": { // 1. if (keyUsages.length > 0) { throw new DOMException("Invalid key usages", "SyntaxError"); } const publicKeyData = new Uint8Array(32); if (!op_crypto_import_spki_x25519(keyData, publicKeyData)) { throw new DOMException("Invalid key data", "DataError"); } const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, publicKeyData); const algorithm = { name: "X25519", }; return constructKey( "public", extractable, [], algorithm, handle, ); } case "pkcs8": { // 1. if ( ArrayPrototypeFind( keyUsages, (u) => !ArrayPrototypeIncludes(["deriveKey", "deriveBits"], u), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } const privateKeyData = new Uint8Array(32); if (!op_crypto_import_pkcs8_x25519(keyData, privateKeyData)) { throw new DOMException("Invalid key data", "DataError"); } const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, privateKeyData); const algorithm = { name: "X25519", }; return constructKey( "private", extractable, usageIntersection(keyUsages, recognisedUsages), algorithm, handle, ); } case "jwk": { // 1. const jwk = keyData; // 2. if (jwk.d !== undefined) { if ( ArrayPrototypeFind( keyUsages, (u) => !ArrayPrototypeIncludes( ["deriveKey", "deriveBits"], u, ), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } } // 3. if (jwk.d === undefined && keyUsages.length > 0) { throw new DOMException("Invalid key usages", "SyntaxError"); } // 4. if (jwk.kty !== "OKP") { throw new DOMException("Invalid key type", "DataError"); } // 5. if (jwk.crv !== "X25519") { throw new DOMException("Invalid curve", "DataError"); } // 6. if (keyUsages.length > 0 && jwk.use !== undefined) { if (jwk.use !== "enc") { throw new DOMException("Invalid key use", "DataError"); } } // 7. if (jwk.key_ops !== undefined) { if ( ArrayPrototypeFind( jwk.key_ops, (u) => !ArrayPrototypeIncludes(recognisedUsages, u), ) !== undefined ) { throw new DOMException( "'key_ops' property of JsonWebKey is invalid", "DataError", ); } if ( !ArrayPrototypeEvery( jwk.key_ops, (u) => ArrayPrototypeIncludes(keyUsages, u), ) ) { throw new DOMException( "'key_ops' property of JsonWebKey is invalid", "DataError", ); } } // 8. if (jwk.ext !== undefined && jwk.ext === false && extractable) { throw new DOMException("Invalid key extractability", "DataError"); } // 9. if (jwk.d !== undefined) { // https://www.rfc-editor.org/rfc/rfc8037#section-2 const privateKeyData = op_crypto_base64url_decode(jwk.d); const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, privateKeyData); const algorithm = { name: "X25519", }; return constructKey( "private", extractable, usageIntersection(keyUsages, ["deriveKey", "deriveBits"]), algorithm, handle, ); } else { // https://www.rfc-editor.org/rfc/rfc8037#section-2 const publicKeyData = op_crypto_base64url_decode(jwk.x); const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, publicKeyData); const algorithm = { name: "X25519", }; return constructKey( "public", extractable, [], algorithm, handle, ); } } default: throw new DOMException("Not implemented", "NotSupportedError"); } } function exportKeyAES( format, key, innerKey, ) { switch (format) { // 2. case "raw": { // 1. const data = innerKey.data; // 2. return TypedArrayPrototypeGetBuffer(data); } case "jwk": { // 1-2. const jwk = { kty: "oct", }; // 3. const data = op_crypto_export_key({ format: "jwksecret", algorithm: "AES", }, innerKey); ObjectAssign(jwk, data); // 4. const algorithm = key[_algorithm]; switch (algorithm.length) { case 128: jwk.alg = aesJwkAlg[algorithm.name][128]; break; case 192: jwk.alg = aesJwkAlg[algorithm.name][192]; break; case 256: jwk.alg = aesJwkAlg[algorithm.name][256]; break; default: throw new DOMException( "Invalid key length", "NotSupportedError", ); } // 5. jwk.key_ops = key.usages; // 6. jwk.ext = key[_extractable]; // 7. return jwk; } default: throw new DOMException("Not implemented", "NotSupportedError"); } } function importKeyAES( format, normalizedAlgorithm, keyData, extractable, keyUsages, supportedKeyUsages, ) { // 1. if ( ArrayPrototypeFind( keyUsages, (u) => !ArrayPrototypeIncludes(supportedKeyUsages, u), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } const algorithmName = normalizedAlgorithm.name; // 2. let data = keyData; switch (format) { case "raw": { // 2. if ( !ArrayPrototypeIncludes( [128, 192, 256], TypedArrayPrototypeGetByteLength(keyData) * 8, ) ) { throw new DOMException("Invalid key length", "DataError"); } break; } case "jwk": { // 1. const jwk = keyData; // 2. if (jwk.kty !== "oct") { throw new DOMException( "'kty' property of JsonWebKey must be 'oct'", "DataError", ); } // Section 6.4.1 of RFC7518 if (jwk.k === undefined) { throw new DOMException( "'k' property of JsonWebKey must be present", "DataError", ); } // 4. const { rawData } = op_crypto_import_key( { algorithm: "AES" }, { jwkSecret: jwk }, ); data = rawData.data; // 5. switch (TypedArrayPrototypeGetByteLength(data) * 8) { case 128: if ( jwk.alg !== undefined && jwk.alg !== aesJwkAlg[algorithmName][128] ) { throw new DOMException("Invalid algorithm", "DataError"); } break; case 192: if ( jwk.alg !== undefined && jwk.alg !== aesJwkAlg[algorithmName][192] ) { throw new DOMException("Invalid algorithm", "DataError"); } break; case 256: if ( jwk.alg !== undefined && jwk.alg !== aesJwkAlg[algorithmName][256] ) { throw new DOMException("Invalid algorithm", "DataError"); } break; default: throw new DOMException( "Invalid key length", "DataError", ); } // 6. if ( keyUsages.length > 0 && jwk.use !== undefined && jwk.use !== "enc" ) { throw new DOMException("Invalid key usages", "DataError"); } // 7. // Section 4.3 of RFC7517 if (jwk.key_ops !== undefined) { if ( ArrayPrototypeFind( jwk.key_ops, (u) => !ArrayPrototypeIncludes(recognisedUsages, u), ) !== undefined ) { throw new DOMException( "'key_ops' property of JsonWebKey is invalid", "DataError", ); } if ( !ArrayPrototypeEvery( jwk.key_ops, (u) => ArrayPrototypeIncludes(keyUsages, u), ) ) { throw new DOMException( "'key_ops' property of JsonWebKey is invalid", "DataError", ); } } // 8. if (jwk.ext === false && extractable === true) { throw new DOMException( "'ext' property of JsonWebKey must not be false if extractable is true", "DataError", ); } break; } default: throw new DOMException("Not implemented", "NotSupportedError"); } const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, { type: "secret", data, }); // 4-7. const algorithm = { name: algorithmName, length: TypedArrayPrototypeGetByteLength(data) * 8, }; const key = constructKey( "secret", extractable, usageIntersection(keyUsages, recognisedUsages), algorithm, handle, ); // 8. return key; } function importKeyHMAC( format, normalizedAlgorithm, keyData, extractable, keyUsages, ) { // 2. if ( ArrayPrototypeFind( keyUsages, (u) => !ArrayPrototypeIncludes(["sign", "verify"], u), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } // 3. let hash; let data; // 4. https://w3c.github.io/webcrypto/#hmac-operations switch (format) { case "raw": { data = keyData; hash = normalizedAlgorithm.hash; break; } case "jwk": { const jwk = keyData; // 2. if (jwk.kty !== "oct") { throw new DOMException( "'kty' property of JsonWebKey must be 'oct'", "DataError", ); } // Section 6.4.1 of RFC7518 if (jwk.k === undefined) { throw new DOMException( "'k' property of JsonWebKey must be present", "DataError", ); } // 4. const { rawData } = op_crypto_import_key( { algorithm: "HMAC" }, { jwkSecret: jwk }, ); data = rawData.data; // 5. hash = normalizedAlgorithm.hash; // 6. switch (hash.name) { case "SHA-1": { if (jwk.alg !== undefined && jwk.alg !== "HS1") { throw new DOMException( "'alg' property of JsonWebKey must be 'HS1'", "DataError", ); } break; } case "SHA-256": { if (jwk.alg !== undefined && jwk.alg !== "HS256") { throw new DOMException( "'alg' property of JsonWebKey must be 'HS256'", "DataError", ); } break; } case "SHA-384": { if (jwk.alg !== undefined && jwk.alg !== "HS384") { throw new DOMException( "'alg' property of JsonWebKey must be 'HS384'", "DataError", ); } break; } case "SHA-512": { if (jwk.alg !== undefined && jwk.alg !== "HS512") { throw new DOMException( "'alg' property of JsonWebKey must be 'HS512'", "DataError", ); } break; } default: throw new TypeError("unreachable"); } // 7. if ( keyUsages.length > 0 && jwk.use !== undefined && jwk.use !== "sig" ) { throw new DOMException( "'use' property of JsonWebKey must be 'sig'", "DataError", ); } // 8. // Section 4.3 of RFC7517 if (jwk.key_ops !== undefined) { if ( ArrayPrototypeFind( jwk.key_ops, (u) => !ArrayPrototypeIncludes(recognisedUsages, u), ) !== undefined ) { throw new DOMException( "'key_ops' property of JsonWebKey is invalid", "DataError", ); } if ( !ArrayPrototypeEvery( jwk.key_ops, (u) => ArrayPrototypeIncludes(keyUsages, u), ) ) { throw new DOMException( "'key_ops' property of JsonWebKey is invalid", "DataError", ); } } // 9. if (jwk.ext === false && extractable === true) { throw new DOMException( "'ext' property of JsonWebKey must not be false if extractable is true", "DataError", ); } break; } default: throw new DOMException("Not implemented", "NotSupportedError"); } // 5. let length = TypedArrayPrototypeGetByteLength(data) * 8; // 6. if (length === 0) { throw new DOMException("Key length is zero", "DataError"); } // 7. if (normalizedAlgorithm.length !== undefined) { if ( normalizedAlgorithm.length > length || normalizedAlgorithm.length <= (length - 8) ) { throw new DOMException( "Key length is invalid", "DataError", ); } length = normalizedAlgorithm.length; } const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, { type: "secret", data, }); const algorithm = { name: "HMAC", length, hash, }; const key = constructKey( "secret", extractable, usageIntersection(keyUsages, recognisedUsages), algorithm, handle, ); return key; } function importKeyEC( format, normalizedAlgorithm, keyData, extractable, keyUsages, ) { const supportedUsages = SUPPORTED_KEY_USAGES[normalizedAlgorithm.name]; switch (format) { case "raw": { // 1. if ( !ArrayPrototypeIncludes( supportedNamedCurves, normalizedAlgorithm.namedCurve, ) ) { throw new DOMException( "Invalid namedCurve", "DataError", ); } // 2. if ( ArrayPrototypeFind( keyUsages, (u) => !ArrayPrototypeIncludes( SUPPORTED_KEY_USAGES[normalizedAlgorithm.name].public, u, ), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } // 3. const { rawData } = op_crypto_import_key({ algorithm: normalizedAlgorithm.name, namedCurve: normalizedAlgorithm.namedCurve, }, { raw: keyData }); const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, rawData); // 4-5. const algorithm = { name: normalizedAlgorithm.name, namedCurve: normalizedAlgorithm.namedCurve, }; // 6-8. const key = constructKey( "public", extractable, usageIntersection(keyUsages, recognisedUsages), algorithm, handle, ); return key; } case "pkcs8": { // 1. if ( ArrayPrototypeFind( keyUsages, (u) => !ArrayPrototypeIncludes( SUPPORTED_KEY_USAGES[normalizedAlgorithm.name].private, u, ), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } // 2-9. const { rawData } = op_crypto_import_key({ algorithm: normalizedAlgorithm.name, namedCurve: normalizedAlgorithm.namedCurve, }, { pkcs8: keyData }); const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, rawData); const algorithm = { name: normalizedAlgorithm.name, namedCurve: normalizedAlgorithm.namedCurve, }; const key = constructKey( "private", extractable, usageIntersection(keyUsages, recognisedUsages), algorithm, handle, ); return key; } case "spki": { // 1. if (normalizedAlgorithm.name == "ECDSA") { if ( ArrayPrototypeFind( keyUsages, (u) => !ArrayPrototypeIncludes( SUPPORTED_KEY_USAGES[normalizedAlgorithm.name].public, u, ), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } } else if (keyUsages.length != 0) { throw new DOMException("Key usage must be empty", "SyntaxError"); } // 2-12 const { rawData } = op_crypto_import_key({ algorithm: normalizedAlgorithm.name, namedCurve: normalizedAlgorithm.namedCurve, }, { spki: keyData }); const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, rawData); const algorithm = { name: normalizedAlgorithm.name, namedCurve: normalizedAlgorithm.namedCurve, }; // 6-8. const key = constructKey( "public", extractable, usageIntersection(keyUsages, recognisedUsages), algorithm, handle, ); return key; } case "jwk": { const jwk = keyData; const keyType = (jwk.d !== undefined) ? "private" : "public"; // 2. if ( ArrayPrototypeFind( keyUsages, (u) => !ArrayPrototypeIncludes(supportedUsages[keyType], u), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } // 3. if (jwk.kty !== "EC") { throw new DOMException( "'kty' property of JsonWebKey must be 'EC'", "DataError", ); } // 4. if ( keyUsages.length > 0 && jwk.use !== undefined && jwk.use !== supportedUsages.jwkUse ) { throw new DOMException( `'use' property of JsonWebKey must be '${supportedUsages.jwkUse}'`, "DataError", ); } // 5. // Section 4.3 of RFC7517 if (jwk.key_ops !== undefined) { if ( ArrayPrototypeFind( jwk.key_ops, (u) => !ArrayPrototypeIncludes(recognisedUsages, u), ) !== undefined ) { throw new DOMException( "'key_ops' member of JsonWebKey is invalid", "DataError", ); } if ( !ArrayPrototypeEvery( jwk.key_ops, (u) => ArrayPrototypeIncludes(keyUsages, u), ) ) { throw new DOMException( "'key_ops' member of JsonWebKey is invalid", "DataError", ); } } // 6. if (jwk.ext === false && extractable === true) { throw new DOMException( "'ext' property of JsonWebKey must not be false if extractable is true", "DataError", ); } // 9. if (jwk.alg !== undefined && normalizedAlgorithm.name == "ECDSA") { let algNamedCurve; switch (jwk.alg) { case "ES256": { algNamedCurve = "P-256"; break; } case "ES384": { algNamedCurve = "P-384"; break; } case "ES512": { algNamedCurve = "P-521"; break; } default: throw new DOMException( "Curve algorithm not supported", "DataError", ); } if (algNamedCurve) { if (algNamedCurve !== normalizedAlgorithm.namedCurve) { throw new DOMException( "Mismatched curve algorithm", "DataError", ); } } } // Validate that this is a valid public key. if (jwk.x === undefined) { throw new DOMException( "'x' property of JsonWebKey is required for EC keys", "DataError", ); } if (jwk.y === undefined) { throw new DOMException( "'y' property of JsonWebKey is required for EC keys", "DataError", ); } if (jwk.d !== undefined) { // it's also a Private key const { rawData } = op_crypto_import_key({ algorithm: normalizedAlgorithm.name, namedCurve: normalizedAlgorithm.namedCurve, }, { jwkPrivateEc: jwk }); const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, rawData); const algorithm = { name: normalizedAlgorithm.name, namedCurve: normalizedAlgorithm.namedCurve, }; const key = constructKey( "private", extractable, usageIntersection(keyUsages, recognisedUsages), algorithm, handle, ); return key; } else { const { rawData } = op_crypto_import_key({ algorithm: normalizedAlgorithm.name, namedCurve: normalizedAlgorithm.namedCurve, }, { jwkPublicEc: jwk }); const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, rawData); const algorithm = { name: normalizedAlgorithm.name, namedCurve: normalizedAlgorithm.namedCurve, }; const key = constructKey( "public", extractable, usageIntersection(keyUsages, recognisedUsages), algorithm, handle, ); return key; } } default: throw new DOMException("Not implemented", "NotSupportedError"); } } const SUPPORTED_KEY_USAGES = { "RSASSA-PKCS1-v1_5": { public: ["verify"], private: ["sign"], jwkUse: "sig", }, "RSA-PSS": { public: ["verify"], private: ["sign"], jwkUse: "sig", }, "RSA-OAEP": { public: ["encrypt", "wrapKey"], private: ["decrypt", "unwrapKey"], jwkUse: "enc", }, "ECDSA": { public: ["verify"], private: ["sign"], jwkUse: "sig", }, "ECDH": { public: [], private: ["deriveKey", "deriveBits"], jwkUse: "enc", }, }; function importKeyRSA( format, normalizedAlgorithm, keyData, extractable, keyUsages, ) { switch (format) { case "pkcs8": { // 1. if ( ArrayPrototypeFind( keyUsages, (u) => !ArrayPrototypeIncludes( SUPPORTED_KEY_USAGES[normalizedAlgorithm.name].private, u, ), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } // 2-9. const { modulusLength, publicExponent, rawData } = op_crypto_import_key( { algorithm: normalizedAlgorithm.name, // Needed to perform step 7 without normalization. hash: normalizedAlgorithm.hash.name, }, { pkcs8: keyData }, ); const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, rawData); const algorithm = { name: normalizedAlgorithm.name, modulusLength, publicExponent, hash: normalizedAlgorithm.hash, }; const key = constructKey( "private", extractable, usageIntersection(keyUsages, recognisedUsages), algorithm, handle, ); return key; } case "spki": { // 1. if ( ArrayPrototypeFind( keyUsages, (u) => !ArrayPrototypeIncludes( SUPPORTED_KEY_USAGES[normalizedAlgorithm.name].public, u, ), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } // 2-9. const { modulusLength, publicExponent, rawData } = op_crypto_import_key( { algorithm: normalizedAlgorithm.name, // Needed to perform step 7 without normalization. hash: normalizedAlgorithm.hash.name, }, { spki: keyData }, ); const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, rawData); const algorithm = { name: normalizedAlgorithm.name, modulusLength, publicExponent, hash: normalizedAlgorithm.hash, }; const key = constructKey( "public", extractable, usageIntersection(keyUsages, recognisedUsages), algorithm, handle, ); return key; } case "jwk": { // 1. const jwk = keyData; // 2. if (jwk.d !== undefined) { if ( ArrayPrototypeFind( keyUsages, (u) => !ArrayPrototypeIncludes( SUPPORTED_KEY_USAGES[normalizedAlgorithm.name].private, u, ), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } } else if ( ArrayPrototypeFind( keyUsages, (u) => !ArrayPrototypeIncludes( SUPPORTED_KEY_USAGES[normalizedAlgorithm.name].public, u, ), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } // 3. if (StringPrototypeToUpperCase(jwk.kty) !== "RSA") { throw new DOMException( "'kty' property of JsonWebKey must be 'RSA'", "DataError", ); } // 4. if ( keyUsages.length > 0 && jwk.use !== undefined && StringPrototypeToLowerCase(jwk.use) !== SUPPORTED_KEY_USAGES[normalizedAlgorithm.name].jwkUse ) { throw new DOMException( `'use' property of JsonWebKey must be '${ SUPPORTED_KEY_USAGES[normalizedAlgorithm.name].jwkUse }'`, "DataError", ); } // 5. if (jwk.key_ops !== undefined) { if ( ArrayPrototypeFind( jwk.key_ops, (u) => !ArrayPrototypeIncludes(recognisedUsages, u), ) !== undefined ) { throw new DOMException( "'key_ops' property of JsonWebKey is invalid", "DataError", ); } if ( !ArrayPrototypeEvery( jwk.key_ops, (u) => ArrayPrototypeIncludes(keyUsages, u), ) ) { throw new DOMException( "'key_ops' property of JsonWebKey is invalid", "DataError", ); } } if (jwk.ext === false && extractable === true) { throw new DOMException( "'ext' property of JsonWebKey must not be false if extractable is true", "DataError", ); } // 7. let hash; // 8. if (normalizedAlgorithm.name === "RSASSA-PKCS1-v1_5") { switch (jwk.alg) { case undefined: hash = undefined; break; case "RS1": hash = "SHA-1"; break; case "RS256": hash = "SHA-256"; break; case "RS384": hash = "SHA-384"; break; case "RS512": hash = "SHA-512"; break; default: throw new DOMException( `'alg' property of JsonWebKey must be one of 'RS1', 'RS256', 'RS384', 'RS512'`, "DataError", ); } } else if (normalizedAlgorithm.name === "RSA-PSS") { switch (jwk.alg) { case undefined: hash = undefined; break; case "PS1": hash = "SHA-1"; break; case "PS256": hash = "SHA-256"; break; case "PS384": hash = "SHA-384"; break; case "PS512": hash = "SHA-512"; break; default: throw new DOMException( `'alg' property of JsonWebKey must be one of 'PS1', 'PS256', 'PS384', 'PS512'`, "DataError", ); } } else { switch (jwk.alg) { case undefined: hash = undefined; break; case "RSA-OAEP": hash = "SHA-1"; break; case "RSA-OAEP-256": hash = "SHA-256"; break; case "RSA-OAEP-384": hash = "SHA-384"; break; case "RSA-OAEP-512": hash = "SHA-512"; break; default: throw new DOMException( `'alg' property of JsonWebKey must be one of 'RSA-OAEP', 'RSA-OAEP-256', 'RSA-OAEP-384', or 'RSA-OAEP-512'`, "DataError", ); } } // 9. if (hash !== undefined) { // 9.1. const normalizedHash = normalizeAlgorithm(hash, "digest"); // 9.2. if (normalizedHash.name !== normalizedAlgorithm.hash.name) { throw new DOMException( `'alg' property of JsonWebKey must be '${normalizedAlgorithm.name}'`, "DataError", ); } } // 10. if (jwk.d !== undefined) { // Private key const optimizationsPresent = jwk.p !== undefined || jwk.q !== undefined || jwk.dp !== undefined || jwk.dq !== undefined || jwk.qi !== undefined; if (optimizationsPresent) { if (jwk.q === undefined) { throw new DOMException( "'q' property of JsonWebKey is required for private keys", "DataError", ); } if (jwk.dp === undefined) { throw new DOMException( "'dp' property of JsonWebKey is required for private keys", "DataError", ); } if (jwk.dq === undefined) { throw new DOMException( "'dq' property of JsonWebKey is required for private keys", "DataError", ); } if (jwk.qi === undefined) { throw new DOMException( "'qi' property of JsonWebKey is required for private keys", "DataError", ); } if (jwk.oth !== undefined) { throw new DOMException( "'oth' property of JsonWebKey is not supported", "NotSupportedError", ); } } else { throw new DOMException( "only optimized private keys are supported", "NotSupportedError", ); } const { modulusLength, publicExponent, rawData } = op_crypto_import_key( { algorithm: normalizedAlgorithm.name, hash: normalizedAlgorithm.hash.name, }, { jwkPrivateRsa: jwk }, ); const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, rawData); const algorithm = { name: normalizedAlgorithm.name, modulusLength, publicExponent, hash: normalizedAlgorithm.hash, }; const key = constructKey( "private", extractable, usageIntersection(keyUsages, recognisedUsages), algorithm, handle, ); return key; } else { // Validate that this is a valid public key. if (jwk.n === undefined) { throw new DOMException( "'n' property of JsonWebKey is required for public keys", "DataError", ); } if (jwk.e === undefined) { throw new DOMException( "'e' property of JsonWebKey is required for public keys", "DataError", ); } const { modulusLength, publicExponent, rawData } = op_crypto_import_key( { algorithm: normalizedAlgorithm.name, hash: normalizedAlgorithm.hash.name, }, { jwkPublicRsa: jwk }, ); const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, rawData); const algorithm = { name: normalizedAlgorithm.name, modulusLength, publicExponent, hash: normalizedAlgorithm.hash, }; const key = constructKey( "public", extractable, usageIntersection(keyUsages, recognisedUsages), algorithm, handle, ); return key; } } default: throw new DOMException("Not implemented", "NotSupportedError"); } } function importKeyHKDF( format, keyData, extractable, keyUsages, ) { if (format !== "raw") { throw new DOMException("Format not supported", "NotSupportedError"); } // 1. if ( ArrayPrototypeFind( keyUsages, (u) => !ArrayPrototypeIncludes(["deriveKey", "deriveBits"], u), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } // 2. if (extractable !== false) { throw new DOMException( "Key must not be extractable", "SyntaxError", ); } // 3. const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, { type: "secret", data: keyData, }); // 4-8. const algorithm = { name: "HKDF", }; const key = constructKey( "secret", false, usageIntersection(keyUsages, recognisedUsages), algorithm, handle, ); // 9. return key; } function importKeyPBKDF2( format, keyData, extractable, keyUsages, ) { // 1. if (format !== "raw") { throw new DOMException("Format not supported", "NotSupportedError"); } // 2. if ( ArrayPrototypeFind( keyUsages, (u) => !ArrayPrototypeIncludes(["deriveKey", "deriveBits"], u), ) !== undefined ) { throw new DOMException("Invalid key usages", "SyntaxError"); } // 3. if (extractable !== false) { throw new DOMException( "Key must not be extractable", "SyntaxError", ); } // 4. const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, { type: "secret", data: keyData, }); // 5-9. const algorithm = { name: "PBKDF2", }; const key = constructKey( "secret", false, usageIntersection(keyUsages, recognisedUsages), algorithm, handle, ); // 10. return key; } function exportKeyHMAC(format, key, innerKey) { // 1. if (innerKey == null) { throw new DOMException("Key is not available", "OperationError"); } switch (format) { // 3. case "raw": { const bits = innerKey.data; // TODO(petamoriken): Uint8Array doesn't have push method // for (let _i = 7 & (8 - bits.length % 8); _i > 0; _i--) { // bits.push(0); // } // 4-5. return TypedArrayPrototypeGetBuffer(bits); } case "jwk": { // 1-2. const jwk = { kty: "oct", }; // 3. const data = op_crypto_export_key({ format: "jwksecret", algorithm: key[_algorithm].name, }, innerKey); jwk.k = data.k; // 4. const algorithm = key[_algorithm]; // 5. const hash = algorithm.hash; // 6. switch (hash.name) { case "SHA-1": jwk.alg = "HS1"; break; case "SHA-256": jwk.alg = "HS256"; break; case "SHA-384": jwk.alg = "HS384"; break; case "SHA-512": jwk.alg = "HS512"; break; default: throw new DOMException( "Hash algorithm not supported", "NotSupportedError", ); } // 7. jwk.key_ops = key.usages; // 8. jwk.ext = key[_extractable]; // 9. return jwk; } default: throw new DOMException("Not implemented", "NotSupportedError"); } } function exportKeyRSA(format, key, innerKey) { switch (format) { case "pkcs8": { // 1. if (key[_type] !== "private") { throw new DOMException( "Key is not a private key", "InvalidAccessError", ); } // 2. const data = op_crypto_export_key({ algorithm: key[_algorithm].name, format: "pkcs8", }, innerKey); // 3. return TypedArrayPrototypeGetBuffer(data); } case "spki": { // 1. if (key[_type] !== "public") { throw new DOMException( "Key is not a public key", "InvalidAccessError", ); } // 2. const data = op_crypto_export_key({ algorithm: key[_algorithm].name, format: "spki", }, innerKey); // 3. return TypedArrayPrototypeGetBuffer(data); } case "jwk": { // 1-2. const jwk = { kty: "RSA", }; // 3. const hash = key[_algorithm].hash.name; // 4. if (key[_algorithm].name === "RSASSA-PKCS1-v1_5") { switch (hash) { case "SHA-1": jwk.alg = "RS1"; break; case "SHA-256": jwk.alg = "RS256"; break; case "SHA-384": jwk.alg = "RS384"; break; case "SHA-512": jwk.alg = "RS512"; break; default: throw new DOMException( "Hash algorithm not supported", "NotSupportedError", ); } } else if (key[_algorithm].name === "RSA-PSS") { switch (hash) { case "SHA-1": jwk.alg = "PS1"; break; case "SHA-256": jwk.alg = "PS256"; break; case "SHA-384": jwk.alg = "PS384"; break; case "SHA-512": jwk.alg = "PS512"; break; default: throw new DOMException( "Hash algorithm not supported", "NotSupportedError", ); } } else { switch (hash) { case "SHA-1": jwk.alg = "RSA-OAEP"; break; case "SHA-256": jwk.alg = "RSA-OAEP-256"; break; case "SHA-384": jwk.alg = "RSA-OAEP-384"; break; case "SHA-512": jwk.alg = "RSA-OAEP-512"; break; default: throw new DOMException( "Hash algorithm not supported", "NotSupportedError", ); } } // 5-6. const data = op_crypto_export_key({ format: key[_type] === "private" ? "jwkprivate" : "jwkpublic", algorithm: key[_algorithm].name, }, innerKey); ObjectAssign(jwk, data); // 7. jwk.key_ops = key.usages; // 8. jwk.ext = key[_extractable]; return jwk; } default: throw new DOMException("Not implemented", "NotSupportedError"); } } function exportKeyEd25519(format, key, innerKey) { switch (format) { case "raw": { // 1. if (key[_type] !== "public") { throw new DOMException( "Key is not a public key", "InvalidAccessError", ); } // 2-3. return TypedArrayPrototypeGetBuffer(innerKey); } case "spki": { // 1. if (key[_type] !== "public") { throw new DOMException( "Key is not a public key", "InvalidAccessError", ); } const spkiDer = op_crypto_export_spki_ed25519(innerKey); return TypedArrayPrototypeGetBuffer(spkiDer); } case "pkcs8": { // 1. if (key[_type] !== "private") { throw new DOMException( "Key is not a public key", "InvalidAccessError", ); } const pkcs8Der = op_crypto_export_pkcs8_ed25519( new Uint8Array([0x04, 0x22, ...new SafeArrayIterator(innerKey)]), ); pkcs8Der[15] = 0x20; return TypedArrayPrototypeGetBuffer(pkcs8Der); } case "jwk": { const x = key[_type] === "private" ? op_crypto_jwk_x_ed25519(innerKey) : op_crypto_base64url_encode(innerKey); const jwk = { kty: "OKP", crv: "Ed25519", x, "key_ops": key.usages, ext: key[_extractable], }; if (key[_type] === "private") { jwk.d = op_crypto_base64url_encode(innerKey); } return jwk; } default: throw new DOMException("Not implemented", "NotSupportedError"); } } function exportKeyX25519(format, key, innerKey) { switch (format) { case "raw": { // 1. if (key[_type] !== "public") { throw new DOMException( "Key is not a public key", "InvalidAccessError", ); } // 2-3. return TypedArrayPrototypeGetBuffer(innerKey); } case "spki": { // 1. if (key[_type] !== "public") { throw new DOMException( "Key is not a public key", "InvalidAccessError", ); } const spkiDer = op_crypto_export_spki_x25519(innerKey); return TypedArrayPrototypeGetBuffer(spkiDer); } case "pkcs8": { // 1. if (key[_type] !== "private") { throw new DOMException( "Key is not a public key", "InvalidAccessError", ); } const pkcs8Der = op_crypto_export_pkcs8_x25519( new Uint8Array([0x04, 0x22, ...new SafeArrayIterator(innerKey)]), ); pkcs8Der[15] = 0x20; return TypedArrayPrototypeGetBuffer(pkcs8Der); } case "jwk": { if (key[_type] === "private") { throw new DOMException("Not implemented", "NotSupportedError"); } const x = op_crypto_base64url_encode(innerKey); const jwk = { kty: "OKP", crv: "X25519", x, "key_ops": key.usages, ext: key[_extractable], }; return jwk; } default: throw new DOMException("Not implemented", "NotSupportedError"); } } function exportKeyEC(format, key, innerKey) { switch (format) { case "raw": { // 1. if (key[_type] !== "public") { throw new DOMException( "Key is not a public key", "InvalidAccessError", ); } // 2. const data = op_crypto_export_key({ algorithm: key[_algorithm].name, namedCurve: key[_algorithm].namedCurve, format: "raw", }, innerKey); return TypedArrayPrototypeGetBuffer(data); } case "pkcs8": { // 1. if (key[_type] !== "private") { throw new DOMException( "Key is not a private key", "InvalidAccessError", ); } // 2. const data = op_crypto_export_key({ algorithm: key[_algorithm].name, namedCurve: key[_algorithm].namedCurve, format: "pkcs8", }, innerKey); return TypedArrayPrototypeGetBuffer(data); } case "spki": { // 1. if (key[_type] !== "public") { throw new DOMException( "Key is not a public key", "InvalidAccessError", ); } // 2. const data = op_crypto_export_key({ algorithm: key[_algorithm].name, namedCurve: key[_algorithm].namedCurve, format: "spki", }, innerKey); return TypedArrayPrototypeGetBuffer(data); } case "jwk": { if (key[_algorithm].name == "ECDSA") { // 1-2. const jwk = { kty: "EC", }; // 3.1 jwk.crv = key[_algorithm].namedCurve; // Missing from spec let algNamedCurve; switch (key[_algorithm].namedCurve) { case "P-256": { algNamedCurve = "ES256"; break; } case "P-384": { algNamedCurve = "ES384"; break; } case "P-521": { algNamedCurve = "ES512"; break; } default: throw new DOMException( "Curve algorithm not supported", "DataError", ); } jwk.alg = algNamedCurve; // 3.2 - 3.4. const data = op_crypto_export_key({ format: key[_type] === "private" ? "jwkprivate" : "jwkpublic", algorithm: key[_algorithm].name, namedCurve: key[_algorithm].namedCurve, }, innerKey); ObjectAssign(jwk, data); // 4. jwk.key_ops = key.usages; // 5. jwk.ext = key[_extractable]; return jwk; } else { // ECDH // 1-2. const jwk = { kty: "EC", }; // missing step from spec jwk.alg = "ECDH"; // 3.1 jwk.crv = key[_algorithm].namedCurve; // 3.2 - 3.4 const data = op_crypto_export_key({ format: key[_type] === "private" ? "jwkprivate" : "jwkpublic", algorithm: key[_algorithm].name, namedCurve: key[_algorithm].namedCurve, }, innerKey); ObjectAssign(jwk, data); // 4. jwk.key_ops = key.usages; // 5. jwk.ext = key[_extractable]; return jwk; } } default: throw new DOMException("Not implemented", "NotSupportedError"); } } async function generateKeyAES(normalizedAlgorithm, extractable, usages) { const algorithmName = normalizedAlgorithm.name; // 2. if (!ArrayPrototypeIncludes([128, 192, 256], normalizedAlgorithm.length)) { throw new DOMException("Invalid key length", "OperationError"); } // 3. const keyData = await op_crypto_generate_key({ algorithm: "AES", length: normalizedAlgorithm.length, }); const handle = {}; WeakMapPrototypeSet(KEY_STORE, handle, { type: "secret", data: keyData, }); // 6-8. const algorithm = { name: algorithmName, length: normalizedAlgorithm.length, }; // 9-11. const key = constructKey( "secret", extractable, usages, algorithm, handle, ); // 12. return key; } async function deriveBits(normalizedAlgorithm, baseKey, length) { switch (normalizedAlgorithm.name) { case "PBKDF2": { // 1. if (length == null || length == 0 || length % 8 !== 0) { throw new DOMException("Invalid length", "OperationError"); } if (normalizedAlgorithm.iterations == 0) { throw new DOMException( "iterations must not be zero", "OperationError", ); } const handle = baseKey[_handle]; const keyData = WeakMapPrototypeGet(KEY_STORE, handle); normalizedAlgorithm.salt = copyBuffer(normalizedAlgorithm.salt); const buf = await op_crypto_derive_bits({ key: keyData, algorithm: "PBKDF2", hash: normalizedAlgorithm.hash.name, iterations: normalizedAlgorithm.iterations, length, }, normalizedAlgorithm.salt); return TypedArrayPrototypeGetBuffer(buf); } case "ECDH": { // 1. if (baseKey[_type] !== "private") { throw new DOMException("Invalid key type", "InvalidAccessError"); } // 2. const publicKey = normalizedAlgorithm.public; // 3. if (publicKey[_type] !== "public") { throw new DOMException("Invalid key type", "InvalidAccessError"); } // 4. if (publicKey[_algorithm].name !== baseKey[_algorithm].name) { throw new DOMException( "Algorithm mismatch", "InvalidAccessError", ); } // 5. if ( publicKey[_algorithm].namedCurve !== baseKey[_algorithm].namedCurve ) { throw new DOMException( "namedCurve mismatch", "InvalidAccessError", ); } // 6. if ( ArrayPrototypeIncludes( supportedNamedCurves, publicKey[_algorithm].namedCurve, ) ) { const baseKeyhandle = baseKey[_handle]; const baseKeyData = WeakMapPrototypeGet(KEY_STORE, baseKeyhandle); const publicKeyhandle = publicKey[_handle]; const publicKeyData = WeakMapPrototypeGet(KEY_STORE, publicKeyhandle); const buf = await op_crypto_derive_bits({ key: baseKeyData, publicKey: publicKeyData, algorithm: "ECDH", namedCurve: publicKey[_algorithm].namedCurve, length: length ?? 0, }); // 8. if (length === null) { return TypedArrayPrototypeGetBuffer(buf); } else if (TypedArrayPrototypeGetByteLength(buf) * 8 < length) { throw new DOMException("Invalid length", "OperationError"); } else { return ArrayBufferPrototypeSlice( TypedArrayPrototypeGetBuffer(buf), 0, MathCeil(length / 8), ); } } else { throw new DOMException("Not implemented", "NotSupportedError"); } } case "HKDF": { // 1. if (length === null || length === 0 || length % 8 !== 0) { throw new DOMException("Invalid length", "OperationError"); } const handle = baseKey[_handle]; const keyDerivationKey = WeakMapPrototypeGet(KEY_STORE, handle); normalizedAlgorithm.salt = copyBuffer(normalizedAlgorithm.salt); normalizedAlgorithm.info = copyBuffer(normalizedAlgorithm.info); const buf = await op_crypto_derive_bits({ key: keyDerivationKey, algorithm: "HKDF", hash: normalizedAlgorithm.hash.name, info: normalizedAlgorithm.info, length, }, normalizedAlgorithm.salt); return TypedArrayPrototypeGetBuffer(buf); } case "X25519": { // 1. if (baseKey[_type] !== "private") { throw new DOMException("Invalid key type", "InvalidAccessError"); } // 2. const publicKey = normalizedAlgorithm.public; // 3. if (publicKey[_type] !== "public") { throw new DOMException("Invalid key type", "InvalidAccessError"); } // 4. if (publicKey[_algorithm].name !== baseKey[_algorithm].name) { throw new DOMException( "Algorithm mismatch", "InvalidAccessError", ); } // 5. const kHandle = baseKey[_handle]; const k = WeakMapPrototypeGet(KEY_STORE, kHandle); const uHandle = publicKey[_handle]; const u = WeakMapPrototypeGet(KEY_STORE, uHandle); const secret = new Uint8Array(32); const isIdentity = op_crypto_derive_bits_x25519(k, u, secret); // 6. if (isIdentity) { throw new DOMException("Invalid key", "OperationError"); } // 7. if (length === null) { return TypedArrayPrototypeGetBuffer(secret); } else if ( TypedArrayPrototypeGetByteLength(secret) * 8 < length ) { throw new DOMException("Invalid length", "OperationError"); } else { return ArrayBufferPrototypeSlice( TypedArrayPrototypeGetBuffer(secret), 0, MathCeil(length / 8), ); } } default: throw new DOMException("Not implemented", "NotSupportedError"); } } async function encrypt(normalizedAlgorithm, key, data) { const handle = key[_handle]; const keyData = WeakMapPrototypeGet(KEY_STORE, handle); switch (normalizedAlgorithm.name) { case "RSA-OAEP": { // 1. if (key[_type] !== "public") { throw new DOMException( "Key type not supported", "InvalidAccessError", ); } // 2. if (normalizedAlgorithm.label) { normalizedAlgorithm.label = copyBuffer(normalizedAlgorithm.label); } else { normalizedAlgorithm.label = new Uint8Array(); } // 3-5. const hashAlgorithm = key[_algorithm].hash.name; const cipherText = await op_crypto_encrypt({ key: keyData, algorithm: "RSA-OAEP", hash: hashAlgorithm, label: normalizedAlgorithm.label, }, data); // 6. return TypedArrayPrototypeGetBuffer(cipherText); } case "AES-CBC": { normalizedAlgorithm.iv = copyBuffer(normalizedAlgorithm.iv); // 1. if (TypedArrayPrototypeGetByteLength(normalizedAlgorithm.iv) !== 16) { throw new DOMException( "Initialization vector must be 16 bytes", "OperationError", ); } // 2. const cipherText = await op_crypto_encrypt({ key: keyData, algorithm: "AES-CBC", length: key[_algorithm].length, iv: normalizedAlgorithm.iv, }, data); // 4. return TypedArrayPrototypeGetBuffer(cipherText); } case "AES-CTR": { normalizedAlgorithm.counter = copyBuffer(normalizedAlgorithm.counter); // 1. if ( TypedArrayPrototypeGetByteLength(normalizedAlgorithm.counter) !== 16 ) { throw new DOMException( "Counter vector must be 16 bytes", "OperationError", ); } // 2. if ( normalizedAlgorithm.length == 0 || normalizedAlgorithm.length > 128 ) { throw new DOMException( "Counter length must not be 0 or greater than 128", "OperationError", ); } // 3. const cipherText = await op_crypto_encrypt({ key: keyData, algorithm: "AES-CTR", keyLength: key[_algorithm].length, counter: normalizedAlgorithm.counter, ctrLength: normalizedAlgorithm.length, }, data); // 4. return TypedArrayPrototypeGetBuffer(cipherText); } case "AES-GCM": { normalizedAlgorithm.iv = copyBuffer(normalizedAlgorithm.iv); // 1. if (TypedArrayPrototypeGetByteLength(data) > (2 ** 39) - 256) { throw new DOMException( "Plaintext too large", "OperationError", ); } // 2. // We only support 96-bit and 128-bit nonce. if ( ArrayPrototypeIncludes( [12, 16], TypedArrayPrototypeGetByteLength(normalizedAlgorithm.iv), ) === undefined ) { throw new DOMException( "Initialization vector length not supported", "NotSupportedError", ); } // 3. // NOTE: over the size of Number.MAX_SAFE_INTEGER is not available in V8 // if (normalizedAlgorithm.additionalData !== undefined) { // if (normalizedAlgorithm.additionalData.byteLength > (2 ** 64) - 1) { // throw new DOMException( // "Additional data too large", // "OperationError", // ); // } // } // 4. if (normalizedAlgorithm.tagLength == undefined) { normalizedAlgorithm.tagLength = 128; } else if ( !ArrayPrototypeIncludes( [32, 64, 96, 104, 112, 120, 128], normalizedAlgorithm.tagLength, ) ) { throw new DOMException( "Invalid tag length", "OperationError", ); } // 5. if (normalizedAlgorithm.additionalData) { normalizedAlgorithm.additionalData = copyBuffer( normalizedAlgorithm.additionalData, ); } // 6-7. const cipherText = await op_crypto_encrypt({ key: keyData, algorithm: "AES-GCM", length: key[_algorithm].length, iv: normalizedAlgorithm.iv, additionalData: normalizedAlgorithm.additionalData || null, tagLength: normalizedAlgorithm.tagLength, }, data); // 8. return TypedArrayPrototypeGetBuffer(cipherText); } default: throw new DOMException("Not implemented", "NotSupportedError"); } } webidl.configureInterface(SubtleCrypto); const subtle = webidl.createBranded(SubtleCrypto); class Crypto { constructor() { webidl.illegalConstructor(); } getRandomValues(typedArray) { webidl.assertBranded(this, CryptoPrototype); const prefix = "Failed to execute 'getRandomValues' on 'Crypto'"; webidl.requiredArguments(arguments.length, 1, prefix); // Fast path for Uint8Array const tag = TypedArrayPrototypeGetSymbolToStringTag(typedArray); if (tag === "Uint8Array") { op_crypto_get_random_values(typedArray); return typedArray; } typedArray = webidl.converters.ArrayBufferView( typedArray, prefix, "Argument 1", ); switch (tag) { case "Int8Array": case "Uint8ClampedArray": case "Int16Array": case "Uint16Array": case "Int32Array": case "Uint32Array": case "BigInt64Array": case "BigUint64Array": break; default: throw new DOMException( "The provided ArrayBufferView is not an integer array type", "TypeMismatchError", ); } const ui8 = new Uint8Array( TypedArrayPrototypeGetBuffer(typedArray), TypedArrayPrototypeGetByteOffset(typedArray), TypedArrayPrototypeGetByteLength(typedArray), ); op_crypto_get_random_values(ui8); return typedArray; } randomUUID() { webidl.assertBranded(this, CryptoPrototype); return op_crypto_random_uuid(); } get subtle() { webidl.assertBranded(this, CryptoPrototype); return subtle; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(CryptoPrototype, this), keys: ["subtle"], }), inspectOptions, ); } } webidl.configureInterface(Crypto); const CryptoPrototype = Crypto.prototype; const crypto = webidl.createBranded(Crypto); webidl.converters.AlgorithmIdentifier = (V, prefix, context, opts) => { // Union for (object or DOMString) if (webidl.type(V) == "Object") { return webidl.converters.object(V, prefix, context, opts); } return webidl.converters.DOMString(V, prefix, context, opts); }; webidl.converters["BufferSource or JsonWebKey"] = ( V, prefix, context, opts, ) => { // Union for (BufferSource or JsonWebKey) if (ArrayBufferIsView(V) || isArrayBuffer(V)) { return webidl.converters.BufferSource(V, prefix, context, opts); } return webidl.converters.JsonWebKey(V, prefix, context, opts); }; webidl.converters.KeyType = webidl.createEnumConverter("KeyType", [ "public", "private", "secret", ]); webidl.converters.KeyFormat = webidl.createEnumConverter("KeyFormat", [ "raw", "pkcs8", "spki", "jwk", ]); webidl.converters.KeyUsage = webidl.createEnumConverter("KeyUsage", [ "encrypt", "decrypt", "sign", "verify", "deriveKey", "deriveBits", "wrapKey", "unwrapKey", ]); webidl.converters["sequence"] = webidl.createSequenceConverter( webidl.converters.KeyUsage, ); webidl.converters.HashAlgorithmIdentifier = webidl.converters.AlgorithmIdentifier; /** @type {webidl.Dictionary} */ const dictAlgorithm = [{ key: "name", converter: webidl.converters.DOMString, required: true, }]; webidl.converters.Algorithm = webidl .createDictionaryConverter("Algorithm", dictAlgorithm); webidl.converters.BigInteger = webidl.converters.Uint8Array; /** @type {webidl.Dictionary} */ const dictRsaKeyGenParams = [ ...new SafeArrayIterator(dictAlgorithm), { key: "modulusLength", converter: (V, prefix, context, opts) => webidl.converters["unsigned long"](V, prefix, context, { ...opts, enforceRange: true, }), required: true, }, { key: "publicExponent", converter: webidl.converters.BigInteger, required: true, }, ]; webidl.converters.RsaKeyGenParams = webidl .createDictionaryConverter("RsaKeyGenParams", dictRsaKeyGenParams); const dictRsaHashedKeyGenParams = [ ...new SafeArrayIterator(dictRsaKeyGenParams), { key: "hash", converter: webidl.converters.HashAlgorithmIdentifier, required: true, }, ]; webidl.converters.RsaHashedKeyGenParams = webidl.createDictionaryConverter( "RsaHashedKeyGenParams", dictRsaHashedKeyGenParams, ); const dictRsaHashedImportParams = [ ...new SafeArrayIterator(dictAlgorithm), { key: "hash", converter: webidl.converters.HashAlgorithmIdentifier, required: true, }, ]; webidl.converters.RsaHashedImportParams = webidl.createDictionaryConverter( "RsaHashedImportParams", dictRsaHashedImportParams, ); webidl.converters.NamedCurve = webidl.converters.DOMString; const dictEcKeyImportParams = [ ...new SafeArrayIterator(dictAlgorithm), { key: "namedCurve", converter: webidl.converters.NamedCurve, required: true, }, ]; webidl.converters.EcKeyImportParams = webidl.createDictionaryConverter( "EcKeyImportParams", dictEcKeyImportParams, ); const dictEcKeyGenParams = [ ...new SafeArrayIterator(dictAlgorithm), { key: "namedCurve", converter: webidl.converters.NamedCurve, required: true, }, ]; webidl.converters.EcKeyGenParams = webidl .createDictionaryConverter("EcKeyGenParams", dictEcKeyGenParams); const dictAesKeyGenParams = [ ...new SafeArrayIterator(dictAlgorithm), { key: "length", converter: (V, prefix, context, opts) => webidl.converters["unsigned short"](V, prefix, context, { ...opts, enforceRange: true, }), required: true, }, ]; webidl.converters.AesKeyGenParams = webidl .createDictionaryConverter("AesKeyGenParams", dictAesKeyGenParams); const dictHmacKeyGenParams = [ ...new SafeArrayIterator(dictAlgorithm), { key: "hash", converter: webidl.converters.HashAlgorithmIdentifier, required: true, }, { key: "length", converter: (V, prefix, context, opts) => webidl.converters["unsigned long"](V, prefix, context, { ...opts, enforceRange: true, }), }, ]; webidl.converters.HmacKeyGenParams = webidl .createDictionaryConverter("HmacKeyGenParams", dictHmacKeyGenParams); const dictRsaPssParams = [ ...new SafeArrayIterator(dictAlgorithm), { key: "saltLength", converter: (V, prefix, context, opts) => webidl.converters["unsigned long"](V, prefix, context, { ...opts, enforceRange: true, }), required: true, }, ]; webidl.converters.RsaPssParams = webidl .createDictionaryConverter("RsaPssParams", dictRsaPssParams); const dictRsaOaepParams = [ ...new SafeArrayIterator(dictAlgorithm), { key: "label", converter: webidl.converters["BufferSource"], }, ]; webidl.converters.RsaOaepParams = webidl .createDictionaryConverter("RsaOaepParams", dictRsaOaepParams); const dictEcdsaParams = [ ...new SafeArrayIterator(dictAlgorithm), { key: "hash", converter: webidl.converters.HashAlgorithmIdentifier, required: true, }, ]; webidl.converters["EcdsaParams"] = webidl .createDictionaryConverter("EcdsaParams", dictEcdsaParams); const dictHmacImportParams = [ ...new SafeArrayIterator(dictAlgorithm), { key: "hash", converter: webidl.converters.HashAlgorithmIdentifier, required: true, }, { key: "length", converter: (V, prefix, context, opts) => webidl.converters["unsigned long"](V, prefix, context, { ...opts, enforceRange: true, }), }, ]; webidl.converters.HmacImportParams = webidl .createDictionaryConverter("HmacImportParams", dictHmacImportParams); const dictRsaOtherPrimesInfo = [ { key: "r", converter: webidl.converters["DOMString"], }, { key: "d", converter: webidl.converters["DOMString"], }, { key: "t", converter: webidl.converters["DOMString"], }, ]; webidl.converters.RsaOtherPrimesInfo = webidl.createDictionaryConverter( "RsaOtherPrimesInfo", dictRsaOtherPrimesInfo, ); webidl.converters["sequence"] = webidl .createSequenceConverter( webidl.converters.RsaOtherPrimesInfo, ); const dictJsonWebKey = [ // Sections 4.2 and 4.3 of RFC7517. // https://datatracker.ietf.org/doc/html/rfc7517#section-4 { key: "kty", converter: webidl.converters["DOMString"], }, { key: "use", converter: webidl.converters["DOMString"], }, { key: "key_ops", converter: webidl.converters["sequence"], }, { key: "alg", converter: webidl.converters["DOMString"], }, // JSON Web Key Parameters Registration { key: "ext", converter: webidl.converters["boolean"], }, // Section 6 of RFC7518 JSON Web Algorithms // https://datatracker.ietf.org/doc/html/rfc7518#section-6 { key: "crv", converter: webidl.converters["DOMString"], }, { key: "x", converter: webidl.converters["DOMString"], }, { key: "y", converter: webidl.converters["DOMString"], }, { key: "d", converter: webidl.converters["DOMString"], }, { key: "n", converter: webidl.converters["DOMString"], }, { key: "e", converter: webidl.converters["DOMString"], }, { key: "p", converter: webidl.converters["DOMString"], }, { key: "q", converter: webidl.converters["DOMString"], }, { key: "dp", converter: webidl.converters["DOMString"], }, { key: "dq", converter: webidl.converters["DOMString"], }, { key: "qi", converter: webidl.converters["DOMString"], }, { key: "oth", converter: webidl.converters["sequence"], }, { key: "k", converter: webidl.converters["DOMString"], }, ]; webidl.converters.JsonWebKey = webidl.createDictionaryConverter( "JsonWebKey", dictJsonWebKey, ); const dictHkdfParams = [ ...new SafeArrayIterator(dictAlgorithm), { key: "hash", converter: webidl.converters.HashAlgorithmIdentifier, required: true, }, { key: "salt", converter: webidl.converters["BufferSource"], required: true, }, { key: "info", converter: webidl.converters["BufferSource"], required: true, }, ]; webidl.converters.HkdfParams = webidl .createDictionaryConverter("HkdfParams", dictHkdfParams); const dictPbkdf2Params = [ ...new SafeArrayIterator(dictAlgorithm), { key: "hash", converter: webidl.converters.HashAlgorithmIdentifier, required: true, }, { key: "iterations", converter: (V, prefix, context, opts) => webidl.converters["unsigned long"](V, prefix, context, { ...opts, enforceRange: true, }), required: true, }, { key: "salt", converter: webidl.converters["BufferSource"], required: true, }, ]; webidl.converters.Pbkdf2Params = webidl .createDictionaryConverter("Pbkdf2Params", dictPbkdf2Params); const dictAesDerivedKeyParams = [ ...new SafeArrayIterator(dictAlgorithm), { key: "length", converter: (V, prefix, context, opts) => webidl.converters["unsigned long"](V, prefix, context, { ...opts, enforceRange: true, }), required: true, }, ]; const dictAesCbcParams = [ ...new SafeArrayIterator(dictAlgorithm), { key: "iv", converter: webidl.converters["BufferSource"], required: true, }, ]; const dictAesGcmParams = [ ...new SafeArrayIterator(dictAlgorithm), { key: "iv", converter: webidl.converters["BufferSource"], required: true, }, { key: "tagLength", converter: (V, prefix, context, opts) => webidl.converters["unsigned long"](V, prefix, context, { ...opts, enforceRange: true, }), }, { key: "additionalData", converter: webidl.converters["BufferSource"], }, ]; const dictAesCtrParams = [ ...new SafeArrayIterator(dictAlgorithm), { key: "counter", converter: webidl.converters["BufferSource"], required: true, }, { key: "length", converter: (V, prefix, context, opts) => webidl.converters["unsigned short"](V, prefix, context, { ...opts, enforceRange: true, }), required: true, }, ]; webidl.converters.AesDerivedKeyParams = webidl .createDictionaryConverter("AesDerivedKeyParams", dictAesDerivedKeyParams); webidl.converters.AesCbcParams = webidl .createDictionaryConverter("AesCbcParams", dictAesCbcParams); webidl.converters.AesGcmParams = webidl .createDictionaryConverter("AesGcmParams", dictAesGcmParams); webidl.converters.AesCtrParams = webidl .createDictionaryConverter("AesCtrParams", dictAesCtrParams); webidl.converters.CryptoKey = webidl.createInterfaceConverter( "CryptoKey", CryptoKey.prototype, ); const dictCryptoKeyPair = [ { key: "publicKey", converter: webidl.converters.CryptoKey, }, { key: "privateKey", converter: webidl.converters.CryptoKey, }, ]; webidl.converters.CryptoKeyPair = webidl .createDictionaryConverter("CryptoKeyPair", dictCryptoKeyPair); const dictEcdhKeyDeriveParams = [ ...new SafeArrayIterator(dictAlgorithm), { key: "public", converter: webidl.converters.CryptoKey, required: true, }, ]; webidl.converters.EcdhKeyDeriveParams = webidl .createDictionaryConverter("EcdhKeyDeriveParams", dictEcdhKeyDeriveParams); export { Crypto, crypto, CryptoKey, SubtleCrypto }; QdjRext:deno_crypto/00_crypto.jsa b,D`M`f T `LaM T  I`Cyb5Sb1J2">5q!sthf![cA237!LSnbo = "I b¢BbB"""bBbbbBbbbBBb")??????????????????????????????????????????????????????????????????????????Ib`L` bS]`HB]`b]`]"]`B]`]8L` B` L`Bb` L`b` L`` L` L`  DDcQWL`! Dllc D  c/3 Dc D  c D  c D  c D  c  D  c- D  c1B D  cFZ D  c^| D  c D  c D  c D  c D  c D  c"C D  cGb D  cfz D  c~ D  c D  c D  c D  c D  c2 D  c6L D  cPb D  cf} D  c D  c D ! !c D % %c Dc5@`% a?a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? !a? %a?a?la?ba?a?Ba?a?cb@  T I`!cb@  T  I`'(bb@  T I`))Bb@  T I`v*/bb@  T I`6bMQ  T I`Q'bb@&  T I`A b@.  T I` Bb@3  T I`{bb@4  T I`(b@8  T I`(Gbb@<  T I`Ierb@C  T I`}rubb@J  T I`uJyb@L  T I`by*b@N  T I`ABb@O  T I`:@Bb@P  T I`Z b@Q  T I`6b@R  T I`bbMQS  T I`ϺbMQT  T I`bMQU Lda  2">5q!sthf![cA237!$LSnbo Br = "I b  `M`b£" `(M`b¥""pb ¨ bB"t"t"bªbbbªbbbªbbª(bªb"t""t® bªb"tBbb#"t¯bªbbhb 0bFbF²F"Fpb """bbµb"b·"FF8b Fbb"FF¥8b Fbb"FFBb¯¯¯bbµb"b¹F"F"FFbF·FFF0b¹"®µ0bB"b¨"b0bB"b¨""Hb"b·"b¹F"F"b·Fb·F0b"(c"``(c`b`b(c"``·(cB``DSb @mBEEf?????!&c  `T ``/ `/ `?  `  a!&D]f6D } ` F` Db ` F` D `F`  ` F`  aDHcD La0 T  I`""becb Ճ  T I`#j# Qaget typeb  T I`##Qbget extractableb  T I`$$Qb get usagesb   T I`$b%Qb get algorithmb   T I`%&`b(  T8`/]  Ef`Kcԏ t !g55555(Sbqqb`Da!& a 4 4b    `T ``/ `/ `?  `  a/D]ff Da aDba DaDBa D"a ¥a a Da a a D"a  aDHcD La< T  I`//ccb   T I`k02b Q  T I`j37b Q  T I`8jNbb Q  T I`N_b Q  T I``lBbQ  T I`m&sbQ  T I`s xbQ  T I`x+"bQ  T I`¥b Q  T I`F{"b Q  T I`ӝjbQ  T I` bQ  T I`B`b( 8b (b  ` M`¥ ` M`B(b ` M`¥ ` M`B(b `M`" `M`bBb(b ` M`¥ ` M`Bµ(b `] `M`"B  `T ``/ `/ `?  `  aD]fDa  aDa  } `F` HcD La T  I`%Bccb V  T I`8bW  T I`Db X  T I`RQb get subtleb Y  T I``b(Z b^ T y`%``b^``fSIbK[  T `,`&`%b^``IbK\ B  `M`b" `M`ABb `(M`b¥""zª ` La(ba ‰CGbg‰Bb(ba b‰CG T  y`Qb .converter`J‰ccbK] (ba ‰CG(ba ‰CG"(ba ‰CG¯(ba ‰CGb(ba ‰CGb(ba ‰CG T `BQb .converter`S‰bK^ (ba ‰CG ba ‰C T `Qb .converter`N‰bK_ (ba ‰CG T `Qb .converter`>‰bK` b ba b#‰C"tB(ba ‰CG(ba ‰CG ba ‰C T `Qb .converter`N‰bKa b  `Lc ba ".‰C ba (‰C ba .‰C `PLr ba  ‰C ba " ‰C ba  ‰CB ba  ‰C ba B ‰C= ba  ‰C ba b0‰C ba 0‰C ba (‰C ba ,‰C ba B)‰C ba b-‰C ba -‰C ba  ‰C ba b ‰C ba  ‰C ba " ‰C ba +‰CB(ba ‰CG(ba b‰CG(ba "‰CG(ba ‰CG(ba ‰CG T `Qb .converter`1‰bKb (ba b‰CG®(ba ‰CG T `!Qb .converter`‰bKc (ba B‰CG(ba B‰CG ba ‰C T `"Qb .converter`D‰bKd  ba ‰C(ba ‰CG(ba ‰CG T `"Qb .converter`t‰bKe "¨b `Lb ba b‰C ba ‰C(ba ‰CG  c`Dm ph %%%%%%% % % % % %%%%%%%%%%%%%%%%%%% %!%"%#%$%&%'%(%)%*%+%,%-%.%/%0%1%2%3%4%5%6%7%8%9%: %; %< %= %>%? %@ %A%B%C%D%E%F%G%H%I%J%K%Lei e%% h  ީ ޫ0-%-%-%0- %-!%-" %-# % -$% -%% -&% -'% -(%-)%-*%-+%-,%-- %-."%-/$%-0&%-1(-2*%-3,%-4.%-50%-62-74-86%-98%-::%-;<%-<>%-=@% ->B%!-?D%"-@F%#-AH%${BJ%%&{CK%%'~DL%(~EM%)~FN%*GbO%-HbQ%.IbS%/JbU%0KbW%1L%%%%%ڂNM1t%/t%.t%0t%-t%ՂOԂPӂQ҂RSbYtЂTe+U2V[ 1%-W]0^_0-Xa%2 ic%5ۂZY݂[ڂ\ ق]!؂^"ׂ_#ւ`$Ղa%Ԃb&ӂc'҂d(тe)Ђf*Sbet΂g+e+ 10-Xg%7~hi %?%-W]0^j%-il0^n%Kۂk,j݂l-ڂm.قn/Sbptׂo0e+ 1%-W]0^r0-Xt%L%-il0^v1%-pxނq12rz%-pxނs22t|%-px%-u~v{w%_ځ2v%-px%-u~x{y%_چ2x%-px%-u~z{{%_ڋ2z%-px%-|%-px-z^ۓ2}%-px%-px-r2~{ ~)%-px-ہ3܂ 6ݡ%-px%-܃_2ބ%-px%-px-?2ޅ i|-ކ~)܂33܂ 6ݴ P~)%-px-ۅ3܂ 6ݴ%-px%-܃_2ފ i|-ކ~)%-px-~3܂ 6%-px%-܃_2ތ i|-ކ~)%-px-~3܂ 6%-px%-܃_2ގ%-px%-px-݁2ޏ i|-ކ~)%-px-ۏ3܂ 6%-px%-܃_2ޑ i|-ކ~)%-px-ۏ3܂ 6%-px%-܃_2ޓ i|-~)܂43 6%-px%-܃_ 2  i |-~)%-px-~3 6 P~)܂53 6%-px%-܃_2 i |-"~$)܂63% 6'%-px%-܃_)2+ i-|-/~1)%-px-234 66%-px%-܃_82: i<|->~@)%-px-~A3C 6E%-px%-܃_G2I iK|-M~O)%-px-~P3R 6T PV~W)܂73X 6T%-px%-܃_Z2\{^ ~_)%-px-`3b 6d ~f)%-px-g3i 6d ~k)%-px-l3n 6d%-px%-܃_p2r%-px%-|%-px-t^v2x{z ~{)%-px-|3~ 6 ~)%-px-3 6 ~)%-px-3 6 ~)%-px-3 6 ~)%-px-3 6 ~)%-px-3 6 ~)%-px-3 6 ~)%-px-3 6 ~)%-px-3 6 ~)%-px-3 6 ~)%-px-3 6 ~)%-px-3 6 ~)%-px-3 6 ~)%-px-3 6 ~)%-px-3 6 ~)%-px-3 6 ~)%-px-3 6 ~)%-px-3 6%-px%-܃_2 i|-~)%-px-~3 6 P~)%-px-3 6 P~)%-px-3 6%-px%-܃_2 i|-~)%-px-~3 6 P~)܂83 6 P~)%-px-3 6%-px%-܃_ 2  i |-~)܂93 6 i|-~)%-px-3 6 i!|-#~%)%-px-&3( 6* P,~-)܂:3. 6* P,~0)%-px-133 6* i5|-7~9)%-px-:3< 6> P@~A)܂;3B 6>%-px%-܃_D2F%-px%-܃_H2J%-px%-܃_L2N%-px%-܃_P2R%-px%-T0-Xa_V2X{Z ~[)%-px-\3^ 6` ~b)%-px-c3e 6`%-px%-܃_g2i ik|-m~o)%-px-p3r 6t%-px%-܃_v2x ߫z<PPPPPPPPPPPP9'`I@@,L` &Y 0 ` `,@&0,@LY <' 0&0,@&0p2@ Y <0 Y s`&00 Y `&00 Y `&00 &0p` `` `20 Y <' &0p2@ ,@ @ Y <0 &0,bA cdf ff!f-f9fAfddDdqfyfffffffffffffdDdDdDddDdDdDdDdDeD eee!e)e1e9eAeagigqgyggggg h%h9hYhhhi1iD`RD]DH =Q9~6Ǿh// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. /// import { core, primordials } from "ext:core/mod.js"; import { op_broadcast_recv, op_broadcast_send, op_broadcast_subscribe, op_broadcast_unsubscribe, } from "ext:core/ops"; const { ArrayPrototypeIndexOf, ArrayPrototypePush, ArrayPrototypeSplice, ObjectPrototypeIsPrototypeOf, Symbol, SymbolFor, Uint8Array, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; import { defineEventHandler, EventTarget, setIsTrusted, setTarget, } from "ext:deno_web/02_event.js"; import { defer } from "ext:deno_web/02_timers.js"; import { DOMException } from "ext:deno_web/01_dom_exception.js"; const _name = Symbol("[[name]]"); const _closed = Symbol("[[closed]]"); const channels = []; let rid = null; async function recv() { while (channels.length > 0) { const message = await op_broadcast_recv(rid); if (message === null) { break; } const { 0: name, 1: data } = message; dispatch(null, name, new Uint8Array(data)); } core.close(rid); rid = null; } function dispatch(source, name, data) { for (let i = 0; i < channels.length; ++i) { const channel = channels[i]; if (channel === source) continue; // Don't self-send. if (channel[_name] !== name) continue; if (channel[_closed]) continue; const go = () => { if (channel[_closed]) return; const event = new MessageEvent("message", { data: core.deserialize(data), // TODO(bnoordhuis) Cache immutables. origin: "http://127.0.0.1", }); setIsTrusted(event, true); setTarget(event, channel); channel.dispatchEvent(event); }; defer(go); } } class BroadcastChannel extends EventTarget { [_name]; [_closed] = false; get name() { return this[_name]; } constructor(name) { super(); const prefix = "Failed to construct 'BroadcastChannel'"; webidl.requiredArguments(arguments.length, 1, prefix); this[_name] = webidl.converters["DOMString"](name, prefix, "Argument 1"); this[webidl.brand] = webidl.brand; ArrayPrototypePush(channels, this); if (rid === null) { // Create the rid immediately, otherwise there is a time window (and a // race condition) where messages can get lost, because recv() is async. rid = op_broadcast_subscribe(); recv(); } } postMessage(message) { webidl.assertBranded(this, BroadcastChannelPrototype); const prefix = "Failed to execute 'postMessage' on 'BroadcastChannel'"; webidl.requiredArguments(arguments.length, 1, prefix); if (this[_closed]) { throw new DOMException("Already closed", "InvalidStateError"); } if (typeof message === "function" || typeof message === "symbol") { throw new DOMException("Uncloneable value", "DataCloneError"); } const data = core.serialize(message); // Send to other listeners in this VM. dispatch(this, this[_name], new Uint8Array(data)); // Send to listeners in other VMs. defer(() => { if (!this[_closed]) { op_broadcast_send(rid, this[_name], data); } }); } close() { webidl.assertBranded(this, BroadcastChannelPrototype); this[_closed] = true; const index = ArrayPrototypeIndexOf(channels, this); if (index === -1) return; ArrayPrototypeSplice(channels, index, 1); if (channels.length === 0) { op_broadcast_unsubscribe(rid); } } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(BroadcastChannelPrototype, this), keys: [ "name", "onmessage", "onmessageerror", ], }), inspectOptions, ); } } defineEventHandler(BroadcastChannel.prototype, "message"); defineEventHandler(BroadcastChannel.prototype, "messageerror"); const BroadcastChannelPrototype = BroadcastChannel.prototype; export { BroadcastChannel }; $QgzS2ext:deno_broadcast_channel/01_broadcast_channel.jsa b-D`4M`  T`FLaU T  I`"9Sb1 AdAc!I ObbA"bl?????????????Ibh`$L` bS]`B]`$b]`"]`=]`]`B]`]L`` L` L`  DDc buffer, ); } } else { if (this.#structSize === null) { return op_ffi_call_ptr( this.pointer, this.definition, parameters, ); } else { const buffer = new Uint8Array(this.#structSize); op_ffi_call_ptr( this.pointer, this.definition, parameters, buffer, ); return buffer; } } } } function isReturnedAsBigInt(type) { return type === "u64" || type === "i64" || type === "usize" || type === "isize"; } function isI64(type) { return type === "i64" || type === "isize"; } function isStruct(type) { return typeof type === "object" && type !== null && typeof type.struct === "object"; } function getTypeSizeAndAlignment(type, cache = new SafeMap()) { if (isStruct(type)) { const cached = cache.get(type); if (cached !== undefined) { if (cached === null) { throw new TypeError("Recursive struct definition"); } return cached; } cache.set(type, null); let size = 0; let alignment = 1; for (const field of new SafeArrayIterator(type.struct)) { const { 0: fieldSize, 1: fieldAlign } = getTypeSizeAndAlignment( field, cache, ); alignment = MathMax(alignment, fieldAlign); size = MathCeil(size / fieldAlign) * fieldAlign; size += fieldSize; } size = MathCeil(size / alignment) * alignment; const result = [size, alignment]; cache.set(type, result); return result; } switch (type) { case "bool": case "u8": case "i8": return [1, 1]; case "u16": case "i16": return [2, 2]; case "u32": case "i32": case "f32": return [4, 4]; case "u64": case "i64": case "f64": case "pointer": case "buffer": case "function": case "usize": case "isize": return [8, 8]; default: throw new TypeError(`Unsupported type: ${type}`); } } class UnsafeCallback { #refcount; // Internal promise only meant to keep Deno from exiting #refpromise; #rid; definition; callback; pointer; constructor(definition, callback) { if (definition.nonblocking) { throw new TypeError( "Invalid UnsafeCallback, cannot be nonblocking", ); } const { 0: rid, 1: pointer } = op_ffi_unsafe_callback_create( definition, callback, ); this.#refcount = 0; this.#rid = rid; this.pointer = pointer; this.definition = definition; this.callback = callback; } static threadSafe(definition, callback) { const unsafeCallback = new UnsafeCallback(definition, callback); unsafeCallback.ref(); return unsafeCallback; } ref() { if (this.#refcount++ === 0) { if (this.#refpromise) { // Re-refing core.refOpPromise(this.#refpromise); } else { this.#refpromise = op_ffi_unsafe_callback_ref( this.#rid, ); } } return this.#refcount; } unref() { // Only decrement refcount if it is positive, and only // unref the callback if refcount reaches zero. if (this.#refcount > 0 && --this.#refcount === 0) { core.unrefOpPromise(this.#refpromise); } return this.#refcount; } close() { this.#refcount = 0; op_ffi_unsafe_callback_close(this.#rid); } } const UnsafeCallbackPrototype = UnsafeCallback.prototype; class DynamicLibrary { #rid; symbols = {}; constructor(path, symbols) { ({ 0: this.#rid, 1: this.symbols } = op_ffi_load({ path, symbols })); for (const symbol in symbols) { if (!ObjectHasOwn(symbols, symbol)) { continue; } // Symbol was marked as optional, and not found. // In that case, we set its value to null in Rust-side. if (symbols[symbol] === null) { continue; } if (ReflectHas(symbols[symbol], "type")) { const type = symbols[symbol].type; if (type === "void") { throw new TypeError( "Foreign symbol of type 'void' is not supported.", ); } const name = symbols[symbol].name || symbol; const value = op_ffi_get_static( this.#rid, name, type, symbols[symbol].optional, ); ObjectDefineProperty( this.symbols, symbol, { configurable: false, enumerable: true, value, writable: false, }, ); continue; } const resultType = symbols[symbol].result; const isStructResult = isStruct(resultType); const structSize = isStructResult ? getTypeSizeAndAlignment(resultType)[0] : 0; const needsUnpacking = isReturnedAsBigInt(resultType); const isNonBlocking = symbols[symbol].nonblocking; if (isNonBlocking) { ObjectDefineProperty( this.symbols, symbol, { configurable: false, enumerable: true, value: (...parameters) => { if (isStructResult) { const buffer = new Uint8Array(structSize); const ret = op_ffi_call_nonblocking( this.#rid, symbol, parameters, buffer, ); return PromisePrototypeThen( ret, () => buffer, ); } else { return op_ffi_call_nonblocking( this.#rid, symbol, parameters, ); } }, writable: false, }, ); } if (needsUnpacking && !isNonBlocking) { const call = this.symbols[symbol]; const parameters = symbols[symbol].parameters; const vi = new Int32Array(2); const vui = new Uint32Array(TypedArrayPrototypeGetBuffer(vi)); const b = new BigInt64Array(TypedArrayPrototypeGetBuffer(vi)); const params = ArrayPrototypeJoin( ArrayPrototypeMap(parameters, (_, index) => `p${index}`), ", ", ); // Make sure V8 has no excuse to not optimize this function. this.symbols[symbol] = new Function( "vi", "vui", "b", "call", "NumberIsSafeInteger", "Number", `return function (${params}) { call(${params}${parameters.length > 0 ? ", " : ""}vi); ${ isI64(resultType) ? `const n1 = Number(b[0])` : `const n1 = vui[0] + 2 ** 32 * vui[1]` // Faster path for u64 }; if (NumberIsSafeInteger(n1)) return n1; return b[0]; }`, )(vi, vui, b, call, NumberIsSafeInteger, Number); } else if (isStructResult && !isNonBlocking) { const call = this.symbols[symbol]; const parameters = symbols[symbol].parameters; const params = ArrayPrototypeJoin( ArrayPrototypeMap(parameters, (_, index) => `p${index}`), ", ", ); this.symbols[symbol] = new Function( "call", `return function (${params}) { const buffer = new Uint8Array(${structSize}); call(${params}${parameters.length > 0 ? ", " : ""}buffer); return buffer; }`, )(call); } } } close() { core.close(this.#rid); } } function dlopen(path, symbols) { return new DynamicLibrary(pathFromURL(path), symbols); } export { dlopen, UnsafeCallback, UnsafeFnPointer, UnsafePointer, UnsafePointerView, }; QcV@}ext:deno_ffi/00_ffi.jsa b.D`M`2 T`syLa\ T  I`"%Sb1(25">q!s!!"= I E )iK7!$"b"!"b  B(????????????????????????????????????????Ib7`L` bS]`nB]`>n]`]DL`$` L`$` L`b` L`bb` L`b+` L`+]L`   D  cUY D 9 9c D = =c D A Ac D E Ec. D I Ic2B D M McFT D Q QcXi D U Ucmx D Y Yc| D ] ]c D a ac D e ec D i ic D m mc D q qc D u uc  D y yc- D } }c1@ D  cDS D  cWf D  cjx D  c| D  c D  c D  c D  c D  c D  c D  c5 DbJbJcx Dc[f`% a?a? 9a? =a? Aa? Ea? Ia? Ma? Qa? Ua? Ya? ]a? aa? ea? ia? ma? qa? ua? ya? }a? a? a? a? a? a? a? a? a? a? a? a?bJa?ba?ba?a?$a?+a?ijb"@  T  I`!jb@   T I`3"b@!  T I`Fb b@"  T I`! b @# $Ld T I`A77+b@1 a+a  25">q!s!!"= I E )-iK7!$$  `x ` `/  `/ `?   `   anBajajBajD] ` ajbajBajajajajajaj aj aj aj aj ajBaj ajBaj] T  I`bjijb Ճ!  T I`&~bb"  T I`Bb#  T I`A b$  T I`N b %  T I`  b&  T I` l b '  T I`x b (  T I` [ b  )  T I`j b  *  T I` K b  +  T I`Y b  ,  T I`  b -  T I`# { Bb .  T I` Bb /  T I` rb0  T I`b1  T I`Bb2  T I`lBb3  T$` L`  l` Ka> Db3(Sbqqb`Dan a b4    ` ` `/  `/ `?  `  a%)aj ajajajajD] ` aj] T  I`%%bjijbD5  T I`J|)b6  T I`b7  T I` b8  T I`Pb9  T I``b: $Sb @b?n  `T ``/ `/ `?  `  anD]$ ` aj1aj] T  I`qlijb Ճ;  T I`l1b<  T,`L`b  l`Kb ܵ ,8 $d335(Sbqq`Dan a 0b=   T I`#u$B&b %?  T I`|$%B'b&@  T I`%&'b'A  T I`&&b(B  T8`,L`b  l`Kc < 8 0 &g555333 (Sbqq$`Da!& a 4 0b)C $Sb @Bhb?0'07j  `T ``/ `/ `?  `  a0'07D]$ ` ajaj] T  I`m'7( mijb Ճ*D  T I` 7.7b/E  T(` L`"  1m`Kb   H ~c53(Sbqq(`DaE'07 a 0b0F  }j`Dh %%%%%%% % % % % %%%%%%%%%%%%%%%%%%% %!%"%#%$%%%&%'%(%)%*ei h  0 - %- %- %0 -%-%- %- % -% -% -% -% -%-%-%-%-%- %-"%-$%-&%-(- *%-!,%-".%-#0%-$2%-%4%-&6%-'8  i:%b< i>% b@ iB%!)(*+,- . / 0 1 23456789:;e+<2=D 1  iF%""bH iJ%# iL%$?>@ABCDe+ 1EGGe%HFI e+J!2=N 1K%MMe%NNe%OOe%P"LQ#R$S%T&e+ %U'2=P 10-VR%)WOOe%Y(XZ)e+[*2=T %* j(hV,PPPPPPPPP@@,@@ ,P bA j}kkkkkkkkkkkkkkkkkl llIlQlYlalilAlllDlAkIkQkYkllllllmD%m-mekD`RD]DH Q!73// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { core, internals, primordials } from "ext:core/mod.js"; const { BadResourcePrototype, InterruptedPrototype, internalRidSymbol, createCancelHandle, } = core; import { op_dns_resolve, op_net_accept_tcp, op_net_accept_unix, op_net_connect_tcp, op_net_connect_unix, op_net_join_multi_v4_udp, op_net_join_multi_v6_udp, op_net_leave_multi_v4_udp, op_net_leave_multi_v6_udp, op_net_listen_tcp, op_net_listen_unix, op_net_recv_udp, op_net_recv_unixpacket, op_net_send_udp, op_net_send_unixpacket, op_net_set_multi_loopback_udp, op_net_set_multi_ttl_udp, op_set_keepalive, op_set_nodelay, } from "ext:core/ops"; const { Error, Number, ObjectPrototypeIsPrototypeOf, ObjectDefineProperty, PromiseResolve, SafeSet, SetPrototypeAdd, SetPrototypeDelete, SetPrototypeForEach, SymbolAsyncIterator, Symbol, TypeError, TypedArrayPrototypeSubarray, Uint8Array, } = primordials; import { readableStreamForRidUnrefable, readableStreamForRidUnrefableRef, readableStreamForRidUnrefableUnref, writableStreamForRid, } from "ext:deno_web/06_streams.js"; import * as abortSignal from "ext:deno_web/03_abort_signal.js"; import { SymbolDispose } from "ext:deno_web/00_infra.js"; async function write(rid, data) { return await core.write(rid, data); } function shutdown(rid) { return core.shutdown(rid); } async function resolveDns(query, recordType, options) { let cancelRid; let abortHandler; if (options?.signal) { options.signal.throwIfAborted(); cancelRid = createCancelHandle(); abortHandler = () => core.tryClose(cancelRid); options.signal[abortSignal.add](abortHandler); } try { return await op_dns_resolve({ cancelRid, query, recordType, options, }); } finally { if (options?.signal) { options.signal[abortSignal.remove](abortHandler); // always throw the abort error when aborted options.signal.throwIfAborted(); } } } class Conn { #rid = 0; #remoteAddr = null; #localAddr = null; #unref = false; #pendingReadPromises = new SafeSet(); #readable; #writable; constructor(rid, remoteAddr, localAddr) { ObjectDefineProperty(this, internalRidSymbol, { enumerable: false, value: rid, }); this.#rid = rid; this.#remoteAddr = remoteAddr; this.#localAddr = localAddr; } get rid() { internals.warnOnDeprecatedApi( "Deno.Conn.rid", new Error().stack, "Use `Deno.Conn` instance methods instead.", ); return this.#rid; } get remoteAddr() { return this.#remoteAddr; } get localAddr() { return this.#localAddr; } write(p) { return write(this.#rid, p); } async read(buffer) { if (buffer.length === 0) { return 0; } const promise = core.read(this.#rid, buffer); if (this.#unref) core.unrefOpPromise(promise); SetPrototypeAdd(this.#pendingReadPromises, promise); let nread; try { nread = await promise; } catch (e) { throw e; } finally { SetPrototypeDelete(this.#pendingReadPromises, promise); } return nread === 0 ? null : nread; } close() { core.close(this.#rid); } closeWrite() { return shutdown(this.#rid); } get readable() { if (this.#readable === undefined) { this.#readable = readableStreamForRidUnrefable(this.#rid); if (this.#unref) { readableStreamForRidUnrefableUnref(this.#readable); } } return this.#readable; } get writable() { if (this.#writable === undefined) { this.#writable = writableStreamForRid(this.#rid); } return this.#writable; } ref() { this.#unref = false; if (this.#readable) { readableStreamForRidUnrefableRef(this.#readable); } SetPrototypeForEach( this.#pendingReadPromises, (promise) => core.refOpPromise(promise), ); } unref() { this.#unref = true; if (this.#readable) { readableStreamForRidUnrefableUnref(this.#readable); } SetPrototypeForEach( this.#pendingReadPromises, (promise) => core.unrefOpPromise(promise), ); } [SymbolDispose]() { core.tryClose(this.#rid); } } class TcpConn extends Conn { #rid = 0; constructor(rid, remoteAddr, localAddr) { super(rid, remoteAddr, localAddr); ObjectDefineProperty(this, internalRidSymbol, { enumerable: false, value: rid, }); this.#rid = rid; } get rid() { internals.warnOnDeprecatedApi( "Deno.TcpConn.rid", new Error().stack, "Use `Deno.TcpConn` instance methods instead.", ); return this.#rid; } setNoDelay(noDelay = true) { return op_set_nodelay(this.#rid, noDelay); } setKeepAlive(keepAlive = true) { return op_set_keepalive(this.#rid, keepAlive); } } class UnixConn extends Conn { #rid = 0; constructor(rid, remoteAddr, localAddr) { super(rid, remoteAddr, localAddr); ObjectDefineProperty(this, internalRidSymbol, { enumerable: false, value: rid, }); this.#rid = rid; } get rid() { internals.warnOnDeprecatedApi( "Deno.UnixConn.rid", new Error().stack, "Use `Deno.UnixConn` instance methods instead.", ); return this.#rid; } } class Listener { #rid = 0; #addr = null; #unref = false; #promise = null; constructor(rid, addr) { ObjectDefineProperty(this, internalRidSymbol, { enumerable: false, value: rid, }); this.#rid = rid; this.#addr = addr; } get rid() { internals.warnOnDeprecatedApi( "Deno.Listener.rid", new Error().stack, "Use `Deno.Listener` instance methods instead.", ); return this.#rid; } get addr() { return this.#addr; } async accept() { let promise; switch (this.addr.transport) { case "tcp": promise = op_net_accept_tcp(this.#rid); break; case "unix": promise = op_net_accept_unix(this.#rid); break; default: throw new Error(`Unsupported transport: ${this.addr.transport}`); } this.#promise = promise; if (this.#unref) core.unrefOpPromise(promise); const { 0: rid, 1: localAddr, 2: remoteAddr } = await promise; this.#promise = null; if (this.addr.transport == "tcp") { localAddr.transport = "tcp"; remoteAddr.transport = "tcp"; return new TcpConn(rid, remoteAddr, localAddr); } else if (this.addr.transport == "unix") { return new UnixConn( rid, { transport: "unix", path: remoteAddr }, { transport: "unix", path: localAddr }, ); } else { throw new Error("unreachable"); } } async next() { let conn; try { conn = await this.accept(); } catch (error) { if ( ObjectPrototypeIsPrototypeOf(BadResourcePrototype, error) || ObjectPrototypeIsPrototypeOf(InterruptedPrototype, error) ) { return { value: undefined, done: true }; } throw error; } return { value: conn, done: false }; } return(value) { this.close(); return PromiseResolve({ value, done: true }); } close() { core.close(this.#rid); } [SymbolDispose]() { core.tryClose(this.#rid); } [SymbolAsyncIterator]() { return this; } ref() { this.#unref = false; if (this.#promise !== null) { core.refOpPromise(this.#promise); } } unref() { this.#unref = true; if (this.#promise !== null) { core.unrefOpPromise(this.#promise); } } } class Datagram { #rid = 0; #addr = null; #unref = false; #promise = null; constructor(rid, addr, bufSize = 1024) { this.#rid = rid; this.#addr = addr; this.bufSize = bufSize; } get addr() { return this.#addr; } async joinMulticastV4(addr, multiInterface) { await op_net_join_multi_v4_udp( this.#rid, addr, multiInterface, ); return { leave: () => op_net_leave_multi_v4_udp( this.#rid, addr, multiInterface, ), setLoopback: (loopback) => op_net_set_multi_loopback_udp( this.#rid, true, loopback, ), setTTL: (ttl) => op_net_set_multi_ttl_udp( this.#rid, ttl, ), }; } async joinMulticastV6(addr, multiInterface) { await op_net_join_multi_v6_udp( this.#rid, addr, multiInterface, ); return { leave: () => op_net_leave_multi_v6_udp( this.#rid, addr, multiInterface, ), setLoopback: (loopback) => op_net_set_multi_loopback_udp( this.#rid, false, loopback, ), }; } async receive(p) { const buf = p || new Uint8Array(this.bufSize); let nread; let remoteAddr; switch (this.addr.transport) { case "udp": { this.#promise = op_net_recv_udp( this.#rid, buf, ); if (this.#unref) core.unrefOpPromise(this.#promise); ({ 0: nread, 1: remoteAddr } = await this.#promise); remoteAddr.transport = "udp"; break; } case "unixpacket": { let path; ({ 0: nread, 1: path } = await op_net_recv_unixpacket( this.#rid, buf, )); remoteAddr = { transport: "unixpacket", path }; break; } default: throw new Error(`Unsupported transport: ${this.addr.transport}`); } const sub = TypedArrayPrototypeSubarray(buf, 0, nread); return [sub, remoteAddr]; } async send(p, opts) { switch (this.addr.transport) { case "udp": return await op_net_send_udp( this.#rid, { hostname: opts.hostname ?? "127.0.0.1", port: opts.port }, p, ); case "unixpacket": return await op_net_send_unixpacket( this.#rid, opts.path, p, ); default: throw new Error(`Unsupported transport: ${this.addr.transport}`); } } close() { core.close(this.#rid); } ref() { this.#unref = false; if (this.#promise !== null) { core.refOpPromise(this.#promise); } } unref() { this.#unref = true; if (this.#promise !== null) { core.unrefOpPromise(this.#promise); } } async *[SymbolAsyncIterator]() { while (true) { try { yield await this.receive(); } catch (err) { if ( ObjectPrototypeIsPrototypeOf(BadResourcePrototype, err) || ObjectPrototypeIsPrototypeOf(InterruptedPrototype, err) ) { break; } throw err; } } } } const listenOptionApiName = Symbol("listenOptionApiName"); function listen(args) { switch (args.transport ?? "tcp") { case "tcp": { const { 0: rid, 1: addr } = op_net_listen_tcp({ hostname: args.hostname ?? "0.0.0.0", port: Number(args.port), }, args.reusePort); addr.transport = "tcp"; return new Listener(rid, addr); } case "unix": { const { 0: rid, 1: path } = op_net_listen_unix( args.path, args[listenOptionApiName] ?? "Deno.listen", ); const addr = { transport: "unix", path, }; return new Listener(rid, addr); } default: throw new TypeError(`Unsupported transport: '${transport}'`); } } function createListenDatagram(udpOpFn, unixOpFn) { return function listenDatagram(args) { switch (args.transport) { case "udp": { const { 0: rid, 1: addr } = udpOpFn( { hostname: args.hostname ?? "127.0.0.1", port: args.port, }, args.reuseAddress ?? false, args.loopback ?? false, ); addr.transport = "udp"; return new Datagram(rid, addr); } case "unixpacket": { const { 0: rid, 1: path } = unixOpFn(args.path); const addr = { transport: "unixpacket", path, }; return new Datagram(rid, addr); } default: throw new TypeError(`Unsupported transport: '${transport}'`); } }; } async function connect(args) { switch (args.transport ?? "tcp") { case "tcp": { const { 0: rid, 1: localAddr, 2: remoteAddr } = await op_net_connect_tcp( { hostname: args.hostname ?? "127.0.0.1", port: args.port, }, ); localAddr.transport = "tcp"; remoteAddr.transport = "tcp"; return new TcpConn(rid, remoteAddr, localAddr); } case "unix": { const { 0: rid, 1: localAddr, 2: remoteAddr } = await op_net_connect_unix( args.path, ); return new UnixConn( rid, { transport: "unix", path: remoteAddr }, { transport: "unix", path: localAddr }, ); } default: throw new TypeError(`Unsupported transport: '${transport}'`); } } export { Conn, connect, createListenDatagram, listen, Listener, listenOptionApiName, resolveDns, shutdown, TcpConn, UnixConn, }; QcNr#ext:deno_net/01_net.jsa b/D`M`= T`gyLa\d T  I`:ob}Sb1Bb&J !%EBF"H= I -b7r???????????????????Ib3`L` bS]`yB]`"t]`]`n]` ]L`.` L`.5` L`5B3` L`B35` L`5>` L`><` L`<;` L`;";` L`";",`  L`",`  L` L`  D-DctL` DbKbKc D  cUY DBKBKc[d D  c D  c' D  c+= D  cAS D  cWj D  cn D  c D  c D  c D  c D  c D  c  D  c4 D  c8G D  cKa D  ce D  c D  c D  c Dcfq Dc" Dc&F DcJl D""cp`% a?BKa?a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a?a?a?a?"a?bKa?a ?",a ?.a?B3a?5a?5a?";a?;a?<a?>a?QmbMQM XL` T  I`umb@H a.  T I`",bMQI f/  T I`*+-;b@9J a0 T,`L`8SbqA=B=aR<`DaJ-/0 T I`-,0>anb;  Yn`Dd % %`Qmb@:K a1 T  I`G033>umbMQ<L a2a  Bb&J !%EBF"HBs = I TSb @Bhb..b//b00h???????  `T ``/ `/ `?  `  aD]ff D } ` F`  D" ` F` Da 1 `F` ba b1 `F` a'a DbA `F` B'a D a2a DHcD La8Bhb..b//b00 T  I` .}nQmb ՃN  T I` O  Qaget ridbO  T I`a Qbget remoteAddrbP  T I` Qb get localAddrb Q  T I` bb R  T I` b Q S  T I` b T  T I`  2b  U  T I` Qb get readableb  V  T I`Qb get writableb W  T I`B'bX  T I`'bY bK T I``bZ  TH`L L`%  -o`Kc@,LTDH4 Ak 5555 i5 5 5(Sbqq.`Dab 4  4b[  $Sb @Bhb?3um  `T ``/ `/ `?  `  a3D]< ` ajbA`+ } `F3aj4aj] T  I`B3EoQmb Ճ\  T I` Qaget ridb]  T I`3b ^  T I`14b _  T(` ]  o`Kb ,c 5(SbqqB3`Da3 a b` $Sb @Bhb?5um  `T ``/ `/ `?  `  a5D]$ ` ajbA`+ } `F] T  I`m25oQmb Ճa  T I`= Qaget ridbb  T(` ]  o`Kb Ț, c 5(Sbqq5`DaQ a bc e%@@e%e%AAe%B?CDEFGH0tI tJK L!e+M"21* 1Ne%@@e%e%AAe%P#OQ$R%S&T'U(V)W*X+ tY,e+ Z-21, %[b.1 umd03PPPPPP , ,@bAG mm=nEnDnnnnnnnnnooDoD!o)o]oeoqoyooooop pp!p)p1p9pApIpQpYpappppDpDpppppppMnUnenunD`RD]DH QT// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { core, internals, primordials } from "ext:core/mod.js"; const { internalRidSymbol } = core; import { op_net_accept_tls, op_net_connect_tls, op_net_listen_tls, op_tls_handshake, op_tls_start, } from "ext:core/ops"; const { Number, ObjectDefineProperty, TypeError, } = primordials; import { Conn, Listener } from "ext:deno_net/01_net.js"; class TlsConn extends Conn { #rid = 0; constructor(rid, remoteAddr, localAddr) { super(rid, remoteAddr, localAddr); ObjectDefineProperty(this, internalRidSymbol, { enumerable: false, value: rid, }); this.#rid = rid; } get rid() { internals.warnOnDeprecatedApi( "Deno.TlsConn.rid", new Error().stack, "Use `Deno.TlsConn` instance methods instead.", ); return this.#rid; } handshake() { return op_tls_handshake(this.#rid); } } async function connectTls({ port, hostname = "127.0.0.1", transport = "tcp", certFile = undefined, caCerts = [], certChain = undefined, privateKey = undefined, cert = undefined, key = undefined, alpnProtocols = undefined, }) { if (certFile !== undefined) { internals.warnOnDeprecatedApi( "Deno.ConnectTlsOptions.certFile", new Error().stack, "Pass the cert file contents to the `Deno.ConnectTlsOptions.cert` option instead.", ); } if (certChain !== undefined) { internals.warnOnDeprecatedApi( "Deno.ConnectTlsOptions.certChain", new Error().stack, "Use the `Deno.ConnectTlsOptions.cert` option instead.", ); } if (privateKey !== undefined) { internals.warnOnDeprecatedApi( "Deno.ConnectTlsOptions.privateKey", new Error().stack, "Use the `Deno.ConnectTlsOptions.key` option instead.", ); } if (transport !== "tcp") { throw new TypeError(`Unsupported transport: '${transport}'`); } if (certChain !== undefined && cert !== undefined) { throw new TypeError( "Cannot specify both `certChain` and `cert`", ); } if (privateKey !== undefined && key !== undefined) { throw new TypeError( "Cannot specify both `privateKey` and `key`", ); } cert ??= certChain; key ??= privateKey; const { 0: rid, 1: localAddr, 2: remoteAddr } = await op_net_connect_tls( { hostname, port }, { certFile, caCerts, cert, key, alpnProtocols }, ); localAddr.transport = "tcp"; remoteAddr.transport = "tcp"; return new TlsConn(rid, remoteAddr, localAddr); } class TlsListener extends Listener { #rid = 0; constructor(rid, addr) { super(rid, addr); ObjectDefineProperty(this, internalRidSymbol, { enumerable: false, value: rid, }); this.#rid = rid; } get rid() { internals.warnOnDeprecatedApi( "Deno.TlsListener.rid", new Error().stack, "Use `Deno.TlsListener` instance methods instead.", ); return this.#rid; } async accept() { const { 0: rid, 1: localAddr, 2: remoteAddr } = await op_net_accept_tls( this.#rid, ); localAddr.transport = "tcp"; remoteAddr.transport = "tcp"; return new TlsConn(rid, remoteAddr, localAddr); } } function listenTls({ port, cert, certFile, key, keyFile, hostname = "0.0.0.0", transport = "tcp", alpnProtocols = undefined, reusePort = false, }) { if (transport !== "tcp") { throw new TypeError(`Unsupported transport: '${transport}'`); } if (keyFile !== undefined) { internals.warnOnDeprecatedApi( "Deno.ListenTlsOptions.keyFile", new Error().stack, "Pass the key file contents to the `Deno.ListenTlsOptions.key` option instead.", ); } if (certFile !== undefined) { internals.warnOnDeprecatedApi( "Deno.ListenTlsOptions.certFile", new Error().stack, "Pass the cert file contents to the `Deno.ListenTlsOptions.cert` option instead.", ); } const { 0: rid, 1: localAddr } = op_net_listen_tls( { hostname, port: Number(port) }, { cert, certFile, key, keyFile, alpnProtocols, reusePort }, ); return new TlsListener(rid, localAddr); } async function startTls( conn, { hostname = "127.0.0.1", caCerts = [], alpnProtocols = undefined, } = {}, ) { const { 0: rid, 1: localAddr, 2: remoteAddr } = await op_tls_start({ rid: conn[internalRidSymbol], hostname, caCerts, alpnProtocols, }); return new TlsConn(rid, remoteAddr, localAddr); } export { connectTls, listenTls, startTls, TlsConn, TlsListener }; Qc:ext:deno_net/02_tls.jsa b0D`8M`  T`pLa-4La  T  I` b@Sb1&= c????Ib`L` bS]`yB]`$>]`]DL`?` L`?C` L`Cb@` L`b@C` L`CD` L`D]0L`   D..c D55c D  cUY DBKBKc[d D  c D  c D  c D  c  D  c Dcfq` a?BKa?a? a? a? a? a? a?.a?5a??a?b@a?Ca?Ca?Da? qbMQ| b T I` 3C5qb@ } a  T I`LDbMQ ~ a a  &$Sb @Bhb?  `T ``/ `/ `?  `  aD]0 ` ajbA`+ } `F?aj]Bh. T  I`?q qb Ճ  T I`o Qaget ridb  T I`|?b   T(` ]  q` Ka,c 5(Sbqq?`Da a b  $Sb @Bhb? 5q  `T ``/ `/ `?  `  a D]0 ` ajbA`+ } `F7aj]5 T  I`2 Cq qb Ճ  T I`  Qaget ridb  T I` 7b Q  T(` ]  %r` KaP,c 5(SbqqC`Da  a b  !q`DHh %%%%ei h  0-%0-%-%- %   e%0  ‚e+2 1  e%0‚e+2  1 5q a P,bA{ qqqq-qr rr!rqqD`RD]DH -#Q)#GF// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { core, primordials } from "ext:core/mod.js"; const { isPromise } = core; import { op_kv_atomic_write, op_kv_database_open, op_kv_dequeue_next_message, op_kv_encode_cursor, op_kv_finish_dequeued_message, op_kv_snapshot_read, op_kv_watch, op_kv_watch_next } from "ext:core/ops"; const { ArrayFrom, ArrayPrototypeMap, ArrayPrototypePush, ArrayPrototypeReverse, ArrayPrototypeSlice, AsyncGeneratorPrototype, BigInt, BigIntPrototypeToString, Error, NumberIsNaN, Object, ObjectFreeze, ObjectGetPrototypeOf, ObjectHasOwn, ObjectPrototypeIsPrototypeOf, RangeError, SafeMap, SafeMapIterator, StringPrototypeReplace, Symbol, SymbolAsyncIterator, SymbolFor, SymbolToStringTag, TypeError, TypedArrayPrototypeGetSymbolToStringTag } = primordials; import { SymbolDispose } from "ext:deno_web/00_infra.js"; import { ReadableStream } from "ext:deno_web/06_streams.js"; const encodeCursor = (selector, boundaryKey)=>op_kv_encode_cursor(selector, boundaryKey); async function openKv(path) { const rid = await op_kv_database_open(path); return new Kv(rid, kvSymbol); } const maxQueueDelay = 30 * 24 * 60 * 60 * 1000; function validateQueueDelay(delay) { if (delay < 0) { throw new TypeError("delay cannot be negative"); } if (delay > maxQueueDelay) { throw new TypeError("delay cannot be greater than 30 days"); } if (NumberIsNaN(delay)) { throw new TypeError("delay cannot be NaN"); } } const maxQueueBackoffIntervals = 5; const maxQueueBackoffInterval = 60 * 60 * 1000; function validateBackoffSchedule(backoffSchedule) { if (backoffSchedule.length > maxQueueBackoffIntervals) { throw new TypeError("invalid backoffSchedule"); } for(let i = 0; i < backoffSchedule.length; ++i){ const interval = backoffSchedule[i]; if (interval < 0 || interval > maxQueueBackoffInterval || NumberIsNaN(interval)) { throw new TypeError("invalid backoffSchedule"); } } } const kvSymbol = Symbol("KvRid"); const commitVersionstampSymbol = Symbol("KvCommitVersionstamp"); class Kv { #rid; #isClosed; constructor(rid = undefined, symbol = undefined){ if (kvSymbol !== symbol) { throw new TypeError("Deno.Kv can not be constructed, use Deno.openKv instead."); } this.#rid = rid; this.#isClosed = false; } atomic() { return new AtomicOperation(this.#rid); } commitVersionstamp() { return commitVersionstampSymbol; } async get(key, opts) { const { 0: entries } = await op_kv_snapshot_read(this.#rid, [ [ null, key, null, 1, false, null ] ], opts?.consistency ?? "strong"); if (!entries.length) { return { key, value: null, versionstamp: null }; } return deserializeValue(entries[0]); } async getMany(keys, opts) { const ranges = await op_kv_snapshot_read(this.#rid, ArrayPrototypeMap(keys, (key)=>[ null, key, null, 1, false, null ]), opts?.consistency ?? "strong"); return ArrayPrototypeMap(ranges, (entries, i)=>{ if (!entries.length) { return { key: keys[i], value: null, versionstamp: null }; } return deserializeValue(entries[0]); }); } async set(key, value, options) { const versionstamp = await doAtomicWriteInPlace(this.#rid, [], [ [ key, "set", serializeValue(value), options?.expireIn ] ], []); if (versionstamp === null) throw new TypeError("Failed to set value"); return { ok: true, versionstamp }; } async delete(key) { const result = await doAtomicWriteInPlace(this.#rid, [], [ [ key, "delete", null, undefined ] ], []); if (!result) throw new TypeError("Failed to set value"); } list(selector, options = {}) { if (options.limit !== undefined && options.limit <= 0) { throw new Error("limit must be positive"); } let batchSize = options.batchSize ?? options.limit ?? 100; if (batchSize <= 0) throw new Error("batchSize must be positive"); if (options.batchSize === undefined && batchSize > 500) batchSize = 500; return new KvListIterator({ limit: options.limit, selector, cursor: options.cursor, reverse: options.reverse ?? false, consistency: options.consistency ?? "strong", batchSize, pullBatch: this.#pullBatch(batchSize) }); } #pullBatch(batchSize) { return async (selector, cursor, reverse, consistency)=>{ const { 0: entries } = await op_kv_snapshot_read(this.#rid, [ [ ObjectHasOwn(selector, "prefix") ? selector.prefix : null, ObjectHasOwn(selector, "start") ? selector.start : null, ObjectHasOwn(selector, "end") ? selector.end : null, batchSize, reverse, cursor ] ], consistency); return ArrayPrototypeMap(entries, deserializeValue); }; } async enqueue(message, opts) { if (opts?.delay !== undefined) { validateQueueDelay(opts?.delay); } if (opts?.backoffSchedule !== undefined) { validateBackoffSchedule(opts?.backoffSchedule); } const versionstamp = await doAtomicWriteInPlace(this.#rid, [], [], [ [ core.serialize(message, { forStorage: true }), opts?.delay ?? 0, opts?.keysIfUndelivered ?? [], opts?.backoffSchedule ?? null ] ]); if (versionstamp === null) throw new TypeError("Failed to enqueue value"); return { ok: true, versionstamp }; } async listenQueue(handler) { if (this.#isClosed) { throw new Error("already closed"); } const finishMessageOps = new SafeMap(); while(true){ // Wait for the next message. const next = await op_kv_dequeue_next_message(this.#rid); if (next === null) { break; } // Deserialize the payload. const { 0: payload, 1: handleId } = next; const deserializedPayload = core.deserialize(payload, { forStorage: true }); // Dispatch the payload. (async ()=>{ let success = false; try { const result = handler(deserializedPayload); const _res = isPromise(result) ? await result : result; success = true; } catch (error) { console.error("Exception in queue handler", error); } finally{ const promise = op_kv_finish_dequeued_message(handleId, success); finishMessageOps.set(handleId, promise); try { await promise; } finally{ finishMessageOps.delete(handleId); } } })(); } for (const { 1: promise } of new SafeMapIterator(finishMessageOps)){ await promise; } finishMessageOps.clear(); } watch(keys, options = {}) { const raw = options.raw ?? false; const rid = op_kv_watch(this.#rid, keys); const lastEntries = ArrayFrom({ length: keys.length }); return new ReadableStream({ async pull (controller) { while(true){ let updates; try { updates = await op_kv_watch_next(rid); } catch (err) { core.tryClose(rid); controller.error(err); return; } if (updates === null) { core.tryClose(rid); controller.close(); return; } let changed = false; for(let i = 0; i < keys.length; i++){ if (updates[i] === "unchanged") { if (lastEntries[i] === undefined) { throw new Error("watch: invalid unchanged update (internal error)"); } continue; } if (lastEntries[i] !== undefined && (updates[i]?.versionstamp ?? null) === lastEntries[i]?.versionstamp) { continue; } changed = true; if (updates[i] === null) { lastEntries[i] = { key: ArrayPrototypeSlice(keys[i]), value: null, versionstamp: null }; } else { lastEntries[i] = updates[i]; } } if (!changed && !raw) continue; // no change const entries = ArrayPrototypeMap(lastEntries, (entry)=>entry.versionstamp === null ? { ...entry } : deserializeValue(entry)); controller.enqueue(entries); return; } }, cancel () { core.tryClose(rid); } }); } close() { core.close(this.#rid); this.#isClosed = true; } [SymbolDispose]() { core.tryClose(this.#rid); } } class AtomicOperation { #rid; #checks = []; #mutations = []; #enqueues = []; constructor(rid){ this.#rid = rid; } check(...checks) { for(let i = 0; i < checks.length; ++i){ const check = checks[i]; ArrayPrototypePush(this.#checks, [ check.key, check.versionstamp ]); } return this; } mutate(...mutations) { for(let i = 0; i < mutations.length; ++i){ const mutation = mutations[i]; const key = mutation.key; let type; let value; let expireIn = undefined; switch(mutation.type){ case "delete": type = "delete"; if (mutation.value) { throw new TypeError("invalid mutation 'delete' with value"); } break; case "set": if (typeof mutation.expireIn === "number") { expireIn = mutation.expireIn; } /* falls through */ case "sum": case "min": case "max": type = mutation.type; if (!ObjectHasOwn(mutation, "value")) { throw new TypeError(`invalid mutation '${type}' without value`); } value = serializeValue(mutation.value); break; default: throw new TypeError("Invalid mutation type"); } ArrayPrototypePush(this.#mutations, [ key, type, value, expireIn ]); } return this; } sum(key, n) { ArrayPrototypePush(this.#mutations, [ key, "sum", serializeValue(new KvU64(n)), undefined ]); return this; } min(key, n) { ArrayPrototypePush(this.#mutations, [ key, "min", serializeValue(new KvU64(n)), undefined ]); return this; } max(key, n) { ArrayPrototypePush(this.#mutations, [ key, "max", serializeValue(new KvU64(n)), undefined ]); return this; } set(key, value, options) { ArrayPrototypePush(this.#mutations, [ key, "set", serializeValue(value), options?.expireIn ]); return this; } delete(key) { ArrayPrototypePush(this.#mutations, [ key, "delete", null, undefined ]); return this; } enqueue(message, opts) { if (opts?.delay !== undefined) { validateQueueDelay(opts?.delay); } if (opts?.backoffSchedule !== undefined) { validateBackoffSchedule(opts?.backoffSchedule); } ArrayPrototypePush(this.#enqueues, [ core.serialize(message, { forStorage: true }), opts?.delay ?? 0, opts?.keysIfUndelivered ?? [], opts?.backoffSchedule ?? null ]); return this; } async commit() { const versionstamp = await doAtomicWriteInPlace(this.#rid, this.#checks, this.#mutations, this.#enqueues); if (versionstamp === null) return { ok: false }; return { ok: true, versionstamp }; } then() { throw new TypeError("`Deno.AtomicOperation` is not a promise. Did you forget to call `commit()`?"); } } const MIN_U64 = BigInt("0"); const MAX_U64 = BigInt("0xffffffffffffffff"); class KvU64 { value; constructor(value){ if (typeof value !== "bigint") { throw new TypeError("value must be a bigint"); } if (value < MIN_U64) { throw new RangeError("value must be a positive bigint"); } if (value > MAX_U64) { throw new RangeError("value must fit in a 64-bit unsigned integer"); } this.value = value; ObjectFreeze(this); } valueOf() { return this.value; } toString() { return BigIntPrototypeToString(this.value); } get [SymbolToStringTag]() { return "Deno.KvU64"; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return StringPrototypeReplace(inspect(Object(this.value), inspectOptions), "BigInt", "Deno.KvU64"); } } function deserializeValue(entry) { const { kind, value } = entry.value; switch(kind){ case "v8": return { ...entry, value: core.deserialize(value, { forStorage: true }) }; case "bytes": return { ...entry, value }; case "u64": return { ...entry, value: new KvU64(value) }; default: throw new TypeError("Invalid value type"); } } function serializeValue(value) { if (TypedArrayPrototypeGetSymbolToStringTag(value) === "Uint8Array") { return { kind: "bytes", value }; } else if (ObjectPrototypeIsPrototypeOf(KvU64.prototype, value)) { return { kind: "u64", // deno-lint-ignore prefer-primordials value: value.valueOf() }; } else { return { kind: "v8", value: core.serialize(value, { forStorage: true }) }; } } // This gets the %AsyncIteratorPrototype% object (which exists but is not a // global). We extend the KvListIterator iterator from, so that we immediately // support async iterator helpers once they land. The %AsyncIterator% does not // yet actually exist however, so right now the AsyncIterator binding refers to // %Object%. I know. // Once AsyncIterator is a global, we can just use it (from primordials), rather // than doing this here. const AsyncIteratorPrototype = ObjectGetPrototypeOf(AsyncGeneratorPrototype); const AsyncIterator = AsyncIteratorPrototype.constructor; class KvListIterator extends AsyncIterator { #selector; #entries = null; #cursorGen = null; #done = false; #lastBatch = false; #pullBatch; #limit; #count = 0; #reverse; #batchSize; #consistency; constructor({ limit, selector, cursor, reverse, consistency, batchSize, pullBatch }){ super(); let prefix; let start; let end; if (ObjectHasOwn(selector, "prefix") && selector.prefix !== undefined) { prefix = ObjectFreeze(ArrayPrototypeSlice(selector.prefix)); } if (ObjectHasOwn(selector, "start") && selector.start !== undefined) { start = ObjectFreeze(ArrayPrototypeSlice(selector.start)); } if (ObjectHasOwn(selector, "end") && selector.end !== undefined) { end = ObjectFreeze(ArrayPrototypeSlice(selector.end)); } if (prefix) { if (start && end) { throw new TypeError("Selector can not specify both 'start' and 'end' key when specifying 'prefix'."); } if (start) { this.#selector = { prefix, start }; } else if (end) { this.#selector = { prefix, end }; } else { this.#selector = { prefix }; } } else { if (start && end) { this.#selector = { start, end }; } else { throw new TypeError("Selector must specify either 'prefix' or both 'start' and 'end' key."); } } ObjectFreeze(this.#selector); this.#pullBatch = pullBatch; this.#limit = limit; this.#reverse = reverse; this.#consistency = consistency; this.#batchSize = batchSize; this.#cursorGen = cursor ? ()=>cursor : null; } get cursor() { if (this.#cursorGen === null) { throw new Error("Cannot get cursor before first iteration"); } return this.#cursorGen(); } async next() { // Fused or limit exceeded if (this.#done || this.#limit !== undefined && this.#count >= this.#limit) { return { done: true, value: undefined }; } // Attempt to fill the buffer if (!this.#entries?.length && !this.#lastBatch) { const batch = await this.#pullBatch(this.#selector, this.#cursorGen ? this.#cursorGen() : undefined, this.#reverse, this.#consistency); // Reverse the batch so we can pop from the end ArrayPrototypeReverse(batch); this.#entries = batch; // Last batch, do not attempt to pull more if (batch.length < this.#batchSize) { this.#lastBatch = true; } } const entry = this.#entries?.pop(); if (!entry) { this.#done = true; this.#cursorGen = ()=>""; return { done: true, value: undefined }; } this.#cursorGen = ()=>{ const selector = this.#selector; return encodeCursor([ ObjectHasOwn(selector, "prefix") ? selector.prefix : null, ObjectHasOwn(selector, "start") ? selector.start : null, ObjectHasOwn(selector, "end") ? selector.end : null ], entry.key); }; this.#count++; return { done: false, value: entry }; } [SymbolAsyncIterator]() { return this; } } async function doAtomicWriteInPlace(rid, checks, mutations, enqueues) { for(let i = 0; i < mutations.length; ++i){ const mutation = mutations[i]; const key = mutation[0]; if (key.length && mutation[1] === "set" && key[key.length - 1] === commitVersionstampSymbol) { mutation[0] = ArrayPrototypeSlice(key, 0, key.length - 1); mutation[1] = "setSuffixVersionstampedKey"; } } return await op_kv_atomic_write(rid, checks, mutations, enqueues); } export { AtomicOperation, Kv, KvListIterator, KvU64, openKv }; Qc^Cext:deno_kv/01_db.tsa b1D`M`8 T `Lam T  I`BHSb1 b:aUA_ay !9!$`= BEGBHBIIJbGbL"^^ORbQ????????????????????????????????IbGF`L` bS]`mB]`Xn]`O"t]`]DL`N` L`NG` L`GS` L`Sb]` L`b]F` L`F]8L`   DXXct DbKbKc:G D  cTX D  c D  c D  c D  c D  c D ! !c1 D % %c3> D ) )c@P DcZe` a?a? a? a? a? a? a? !a? %a? )a?bKa?Xa?Fa?Ga?Na?b]a?Sa?Arb@  T  I`<Jerb @  T I`13Ob@-  T I`3q5Rb@.  T I`ODFbQb#MQ7 $L` T I`pFbMQ e,a  b:aUA_a!y " !9!$` BsBrx=  T BE`BEArbK Y`OALMTbQ  T I`F%"c8C@CD@Wb  T I`-"k"b bK T I`}""`b  T,`]  s`Kb A  d55(SbqqG`Da$" a 4b  StArb Ճ/  T I`g>>Qb get cursorb 1  T I`?Cb Q2  T I`D)D`b5  TT`e]  t`Kd `T@X$8L08 ]n555555 5  5 5 5 5(SbqqS`Da7+Db 4 4 4 4b6  Ur`Dh %%%%%%% % % % % %%%%%%%%%%%%%%%%%%% %!%"ei h  0 - %0 - %- %-%-%- %- --% -% -% -% -% --%-%- %-"%-$%-&%-(- *-!,-".-#0%-$2%%%&% % 6%'b4%(b6%)+e%,,e%--e%.%/*01 2 3 4 5 6789:0;tނ<e+=2>8 1?,,e%AAe%BBe%CCe%D@EFGHIJKLMNe+ O 2>: 1Pb<%Qb>%S!RT"U# tV$Wb@tX%e+ Y&2>B 1bD-ZF[]]e%^^e%__e%``e%aae%bbe%cce%dde% eee% ffe% gge% h'\i(j) tk*e+l+2>H 1 er$gJ-PPPPPPPP@,@ P bA rr]rr)s1s9sAsIsDQsYsas!sDisqsDysDssssssssssst tttItQtYtatitqtrrtDttDttrD`RD]DH Q!ʍ// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { core, internals, primordials } from "ext:core/mod.js"; const { isPromise } = core; import { op_cron_create, op_cron_next } from "ext:core/ops"; const { ArrayPrototypeJoin, NumberPrototypeToString, TypeError } = primordials; export function formatToCronSchedule(value) { if (value === undefined) { return "*"; } else if (typeof value === "number") { return NumberPrototypeToString(value); } else { const { exact } = value; if (exact === undefined) { const { start, end, every } = value; if (start !== undefined && end !== undefined && every !== undefined) { return start + "-" + end + "/" + every; } else if (start !== undefined && end !== undefined) { return start + "-" + end; } else if (start !== undefined && every !== undefined) { return start + "/" + every; } else if (start !== undefined) { return start + "/1"; } else if (end === undefined && every !== undefined) { return "*/" + every; } else { throw new TypeError("Invalid cron schedule"); } } else { if (typeof exact === "number") { return NumberPrototypeToString(exact); } else { return ArrayPrototypeJoin(exact, ","); } } } } export function parseScheduleToString(schedule) { if (typeof schedule === "string") { return schedule; } else { let { minute, hour, dayOfMonth, month, dayOfWeek } = schedule; // Automatically override unspecified values for convenience. For example, // to run every 2 hours, `{ hour: { every: 2 } }` can be specified without // explicitely specifying `minute`. if (minute !== undefined) { // Nothing to override. } else if (hour !== undefined) { // Override minute to 0 since it's not specified. minute = 0; } else if (dayOfMonth !== undefined || dayOfWeek !== undefined) { // Override minute and hour to 0 since they're not specified. minute = 0; hour = 0; } else if (month !== undefined) { // Override minute and hour to 0, and dayOfMonth to 1 since they're not specified. minute = 0; hour = 0; dayOfMonth = 1; } return formatToCronSchedule(minute) + " " + formatToCronSchedule(hour) + " " + formatToCronSchedule(dayOfMonth) + " " + formatToCronSchedule(month) + " " + formatToCronSchedule(dayOfWeek); } } function cron(name, schedule, handlerOrOptions1, handler2) { if (name === undefined) { throw new TypeError("Deno.cron requires a unique name"); } if (schedule === undefined) { throw new TypeError("Deno.cron requires a valid schedule"); } schedule = parseScheduleToString(schedule); let handler; let options = undefined; if (typeof handlerOrOptions1 === "function") { handler = handlerOrOptions1; if (handler2 !== undefined) { throw new TypeError("Deno.cron requires a single handler"); } } else if (typeof handler2 === "function") { handler = handler2; options = handlerOrOptions1; } else { throw new TypeError("Deno.cron requires a handler"); } const rid = op_cron_create(name, schedule, options?.backoffSchedule); if (options?.signal) { const signal = options?.signal; signal.addEventListener("abort", ()=>{ core.close(rid); }, { once: true }); } return (async ()=>{ let success = true; while(true){ const r = await op_cron_next(rid, success); if (r === false) { break; } try { const result = handler(); const _res = isPromise(result) ? await result : result; success = true; } catch (error) { console.error(`Exception in cron handler ${name}`, error); success = false; } } })(); } // For testing internals.formatToCronSchedule = formatToCronSchedule; internals.parseScheduleToString = parseScheduleToString; export { cron }; Qcext:deno_cron/01_cron.tsa b2D` M` Td` {}; const upgradeRid = op_http_upgrade_raw(external); const conn = new TcpConn( upgradeRid, underlyingConn?.remoteAddr, underlyingConn?.localAddr, ); return { response: UPGRADE_RESPONSE_SENTINEL, conn }; } // upgradeWebSocket is sync if (upgradeType == "upgradeWebSocket") { const response = originalArgs[0]; const ws = originalArgs[1]; const external = this.#external; this.url(); this.headerList; this.close(); const goAhead = new Deferred(); this.#upgraded = () => { goAhead.resolve(); }; const wsPromise = op_http_upgrade_websocket_next( external, response.headerList, ); // Start the upgrade in the background. (async () => { try { // Returns the upgraded websocket connection const wsRid = await wsPromise; // We have to wait for the go-ahead signal await goAhead; ws[_rid] = wsRid; ws[_readyState] = WebSocket.OPEN; ws[_role] = SERVER; const event = new Event("open"); ws.dispatchEvent(event); ws[_eventLoop](); if (ws[_idleTimeoutDuration]) { ws.addEventListener( "close", () => clearTimeout(ws[_idleTimeoutTimeout]), ); } ws[_serverHandleIdleTimeout](); } catch (error) { const event = new ErrorEvent("error", { error }); ws.dispatchEvent(event); } })(); return { response: UPGRADE_RESPONSE_SENTINEL, socket: ws }; } } url() { if (this.#urlValue !== undefined) { return this.#urlValue; } if (this.#methodAndUri === undefined) { if (this.#external === null) { throw new TypeError("request closed"); } // TODO(mmastrac): This is quite slow as we're serializing a large number of values. We may want to consider // splitting this up into multiple ops. this.#methodAndUri = op_http_get_request_method_and_url(this.#external); } const path = this.#methodAndUri[2]; // * is valid for OPTIONS if (path === "*") { return this.#urlValue = "*"; } // If the path is empty, return the authority (valid for CONNECT) if (path == "") { return this.#urlValue = this.#methodAndUri[1]; } // CONNECT requires an authority if (this.#methodAndUri[0] == "CONNECT") { return this.#urlValue = this.#methodAndUri[1]; } const hostname = this.#methodAndUri[1]; if (hostname) { // Construct a URL from the scheme, the hostname, and the path return this.#urlValue = this.#context.scheme + hostname + path; } // Construct a URL from the scheme, the fallback hostname, and the path return this.#urlValue = this.#context.scheme + this.#context.fallbackHost + path; } get remoteAddr() { const transport = this.#context.listener?.addr.transport; if (transport === "unix" || transport === "unixpacket") { return { transport, path: this.#context.listener.addr.path, }; } if (this.#methodAndUri === undefined) { if (this.#external === null) { throw new TypeError("request closed"); } this.#methodAndUri = op_http_get_request_method_and_url(this.#external); } return { transport: "tcp", hostname: this.#methodAndUri[3], port: this.#methodAndUri[4], }; } get method() { if (this.#methodAndUri === undefined) { if (this.#external === null) { throw new TypeError("request closed"); } this.#methodAndUri = op_http_get_request_method_and_url(this.#external); } return this.#methodAndUri[0]; } get body() { if (this.#external === null) { throw new TypeError("request closed"); } if (this.#body !== undefined) { return this.#body; } // If the method is GET or HEAD, we do not want to include a body here, even if the Rust // side of the code is willing to provide it to us. if (this.method == "GET" || this.method == "HEAD") { this.#body = null; return null; } this.#streamRid = op_http_read_request_body(this.#external); this.#body = new InnerBody(readableStreamForRid(this.#streamRid, false)); return this.#body; } get headerList() { if (this.#external === null) { throw new TypeError("request closed"); } const headers = []; const reqHeaders = op_http_get_request_headers(this.#external); for (let i = 0; i < reqHeaders.length; i += 2) { ArrayPrototypePush(headers, [reqHeaders[i], reqHeaders[i + 1]]); } return headers; } get external() { return this.#external; } } class CallbackContext { abortController; scheme; fallbackHost; serverRid; closed; /** @type {Promise | undefined} */ closing; listener; constructor(signal, args, listener) { // The abort signal triggers a non-graceful shutdown signal?.addEventListener( "abort", () => { op_http_cancel(this.serverRid, false); }, { once: true }, ); this.abortController = new AbortController(); this.serverRid = args[0]; this.scheme = args[1]; this.fallbackHost = args[2]; this.closed = false; this.listener = listener; } close() { try { this.closed = true; core.tryClose(this.serverRid); } catch { // Pass } } } class ServeHandlerInfo { #inner = null; constructor(inner) { this.#inner = inner; } get remoteAddr() { return this.#inner.remoteAddr; } } function fastSyncResponseOrStream(req, respBody, status, innerRequest) { if (respBody === null || respBody === undefined) { // Don't set the body innerRequest?.close(); op_http_set_promise_complete(req, status); return; } const stream = respBody.streamOrStatic; const body = stream.body; if (TypedArrayPrototypeGetSymbolToStringTag(body) === "Uint8Array") { innerRequest?.close(); op_http_set_response_body_bytes(req, body, status); return; } if (typeof body === "string") { innerRequest?.close(); op_http_set_response_body_text(req, body, status); return; } // At this point in the response it needs to be a stream if (!ObjectPrototypeIsPrototypeOf(ReadableStreamPrototype, stream)) { innerRequest?.close(); throw TypeError("invalid response"); } const resourceBacking = getReadableStreamResourceBacking(stream); let rid, autoClose; if (resourceBacking) { rid = resourceBacking.rid; autoClose = resourceBacking.autoClose; } else { rid = resourceForReadableStream(stream); autoClose = true; } PromisePrototypeThen( op_http_set_response_body_resource( req, rid, autoClose, status, ), () => { innerRequest?.close(); op_http_close_after_finish(req); }, ); } /** * Maps the incoming request slab ID to a fully-fledged Request object, passes it to the user-provided * callback, then extracts the response that was returned from that callback. The response is then pulled * apart and handled on the Rust side. * * This function returns a promise that will only reject in the case of abnormal exit. */ function mapToCallback(context, callback, onError) { const signal = context.abortController.signal; return async function (req) { // Get the response from the user-provided callback. If that fails, use onError. If that fails, return a fallback // 500 error. let innerRequest; let response; try { innerRequest = new InnerRequest(req, context); response = await callback( fromInnerRequest(innerRequest, signal, "immutable"), new ServeHandlerInfo(innerRequest), ); // Throwing Error if the handler return value is not a Response class if (!ObjectPrototypeIsPrototypeOf(ResponsePrototype, response)) { throw TypeError( "Return value from serve handler must be a response or a promise resolving to a response", ); } } catch (error) { try { response = await onError(error); if (!ObjectPrototypeIsPrototypeOf(ResponsePrototype, response)) { throw TypeError( "Return value from onError handler must be a response or a promise resolving to a response", ); } } catch (error) { console.error("Exception in onError while handling exception", error); response = internalServerError(); } } const inner = toInnerResponse(response); if (innerRequest?.[_upgraded]) { // We're done here as the connection has been upgraded during the callback and no longer requires servicing. if (response !== UPGRADE_RESPONSE_SENTINEL) { console.error("Upgrade response was not returned from callback"); context.close(); } innerRequest?.[_upgraded](); return; } // Did everything shut down while we were waiting? if (context.closed) { // We're shutting down, so this status shouldn't make it back to the client but "Service Unavailable" seems appropriate innerRequest?.close(); op_http_set_promise_complete(req, 503); return; } const status = inner.status; const headers = inner.headerList; if (headers && headers.length > 0) { if (headers.length == 1) { op_http_set_response_header(req, headers[0][0], headers[0][1]); } else { op_http_set_response_headers(req, headers); } } fastSyncResponseOrStream(req, inner.body, status, innerRequest); }; } function serve(arg1, arg2) { let options = undefined; let handler = undefined; if (typeof arg1 === "function") { handler = arg1; } else if (typeof arg2 === "function") { handler = arg2; options = arg1; } else { options = arg1; } if (handler === undefined) { if (options === undefined) { throw new TypeError( "No handler was provided, so an options bag is mandatory.", ); } handler = options.handler; } if (typeof handler !== "function") { throw new TypeError("A handler function must be provided."); } if (options === undefined) { options = {}; } const wantsHttps = options.cert || options.key; const wantsUnix = ObjectHasOwn(options, "path"); const signal = options.signal; const onError = options.onError ?? function (error) { console.error(error); return internalServerError(); }; if (wantsUnix) { const listener = listen({ transport: "unix", path: options.path, [listenOptionApiName]: "Deno.serve", }); const path = listener.addr.path; return serveHttpOnListener(listener, signal, handler, onError, () => { if (options.onListen) { options.onListen({ path }); } else { console.log(`Listening on ${path}`); } }); } const listenOpts = { hostname: options.hostname ?? "0.0.0.0", port: options.port ?? 8000, reusePort: options.reusePort ?? false, }; if (options.certFile || options.keyFile) { throw new TypeError( "Unsupported 'certFile' / 'keyFile' options provided: use 'cert' / 'key' instead.", ); } if (options.alpnProtocols) { throw new TypeError( "Unsupported 'alpnProtocols' option provided. 'h2' and 'http/1.1' are automatically supported.", ); } let listener; if (wantsHttps) { if (!options.cert || !options.key) { throw new TypeError( "Both cert and key must be provided to enable HTTPS.", ); } listenOpts.cert = options.cert; listenOpts.key = options.key; listenOpts.alpnProtocols = ["h2", "http/1.1"]; listener = listenTls(listenOpts); listenOpts.port = listener.addr.port; } else { listener = listen(listenOpts); listenOpts.port = listener.addr.port; } const onListen = (scheme) => { // If the hostname is "0.0.0.0", we display "localhost" in console // because browsers in Windows don't resolve "0.0.0.0". // See the discussion in https://github.com/denoland/deno_std/issues/1165 const hostname = listenOpts.hostname == "0.0.0.0" ? "localhost" : listenOpts.hostname; const port = listenOpts.port; if (options.onListen) { options.onListen({ hostname, port }); } else { console.log(`Listening on ${scheme}${hostname}:${port}/`); } }; return serveHttpOnListener(listener, signal, handler, onError, onListen); } /** * Serve HTTP/1.1 and/or HTTP/2 on an arbitrary listener. */ function serveHttpOnListener(listener, signal, handler, onError, onListen) { const context = new CallbackContext( signal, op_http_serve(listener[internalRidSymbol]), listener, ); const callback = mapToCallback(context, handler, onError); onListen(context.scheme); return serveHttpOn(context, callback); } /** * Serve HTTP/1.1 and/or HTTP/2 on an arbitrary connection. */ function serveHttpOnConnection(connection, signal, handler, onError, onListen) { const context = new CallbackContext( signal, op_http_serve_on(connection[internalRidSymbol]), null, ); const callback = mapToCallback(context, handler, onError); onListen(context.scheme); return serveHttpOn(context, callback); } function serveHttpOn(context, callback) { let ref = true; let currentPromise = null; const promiseErrorHandler = (error) => { // Abnormal exit console.error( "Terminating Deno.serve loop due to unexpected error", error, ); context.close(); }; // Run the server const finished = (async () => { const rid = context.serverRid; while (true) { let req; try { // Attempt to pull as many requests out of the queue as possible before awaiting. This API is // a synchronous, non-blocking API that returns u32::MAX if anything goes wrong. while ((req = op_http_try_wait(rid)) !== null) { PromisePrototypeCatch(callback(req), promiseErrorHandler); } currentPromise = op_http_wait(rid); if (!ref) { core.unrefOpPromise(currentPromise); } req = await currentPromise; currentPromise = null; } catch (error) { if (ObjectPrototypeIsPrototypeOf(BadResourcePrototype, error)) { break; } if (ObjectPrototypeIsPrototypeOf(InterruptedPrototype, error)) { break; } throw new Deno.errors.Http(error); } if (req === null) { break; } PromisePrototypeCatch(callback(req), promiseErrorHandler); } if (!context.closing && !context.closed) { context.closing = op_http_close(rid, false); context.close(); } await context.closing; context.close(); context.closed = true; })(); return { finished, async shutdown() { if (!context.closing && !context.closed) { // Shut this HTTP server down gracefully context.closing = op_http_close(context.serverRid, true); } await context.closing; context.closed = true; }, ref() { ref = true; if (currentPromise) { core.refOpPromise(currentPromise); } }, unref() { ref = false; if (currentPromise) { core.unrefOpPromise(currentPromise); } }, [SymbolAsyncDispose]() { return this.shutdown(); }, }; } internals.addTrailers = addTrailers; internals.upgradeHttpRaw = upgradeHttpRaw; internals.serveHttpOnListener = serveHttpOnListener; internals.serveHttpOnConnection = serveHttpOnConnection; export { addTrailers, serve, serveHttpOnConnection, serveHttpOnListener, upgradeHttpRaw, }; QdIext:deno_http/00_serve.jsa b3D`M`+ T=`8La>i T  I`X luSb1Bb&A!!+= I ll"mbow"z{|s????????????????????IbL`8L`  bS]`yB]`*]`]`ABW]`V]`]`Pj]`+"t]`>]`4bk]`hn]`]DL`n` L`n|` L`|B` L`BB~` L`B~bn` L`bn]L`4  Dc9H Dc\d D""c49 D  c D"H"Hc DQQc Dc DLLc  DB3B3c %, DŒŒc" D""c~ Dc D""c D""c Dkkc Dc Dbbc D""c Dbbc  D  cUY DDDc DUUchy Dch DBKBKc[d D;;c  D";";c # DCCc W` DbMbMc} D 5 5c D 9 9c  D = =c+ D A Ac/J D E EcNp D I Ict D M Mc D Q Qc D U Uc D Y Yc D ] ]c D a ac= D e ecA\ D i ic`| D m mc D q qc D u uc D y yc D } }c Dcfq Dbbc D||c DBGBGc DbUbUc`9 a?BKa?a? 5a? 9a? =a? Aa? Ea? Ia? Ma? Qa? Ua? Ya? ]a? aa? ea? ia? ma? qa? ua? ya? }a? a?"a?Ua?bMa?Qa?bUa?Da?BGa?a?"a?a?"a?"a?ka?a?ba?"a?ba?a?Œa?a?a?ba?"Ha?|a?;a?";a?B3a?Ca?La?bna?na?|a?B~a?Ba?mub@  T I`0%-*{ub!@  T I`+4b Xi@ |b@  TI`?CK f0ْɔ@Ҕ@ȕ@Ж@ @b@$ DL` T  I`G  bnb@ a T I`4 nb@ a TI`4 @cop@ |b@ a T I`j@AB~b@" a T I`A)CBb@# aa  Bb&A!!+ = I lUbMmTSb @obppBqq"rrh??????? !  ` T ``/ `/ `?  `  a !D]f6 D"sa Da b1 } `F` D5 ` F`  ` F`  a3 ` F` D"v ` F` a HcD LaobppBqq"rr T  I`. bo wmub Ճ  T I` b  T I`  `b  T I` M"sb   T I`TQb  T I`cQbget remoteAddrb  T I`Qb get methodb   T I`  Qaget bodyb  T I` e!Qbget headerListb  T I`u!!Qb get externalb   TD`A]  w`Kc^ 40D8$4 j555555 5 (Sbqqbo`Da !b 4 4 b    `T ``/ `/ `?  `  a!p$D]$ ` ajaj] T  I`H"#wumub Ճ  T I`#n$b  T4`%$L`BxbxByMy  w`Kc̍ L ( @ 4  , f333333 3 (Sbqqw`Da!p$b 0 0 b $Sb @zb?r$ %  `T ``/ `/ `?  `  ar$ %D]$ ` ajb1`+ } `F]z T  I`$$"zwmub Ճ  T I`$ %Qbget remoteAddrb  T(` ]  !x`Kb 4c5(Sbqq"z`Da$ % a b BKnbnB~B u`D%h %%%%%%% % % % % %%%%%%%%%ei h  0- %- %- %0 - %-%- %- % -% --% -% -% b%00 ebc%e%e%e%e%  e%!!e%""e%#$t%&'( ) * + , e+ -2. %0/‚1e+22. %355e%647e+82." %0902:$002;&002<(002=* ud,PPPP@ , , bA uvv9wAwIwQwDYwawmwywwwwwDww xxxvDvDvDvwvDD`RD]DH Q5U=// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { core, internals, primordials } from "ext:core/mod.js"; const { BadResourcePrototype, InterruptedPrototype, } = core; import { op_http_accept, op_http_headers, op_http_shutdown, op_http_upgrade_websocket, op_http_websocket_accept_header, op_http_write, op_http_write_headers, op_http_write_resource, } from "ext:core/ops"; const { ArrayPrototypeIncludes, ArrayPrototypeMap, ArrayPrototypePush, ObjectPrototypeIsPrototypeOf, SafeSet, SafeSetIterator, SetPrototypeAdd, SetPrototypeDelete, StringPrototypeCharCodeAt, StringPrototypeIncludes, StringPrototypeSplit, StringPrototypeToLowerCase, StringPrototypeToUpperCase, Symbol, SymbolAsyncIterator, TypeError, TypedArrayPrototypeGetSymbolToStringTag, Uint8Array, } = primordials; import { InnerBody } from "ext:deno_fetch/22_body.js"; import { Event, setEventTargetData } from "ext:deno_web/02_event.js"; import { BlobPrototype } from "ext:deno_web/09_file.js"; import { fromInnerResponse, newInnerResponse, ResponsePrototype, toInnerResponse, } from "ext:deno_fetch/23_response.js"; import { fromInnerRequest, newInnerRequest, toInnerRequest, } from "ext:deno_fetch/23_request.js"; import { AbortController } from "ext:deno_web/03_abort_signal.js"; import { _eventLoop, _idleTimeoutDuration, _idleTimeoutTimeout, _protocol, _readyState, _rid, _role, _server, _serverHandleIdleTimeout, createWebSocketBranded, SERVER, WebSocket, } from "ext:deno_websocket/01_websocket.js"; import { getReadableStreamResourceBacking, readableStreamClose, readableStreamForRid, ReadableStreamPrototype, } from "ext:deno_web/06_streams.js"; import { serve } from "ext:deno_http/00_serve.js"; import { SymbolDispose } from "ext:deno_web/00_infra.js"; const connErrorSymbol = Symbol("connError"); /** @type {(self: HttpConn, rid: number) => boolean} */ let deleteManagedResource; class HttpConn { #rid = 0; #closed = false; #remoteAddr; #localAddr; // This set holds resource ids of resources // that were created during lifecycle of this request. // When the connection is closed these resources should be closed // as well. #managedResources = new SafeSet(); static { deleteManagedResource = (self, rid) => SetPrototypeDelete(self.#managedResources, rid); } constructor(rid, remoteAddr, localAddr) { this.#rid = rid; this.#remoteAddr = remoteAddr; this.#localAddr = localAddr; } /** @returns {number} */ get rid() { return this.#rid; } /** @returns {Promise} */ async nextRequest() { let nextRequest; try { nextRequest = await op_http_accept(this.#rid); } catch (error) { this.close(); // A connection error seen here would cause disrupted responses to throw // a generic `BadResource` error. Instead store this error and replace // those with it. this[connErrorSymbol] = error; if ( ObjectPrototypeIsPrototypeOf(BadResourcePrototype, error) || ObjectPrototypeIsPrototypeOf(InterruptedPrototype, error) || StringPrototypeIncludes(error.message, "connection closed") ) { return null; } throw error; } if (nextRequest == null) { // Work-around for servers (deno_std/http in particular) that call // `nextRequest()` before upgrading a previous request which has a // `connection: upgrade` header. await null; this.close(); return null; } const { 0: streamRid, 1: method, 2: url } = nextRequest; SetPrototypeAdd(this.#managedResources, streamRid); /** @type {ReadableStream | undefined} */ let body = null; // There might be a body, but we don't expose it for GET/HEAD requests. // It will be closed automatically once the request has been handled and // the response has been sent. if (method !== "GET" && method !== "HEAD") { body = readableStreamForRid(streamRid, false); } const innerRequest = newInnerRequest( method, url, () => op_http_headers(streamRid), body !== null ? new InnerBody(body) : null, false, ); innerRequest[streamRid] = streamRid; const abortController = new AbortController(); const request = fromInnerRequest( innerRequest, abortController.signal, "immutable", false, ); const respondWith = createRespondWith( this, streamRid, abortController, ); return { request, respondWith }; } /** @returns {void} */ close() { if (!this.#closed) { this.#closed = true; core.close(this.#rid); for (const rid of new SafeSetIterator(this.#managedResources)) { SetPrototypeDelete(this.#managedResources, rid); core.close(rid); } } } [SymbolDispose]() { core.tryClose(this.#rid); for (const rid of new SafeSetIterator(this.#managedResources)) { SetPrototypeDelete(this.#managedResources, rid); core.tryClose(rid); } } [SymbolAsyncIterator]() { // deno-lint-ignore no-this-alias const httpConn = this; return { async next() { const reqEvt = await httpConn.nextRequest(); // Change with caution, current form avoids a v8 deopt return { value: reqEvt ?? undefined, done: reqEvt === null }; }, }; } } function createRespondWith( httpConn, streamRid, abortController, ) { return async function respondWith(resp) { try { resp = await resp; if (!(ObjectPrototypeIsPrototypeOf(ResponsePrototype, resp))) { throw new TypeError( "First argument to respondWith must be a Response or a promise resolving to a Response.", ); } const innerResp = toInnerResponse(resp); // If response body length is known, it will be sent synchronously in a // single op, in other case a "response body" resource will be created and // we'll be streaming it. /** @type {ReadableStream | Uint8Array | null} */ let respBody = null; if (innerResp.body !== null) { if (innerResp.body.unusable()) { throw new TypeError("Body is unusable."); } if ( ObjectPrototypeIsPrototypeOf( ReadableStreamPrototype, innerResp.body.streamOrStatic, ) ) { if ( innerResp.body.length === null || ObjectPrototypeIsPrototypeOf( BlobPrototype, innerResp.body.source, ) ) { respBody = innerResp.body.stream; } else { const reader = innerResp.body.stream.getReader(); const r1 = await reader.read(); if (r1.done) { respBody = new Uint8Array(0); } else { respBody = r1.value; const r2 = await reader.read(); if (!r2.done) throw new TypeError("Unreachable"); } } } else { innerResp.body.streamOrStatic.consumed = true; respBody = innerResp.body.streamOrStatic.body; } } else { respBody = new Uint8Array(0); } const isStreamingResponseBody = !( typeof respBody === "string" || TypedArrayPrototypeGetSymbolToStringTag(respBody) === "Uint8Array" ); try { await op_http_write_headers( streamRid, innerResp.status ?? 200, innerResp.headerList, isStreamingResponseBody ? null : respBody, ); } catch (error) { const connError = httpConn[connErrorSymbol]; if ( ObjectPrototypeIsPrototypeOf(BadResourcePrototype, error) && connError != null ) { // deno-lint-ignore no-ex-assign error = new connError.constructor(connError.message); } if ( respBody !== null && ObjectPrototypeIsPrototypeOf(ReadableStreamPrototype, respBody) ) { await respBody.cancel(error); } throw error; } if (isStreamingResponseBody) { let success = false; if ( respBody === null || !ObjectPrototypeIsPrototypeOf(ReadableStreamPrototype, respBody) ) { throw new TypeError("Unreachable"); } const resourceBacking = getReadableStreamResourceBacking(respBody); let reader; if (resourceBacking) { if (respBody.locked) { throw new TypeError("ReadableStream is locked."); } reader = respBody.getReader(); // Acquire JS lock. try { await op_http_write_resource( streamRid, resourceBacking.rid, ); if (resourceBacking.autoClose) core.tryClose(resourceBacking.rid); readableStreamClose(respBody); // Release JS lock. success = true; } catch (error) { const connError = httpConn[connErrorSymbol]; if ( ObjectPrototypeIsPrototypeOf(BadResourcePrototype, error) && connError != null ) { // deno-lint-ignore no-ex-assign error = new connError.constructor(connError.message); } await reader.cancel(error); throw error; } } else { reader = respBody.getReader(); while (true) { const { value, done } = await reader.read(); if (done) break; if ( TypedArrayPrototypeGetSymbolToStringTag(value) !== "Uint8Array" ) { await reader.cancel(new TypeError("Value not a Uint8Array")); break; } try { await op_http_write(streamRid, value); } catch (error) { const connError = httpConn[connErrorSymbol]; if ( ObjectPrototypeIsPrototypeOf(BadResourcePrototype, error) && connError != null ) { // deno-lint-ignore no-ex-assign error = new connError.constructor(connError.message); } await reader.cancel(error); throw error; } } success = true; } if (success) { try { await op_http_shutdown(streamRid); } catch (error) { await reader.cancel(error); throw error; } } } const ws = resp[_ws]; if (ws) { const wsRid = await op_http_upgrade_websocket( streamRid, ); ws[_rid] = wsRid; ws[_protocol] = resp.headers.get("sec-websocket-protocol"); httpConn.close(); ws[_readyState] = WebSocket.OPEN; ws[_role] = SERVER; const event = new Event("open"); ws.dispatchEvent(event); ws[_eventLoop](); if (ws[_idleTimeoutDuration]) { ws.addEventListener( "close", () => clearTimeout(ws[_idleTimeoutTimeout]), ); } ws[_serverHandleIdleTimeout](); } } catch (error) { abortController.abort(error); throw error; } finally { if (deleteManagedResource(httpConn, streamRid)) { core.close(streamRid); } } }; } const _ws = Symbol("[[associated_ws]]"); const websocketCvf = buildCaseInsensitiveCommaValueFinder("websocket"); const upgradeCvf = buildCaseInsensitiveCommaValueFinder("upgrade"); function upgradeWebSocket(request, options = {}) { const inner = toInnerRequest(request); const upgrade = request.headers.get("upgrade"); const upgradeHasWebSocketOption = upgrade !== null && websocketCvf(upgrade); if (!upgradeHasWebSocketOption) { throw new TypeError( "Invalid Header: 'upgrade' header must contain 'websocket'", ); } const connection = request.headers.get("connection"); const connectionHasUpgradeOption = connection !== null && upgradeCvf(connection); if (!connectionHasUpgradeOption) { throw new TypeError( "Invalid Header: 'connection' header must contain 'Upgrade'", ); } const websocketKey = request.headers.get("sec-websocket-key"); if (websocketKey === null) { throw new TypeError( "Invalid Header: 'sec-websocket-key' header must be set", ); } const accept = op_http_websocket_accept_header(websocketKey); const r = newInnerResponse(101); r.headerList = [ ["upgrade", "websocket"], ["connection", "Upgrade"], ["sec-websocket-accept", accept], ]; const protocolsStr = request.headers.get("sec-websocket-protocol") || ""; const protocols = StringPrototypeSplit(protocolsStr, ", "); if (protocols && options.protocol) { if (ArrayPrototypeIncludes(protocols, options.protocol)) { ArrayPrototypePush(r.headerList, [ "sec-websocket-protocol", options.protocol, ]); } else { throw new TypeError( `Protocol '${options.protocol}' not in the request's protocol list (non negotiable)`, ); } } const socket = createWebSocketBranded(WebSocket); setEventTargetData(socket); socket[_server] = true; socket[_idleTimeoutDuration] = options.idleTimeout ?? 120; socket[_idleTimeoutTimeout] = null; if (inner._wantsUpgrade) { return inner._wantsUpgrade("upgradeWebSocket", r, socket); } const response = fromInnerResponse(r, "immutable"); response[_ws] = socket; return { response, socket }; } const spaceCharCode = StringPrototypeCharCodeAt(" ", 0); const tabCharCode = StringPrototypeCharCodeAt("\t", 0); const commaCharCode = StringPrototypeCharCodeAt(",", 0); /** Builds a case function that can be used to find a case insensitive * value in some text that's separated by commas. * * This is done because it doesn't require any allocations. * @param checkText {string} - The text to find. (ex. "websocket") */ function buildCaseInsensitiveCommaValueFinder(checkText) { const charCodes = ArrayPrototypeMap( StringPrototypeSplit( StringPrototypeToLowerCase(checkText), "", ), (c) => [ StringPrototypeCharCodeAt(c, 0), StringPrototypeCharCodeAt(StringPrototypeToUpperCase(c), 0), ], ); /** @type {number} */ let i; /** @type {number} */ let char; /** @param {string} value */ return function (value) { for (i = 0; i < value.length; i++) { char = StringPrototypeCharCodeAt(value, i); skipWhitespace(value); if (hasWord(value)) { skipWhitespace(value); if (i === value.length || char === commaCharCode) { return true; } } else { skipUntilComma(value); } } return false; }; /** @param value {string} */ function hasWord(value) { for (let j = 0; j < charCodes.length; ++j) { const { 0: cLower, 1: cUpper } = charCodes[j]; if (cLower === char || cUpper === char) { char = StringPrototypeCharCodeAt(value, ++i); } else { return false; } } return true; } /** @param value {string} */ function skipWhitespace(value) { while (char === spaceCharCode || char === tabCharCode) { char = StringPrototypeCharCodeAt(value, ++i); } } /** @param value {string} */ function skipUntilComma(value) { while (char !== commaCharCode && i < value.length) { char = StringPrototypeCharCodeAt(value, ++i); } } } // Expose this function for unit tests internals.buildCaseInsensitiveCommaValueFinder = buildCaseInsensitiveCommaValueFinder; export { _ws, HttpConn, serve, upgradeWebSocket }; Qcext:deno_http/01_http.jsa b4D``M` T%`La6w T I`x,b +Y@ " Sb1BbcA!%EBFSbX"dnbo= I "bB""y??????????????????????????Ib=`8L`  bS]`yB]`*]`~]`]`BW]`{V]`]`%j]`"t]`]`n]`- L`  |D|c ,L` B` L`Bb` L`b"` L`"]L`) Dc Db{b{c D""c D  cmv D"H"Hc  DQQcN_ Dc DbKbKc % DŒŒc D""cS] Dcau D""cy D""c Dkkc Dc Dbbc D""c Dbbc D  cUY Dc DDDc DUUc%6 Dc Kk DBKBKc[d Db5b5c DbMbMc:J D  c D  c D  c D  c+ D  c/N D  cR_ D  ccx D  c| Dcfq Dc o Dbbc  D||c  D""c DBGBGc DbUbUccr`, a?BKa?a? a? a? a? a? a? a? a? a? a?"a?"a?b{a?Ua?bMa?Qa?bUa?Da?b5a?BGa?a?"a?a?"a?"a?ka?a?ba?"a?ba?a?a?Œa?a?a?ba?"Ha?|a?bKa?Ba?ba?"a?=xb@  TP`Z0L` XSbqA"*b7"e??????`DaM7 =ex T  I`u:;"myb@ T I`;P<b@ T I`< =b@"dnI T@`;L`  `LbSbo  y`Di({%   c6  b c6 (SbbpWI`Da7V8 a =xbK T I`8A:Ib @ ey`Dm(%%%%%%bcĂc%%%  a@b-@ Lb T  I`-t5"exb@ a a  BbcA!%EBFSbX"dnbo Bs= I "DSb @Bhb..f?????\  ` T ``/ `/ `?  `  a\D]f6Da Da bA } `F` D aDHcDLb Bhb.. T  I`x By=xb Ճ  T I` 7  Qaget ridb  T I`} bQ  T I`77b bK T I`J `b  T I`%Zb )*@`b  T@`: L`%  !z`Kc>,<$<ci 5555 i5 (SbqqB`Da\ a 4 b   T,`L` T  ` d y=xbK  =z`Kb > Xad $(SbqsB`Da\`b ‹ŽbBK  Qx`D h %%%%%%% % % % % %%%%%%%%%%%%%%%ei h  0-%-%0 - %- %- %- %- % -% -% -% -% -%-%-%-%-- -"%-$%-&%b(%%e%  e%!!e%""e%##e%$%&'0(t) t*e+ +2,*- ], 1.b.1/b0%0b2% 1 c4% 2 c6% 3 c8%04 25: exe< PPPPPP@ @@bA EzyyyDz zzD9zzYxDyayyyqyyyyD`RD]DH - Q) sH// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Interfaces 100% copied from Go. // Documentation liberally lifted from them too. // Thank you! We love Go! <3 import { core, internals, primordials } from "ext:core/mod.js"; import { op_is_terminal, op_set_raw } from "ext:core/ops"; const { Uint8Array, ArrayPrototypePush, TypedArrayPrototypeSubarray, TypedArrayPrototypeSet, TypedArrayPrototypeGetByteLength, } = primordials; import { readableStreamForRid, writableStreamForRid, } from "ext:deno_web/06_streams.js"; const DEFAULT_BUFFER_SIZE = 32 * 1024; // Seek whence values. // https://golang.org/pkg/io/#pkg-constants const SeekMode = { 0: "Start", 1: "Current", 2: "End", Start: 0, Current: 1, End: 2, }; async function copy( src, dst, options, ) { internals.warnOnDeprecatedApi( "Deno.copy()", new Error().stack, "Use `copy()` from `https://deno.land/std/io/copy.ts` instead.", ); let n = 0; const bufSize = options?.bufSize ?? DEFAULT_BUFFER_SIZE; const b = new Uint8Array(bufSize); let gotEOF = false; while (gotEOF === false) { const result = await src.read(b); if (result === null) { gotEOF = true; } else { let nwritten = 0; while (nwritten < result) { nwritten += await dst.write( TypedArrayPrototypeSubarray(b, nwritten, result), ); } n += nwritten; } } return n; } async function* iter( r, options, ) { internals.warnOnDeprecatedApi( "Deno.iter()", new Error().stack, "Use `ReadableStream` instead.", ); const bufSize = options?.bufSize ?? DEFAULT_BUFFER_SIZE; const b = new Uint8Array(bufSize); while (true) { const result = await r.read(b); if (result === null) { break; } yield TypedArrayPrototypeSubarray(b, 0, result); } } function* iterSync( r, options, ) { internals.warnOnDeprecatedApi( "Deno.iterSync()", new Error().stack, "Use `ReadableStream` instead.", ); const bufSize = options?.bufSize ?? DEFAULT_BUFFER_SIZE; const b = new Uint8Array(bufSize); while (true) { const result = r.readSync(b); if (result === null) { break; } yield TypedArrayPrototypeSubarray(b, 0, result); } } function readSync(rid, buffer) { if (buffer.length === 0) return 0; const nread = core.readSync(rid, buffer); return nread === 0 ? null : nread; } async function read(rid, buffer) { if (buffer.length === 0) return 0; const nread = await core.read(rid, buffer); return nread === 0 ? null : nread; } function writeSync(rid, data) { return core.writeSync(rid, data); } function write(rid, data) { return core.write(rid, data); } const READ_PER_ITER = 64 * 1024; // 64kb async function readAll(r) { const buffers = []; while (true) { const buf = new Uint8Array(READ_PER_ITER); const read = await r.read(buf); if (typeof read == "number") { ArrayPrototypePush(buffers, TypedArrayPrototypeSubarray(buf, 0, read)); } else { break; } } return concatBuffers(buffers); } function readAllSync(r) { const buffers = []; while (true) { const buf = new Uint8Array(READ_PER_ITER); const read = r.readSync(buf); if (typeof read == "number") { ArrayPrototypePush(buffers, TypedArrayPrototypeSubarray(buf, 0, read)); } else { break; } } return concatBuffers(buffers); } function concatBuffers(buffers) { let totalLen = 0; for (let i = 0; i < buffers.length; ++i) { totalLen += TypedArrayPrototypeGetByteLength(buffers[i]); } const contents = new Uint8Array(totalLen); let n = 0; for (let i = 0; i < buffers.length; ++i) { const buf = buffers[i]; TypedArrayPrototypeSet(contents, buf, n); n += TypedArrayPrototypeGetByteLength(buf); } return contents; } const STDIN_RID = 0; const STDOUT_RID = 1; const STDERR_RID = 2; class Stdin { #rid = STDIN_RID; #readable; constructor() { } get rid() { internals.warnOnDeprecatedApi( "Deno.stdin.rid", new Error().stack, "Use `Deno.stdin` instance methods instead.", ); return this.#rid; } read(p) { return read(this.#rid, p); } readSync(p) { return readSync(this.#rid, p); } close() { core.tryClose(this.#rid); } get readable() { if (this.#readable === undefined) { this.#readable = readableStreamForRid(this.#rid); } return this.#readable; } setRaw(mode, options = {}) { const cbreak = !!(options.cbreak ?? false); op_set_raw(this.#rid, mode, cbreak); } isTerminal() { return op_is_terminal(this.#rid); } } class Stdout { #rid = STDOUT_RID; #writable; constructor() { } get rid() { internals.warnOnDeprecatedApi( "Deno.stdout.rid", new Error().stack, "Use `Deno.stdout` instance methods instead.", ); return this.#rid; } write(p) { return write(this.#rid, p); } writeSync(p) { return writeSync(this.#rid, p); } close() { core.close(this.#rid); } get writable() { if (this.#writable === undefined) { this.#writable = writableStreamForRid(this.#rid); } return this.#writable; } isTerminal() { return op_is_terminal(this.#rid); } } class Stderr { #rid = STDERR_RID; #writable; constructor() { } get rid() { internals.warnOnDeprecatedApi( "Deno.stderr.rid", new Error().stack, "Use `Deno.stderr` instance methods instead.", ); return this.#rid; } write(p) { return write(this.#rid, p); } writeSync(p) { return writeSync(this.#rid, p); } close() { core.close(this.#rid); } get writable() { if (this.#writable === undefined) { this.#writable = writableStreamForRid(this.#rid); } return this.#writable; } isTerminal() { return op_is_terminal(this.#rid); } } const stdin = new Stdin(); const stdout = new Stdout(); const stderr = new Stderr(); export { copy, iter, iterSync, read, readAll, readAllSync, readSync, SeekMode, Stderr, stderr, STDERR_RID, stdin, STDIN_RID, Stdout, stdout, STDOUT_RID, write, writeSync, }; Qcj€ext:deno_io/12_io.jsa b5D`M`$ T`La/< T  I` Sb1I Ab–šg????????IbH`L` bS]`B]`)"t]`]L`6b` L`bb` L`b` L`b` L`b` L`` L`` L`` L`b`  L`b`  L``  L`"`  L`"`  L`` L`B` L`B` L`b` L`b` L`]$L`  D  c DBKBKc D  c D  c! Dc Dbbc D""c ` a?BKa?a? a? a?ba?"a?ba?a?a?ba ?a ?a ?a?ba?a ?"a ?ba?a?ba?a?a?Ba?a?a?ezb@ La$ T I`zbMQ a T I`FbRQ a T I`ZbbS a  T I` b@ a  T I`  bMQ a  T I`1 d b@ a T I`t bb@ a  T I`  bMQ a!  T I`4 k "b@ i" a Ab@c —`"`—`"``,Sb @Bhb0c??R:  ` T ``/ `/ `?  `  aR:D]l ` aj bA`+ } `Fajajaj "`+  `FBajaj ]Bhb0 T(` L`   }{`Dc- ](SbqG`Da]{ aezb Ճ  T  I`O Qaget ridb  T I`Wb  T I`b  T I`b  T I`Qb get readableb   T I`Bb  T I` 8b   T,` L`b {`Kb z,4 d055(Sbqq`Da^: a 4b  ,Sb @Bh0c??<z  ` T ``/ `/ `?  `  a<D]` ` ajbA`+  } `Fbajajaj `+  `Faj]0 T(` L`    |`Dc- ](SbqG`Da{{ aezb Ճ  T  I`= Qaget ridb  T I`Fobb  T I`|b   T I`b  T I`nQb get writableb   T I`|b   T,` L` ]|`Kb ,8 d055(Sbqq`DaI a 4b ,Sb @Bh0c??z  ` T ``/ `/ `?  `  aD]` ` ajbA`+  } `Fbajajaj `+  `Faj] T(` L`   |`Dc- ](SbqG`Dau| aezb Ճ  T  I` Qaget ridb  T I`bb  T I`b  T I`$Gb  T I`WQb get writableb ! T I`b " T,` L`b |`Kb ,8 d055(Sbqq`Da a 4b#  yz`Dxh %%%%%%% % ei h  0-%-%-%- %- % %~ )1 % 1 1 1 e%e% e+  2 e%e%   !"#e+ $2  1%e%e%'&()*+,-e+ .2 1 i10i10i1 zb#P0`ezbA {{!{){1{9{A{I{Q{zy{{{{{{{{{ |!|-|5|=|E|Q|Y|||||||||D`RD]DH (Q(FQ// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { core, internals, primordials } from "ext:core/mod.js"; const { isDate, internalRidSymbol, createCancelHandle, } = core; import { op_fs_chdir, op_fs_chmod_async, op_fs_chmod_sync, op_fs_chown_async, op_fs_chown_sync, op_fs_copy_file_async, op_fs_copy_file_sync, op_fs_cwd, op_fs_fdatasync_async, op_fs_fdatasync_async_unstable, op_fs_fdatasync_sync, op_fs_fdatasync_sync_unstable, op_fs_file_stat_async, op_fs_file_stat_sync, op_fs_flock_async, op_fs_flock_sync, op_fs_fsync_async, op_fs_fsync_async_unstable, op_fs_fsync_sync, op_fs_fsync_sync_unstable, op_fs_ftruncate_async, op_fs_ftruncate_sync, op_fs_funlock_async, op_fs_funlock_sync, op_fs_futime_async, op_fs_futime_sync, op_fs_link_async, op_fs_link_sync, op_fs_lstat_async, op_fs_lstat_sync, op_fs_make_temp_dir_async, op_fs_make_temp_dir_sync, op_fs_make_temp_file_async, op_fs_make_temp_file_sync, op_fs_mkdir_async, op_fs_mkdir_sync, op_fs_open_async, op_fs_open_sync, op_fs_read_dir_async, op_fs_read_dir_sync, op_fs_read_file_async, op_fs_read_file_sync, op_fs_read_file_text_async, op_fs_read_file_text_sync, op_fs_read_link_async, op_fs_read_link_sync, op_fs_realpath_async, op_fs_realpath_sync, op_fs_remove_async, op_fs_remove_sync, op_fs_rename_async, op_fs_rename_sync, op_fs_seek_async, op_fs_seek_sync, op_fs_stat_async, op_fs_stat_sync, op_fs_symlink_async, op_fs_symlink_sync, op_fs_truncate_async, op_fs_truncate_sync, op_fs_umask, op_fs_utime_async, op_fs_utime_sync, op_fs_write_file_async, op_fs_write_file_sync, op_is_terminal, op_set_raw, } from "ext:core/ops"; const { ArrayPrototypeFilter, Date, DatePrototypeGetTime, Error, Function, MathTrunc, ObjectEntries, ObjectDefineProperty, ObjectPrototypeIsPrototypeOf, ObjectValues, StringPrototypeSlice, StringPrototypeStartsWith, SymbolAsyncIterator, SymbolIterator, SymbolFor, Uint32Array, } = primordials; import { read, readSync, write, writeSync } from "ext:deno_io/12_io.js"; import * as abortSignal from "ext:deno_web/03_abort_signal.js"; import { readableStreamForRid, ReadableStreamPrototype, writableStreamForRid, } from "ext:deno_web/06_streams.js"; import { pathFromURL, SymbolDispose } from "ext:deno_web/00_infra.js"; function chmodSync(path, mode) { op_fs_chmod_sync(pathFromURL(path), mode); } async function chmod(path, mode) { await op_fs_chmod_async(pathFromURL(path), mode); } function chownSync( path, uid, gid, ) { op_fs_chown_sync(pathFromURL(path), uid, gid); } async function chown( path, uid, gid, ) { await op_fs_chown_async( pathFromURL(path), uid, gid, ); } function copyFileSync( fromPath, toPath, ) { op_fs_copy_file_sync( pathFromURL(fromPath), pathFromURL(toPath), ); } async function copyFile( fromPath, toPath, ) { await op_fs_copy_file_async( pathFromURL(fromPath), pathFromURL(toPath), ); } function cwd() { return op_fs_cwd(); } function chdir(directory) { op_fs_chdir(pathFromURL(directory)); } function makeTempDirSync(options = {}) { return op_fs_make_temp_dir_sync( options.dir, options.prefix, options.suffix, ); } function makeTempDir(options = {}) { return op_fs_make_temp_dir_async( options.dir, options.prefix, options.suffix, ); } function makeTempFileSync(options = {}) { return op_fs_make_temp_file_sync( options.dir, options.prefix, options.suffix, ); } function makeTempFile(options = {}) { return op_fs_make_temp_file_async( options.dir, options.prefix, options.suffix, ); } function mkdirSync(path, options) { op_fs_mkdir_sync( pathFromURL(path), options?.recursive ?? false, options?.mode, ); } async function mkdir(path, options) { await op_fs_mkdir_async( pathFromURL(path), options?.recursive ?? false, options?.mode, ); } function readDirSync(path) { return op_fs_read_dir_sync(pathFromURL(path))[ SymbolIterator ](); } function readDir(path) { const array = op_fs_read_dir_async( pathFromURL(path), ); return { async *[SymbolAsyncIterator]() { const dir = await array; for (let i = 0; i < dir.length; ++i) { yield dir[i]; } }, }; } function readLinkSync(path) { return op_fs_read_link_sync(pathFromURL(path)); } function readLink(path) { return op_fs_read_link_async(pathFromURL(path)); } function realPathSync(path) { return op_fs_realpath_sync(pathFromURL(path)); } function realPath(path) { return op_fs_realpath_async(pathFromURL(path)); } function removeSync( path, options = {}, ) { op_fs_remove_sync( pathFromURL(path), !!options.recursive, ); } async function remove( path, options = {}, ) { await op_fs_remove_async( pathFromURL(path), !!options.recursive, ); } function renameSync(oldpath, newpath) { op_fs_rename_sync( pathFromURL(oldpath), pathFromURL(newpath), ); } async function rename(oldpath, newpath) { await op_fs_rename_async( pathFromURL(oldpath), pathFromURL(newpath), ); } // Extract the FsStat object from the encoded buffer. // See `runtime/ops/fs.rs` for the encoder. // // This is not a general purpose decoder. There are 4 types: // // 1. date // offset += 4 // 1/0 | extra padding | high u32 | low u32 // if date[0] == 1, new Date(u64) else null // // 2. bool // offset += 2 // 1/0 | extra padding // // 3. u64 // offset += 2 // high u32 | low u32 // // 4. ?u64 converts a zero u64 value to JS null on Windows. // ?bool converts a false bool value to JS null on Windows. function createByteStruct(types) { // types can be "date", "bool" or "u64". let offset = 0; let str = 'const unix = Deno.build.os === "darwin" || Deno.build.os === "linux" || Deno.build.os === "android" || Deno.build.os === "openbsd" || Deno.build.os === "freebsd"; return {'; const typeEntries = ObjectEntries(types); for (let i = 0; i < typeEntries.length; ++i) { let { 0: name, 1: type } = typeEntries[i]; const optional = StringPrototypeStartsWith(type, "?"); if (optional) type = StringPrototypeSlice(type, 1); if (type == "u64") { if (!optional) { str += `${name}: view[${offset}] + view[${offset + 1}] * 2**32,`; } else { str += `${name}: (unix ? (view[${offset}] + view[${ offset + 1 }] * 2**32) : (view[${offset}] + view[${ offset + 1 }] * 2**32) || null),`; } } else if (type == "date") { str += `${name}: view[${offset}] === 0 ? null : new Date(view[${ offset + 2 }] + view[${offset + 3}] * 2**32),`; offset += 2; } else { if (!optional) { str += `${name}: !!(view[${offset}] + view[${offset + 1}] * 2**32),`; } else { str += `${name}: (unix ? !!((view[${offset}] + view[${ offset + 1 }] * 2**32)) : !!((view[${offset}] + view[${ offset + 1 }] * 2**32)) || null),`; } } offset += 2; } str += "};"; // ...so you don't like eval huh? don't worry, it only executes during snapshot :) return [new Function("view", str), new Uint32Array(offset)]; } const { 0: statStruct, 1: statBuf } = createByteStruct({ isFile: "bool", isDirectory: "bool", isSymlink: "bool", size: "u64", mtime: "date", atime: "date", birthtime: "date", dev: "u64", ino: "?u64", mode: "?u64", nlink: "?u64", uid: "?u64", gid: "?u64", rdev: "?u64", blksize: "?u64", blocks: "?u64", isBlockDevice: "?bool", isCharDevice: "?bool", isFifo: "?bool", isSocket: "?bool", }); function parseFileInfo(response) { const unix = core.build.os === "darwin" || core.build.os === "linux" || core.build.os === "android" || core.build.os === "freebsd" || core.build.os === "openbsd"; return { isFile: response.isFile, isDirectory: response.isDirectory, isSymlink: response.isSymlink, size: response.size, mtime: response.mtimeSet === true ? new Date(response.mtime) : null, atime: response.atimeSet === true ? new Date(response.atime) : null, birthtime: response.birthtimeSet === true ? new Date(response.birthtime) : null, dev: response.dev, ino: unix ? response.ino : null, mode: unix ? response.mode : null, nlink: unix ? response.nlink : null, uid: unix ? response.uid : null, gid: unix ? response.gid : null, rdev: unix ? response.rdev : null, blksize: unix ? response.blksize : null, blocks: unix ? response.blocks : null, isBlockDevice: unix ? response.isBlockDevice : null, isCharDevice: unix ? response.isCharDevice : null, isFifo: unix ? response.isFifo : null, isSocket: unix ? response.isSocket : null, }; } function fstatSync(rid) { op_fs_file_stat_sync(rid, statBuf); return statStruct(statBuf); } async function fstat(rid) { return parseFileInfo(await op_fs_file_stat_async(rid)); } async function lstat(path) { const res = await op_fs_lstat_async(pathFromURL(path)); return parseFileInfo(res); } function lstatSync(path) { op_fs_lstat_sync(pathFromURL(path), statBuf); return statStruct(statBuf); } async function stat(path) { const res = await op_fs_stat_async(pathFromURL(path)); return parseFileInfo(res); } function statSync(path) { op_fs_stat_sync(pathFromURL(path), statBuf); return statStruct(statBuf); } function coerceLen(len) { if (len == null || len < 0) { return 0; } return len; } function ftruncateSync(rid, len) { op_fs_ftruncate_sync(rid, coerceLen(len)); } async function ftruncate(rid, len) { await op_fs_ftruncate_async(rid, coerceLen(len)); } function truncateSync(path, len) { op_fs_truncate_sync(path, coerceLen(len)); } async function truncate(path, len) { await op_fs_truncate_async(path, coerceLen(len)); } function umask(mask) { return op_fs_umask(mask); } function linkSync(oldpath, newpath) { op_fs_link_sync(oldpath, newpath); } async function link(oldpath, newpath) { await op_fs_link_async(oldpath, newpath); } function toUnixTimeFromEpoch(value) { if (isDate(value)) { const time = DatePrototypeGetTime(value); const seconds = MathTrunc(time / 1e3); const nanoseconds = MathTrunc(time - (seconds * 1e3)) * 1e6; return [ seconds, nanoseconds, ]; } const seconds = value; const nanoseconds = 0; return [ seconds, nanoseconds, ]; } function futimeSync( rid, atime, mtime, ) { const { 0: atimeSec, 1: atimeNsec } = toUnixTimeFromEpoch(atime); const { 0: mtimeSec, 1: mtimeNsec } = toUnixTimeFromEpoch(mtime); op_fs_futime_sync(rid, atimeSec, atimeNsec, mtimeSec, mtimeNsec); } async function futime( rid, atime, mtime, ) { const { 0: atimeSec, 1: atimeNsec } = toUnixTimeFromEpoch(atime); const { 0: mtimeSec, 1: mtimeNsec } = toUnixTimeFromEpoch(mtime); await op_fs_futime_async( rid, atimeSec, atimeNsec, mtimeSec, mtimeNsec, ); } function utimeSync( path, atime, mtime, ) { const { 0: atimeSec, 1: atimeNsec } = toUnixTimeFromEpoch(atime); const { 0: mtimeSec, 1: mtimeNsec } = toUnixTimeFromEpoch(mtime); op_fs_utime_sync( pathFromURL(path), atimeSec, atimeNsec, mtimeSec, mtimeNsec, ); } async function utime( path, atime, mtime, ) { const { 0: atimeSec, 1: atimeNsec } = toUnixTimeFromEpoch(atime); const { 0: mtimeSec, 1: mtimeNsec } = toUnixTimeFromEpoch(mtime); await op_fs_utime_async( pathFromURL(path), atimeSec, atimeNsec, mtimeSec, mtimeNsec, ); } function symlinkSync( oldpath, newpath, options, ) { op_fs_symlink_sync( pathFromURL(oldpath), pathFromURL(newpath), options?.type, ); } async function symlink( oldpath, newpath, options, ) { await op_fs_symlink_async( pathFromURL(oldpath), pathFromURL(newpath), options?.type, ); } function fdatasyncSync(rid) { op_fs_fdatasync_sync(rid); } async function fdatasync(rid) { await op_fs_fdatasync_async(rid); } function fsyncSync(rid) { op_fs_fsync_sync(rid); } async function fsync(rid) { await op_fs_fsync_async(rid); } function flockSync(rid, exclusive) { op_fs_flock_sync(rid, exclusive === true); } async function flock(rid, exclusive) { await op_fs_flock_async(rid, exclusive === true); } function funlockSync(rid) { op_fs_funlock_sync(rid); } async function funlock(rid) { await op_fs_funlock_async(rid); } function seekSync( rid, offset, whence, ) { return op_fs_seek_sync(rid, offset, whence); } function seek( rid, offset, whence, ) { return op_fs_seek_async(rid, offset, whence); } function openSync( path, options, ) { if (options) checkOpenOptions(options); const rid = op_fs_open_sync( pathFromURL(path), options, ); return new FsFile(rid, SymbolFor("Deno.internal.FsFile")); } async function open( path, options, ) { if (options) checkOpenOptions(options); const rid = await op_fs_open_async( pathFromURL(path), options, ); return new FsFile(rid, SymbolFor("Deno.internal.FsFile")); } function createSync(path) { return openSync(path, { read: true, write: true, truncate: true, create: true, }); } function create(path) { return open(path, { read: true, write: true, truncate: true, create: true, }); } class FsFile { #rid = 0; #readable; #writable; constructor(rid, symbol) { ObjectDefineProperty(this, internalRidSymbol, { enumerable: false, value: rid, }); this.#rid = rid; if (!symbol || symbol !== SymbolFor("Deno.internal.FsFile")) { internals.warnOnDeprecatedApi( "new Deno.FsFile()", new Error().stack, "Use `Deno.open` or `Deno.openSync` instead.", ); } } get rid() { internals.warnOnDeprecatedApi( "Deno.FsFile.rid", new Error().stack, "Use `Deno.FsFile` methods directly instead.", ); return this.#rid; } write(p) { return write(this.#rid, p); } writeSync(p) { return writeSync(this.#rid, p); } truncate(len) { return ftruncate(this.#rid, len); } truncateSync(len) { return ftruncateSync(this.#rid, len); } read(p) { return read(this.#rid, p); } readSync(p) { return readSync(this.#rid, p); } seek(offset, whence) { return seek(this.#rid, offset, whence); } seekSync(offset, whence) { return seekSync(this.#rid, offset, whence); } stat() { return fstat(this.#rid); } statSync() { return fstatSync(this.#rid); } async syncData() { await op_fs_fdatasync_async_unstable(this.#rid); } syncDataSync() { op_fs_fdatasync_sync_unstable(this.#rid); } close() { core.close(this.#rid); } get readable() { if (this.#readable === undefined) { this.#readable = readableStreamForRid(this.#rid); } return this.#readable; } get writable() { if (this.#writable === undefined) { this.#writable = writableStreamForRid(this.#rid); } return this.#writable; } async sync() { await op_fs_fsync_async_unstable(this.#rid); } syncSync() { op_fs_fsync_sync_unstable(this.#rid); } async utime(atime, mtime) { await futime(this.#rid, atime, mtime); } utimeSync(atime, mtime) { futimeSync(this.#rid, atime, mtime); } isTerminal() { return op_is_terminal(this.#rid); } setRaw(mode, options = {}) { const cbreak = !!(options.cbreak ?? false); op_set_raw(this.#rid, mode, cbreak); } lockSync(exclusive = false) { op_fs_flock_sync(this.#rid, exclusive); } async lock(exclusive = false) { await op_fs_flock_async(this.#rid, exclusive); } unlockSync() { op_fs_funlock_sync(this.#rid); } async unlock() { await op_fs_funlock_async(this.#rid); } [SymbolDispose]() { core.tryClose(this.#rid); } } function checkOpenOptions(options) { if ( ArrayPrototypeFilter( ObjectValues(options), (val) => val === true, ).length === 0 ) { throw new Error("OpenOptions requires at least one option to be true"); } if (options.truncate && !options.write) { throw new Error("'truncate' option requires 'write' option"); } const createOrCreateNewWithoutWriteOrAppend = (options.create || options.createNew) && !(options.write || options.append); if (createOrCreateNewWithoutWriteOrAppend) { throw new Error( "'create' or 'createNew' options require 'write' or 'append' option", ); } } const File = FsFile; function readFileSync(path) { return op_fs_read_file_sync(pathFromURL(path)); } async function readFile(path, options) { let cancelRid; let abortHandler; if (options?.signal) { options.signal.throwIfAborted(); cancelRid = createCancelHandle(); abortHandler = () => core.tryClose(cancelRid); options.signal[abortSignal.add](abortHandler); } try { const read = await op_fs_read_file_async( pathFromURL(path), cancelRid, ); return read; } finally { if (options?.signal) { options.signal[abortSignal.remove](abortHandler); // always throw the abort error when aborted options.signal.throwIfAborted(); } } } function readTextFileSync(path) { return op_fs_read_file_text_sync(pathFromURL(path)); } async function readTextFile(path, options) { let cancelRid; let abortHandler; if (options?.signal) { options.signal.throwIfAborted(); cancelRid = createCancelHandle(); abortHandler = () => core.tryClose(cancelRid); options.signal[abortSignal.add](abortHandler); } try { const read = await op_fs_read_file_text_async( pathFromURL(path), cancelRid, ); return read; } finally { if (options?.signal) { options.signal[abortSignal.remove](abortHandler); // always throw the abort error when aborted options.signal.throwIfAborted(); } } } function writeFileSync( path, data, options = {}, ) { options.signal?.throwIfAborted(); op_fs_write_file_sync( pathFromURL(path), options.mode, options.append ?? false, options.create ?? true, options.createNew ?? false, data, ); } async function writeFile( path, data, options = {}, ) { let cancelRid; let abortHandler; if (options.signal) { options.signal.throwIfAborted(); cancelRid = createCancelHandle(); abortHandler = () => core.tryClose(cancelRid); options.signal[abortSignal.add](abortHandler); } try { if (ObjectPrototypeIsPrototypeOf(ReadableStreamPrototype, data)) { const file = await open(path, { mode: options.mode, append: options.append ?? false, create: options.create ?? true, createNew: options.createNew ?? false, write: true, }); await data.pipeTo(file.writable, { signal: options.signal, }); } else { await op_fs_write_file_async( pathFromURL(path), options.mode, options.append ?? false, options.create ?? true, options.createNew ?? false, data, cancelRid, ); } } finally { if (options.signal) { options.signal[abortSignal.remove](abortHandler); // always throw the abort error when aborted options.signal.throwIfAborted(); } } } function writeTextFileSync( path, data, options = {}, ) { const encoder = new TextEncoder(); return writeFileSync(path, encoder.encode(data), options); } function writeTextFile( path, data, options = {}, ) { if (ObjectPrototypeIsPrototypeOf(ReadableStreamPrototype, data)) { return writeFile( path, data.pipeThrough(new TextEncoderStream()), options, ); } else { const encoder = new TextEncoder(); return writeFile(path, encoder.encode(data), options); } } export { chdir, chmod, chmodSync, chown, chownSync, copyFile, copyFileSync, create, createSync, cwd, fdatasync, fdatasyncSync, File, flock, flockSync, FsFile, fstat, fstatSync, fsync, fsyncSync, ftruncate, ftruncateSync, funlock, funlockSync, futime, futimeSync, link, linkSync, lstat, lstatSync, makeTempDir, makeTempDirSync, makeTempFile, makeTempFileSync, mkdir, mkdirSync, open, openSync, readDir, readDirSync, readFile, readFileSync, readLink, readLinkSync, readTextFile, readTextFileSync, realPath, realPathSync, remove, removeSync, rename, renameSync, seek, seekSync, stat, statSync, symlink, symlinkSync, truncate, truncateSync, umask, utime, utimeSync, writeFile, writeFileSync, writeTextFile, writeTextFileSync, }; Qc5ȧext:deno_fs/30_fs.jsa b6D`M`i T9`+LaC T`pL`« gb®""BB"B`  `LbibE   %}`D`  b -n / / / c  c l 1 x8 x88 Dx8 88ŌL x 8 x88 Dx8 8 x88 Dx8 88Ō lG x8 x88 Dx88 Dx888 Dƌ 1 x8 x88 Dx888ŌL x8! x8!8! D"x8!8! x8!8! D#x8!8!8  D$ P%&8'{(%   i)6+  i-6+ (SbqA`DaSb1B6&Jf B !bgBsBr-±Bb½y??????????????????????????IbQ` L` bS]`yB]`b]`_]`"t]` n]`[ ]-L`` L`` L`` L`` L`` L`"` L`"` L`¦` L`¦`  L`)`  L`)b`  L`b"`  L`"b`  L`b` L`` L`` L`»` L`»B` L`Bb` L`b` L`¾` L`¾B` L`B` L`"` L`"` L`` L`M` L`M` L`"` L`"` L`` L`b`  L`b`! L`b`" L`b`# L`b`$ L`bBv`% L`Bv"`& L`"«`' L`«B`( L`B`) L``* L``+ L`"`, L`"b`- L`b`. L``/ L``0 L`B`1 L`B`2 L``3 L`b`4 L`b`5 L``6 L``7 L`b`8 L`b`9 L``: L`¿`; L`¿B`< L`B"`= L`"`> L`"`? L`"b`@ L`b`A L``B L`B`C L`B L`  D-DcEL`O D"H"Hc DbKbKcF S  D  cUY DBKBKc[d D  c D  c D  c D  c' D  c+; D  c?T D  cXl D  cpy D  c} D  c D  c D  c D  c D  c  D  c"3 D  c7G D  cK\ D  c`z D  c~ D  c D  c D  c D  c D  c  D  c  D  c#4 D  c8H D  cL[ D  c_p D  ct D ! !c D % %c D ) )c D - -c D 1 1c  D 5 5c! D 9 9c%5 D = =c9H D A AcL` D E Ecdw D I Ic{ D M Mc D Q Qc D U Uc D Y Yc D ] ]c D a ac, D e ec0C D i icGY D m mc]n D q qcr D u uc D y yc D } }c D  c D  c D  c D  c D  c, D  c0C D  cGR D  cVg D  ck{ D  c D  c D  c D  c DbJbJc9 D  Dcfq Dc7; Dc=E Dbbc D""c  DbbcGL DcNW` a?BKa?a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? !a? %a? )a? -a? 1a? 5a? 9a? =a? Aa? Ea? Ia? Ma? Qa? Ua? Ya? ]a? aa? ea? ia? ma? qa? ua? ya? }a? a? a? a? a? a? a? a? a? a? a? a? a? a?a?a?ba?a?ba?"Ha?"a?bJa?bKa?a?a?a?"a?a ?¦a?"a ?a?ba ?a?ba"?a!?ba$?a#?Ba(?«a'?"a,?a+?a0?a/?a2?Ba1?ba4?a3?Ba?»a?"a?a?a7?ba8?Ba?¾a?Ba<?¿a;?"a=?a?Ma?a?a?"a??a>?a:?a9?a?ba ?a?ba?a?a?"a?a?a6?a5?"a&?Bva%?ba ?)a ?a?a?a*?a)?a.?ba-?aA?ba@?BaC?aB?d/!B#B!B!^8 }b@G T  I`x"b=}b@H T I`m%%½b@"I T I` (f)b@*J T I`>TAb@\KL` T I` b@a" T I` ! bMQa# T I`5 b@a$ T I` "bMQ a% T I` b@ a&  T I`  ¦bMQ a' T I` < "b @ a(  T I`L b@ a) T I`  bb@ a*  T I`% b@ a+ T I` (bb@ a," T I`?b@ a-! T I`?bb@ a.$ T I`UbMQa/# T I`>Bb@a0( T I`PBb !"@«b@a1' T I`Y"b@a2, T I`b@a3+ T I`7b@a40 T I`Jb@a5/ T I`b@a62 T I`BbMQa71 T I`bb@a84 T I`bMQa93 T I`">#Bb@a: T I`T##»bMQa; T I`#$"bMQ a< T I`"$z$b@!a= T I`$$bMQ "a>7 T I`%Y%bb@!#a?8 T I`% &Bb@#$a@ T I`#&e&¾bMQ$%aA T I`|&&Bb@%&aB< T I`&'¿bMQ&'aC; T I`$'J'"b@'(aD= T I`]''b@()aE T I`''MbMQ)*aF T I`{)g*b@++aG T I`~*+bMQ,,aH T I`+,"b@--aI? T I`,-bMQ..aJ> T I`-.b@//aK: T I`.*/bMQ00aL9 T I`B/h/b@11aM T I`//bbMQ22aN  T I`//b@33aO T I`/$0bbMQ44aP T I`80y0b@55aQ T I`00bMQ66aR T I`01"b@77aS T I`)1T1bMQ88aT T I`g11b@99aU6 T I`12b @::aV5 T I`,22"b@;;aW& T I` 33BvbMQ<<aX% T I`3b4bb@==aY  T I`s44)b@>>cZ  T I`AAb@^?a[* T I`ADbMQ_@a\) T I`6DwDb@aAa]. T I`DFbbMQbBa^- T I`FGb@dCa_A T I`H]LbbMQeDa`@ T I`yLMBb@gEaaC T I`M`Nb@hFabBa  B6&Jf iB !bgBsBrE b(+++bB´B"Bbbcb¶bbb¤b"bbbB¸"¸¸¸4Sb @Bhb00d???4>=}  `T ``/ `/ `?  `  a4>D]!f@%D¿a DBa!DaBaDaaa DbA } `F` DBa  aa a a Da a"D `F` DaDa D" `F` Dba DBaDaDba "aa"aaDHcD LatBhb00 T  I`&56}b Ճ?L T I`6U7 Qaget ridb@M T I`^77bbAN T I`77b BO T I`77¿bCP T I`8C8Bb DQ T I`K8s8bER T I`88bFS T I`88bGT T I`9G9bHU T I`O9t9bIV T I`99bbJW T I`99bQKX T I`:>:Bb LY T I`G:j:bMZ T I`z:;Qb get readableb N[ T I`;;Qb get writableb O\ T I`;;b QP] T I`;!<"bQ^ T I`0<o<b QR_ T I`|<<"b S` T I`<<b Ta T I`<r=BbUb T I`~==bVc T I`=>b QWd T I`+>V>Bb Xe T I`f>>b QYfbK T I`>>`bZg T0`]   `Kb ,4 Ne 555(Sbqq`Da4> a 4b[h  }`D! h %%%%%%% % % % % %%%%%%%%%%%%%%ei e% h  0 - %- %- %0 -%-%- %- % -% -% -% -% -%-%-%-%-%- %-"%-$%~&)b' /)% /+%!!e%""e%##e%$ %&'( ) * + , -./01234567߂8ނ9݂:܂;ۂ<ڂ=ق>0?tׂ@ e+A!2B- 101 =}d/cPPPPPPL}bA !)19AIQYDemu}!}ŀ̀Հ݀ %-5=EMU]emu}!-5=EMU]emu}ł͂Ղ݂DDŁD́ՁD݁D`RD]DH Q// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // deno-lint-ignore-file export const denoGlobals = globalThis.__bootstrap.ext_node_denoGlobals; export const nodeGlobals = globalThis.__bootstrap.ext_node_nodeGlobals; Qdnext:deno_node/00_globals.jsa b7D` M` TP`Z(La!Lba  %    9`Dm h ei h  !--1!--1 @Sb1Ib`] L`b` L`b` L`]`ba?a? aP%bAiD`RD]DH Q #// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // deno-lint-ignore-file import { internals } from "ext:core/mod.js"; const requireImpl = internals.requireImpl; import { nodeGlobals } from "ext:deno_node/00_globals.js"; import "node:module"; let initialized = false; function initialize( usesLocalNodeModulesDir, argv0, ) { if (initialized) { throw Error("Node runtime already initialized"); } initialized = true; if (usesLocalNodeModulesDir) { requireImpl.setUsesLocalNodeModulesDir(); } const nativeModuleExports = requireImpl.nativeModuleExports; nodeGlobals.Buffer = nativeModuleExports["buffer"].Buffer; nodeGlobals.clearImmediate = nativeModuleExports["timers"].clearImmediate; nodeGlobals.clearInterval = nativeModuleExports["timers"].clearInterval; nodeGlobals.clearTimeout = nativeModuleExports["timers"].clearTimeout; nodeGlobals.console = nativeModuleExports["console"]; nodeGlobals.global = globalThis; nodeGlobals.process = nativeModuleExports["process"]; nodeGlobals.setImmediate = nativeModuleExports["timers"].setImmediate; nodeGlobals.setInterval = nativeModuleExports["timers"].setInterval; nodeGlobals.setTimeout = nativeModuleExports["timers"].setTimeout; nodeGlobals.performance = nativeModuleExports["perf_hooks"].performance; // FIXME(bartlomieju): not nice to depend on `Deno` namespace here // but it's the only way to get `args` and `version` and this point. internals.__bootstrapNodeProcess(argv0, Deno.args, Deno.version); internals.__initWorkerThreads(); internals.__setupChildProcessIpcChannel(); // `Deno[Deno.internal].requireImpl` will be unreachable after this line. delete internals.requireImpl; } function loadCjsModule(moduleName, isMain, inspectBrk) { if (inspectBrk) { requireImpl.setInspectBrk(); } requireImpl.Module._load(moduleName, null, { main: isMain }); } globalThis.nodeBootstrap = initialize; internals.node = { initialize, loadCjsModule, }; Qcoext:deno_node/02_init.jsa b8D`M` T\`s"PSb1b"a??Ib`L` bS]`]`]`]L`  DBKBKcox Dc`BKa?a?ab@k T I`rBb@la BKb" b"CBC"B  u`Dp0h %%ł h  0-%%! 20~ ) 3  3 2  b bAj}D`RD]DH DQD"%H// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // deno-lint-ignore-file import { core, internals, primordials } from "ext:core/mod.js"; import { op_napi_open, op_require_as_file_path, op_require_break_on_next_statement, op_require_init_paths, op_require_is_deno_dir_package, op_require_is_request_relative, op_require_node_module_paths, op_require_package_imports_resolve, op_require_path_basename, op_require_path_dirname, op_require_path_is_absolute, op_require_path_resolve, op_require_proxy_path, op_require_read_closest_package_json, op_require_read_file, op_require_read_package_scope, op_require_real_path, op_require_resolve_deno_dir, op_require_resolve_exports, op_require_resolve_lookup_paths, op_require_stat, op_require_try_self, op_require_try_self_parent_path } from "ext:core/ops"; const { ArrayIsArray, ArrayPrototypeIncludes, ArrayPrototypeIndexOf, ArrayPrototypeJoin, ArrayPrototypePush, ArrayPrototypeSlice, ArrayPrototypeSplice, Error, JSONParse, ObjectCreate, ObjectEntries, ObjectGetOwnPropertyDescriptor, ObjectGetPrototypeOf, ObjectHasOwn, ObjectKeys, ObjectPrototype, ObjectSetPrototypeOf, Proxy, RegExpPrototypeTest, SafeArrayIterator, SafeMap, SafeWeakMap, String, StringPrototypeCharCodeAt, StringPrototypeEndsWith, StringPrototypeIncludes, StringPrototypeIndexOf, StringPrototypeMatch, StringPrototypeSlice, StringPrototypeSplit, StringPrototypeStartsWith, TypeError } = primordials; import { nodeGlobals } from "ext:deno_node/00_globals.js"; import _httpAgent from "ext:deno_node/_http_agent.mjs"; import _httpOutgoing from "ext:deno_node/_http_outgoing.ts"; import _streamDuplex from "ext:deno_node/internal/streams/duplex.mjs"; import _streamPassthrough from "ext:deno_node/internal/streams/passthrough.mjs"; import _streamReadable from "ext:deno_node/internal/streams/readable.mjs"; import _streamTransform from "ext:deno_node/internal/streams/transform.mjs"; import _streamWritable from "ext:deno_node/internal/streams/writable.mjs"; import assert from "node:assert"; import assertStrict from "node:assert/strict"; import asyncHooks from "node:async_hooks"; import buffer from "node:buffer"; import childProcess from "node:child_process"; import cluster from "node:cluster"; import console from "node:console"; import constants from "node:constants"; import crypto from "node:crypto"; import dgram from "node:dgram"; import diagnosticsChannel from "node:diagnostics_channel"; import dns from "node:dns"; import dnsPromises from "node:dns/promises"; import domain from "node:domain"; import events from "node:events"; import fs from "node:fs"; import fsPromises from "node:fs/promises"; import http from "node:http"; import http2 from "node:http2"; import https from "node:https"; import inspector from "ext:deno_node/inspector.ts"; import internalCp from "ext:deno_node/internal/child_process.ts"; import internalCryptoCertificate from "ext:deno_node/internal/crypto/certificate.ts"; import internalCryptoCipher from "ext:deno_node/internal/crypto/cipher.ts"; import internalCryptoDiffiehellman from "ext:deno_node/internal/crypto/diffiehellman.ts"; import internalCryptoHash from "ext:deno_node/internal/crypto/hash.ts"; import internalCryptoHkdf from "ext:deno_node/internal/crypto/hkdf.ts"; import internalCryptoKeygen from "ext:deno_node/internal/crypto/keygen.ts"; import internalCryptoKeys from "ext:deno_node/internal/crypto/keys.ts"; import internalCryptoPbkdf2 from "ext:deno_node/internal/crypto/pbkdf2.ts"; import internalCryptoRandom from "ext:deno_node/internal/crypto/random.ts"; import internalCryptoScrypt from "ext:deno_node/internal/crypto/scrypt.ts"; import internalCryptoSig from "ext:deno_node/internal/crypto/sig.ts"; import internalCryptoUtil from "ext:deno_node/internal/crypto/util.ts"; import internalCryptoX509 from "ext:deno_node/internal/crypto/x509.ts"; import internalDgram from "ext:deno_node/internal/dgram.ts"; import internalDnsPromises from "ext:deno_node/internal/dns/promises.ts"; import internalErrors from "ext:deno_node/internal/errors.ts"; import internalEventTarget from "ext:deno_node/internal/event_target.mjs"; import internalFsUtils from "ext:deno_node/internal/fs/utils.mjs"; import internalHttp from "ext:deno_node/internal/http.ts"; import internalReadlineUtils from "ext:deno_node/internal/readline/utils.mjs"; import internalStreamsAddAbortSignal from "ext:deno_node/internal/streams/add-abort-signal.mjs"; import internalStreamsBufferList from "ext:deno_node/internal/streams/buffer_list.mjs"; import internalStreamsLazyTransform from "ext:deno_node/internal/streams/lazy_transform.mjs"; import internalStreamsState from "ext:deno_node/internal/streams/state.mjs"; import internalTestBinding from "ext:deno_node/internal/test/binding.ts"; import internalTimers from "ext:deno_node/internal/timers.mjs"; import internalUtil from "ext:deno_node/internal/util.mjs"; import internalUtilInspect from "ext:deno_node/internal/util/inspect.mjs"; import net from "node:net"; import os from "node:os"; import pathPosix from "node:path/posix"; import pathWin32 from "node:path/win32"; import path from "node:path"; import perfHooks from "node:perf_hooks"; import punycode from "node:punycode"; import process from "node:process"; import querystring from "node:querystring"; import readline from "node:readline"; import readlinePromises from "ext:deno_node/readline/promises.ts"; import repl from "node:repl"; import stream from "node:stream"; import streamConsumers from "node:stream/consumers"; import streamPromises from "node:stream/promises"; import streamWeb from "node:stream/web"; import stringDecoder from "node:string_decoder"; import sys from "node:sys"; import test from "node:test"; import timers from "node:timers"; import timersPromises from "node:timers/promises"; import tls from "node:tls"; import tty from "node:tty"; import url from "node:url"; import utilTypes from "node:util/types"; import util from "node:util"; import v8 from "node:v8"; import vm from "node:vm"; import workerThreads from "node:worker_threads"; import wasi from "ext:deno_node/wasi.ts"; import zlib from "node:zlib"; const nativeModuleExports = ObjectCreate(null); const builtinModules = []; // NOTE(bartlomieju): keep this list in sync with `ext/node/polyfill.rs` function setupBuiltinModules() { const nodeModules = { "_http_agent": _httpAgent, "_http_outgoing": _httpOutgoing, "_stream_duplex": _streamDuplex, "_stream_passthrough": _streamPassthrough, "_stream_readable": _streamReadable, "_stream_transform": _streamTransform, "_stream_writable": _streamWritable, assert, "assert/strict": assertStrict, "async_hooks": asyncHooks, buffer, crypto, console, constants, child_process: childProcess, cluster, dgram, diagnostics_channel: diagnosticsChannel, dns, "dns/promises": dnsPromises, domain, events, fs, "fs/promises": fsPromises, http, http2, https, inspector, "internal/child_process": internalCp, "internal/crypto/certificate": internalCryptoCertificate, "internal/crypto/cipher": internalCryptoCipher, "internal/crypto/diffiehellman": internalCryptoDiffiehellman, "internal/crypto/hash": internalCryptoHash, "internal/crypto/hkdf": internalCryptoHkdf, "internal/crypto/keygen": internalCryptoKeygen, "internal/crypto/keys": internalCryptoKeys, "internal/crypto/pbkdf2": internalCryptoPbkdf2, "internal/crypto/random": internalCryptoRandom, "internal/crypto/scrypt": internalCryptoScrypt, "internal/crypto/sig": internalCryptoSig, "internal/crypto/util": internalCryptoUtil, "internal/crypto/x509": internalCryptoX509, "internal/dgram": internalDgram, "internal/dns/promises": internalDnsPromises, "internal/errors": internalErrors, "internal/event_target": internalEventTarget, "internal/fs/utils": internalFsUtils, "internal/http": internalHttp, "internal/readline/utils": internalReadlineUtils, "internal/streams/add-abort-signal": internalStreamsAddAbortSignal, "internal/streams/buffer_list": internalStreamsBufferList, "internal/streams/lazy_transform": internalStreamsLazyTransform, "internal/streams/state": internalStreamsState, "internal/test/binding": internalTestBinding, "internal/timers": internalTimers, "internal/util/inspect": internalUtilInspect, "internal/util": internalUtil, net, os, "path/posix": pathPosix, "path/win32": pathWin32, path, perf_hooks: perfHooks, process, get punycode () { process.emitWarning("The `punycode` module is deprecated. Please use a userland " + "alternative instead.", "DeprecationWarning", "DEP0040"); return punycode; }, querystring, readline, "readline/promises": readlinePromises, repl, stream, "stream/consumers": streamConsumers, "stream/promises": streamPromises, "stream/web": streamWeb, string_decoder: stringDecoder, sys, test, timers, "timers/promises": timersPromises, tls, tty, url, util, "util/types": utilTypes, v8, vm, wasi, worker_threads: workerThreads, zlib }; for (const [name, moduleExports] of ObjectEntries(nodeModules)){ nativeModuleExports[name] = moduleExports; ArrayPrototypePush(builtinModules, name); } } setupBuiltinModules(); // Map used to store CJS parsing data. const cjsParseCache = new SafeWeakMap(); function pathDirname(filepath) { if (filepath == null) { throw new Error("Empty filepath."); } else if (filepath === "") { return "."; } return op_require_path_dirname(filepath); } function pathResolve(...args) { return op_require_path_resolve(args); } const nativeModulePolyfill = new SafeMap(); const relativeResolveCache = ObjectCreate(null); let requireDepth = 0; let statCache = null; let isPreloading = false; let mainModule = null; let hasBrokenOnInspectBrk = false; let hasInspectBrk = false; // Are we running with --node-modules-dir flag? let usesLocalNodeModulesDir = false; function stat(filename) { // TODO: required only on windows // filename = path.toNamespacedPath(filename); if (statCache !== null) { const result = statCache.get(filename); if (result !== undefined) { return result; } } const result = op_require_stat(filename); if (statCache !== null && result >= 0) { statCache.set(filename, result); } return result; } function updateChildren(parent, child, scan) { if (!parent) { return; } const children = parent.children; if (children && !(scan && ArrayPrototypeIncludes(children, child))) { ArrayPrototypePush(children, child); } } function tryFile(requestPath, _isMain) { const rc = stat(requestPath); if (rc !== 0) return; return toRealPath(requestPath); } function tryPackage(requestPath, exts, isMain, originalPath) { const packageJsonPath = pathResolve(requestPath, "package.json"); const pkg = op_require_read_package_scope(packageJsonPath)?.main; if (!pkg) { return tryExtensions(pathResolve(requestPath, "index"), exts, isMain); } const filename = pathResolve(requestPath, pkg); let actual = tryFile(filename, isMain) || tryExtensions(filename, exts, isMain) || tryExtensions(pathResolve(filename, "index"), exts, isMain); if (actual === false) { actual = tryExtensions(pathResolve(requestPath, "index"), exts, isMain); if (!actual) { // eslint-disable-next-line no-restricted-syntax const err = new Error(`Cannot find module '${filename}'. ` + 'Please verify that the package.json has a valid "main" entry'); err.code = "MODULE_NOT_FOUND"; err.path = pathResolve(requestPath, "package.json"); err.requestPath = originalPath; throw err; } else { process.emitWarning(`Invalid 'main' field in '${packageJsonPath}' of '${pkg}'. ` + "Please either fix that or report it to the module author", "DeprecationWarning", "DEP0128"); } } return actual; } const realpathCache = new SafeMap(); function toRealPath(requestPath) { const maybeCached = realpathCache.get(requestPath); if (maybeCached) { return maybeCached; } const rp = op_require_real_path(requestPath); realpathCache.set(requestPath, rp); return rp; } function tryExtensions(p, exts, isMain) { for(let i = 0; i < exts.length; i++){ const filename = tryFile(p + exts[i], isMain); if (filename) { return filename; } } return false; } // Find the longest (possibly multi-dot) extension registered in // Module._extensions function findLongestRegisteredExtension(filename) { const name = op_require_path_basename(filename); let currentExtension; let index; let startIndex = 0; while((index = StringPrototypeIndexOf(name, ".", startIndex)) !== -1){ startIndex = index + 1; if (index === 0) continue; // Skip dotfiles like .gitignore currentExtension = StringPrototypeSlice(name, index); if (Module._extensions[currentExtension]) { return currentExtension; } } return ".js"; } function getExportsForCircularRequire(module) { if (module.exports && ObjectGetPrototypeOf(module.exports) === ObjectPrototype && // Exclude transpiled ES6 modules / TypeScript code because those may // employ unusual patterns for accessing 'module.exports'. That should // be okay because ES6 modules have a different approach to circular // dependencies anyway. !module.exports.__esModule) { // This is later unset once the module is done loading. ObjectSetPrototypeOf(module.exports, CircularRequirePrototypeWarningProxy); } return module.exports; } function emitCircularRequireWarning(prop) { process.emitWarning(`Accessing non-existent property '${String(prop)}' of module exports ` + "inside circular dependency"); } // A Proxy that can be used as the prototype of a module.exports object and // warns when non-existent properties are accessed. const CircularRequirePrototypeWarningProxy = new Proxy({}, { get (target, prop) { // Allow __esModule access in any case because it is used in the output // of transpiled code to determine whether something comes from an // ES module, and is not used as a regular key of `module.exports`. if (prop in target || prop === "__esModule") return target[prop]; emitCircularRequireWarning(prop); return undefined; }, getOwnPropertyDescriptor (target, prop) { if (ObjectHasOwn(target, prop) || prop === "__esModule") { return ObjectGetOwnPropertyDescriptor(target, prop); } emitCircularRequireWarning(prop); return undefined; } }); const moduleParentCache = new SafeWeakMap(); function Module(id = "", parent) { this.id = id; this.path = pathDirname(id); this.exports = {}; moduleParentCache.set(this, parent); updateChildren(parent, this, false); this.filename = null; this.loaded = false; this.children = []; } Module.builtinModules = builtinModules; Module._extensions = ObjectCreate(null); Module._cache = ObjectCreate(null); Module._pathCache = ObjectCreate(null); let modulePaths = []; Module.globalPaths = modulePaths; const CHAR_FORWARD_SLASH = 47; const TRAILING_SLASH_REGEX = /(?:^|\/)\.?\.$/; const encodedSepRegEx = /%2F|%2C/i; function finalizeEsmResolution(resolved, parentPath, pkgPath) { if (RegExpPrototypeTest(encodedSepRegEx, resolved)) { throw new ERR_INVALID_MODULE_SPECIFIER(resolved, 'must not include encoded "/" or "\\" characters', parentPath); } // const filename = fileURLToPath(resolved); const filename = resolved; const actual = tryFile(filename, false); if (actual) { return actual; } throw new ERR_MODULE_NOT_FOUND(filename, path.resolve(pkgPath, "package.json")); } // This only applies to requests of a specific form: // 1. name/.* // 2. @scope/name/.* const EXPORTS_PATTERN = /^((?:@[^/\\%]+\/)?[^./\\%][^/\\%]*)(\/.*)?$/; function resolveExports(modulesPath, request, parentPath, usesLocalNodeModulesDir) { // The implementation's behavior is meant to mirror resolution in ESM. const [, name, expansion = ""] = StringPrototypeMatch(request, EXPORTS_PATTERN) || []; if (!name) { return; } if (!parentPath) { return false; } return op_require_resolve_exports(usesLocalNodeModulesDir, modulesPath, request, name, expansion, parentPath) ?? false; } Module._findPath = function(request, paths, isMain, parentPath) { const absoluteRequest = op_require_path_is_absolute(request); if (absoluteRequest) { paths = [ "" ]; } else if (!paths || paths.length === 0) { return false; } const cacheKey = request + "\x00" + ArrayPrototypeJoin(paths, "\x00"); const entry = Module._pathCache[cacheKey]; if (entry) { return entry; } let exts; let trailingSlash = request.length > 0 && StringPrototypeCharCodeAt(request, request.length - 1) === CHAR_FORWARD_SLASH; if (!trailingSlash) { trailingSlash = RegExpPrototypeTest(TRAILING_SLASH_REGEX, request); } // For each path for(let i = 0; i < paths.length; i++){ // Don't search further if path doesn't exist const curPath = paths[i]; if (curPath && stat(curPath) < 1) continue; if (!absoluteRequest) { const exportsResolved = resolveExports(curPath, request, parentPath, usesLocalNodeModulesDir); if (exportsResolved) { return exportsResolved; } } let basePath; if (usesLocalNodeModulesDir) { basePath = pathResolve(curPath, request); } else { const isDenoDirPackage = op_require_is_deno_dir_package(curPath); const isRelative = op_require_is_request_relative(request); basePath = isDenoDirPackage && !isRelative ? pathResolve(curPath, packageSpecifierSubPath(request)) : pathResolve(curPath, request); } let filename; const rc = stat(basePath); if (!trailingSlash) { if (rc === 0) { filename = toRealPath(basePath); } if (!filename) { // Try it with each of the extensions if (exts === undefined) { exts = ObjectKeys(Module._extensions); } filename = tryExtensions(basePath, exts, isMain); } } if (!filename && rc === 1) { // try it with each of the extensions at "index" if (exts === undefined) { exts = ObjectKeys(Module._extensions); } filename = tryPackage(basePath, exts, isMain, request); } if (filename) { Module._pathCache[cacheKey] = filename; return filename; } } return false; }; /** * Get a list of potential module directories * @param {string} fromPath The directory name of the module * @returns {string[]} List of module directories */ Module._nodeModulePaths = function(fromPath) { return op_require_node_module_paths(fromPath); }; Module._resolveLookupPaths = function(request, parent) { const paths = []; if (op_require_is_request_relative(request)) { ArrayPrototypePush(paths, parent?.filename ? op_require_path_dirname(parent.filename) : "."); return paths; } if (!usesLocalNodeModulesDir && parent?.filename && parent.filename.length > 0) { const denoDirPath = op_require_resolve_deno_dir(request, parent.filename); if (denoDirPath) { ArrayPrototypePush(paths, denoDirPath); } } const lookupPathsResult = op_require_resolve_lookup_paths(request, parent?.paths, parent?.filename ?? ""); if (lookupPathsResult) { ArrayPrototypePush(paths, ...new SafeArrayIterator(lookupPathsResult)); } return paths; }; Module._load = function(request, parent, isMain) { let relResolveCacheIdentifier; if (parent) { // Fast path for (lazy loaded) modules in the same directory. The indirect // caching is required to allow cache invalidation without changing the old // cache key names. relResolveCacheIdentifier = `${parent.path}\x00${request}`; const filename = relativeResolveCache[relResolveCacheIdentifier]; if (filename !== undefined) { const cachedModule = Module._cache[filename]; if (cachedModule !== undefined) { updateChildren(parent, cachedModule, true); if (!cachedModule.loaded) { return getExportsForCircularRequire(cachedModule); } return cachedModule.exports; } delete relativeResolveCache[relResolveCacheIdentifier]; } } const filename = Module._resolveFilename(request, parent, isMain); if (StringPrototypeStartsWith(filename, "node:")) { // Slice 'node:' prefix const id = StringPrototypeSlice(filename, 5); const module = loadNativeModule(id, id); if (!module) { // TODO: // throw new ERR_UNKNOWN_BUILTIN_MODULE(filename); throw new Error("Unknown built-in module"); } return module.exports; } const cachedModule = Module._cache[filename]; if (cachedModule !== undefined) { updateChildren(parent, cachedModule, true); if (!cachedModule.loaded) { return getExportsForCircularRequire(cachedModule); } return cachedModule.exports; } const mod = loadNativeModule(filename, request); if (mod) { return mod.exports; } // Don't call updateChildren(), Module constructor already does. const module = cachedModule || new Module(filename, parent); if (isMain) { process.mainModule = module; mainModule = module; module.id = "."; } Module._cache[filename] = module; if (parent !== undefined) { relativeResolveCache[relResolveCacheIdentifier] = filename; } let threw = true; try { module.load(filename); threw = false; } finally{ if (threw) { delete Module._cache[filename]; if (parent !== undefined) { delete relativeResolveCache[relResolveCacheIdentifier]; const children = parent?.children; if (ArrayIsArray(children)) { const index = ArrayPrototypeIndexOf(children, module); if (index !== -1) { ArrayPrototypeSplice(children, index, 1); } } } } else if (module.exports && ObjectGetPrototypeOf(module.exports) === CircularRequirePrototypeWarningProxy) { ObjectSetPrototypeOf(module.exports, ObjectPrototype); } } return module.exports; }; Module._resolveFilename = function(request, parent, isMain, options) { if (StringPrototypeStartsWith(request, "node:") || nativeModuleCanBeRequiredByUsers(request)) { return request; } let paths; if (typeof options === "object" && options !== null) { if (ArrayIsArray(options.paths)) { const isRelative = op_require_is_request_relative(request); if (isRelative) { paths = options.paths; } else { const fakeParent = new Module("", null); paths = []; for(let i = 0; i < options.paths.length; i++){ const path = options.paths[i]; fakeParent.paths = Module._nodeModulePaths(path); const lookupPaths = Module._resolveLookupPaths(request, fakeParent); for(let j = 0; j < lookupPaths.length; j++){ if (!ArrayPrototypeIncludes(paths, lookupPaths[j])) { ArrayPrototypePush(paths, lookupPaths[j]); } } } } } else if (options.paths === undefined) { paths = Module._resolveLookupPaths(request, parent); } else { // TODO: // throw new ERR_INVALID_ARG_VALUE("options.paths", options.paths); throw new Error("Invalid arg value options.paths", options.path); } } else { paths = Module._resolveLookupPaths(request, parent); } if (parent?.filename) { if (request[0] === "#") { const maybeResolved = op_require_package_imports_resolve(parent.filename, request); if (maybeResolved) { return maybeResolved; } } } // Try module self resolution first const parentPath = op_require_try_self_parent_path(!!parent, parent?.filename, parent?.id); const selfResolved = op_require_try_self(parentPath, request); if (selfResolved) { const cacheKey = request + "\x00" + (paths.length === 1 ? paths[0] : ArrayPrototypeJoin(paths, "\x00")); Module._pathCache[cacheKey] = selfResolved; return selfResolved; } // Look up the filename first, since that's the cache key. const filename = Module._findPath(request, paths, isMain, parentPath); if (filename) { return op_require_real_path(filename); } const requireStack = []; for(let cursor = parent; cursor; cursor = moduleParentCache.get(cursor)){ ArrayPrototypePush(requireStack, cursor.filename || cursor.id); } let message = `Cannot find module '${request}'`; if (requireStack.length > 0) { message = message + "\nRequire stack:\n- " + ArrayPrototypeJoin(requireStack, "\n- "); } // eslint-disable-next-line no-restricted-syntax const err = new Error(message); err.code = "MODULE_NOT_FOUND"; err.requireStack = requireStack; throw err; }; /** * Internal CommonJS API to always require modules before requiring the actual * one when calling `require("my-module")`. This is used by require hooks such * as `ts-node/register`. * @param {string[]} requests List of modules to preload */ Module._preloadModules = function(requests) { if (!ArrayIsArray(requests) || requests.length === 0) { return; } const parent = new Module("internal/preload", null); // All requested files must be resolved against cwd parent.paths = Module._nodeModulePaths(process.cwd()); for(let i = 0; i < requests.length; i++){ parent.require(requests[i]); } }; Module.prototype.load = function(filename) { if (this.loaded) { throw Error("Module already loaded"); } // Canonicalize the path so it's not pointing to the symlinked directory // in `node_modules` directory of the referrer. this.filename = op_require_real_path(filename); this.paths = Module._nodeModulePaths(pathDirname(this.filename)); const extension = findLongestRegisteredExtension(filename); // allow .mjs to be overridden if (StringPrototypeEndsWith(filename, ".mjs") && !Module._extensions[".mjs"]) { throw createRequireEsmError(filename, moduleParentCache.get(this)?.filename); } Module._extensions[extension](this, this.filename); this.loaded = true; // TODO: do caching }; // Loads a module at the given file path. Returns that module's // `exports` property. Module.prototype.require = function(id) { if (typeof id !== "string") { // TODO(bartlomieju): it should use different error type // ("ERR_INVALID_ARG_VALUE") throw new TypeError("Invalid argument type"); } if (id === "") { // TODO(bartlomieju): it should use different error type // ("ERR_INVALID_ARG_VALUE") throw new TypeError("id must be non empty"); } requireDepth++; try { return Module._load(id, this, /* isMain */ false); } finally{ requireDepth--; } }; // The module wrapper looks slightly different to Node. Instead of using one // wrapper function, we use two. The first one exists to performance optimize // access to magic node globals, like `Buffer` or `process`. The second one // is the actual wrapper function we run the users code in. // The only observable difference is that in Deno `arguments.callee` is not // null. Module.wrapper = [ "(function (exports, require, module, __filename, __dirname, Buffer, clearImmediate, clearInterval, clearTimeout, console, global, process, setImmediate, setInterval, setTimeout, performance) { (function (exports, require, module, __filename, __dirname) {", "\n}).call(this, exports, require, module, __filename, __dirname); })" ]; Module.wrap = function(script) { script = script.replace(/^#!.*?\n/, ""); return `${Module.wrapper[0]}${script}${Module.wrapper[1]}`; }; function isEsmSyntaxError(error) { return error instanceof SyntaxError && (StringPrototypeIncludes(error.message, "Cannot use import statement outside a module") || StringPrototypeIncludes(error.message, "Unexpected token 'export'")); } function enrichCJSError(error) { if (isEsmSyntaxError(error)) { console.error('To load an ES module, set "type": "module" in the package.json or use ' + "the .mjs extension."); } } function wrapSafe(filename, content, cjsModuleInstance) { const wrapper = Module.wrap(content); const [f, err] = core.evalContext(wrapper, `file://${filename}`); if (err) { if (process.mainModule === cjsModuleInstance) { enrichCJSError(err.thrown); } if (isEsmSyntaxError(err.thrown)) { throw createRequireEsmError(filename, moduleParentCache.get(cjsModuleInstance)?.filename); } else { throw err.thrown; } } return f; } Module.prototype._compile = function(content, filename) { const compiledWrapper = wrapSafe(filename, content, this); const dirname = pathDirname(filename); const require = makeRequireFunction(this); const exports = this.exports; const thisValue = exports; if (requireDepth === 0) { statCache = new SafeMap(); } if (hasInspectBrk && !hasBrokenOnInspectBrk) { hasBrokenOnInspectBrk = true; op_require_break_on_next_statement(); } const { Buffer, clearImmediate, clearInterval, clearTimeout, console, global, process, setImmediate, setInterval, setTimeout, performance } = nodeGlobals; const result = compiledWrapper.call(thisValue, exports, require, this, filename, dirname, Buffer, clearImmediate, clearInterval, clearTimeout, console, global, process, setImmediate, setInterval, setTimeout, performance); if (requireDepth === 0) { statCache = null; } return result; }; Module._extensions[".js"] = function(module, filename) { const content = op_require_read_file(filename); if (StringPrototypeEndsWith(filename, ".js")) { const pkg = op_require_read_closest_package_json(filename); if (pkg && pkg.exists && pkg.typ === "module") { throw createRequireEsmError(filename, moduleParentCache.get(module)?.filename); } } module._compile(content, filename); }; function createRequireEsmError(filename, parent) { let message = `require() of ES Module ${filename}`; if (parent) { message += ` from ${parent}`; } message += ` not supported. Instead change the require to a dynamic import() which is available in all CommonJS modules.`; const err = new Error(message); err.code = "ERR_REQUIRE_ESM"; return err; } function stripBOM(content) { if (StringPrototypeCharCodeAt(content, 0) === 0xfeff) { content = StringPrototypeSlice(content, 1); } return content; } // Native extension for .json Module._extensions[".json"] = function(module, filename) { const content = op_require_read_file(filename); try { module.exports = JSONParse(stripBOM(content)); } catch (err) { err.message = filename + ": " + err.message; throw err; } }; // Native extension for .node Module._extensions[".node"] = function(module, filename) { if (filename.endsWith("fsevents.node")) { throw new Error("Using fsevents module is currently not supported"); } module.exports = op_napi_open(filename, globalThis); }; function createRequireFromPath(filename) { const proxyPath = op_require_proxy_path(filename); const mod = new Module(proxyPath); mod.filename = proxyPath; mod.paths = Module._nodeModulePaths(mod.path); return makeRequireFunction(mod); } function makeRequireFunction(mod) { const require = function require(path) { return mod.require(path); }; function resolve(request, options) { return Module._resolveFilename(request, mod, false, options); } require.resolve = resolve; function paths(request) { return Module._resolveLookupPaths(request, mod); } resolve.paths = paths; require.main = mainModule; // Enable support to add extra extension types. require.extensions = Module._extensions; require.cache = Module._cache; return require; } // Matches to: // - /foo/... // - \foo\... // - C:/foo/... // - C:\foo\... const RE_START_OF_ABS_PATH = /^([/\\]|[a-zA-Z]:[/\\])/; function isAbsolute(filenameOrUrl) { return RE_START_OF_ABS_PATH.test(filenameOrUrl); } function createRequire(filenameOrUrl) { let fileUrlStr; if (filenameOrUrl instanceof URL) { if (filenameOrUrl.protocol !== "file:") { throw new Error(`The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received ${filenameOrUrl}`); } fileUrlStr = filenameOrUrl.toString(); } else if (typeof filenameOrUrl === "string") { if (!filenameOrUrl.startsWith("file:") && !isAbsolute(filenameOrUrl)) { throw new Error(`The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received ${filenameOrUrl}`); } fileUrlStr = filenameOrUrl; } else { throw new Error(`The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received ${filenameOrUrl}`); } const filename = op_require_as_file_path(fileUrlStr); return createRequireFromPath(filename); } Module.createRequire = createRequire; Module._initPaths = function() { const paths = op_require_init_paths(); modulePaths = paths; Module.globalPaths = ArrayPrototypeSlice(modulePaths); }; Module.syncBuiltinESMExports = function syncBuiltinESMExports() { throw new Error("not implemented"); }; // Mostly used by tools like ts-node. Module.runMain = function() { Module._load(process.argv[1], null, true); }; Module.Module = Module; nativeModuleExports.module = Module; function loadNativeModule(_id, request) { if (nativeModulePolyfill.has(request)) { return nativeModulePolyfill.get(request); } const modExports = nativeModuleExports[request]; if (modExports) { const nodeMod = new Module(request); nodeMod.exports = modExports; nodeMod.loaded = true; nativeModulePolyfill.set(request, nodeMod); return nodeMod; } return undefined; } function nativeModuleCanBeRequiredByUsers(request) { return !!nativeModuleExports[request]; } function readPackageScope() { throw new Error("not implemented"); } /** @param specifier {string} */ function packageSpecifierSubPath(specifier) { let parts = StringPrototypeSplit(specifier, "/"); if (StringPrototypeStartsWith(parts[0], "@")) { parts = ArrayPrototypeSlice(parts, 2); } else { parts = ArrayPrototypeSlice(parts, 1); } return ArrayPrototypeJoin(parts, "/"); } // This is a temporary namespace, that will be removed when initializing // in `02_init.js`. internals.requireImpl = { setUsesLocalNodeModulesDir () { usesLocalNodeModulesDir = true; }, setInspectBrk () { hasInspectBrk = true; }, Module, nativeModuleExports }; export { builtinModules, createRequire, Module }; export const _cache = Module._cache; export const _extensions = Module._extensions; export const _findPath = Module._findPath; export const _initPaths = Module._initPaths; export const _load = Module._load; export const _nodeModulePaths = Module._nodeModulePaths; export const _pathCache = Module._pathCache; export const _preloadModules = Module._preloadModules; export const _resolveFilename = Module._resolveFilename; export const _resolveLookupPaths = Module._resolveLookupPaths; export const globalPaths = Module.globalPaths; export const wrap = Module.wrap; export default Module; Qb9 node:modulea b9D`M`5 T`La{G TU`deL`bXzCB{C{CB|C|Cb}C~C C~CCICCCbCCCCCCCCCCCbCBC"CCCCbCC‚CbCCCBCCC"C‡CbCCC"CCBCCbCCCCbCCC"C‘C% CCBC’CIC"C* C) Cb+ Cb, CBC. CNCCbCCCb4 Cb{CCbCB7 C8 CC": CC; C; C= CC> CzB{"{B|B|b}B~B~bbbbB"Bbb‚" b "  B"  " " ‡" b  b " " B  bb B   bb  # "B" ‘% "& B"' ’I( "* b+ b, B- B. N0 "1 bB2 B3 b4 b{"6 bB7 8 ": "9 ; ; = < > )  T4`%$L`* K"˜b)   `Df(0-8\0(SbqOQb get punycode`Da}!2"}Sb1FTcAd!Aac 2 " b B>!$SUbXY"]b"dg= "B C C "D D BE BF F bG G I K N "K M "P Q S R BT U V bW X \ "^ v Bw w o | ~ z " b h bj "d ??????????????????????????????????????????????????????????????????????IbH`uL`[ bS]`B]`)]`"]`b]`.]`kB]`]`B]`Q]`]`]`]`4b]`[b]`b]`]`]`b]` B]`= b]`j b]` B]` B]` "]` ]`" ]`D ]`i ]` ]` ]` ]` b]`R ]` ]` B ]`G  ]` B ]`  ]`# B ]`m  ]` B ]` ]`NB ]` ]`" ]`  ]`c ]`B ]` ]`3 ]`sb ]`" ]` ]`k ]` ]` ]`hb! ]`" ]`"$ ]`.b% ]`i% ]`& ]`' ]`"( ]`") ]`* ]`=* ]`b+ ]`, ]`- ]`/ ]`/ ]`80 ]`c1 ]`2 ]`3 ]`4 ]`"5 ]`65 ]`V6 ]`7 ]`b8 ]`8 ]`9 ]`: ]`&b; ]`B"< ]`\= ]`> ]`? ]`]L`0` L`}` L`T ` L`T "` L`"_ ` L`_ b ` L`b g ` L`g d ` L`d BU `  L`BU m `  L`m i `  L`i Be `  L`Be ? `  L`? b ` L`b BV ` L`BV v ` L`v ]L`s  Dc Dc( D"cXe Dc DBc Dc;K DBc  D c  DBc  Dbc $. DIc OU Dcq} Dc Dc Dbc D  cmq Dc   Dc2 7  DcR d  Dc  Dc  Dc  Dc  Dc   Dbc4 >  Dbc_ c  DBc}  D"c  Dc  DBc  Dc 3 L  Dbc!  Dc"  Dc#/ A  D" c$w  D c%  D" c&   D c'S g  D" c(  D c)  D" c*7H D c+} D" c, D c-  D c.J] Db c/ D c0 D" c1- D c2am D c3 Db c4 DB c5Le D c6 D c7 Db c8Ob D c9 DB" c: D# c;( DBKBKcs| D% c<`c Dc D  c D  c D  c D  c  D  c- D  c/M D  cOk D  cm D  c D  c D  c D  c D  c D  c5 D  c7K D  cMj D  cl D  c D  c D  c D  c D  c D  c! Dc=|~ DIc@ D"& c> D"' c? D( cA Dc~ D* cCU\ D) cB/7 Db+ cDy Db, cE DB- cF D. cG DNcH,2 D0 cIN] D"1 cJ DB2 cK DB3 cL Db4 cM Db{cN,0 DcOJP D"6 cPlz DB7 cQ D8 cR DcS D": cU  D"9 cT D; cV:< D; cWTV D= cY D< cXn{ D> cZ` a?BKa?a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a?a?a?a?"a?a?Ba?a?Ba?a?Ba?ba?a?a?a?a?ba?a?a?a?a?a?a?a?a?ba?ba?Ba?"a?a?Ba?a?ba?a?a?" a? a?" a? a?" a? a?" a? a?" a? a? a?b a? a?" a? a? a?b a?B a? a? a?b a? a?B" a?# a?% a?a?"& a?"' a?Ia?( a?) a?* a?b+ a?b, a?B- a?. a?Na?0 a?"1 a?B2 a?B3 a?b4 a?b{a?a?"6 a?B7 a?8 a?a?"9 a?": a?; a?; a?< a?= a?> a?? a ?a?b a?T a?"a?_ a?b a?g a?d a?BU a ?m a ?i a ?Be a ?BV a?v a?a? a@b   iA? (Kh@D&`! q8p9Lp"   ݃`D=~)030303030 3 0 3 0 3 03030303030303030303!03#03%03 '0!3!)0"3"+0#3#-0$3%/0&3&10'3'30(3(50)3)70*3+90,3-;0.3/=0031?0233A0435C0637E0839G0:3;I0<3=K0>3?M0@3AO0B3CQ0D3ES0F3GU0H3IW0J3KY0L3M[0N3O]0P3Q_0R3Sa0T3Uc0V3We0X3Yg0Z3[i0\3]k0^3_m0`3ao0b3cq0d3ds0e3eu0f3gw0h3iy0j3j{0k3l}0m3m0n3n0o3o0p3q0r3r0s3s0t3u0v3w0x3y0z3{0|3|0}3}0~3~0303030303030303030303 e b񱳿-]򷺡e-푹-풻- #]e-Ř-  #]e-Ř-    &-ˠ]͡e    * 40 cы   #-Ԡ]֡e   (SbqA@ `Da$Pr   @b@p T  I`%%"B b@q T I`%&C b@r T I`m'(b @s T I`))G b@t T I`)X*I b@u T I`l*.K b@v T I`&/0"K b@ w T I`00M b@ x T I`L13"P b'@ y T I`63O5Q b%@ z T I`s55S b#@ { T I`;u=bY b@| T I`,>?"^ b@} T I`llv b@~ T I`mmBw b@ T I`m}ow b@ T I`tvo b@! T I`)vv| b@" T I`yy~ b@% T I`y{d@ @@z b@& T I`||b b@* T I`Nƃh b@/ T I`&bj b)@0 T I`@l„ b@1 T I`"d b @2XLa  T I`^9J:}b@na. T I`|Ub b@+on/ a TcAd!Aac 2  " b 1B>!$$SUbXY"]b"dg=  bCC T  I`608b T I`M89b? "T BU BV X Y "]  T y`}Qb ._findPath`?LHIb@_  T ``d `ITIIb@d  T ``Be `{I'LIb@Be  T Qb Module._load`@LVIb@g  T ``i `VaIb@i  T ``m `#brcIb@m  T Qb Module.load`c?fIb@ T ` Qa.require`fhIb@o   `M`bp t p  T Qb Module.wrap`kkIb@v  T `Qb ._compile`o sIb@x  T ```" Qa..js`3stIb@ |  T ```" Qa..json`vwIb@#B}  T ```" Qa..node`xxIb@$}  b  T `Qb ._initPaths`Ib@,b  T I`V b-  T ` Qa.runMain`ÁIb@. ¨BK0bB C CCC T  I`FrB b3B  T I` b4 b  у`Dihh %%%%%%% % % % % %%%%%%%%%%%%%%%%%%% ‚%!%"%#%$%%%&%'%(%)%*%+%,%-%.%/%0 %1 %2 %3 %4%5%6%7%8%9%: %; %<%=%>%?%@%A%B%C%D%E%F%G%Hei h  0-%- %-!%-"%-#%-$ %-% % -&% -'% -(-)% -*% -+%-,%--%-.%-/ %-0"-1$%-2&%-3(%-4*-5,%-6.%-70%-82%-94%-:6%-;8%-<:%-=<%->>%b@% }B1 aC iEiG%#bI%$ %%%&%'%(%)%*iK%/~?M)@3ANB3CP iR%5 iT%600 2DV0bX2EZ0b\2F^0b`2Gb}d%7072He /%8zIg%9zJh%:zKi%;0L2Mj0N2Ol0P2Qn0R2Sp0T 2Ur0V!2Wt0-XvY"2Zx0-Xv[#2\z0{]|%2^}0_$2`0-Xva%2b0-Ec&2d0-Ee'2f0-Eg(2hzi%D002j0k)2l0m*2n0o+2p002q 02r0s~t)u,3vw-3x03q 3y 2z0-F10-E10-M10-l10-S10-O10-G1 0-W1 0-U1 0-Q1 0-H10-`101 Hp0PPPPPPPPPP@& 0@,@ ,0`ι , ,P ,0` ``. , L   bAmكɇчهqňш !1!)Ia19DEyyMU]eD`RD]DH Qϑ;// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import * as net from "node:net"; import EventEmitter from "node:events"; import { debuglog } from "ext:deno_node/internal/util/debuglog.ts"; let debug = debuglog("http", (fn) => { debug = fn; }); import { AsyncResource } from "node:async_hooks"; import { symbols } from "ext:deno_node/internal/async_hooks.ts"; // deno-lint-ignore camelcase const { async_id_symbol } = symbols; import { ERR_OUT_OF_RANGE } from "ext:deno_node/internal/errors.ts"; import { once } from "ext:deno_node/internal/util.mjs"; import { validateNumber, validateOneOf, validateString, } from "ext:deno_node/internal/validators.mjs"; const kOnKeylog = Symbol("onkeylog"); const kRequestOptions = Symbol("requestOptions"); const kRequestAsyncResource = Symbol("requestAsyncResource"); // New Agent code. // The largest departure from the previous implementation is that // an Agent instance holds connections for a variable number of host:ports. // Surprisingly, this is still API compatible as far as third parties are // concerned. The only code that really notices the difference is the // request object. // Another departure is that all code related to HTTP parsing is in // ClientRequest.onSocket(). The Agent is now *strictly* // concerned with managing a connection pool. class ReusedHandle { constructor(type, handle) { this.type = type; this.handle = handle; } } function freeSocketErrorListener(err) { // deno-lint-ignore no-this-alias const socket = this; debug("SOCKET ERROR on FREE socket:", err.message, err.stack); socket.destroy(); socket.emit("agentRemove"); } export function Agent(options) { if (!(this instanceof Agent)) { return new Agent(options); } EventEmitter.call(this); this.defaultPort = 80; this.protocol = "http:"; this.options = { __proto__: null, ...options }; // Don't confuse net and make it think that we're connecting to a pipe this.options.path = null; this.requests = Object.create(null); this.sockets = Object.create(null); this.freeSockets = Object.create(null); this.keepAliveMsecs = this.options.keepAliveMsecs || 1000; this.keepAlive = this.options.keepAlive || false; this.maxSockets = this.options.maxSockets || Agent.defaultMaxSockets; this.maxFreeSockets = this.options.maxFreeSockets || 256; this.scheduling = this.options.scheduling || "lifo"; this.maxTotalSockets = this.options.maxTotalSockets; this.totalSocketCount = 0; validateOneOf(this.scheduling, "scheduling", ["fifo", "lifo"]); if (this.maxTotalSockets !== undefined) { validateNumber(this.maxTotalSockets, "maxTotalSockets"); if (this.maxTotalSockets <= 0 || Number.isNaN(this.maxTotalSockets)) { throw new ERR_OUT_OF_RANGE( "maxTotalSockets", "> 0", this.maxTotalSockets, ); } } else { this.maxTotalSockets = Infinity; } this.on("free", (socket, options) => { const name = this.getName(options); debug("agent.on(free)", name); // TODO(ronag): socket.destroy(err) might have been called // before coming here and have an 'error' scheduled. In the // case of socket.destroy() below this 'error' has no handler // and could cause unhandled exception. if (!socket.writable) { socket.destroy(); return; } const requests = this.requests[name]; if (requests && requests.length) { const req = requests.shift(); const reqAsyncRes = req[kRequestAsyncResource]; if (reqAsyncRes) { // Run request within the original async context. reqAsyncRes.runInAsyncScope(() => { asyncResetHandle(socket); setRequestSocket(this, req, socket); }); req[kRequestAsyncResource] = null; } else { setRequestSocket(this, req, socket); } if (requests.length === 0) { delete this.requests[name]; } return; } // If there are no pending requests, then put it in // the freeSockets pool, but only if we're allowed to do so. const req = socket._httpMessage; if (!req || !req.shouldKeepAlive || !this.keepAlive) { socket.destroy(); return; } const freeSockets = this.freeSockets[name] || []; const freeLen = freeSockets.length; let count = freeLen; if (this.sockets[name]) { count += this.sockets[name].length; } if ( this.totalSocketCount > this.maxTotalSockets || count > this.maxSockets || freeLen >= this.maxFreeSockets || !this.keepSocketAlive(socket) ) { socket.destroy(); return; } this.freeSockets[name] = freeSockets; socket[async_id_symbol] = -1; socket._httpMessage = null; this.removeSocket(socket, options); socket.once("error", freeSocketErrorListener); freeSockets.push(socket); }); // Don't emit keylog events unless there is a listener for them. this.on("newListener", maybeEnableKeylog); } Object.setPrototypeOf(Agent.prototype, EventEmitter.prototype); Object.setPrototypeOf(Agent, EventEmitter); function maybeEnableKeylog(eventName) { if (eventName === "keylog") { this.removeListener("newListener", maybeEnableKeylog); // Future sockets will listen on keylog at creation. // deno-lint-ignore no-this-alias const agent = this; this[kOnKeylog] = function onkeylog(keylog) { agent.emit("keylog", keylog, this); }; // Existing sockets will start listening on keylog now. const sockets = ObjectValues(this.sockets); for (let i = 0; i < sockets.length; i++) { sockets[i].on("keylog", this[kOnKeylog]); } } } Agent.defaultMaxSockets = Infinity; Agent.prototype.createConnection = net.createConnection; // Get the key for a given set of request options Agent.prototype.getName = function getName(options = {}) { let name = options.host || "localhost"; name += ":"; if (options.port) { name += options.port; } name += ":"; if (options.localAddress) { name += options.localAddress; } // Pacify parallel/test-http-agent-getname by only appending // the ':' when options.family is set. if (options.family === 4 || options.family === 6) { name += `:${options.family}`; } if (options.socketPath) { name += `:${options.socketPath}`; } return name; }; Agent.prototype.addRequest = function addRequest( req, options, port, /* legacy */ localAddress, /* legacy */ ) { // Legacy API: addRequest(req, host, port, localAddress) if (typeof options === "string") { options = { __proto__: null, host: options, port, localAddress, }; } options = { __proto__: null, ...options, ...this.options }; if (options.socketPath) { options.path = options.socketPath; } if (!options.servername && options.servername !== "") { options.servername = calculateServerName(options, req); } const name = this.getName(options); if (!this.sockets[name]) { this.sockets[name] = []; } const freeSockets = this.freeSockets[name]; let socket; if (freeSockets) { while (freeSockets.length && freeSockets[0].destroyed) { freeSockets.shift(); } socket = this.scheduling === "fifo" ? freeSockets.shift() : freeSockets.pop(); if (!freeSockets.length) { delete this.freeSockets[name]; } } const freeLen = freeSockets ? freeSockets.length : 0; const sockLen = freeLen + this.sockets[name].length; if (socket) { asyncResetHandle(socket); this.reuseSocket(socket, req); setRequestSocket(this, req, socket); this.sockets[name].push(socket); } else if ( sockLen < this.maxSockets && this.totalSocketCount < this.maxTotalSockets ) { debug("call onSocket", sockLen, freeLen); // If we are under maxSockets create a new one. this.createSocket(req, options, (err, socket) => { if (err) { req.onSocket(socket, err); } else { setRequestSocket(this, req, socket); } }); } else { debug("wait for socket"); // We are over limit so we'll add it to the queue. if (!this.requests[name]) { this.requests[name] = []; } // Used to create sockets for pending requests from different origin req[kRequestOptions] = options; // Used to capture the original async context. req[kRequestAsyncResource] = new AsyncResource("QueuedRequest"); this.requests[name].push(req); } }; Agent.prototype.createSocket = function createSocket(req, options, cb) { options = { __proto__: null, ...options, ...this.options }; if (options.socketPath) { options.path = options.socketPath; } if (!options.servername && options.servername !== "") { options.servername = calculateServerName(options, req); } const name = this.getName(options); options._agentKey = name; debug("createConnection", name, options); options.encoding = null; const oncreate = once((err, s) => { if (err) { return cb(err); } if (!this.sockets[name]) { this.sockets[name] = []; } this.sockets[name].push(s); this.totalSocketCount++; debug("sockets", name, this.sockets[name].length, this.totalSocketCount); installListeners(this, s, options); cb(null, s); }); const newSocket = this.createConnection(options, oncreate); if (newSocket) { oncreate(null, newSocket); } }; function calculateServerName(options, req) { let servername = options.host; const hostHeader = req.getHeader("host"); if (hostHeader) { validateString(hostHeader, "options.headers.host"); // abc => abc // abc:123 => abc // [::1] => ::1 // [::1]:123 => ::1 if (hostHeader.startsWith("[")) { const index = hostHeader.indexOf("]"); if (index === -1) { // Leading '[', but no ']'. Need to do something... servername = hostHeader; } else { servername = hostHeader.slice(1, index); } } else { servername = hostHeader.split(":", 1)[0]; } } // Don't implicitly set invalid (IP) servernames. if (net.isIP(servername)) { servername = ""; } return servername; } function installListeners(agent, s, options) { function onFree() { debug("CLIENT socket onFree"); agent.emit("free", s, options); } s.on("free", onFree); function onClose(_err) { debug("CLIENT socket onClose"); // This is the only place where sockets get removed from the Agent. // If you want to remove a socket from the pool, just close it. // All socket errors end in a close event anyway. agent.totalSocketCount--; agent.removeSocket(s, options); } s.on("close", onClose); function onTimeout() { debug("CLIENT socket onTimeout"); // Destroy if in free list. // TODO(ronag): Always destroy, even if not in free list. const sockets = agent.freeSockets; if (Object.keys(sockets).some((name) => sockets[name].includes(s))) { return s.destroy(); } } s.on("timeout", onTimeout); function onRemove() { // We need this function for cases like HTTP 'upgrade' // (defined by WebSockets) where we need to remove a socket from the // pool because it'll be locked up indefinitely debug("CLIENT socket onRemove"); agent.totalSocketCount--; agent.removeSocket(s, options); s.removeListener("close", onClose); s.removeListener("free", onFree); s.removeListener("timeout", onTimeout); s.removeListener("agentRemove", onRemove); } s.on("agentRemove", onRemove); if (agent[kOnKeylog]) { s.on("keylog", agent[kOnKeylog]); } } Agent.prototype.removeSocket = function removeSocket(s, options) { const name = this.getName(options); debug("removeSocket", name, "writable:", s.writable); const sets = [this.sockets]; // If the socket was destroyed, remove it from the free buffers too. if (!s.writable) { sets.push(this.freeSockets); } for (let sk = 0; sk < sets.length; sk++) { const sockets = sets[sk]; if (sockets[name]) { const index = sockets[name].indexOf(s); if (index !== -1) { sockets[name].splice(index, 1); // Don't leak if (sockets[name].length === 0) { delete sockets[name]; } } } } let req; if (this.requests[name] && this.requests[name].length) { debug("removeSocket, have a request, make a socket"); req = this.requests[name][0]; } else { // TODO(rickyes): this logic will not be FIFO across origins. // There might be older requests in a different origin, but // if the origin which releases the socket has pending requests // that will be prioritized. const keys = Object.keys(this.requests); for (let i = 0; i < keys.length; i++) { const prop = keys[i]; // Check whether this specific origin is already at maxSockets if (this.sockets[prop] && this.sockets[prop].length) break; debug( "removeSocket, have a request with different origin," + " make a socket", ); req = this.requests[prop][0]; options = req[kRequestOptions]; break; } } if (req && options) { req[kRequestOptions] = undefined; // If we have pending requests and a socket gets closed make a new one this.createSocket(req, options, (err, socket) => { if (err) { req.onSocket(socket, err); } else { socket.emit("free"); } }); } }; Agent.prototype.keepSocketAlive = function keepSocketAlive(socket) { socket.setKeepAlive(true, this.keepAliveMsecs); socket.unref(); const agentTimeout = this.options.timeout || 0; if (socket.timeout !== agentTimeout) { socket.setTimeout(agentTimeout); } return true; }; Agent.prototype.reuseSocket = function reuseSocket(socket, req) { debug("have free socket"); socket.removeListener("error", freeSocketErrorListener); req.reusedSocket = true; socket.ref(); }; Agent.prototype.destroy = function destroy() { const sets = [this.freeSockets, this.sockets]; for (let s = 0; s < sets.length; s++) { const set = sets[s]; const keys = Object.keys(set); for (let v = 0; v < keys.length; v++) { const setName = set[keys[v]]; for (let n = 0; n < setName.length; n++) { setName[n].destroy(); } } } }; function setRequestSocket(agent, req, socket) { req.onSocket(socket); const agentTimeout = agent.options.timeout || 0; if (req.timeout === undefined || req.timeout === agentTimeout) { return; } socket.setTimeout(req.timeout); } function asyncResetHandle(socket) { // Guard against an uninitialized or user supplied Socket. const handle = socket._handle; if (handle && typeof handle.asyncReset === "function") { // Assign the handle a new asyncId and run any destroy()/init() hooks. handle.asyncReset(new ReusedHandle(handle.getProviderType(), handle)); socket[async_id_symbol] = handle.getAsyncId(); } } export const globalAgent = new Agent(); export default { Agent, globalAgent, }; Qd~(ext:deno_node/_http_agent.mjsa b:D`xM` T `La-` T  I`: !Sb1 %     "   ˜   " l?????????????Ib;`(L` b% ]`"]`Cb ]`k]`ˆ ]` ]`" ]`" ]`G],L` ` L`B ` L`B ¡ ` L`¡  L`  D% Dc,L`  DB B c D" " c D c1= D  c[c DBBc D""c  D  c  D" " c, D  c0>`  a? a?B a?"a?" a?Ba? a?" a? a?B a?¡ a?a?b @ T I`b +,@@ ቗b@ T  I`%z(˜ b@ TI`($.d QR@RT@UW@W[@  b@ T I`89 b@ T I`9;;" b@L` T`L`#0SbbqA `?B `DaQ< 1 “ /I)"n  " M5bNB Nb  bOO"   `M`bP  B" PB "Q T I`; IbKbc  `D( %0r0 i0-^ P22 ~ 9h 2 -2! - ^2 ! - ^2 ! - ^2 -"-$ 2&-(-*2,-.-0 0-224-6-8 2:-<->2@-B-D2F 2H0-J{L%`M-O\0-QcS-U pW!X-Z-\^^0-` ib !d2f-h Â!_j-l" _n0jp`& @ ,P,P,P 0 h@` @b@ca  b T  I`IቔbK"   b    `T ``/ `/ `?  `  aaD] ` aj] T  I`_" b  B   T I`b b b  T I`!— b —  T I` "%™ b ™  T I`Z.T5B bB  T I`5v6 b  T I`6?7 b  T I`l78 b  bB C¡ CB ¡   щ`D0h %%%%%% % % % % %%ei e% h  0   c%0 -%!b%!b%!b %e+ % ! -0-0-_! -00_0!20--20-Ă2 0-Ă 2"0-Ă 2!$0-Ă" 2#&0-Ă$ 2%(0-Ă& 2'*0-Ă(2),0i.1~*0)03+103,3 1 e5`@P@,P , , ,@bAىDMDɊъDيDYaDDmuD`RD]DH .Q.t*]// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { getDefaultHighWaterMark } from "ext:deno_node/internal/streams/state.mjs"; import assert from "ext:deno_node/internal/assert.mjs"; import EE from "node:events"; import { Stream } from "node:stream"; import { deprecate } from "node:util"; import { kNeedDrain, kOutHeaders, utcDate } from "ext:deno_node/internal/http.ts"; import { notImplemented } from "ext:deno_node/_utils.ts"; import { Buffer } from "node:buffer"; import { _checkInvalidHeaderChar as checkInvalidHeaderChar, _checkIsHttpToken as checkIsHttpToken, chunkExpression as RE_TE_CHUNKED } from "ext:deno_node/_http_common.ts"; import { defaultTriggerAsyncIdScope, symbols } from "ext:deno_node/internal/async_hooks.ts"; const { async_id_symbol } = symbols; import { ERR_HTTP_HEADERS_SENT, ERR_HTTP_INVALID_HEADER_VALUE, ERR_HTTP_TRAILER_INVALID, ERR_INVALID_ARG_TYPE, // ERR_INVALID_ARG_VALUE, ERR_INVALID_CHAR, ERR_INVALID_HTTP_TOKEN, ERR_METHOD_NOT_IMPLEMENTED, // ERR_STREAM_ALREADY_FINISHED, ERR_STREAM_CANNOT_PIPE, // ERR_STREAM_DESTROYED, ERR_STREAM_NULL_VALUES, // ERR_STREAM_WRITE_AFTER_END, hideStackFrames } from "ext:deno_node/internal/errors.ts"; import { validateString } from "ext:deno_node/internal/validators.mjs"; import { isUint8Array } from "ext:deno_node/internal/util/types.ts"; // import { kStreamBaseField } from "ext:deno_node/internal_binding/stream_wrap.ts"; import { debuglog } from "ext:deno_node/internal/util/debuglog.ts"; let debug = debuglog("http", (fn)=>{ debug = fn; }); const HIGH_WATER_MARK = getDefaultHighWaterMark(); const kCorked = Symbol("corked"); const nop = ()=>{}; const RE_CONN_CLOSE = /(?:^|\W)close(?:$|\W)/i; export class OutgoingMessage extends Stream { // deno-lint-ignore no-explicit-any outputData; outputSize; writable; destroyed; _last; chunkedEncoding; shouldKeepAlive; maxRequestsOnConnectionReached; _defaultKeepAlive; useChunkedEncodingByDefault; sendDate; _removedConnection; _removedContLen; _removedTE; _contentLength; _hasBody; _trailer; [kNeedDrain]; finished; _headerSent; [kCorked]; _closed; // TODO(crowlKats): use it socket; _header; [kOutHeaders]; _keepAliveTimeout; _onPendingData; constructor(){ super(); // Queue that holds all currently pending data, until the response will be // assigned to the socket (until it will its turn in the HTTP pipeline). this.outputData = []; // `outputSize` is an approximate measure of how much data is queued on this // response. `_onPendingData` will be invoked to update similar global // per-connection counter. That counter will be used to pause/unpause the // TCP socket and HTTP Parser and thus handle the backpressure. this.outputSize = 0; this.writable = true; this.destroyed = false; this._last = false; this.chunkedEncoding = false; this.shouldKeepAlive = true; this.maxRequestsOnConnectionReached = false; this._defaultKeepAlive = true; this.useChunkedEncodingByDefault = true; this.sendDate = false; this._removedConnection = false; this._removedContLen = false; this._removedTE = false; this._contentLength = null; this._hasBody = true; this._trailer = ""; this[kNeedDrain] = false; this.finished = false; this._headerSent = false; this[kCorked] = 0; this._closed = false; this.socket = null; this._header = null; this[kOutHeaders] = null; this._keepAliveTimeout = 0; this._onPendingData = nop; } get writableFinished() { return this.finished && this.outputSize === 0 && (!this.socket || this.socket.writableLength === 0); } get writableObjectMode() { return false; } get writableLength() { return this.outputSize + (this.socket ? this.socket.writableLength : 0); } get writableHighWaterMark() { return this.socket ? this.socket.writableHighWaterMark : HIGH_WATER_MARK; } get writableCorked() { const corked = this.socket ? this.socket.writableCorked : 0; return corked + this[kCorked]; } get connection() { return this.socket; } set connection(val) { this.socket = val; } get writableEnded() { return this.finished; } get writableNeedDrain() { return !this.destroyed && !this.finished && this[kNeedDrain]; } cork() { if (this.socket) { this.socket.cork(); } else { this[kCorked]++; } } uncork() { if (this.socket) { this.socket.uncork(); } else if (this[kCorked]) { this[kCorked]--; } } setTimeout(msecs, callback) { if (callback) { this.on("timeout", callback); } if (!this.socket) { // deno-lint-ignore no-explicit-any this.once("socket", function socketSetTimeoutOnConnect(socket) { socket.setTimeout(msecs); }); } else { this.socket.setTimeout(msecs); } return this; } // It's possible that the socket will be destroyed, and removed from // any messages, before ever calling this. In that case, just skip // it, since something else is destroying this connection anyway. destroy(error) { if (this.destroyed) { return this; } this.destroyed = true; if (this.socket) { this.socket.destroy(error); } else { // deno-lint-ignore no-explicit-any this.once("socket", function socketDestroyOnConnect(socket) { socket.destroy(error); }); } return this; } setHeader(name, value) { if (this._header) { throw new ERR_HTTP_HEADERS_SENT("set"); } validateHeaderName(name); validateHeaderValue(name, value); let headers = this[kOutHeaders]; if (headers === null) { this[kOutHeaders] = headers = Object.create(null); } name = name.toString(); headers[name.toLowerCase()] = [ name, String(value) ]; return this; } appendHeader(name, value) { if (this._header) { throw new ERR_HTTP_HEADERS_SENT("append"); } validateHeaderName(name); validateHeaderValue(name, value); name = name.toString(); const field = name.toLowerCase(); const headers = this[kOutHeaders]; if (headers === null || !headers[field]) { return this.setHeader(name, value); } // Prepare the field for appending, if required if (!Array.isArray(headers[field][1])) { headers[field][1] = [ headers[field][1] ]; } const existingValues = headers[field][1]; if (Array.isArray(value)) { for(let i = 0, length = value.length; i < length; i++){ existingValues.push(value[i].toString()); } } else { existingValues.push(value.toString()); } return this; } // Returns a shallow copy of the current outgoing headers. getHeaders() { const headers = this[kOutHeaders]; const ret = Object.create(null); if (headers) { const keys = Object.keys(headers); // Retain for(;;) loop for performance reasons // Refs: https://github.com/nodejs/node/pull/30958 for(let i = 0; i < keys.length; ++i){ const key = keys[i]; const val = headers[key][1]; ret[key] = val; } } return ret; } hasHeader(name) { validateString(name, "name"); return this[kOutHeaders] !== null && !!this[kOutHeaders][name.toLowerCase()]; } removeHeader(name) { validateString(name, "name"); if (this._header) { throw new ERR_HTTP_HEADERS_SENT("remove"); } const key = name.toLowerCase(); switch(key){ case "connection": this._removedConnection = true; break; case "content-length": this._removedContLen = true; break; case "transfer-encoding": this._removedTE = true; break; case "date": this.sendDate = false; break; } if (this[kOutHeaders] !== null) { delete this[kOutHeaders][key]; } } getHeader(name) { validateString(name, "name"); const headers = this[kOutHeaders]; if (headers === null) { return; } const entry = headers[name.toLowerCase()]; return entry && entry[1]; } // Returns an array of the names of the current outgoing headers. getHeaderNames() { return this[kOutHeaders] !== null ? Object.keys(this[kOutHeaders]) : []; } // Returns an array of the names of the current outgoing raw headers. getRawHeaderNames() { const headersMap = this[kOutHeaders]; if (headersMap === null) return []; const values = Object.values(headersMap); const headers = Array(values.length); // Retain for(;;) loop for performance reasons // Refs: https://github.com/nodejs/node/pull/30958 for(let i = 0, l = values.length; i < l; i++){ // deno-lint-ignore no-explicit-any headers[i] = values[i][0]; } return headers; } write(chunk, encoding, callback) { if (typeof encoding === "function") { callback = encoding; encoding = null; } return this.write_(chunk, encoding, callback, false); } write_(chunk, encoding, callback, fromEnd) { // Ignore lint to keep the code as similar to Nodejs as possible // deno-lint-ignore no-this-alias const msg = this; if (chunk === null) { throw new ERR_STREAM_NULL_VALUES(); } else if (typeof chunk !== "string" && !isUint8Array(chunk)) { throw new ERR_INVALID_ARG_TYPE("chunk", [ "string", "Buffer", "Uint8Array" ], chunk); } let len; if (!msg._header) { if (fromEnd) { len ??= typeof chunk === "string" ? Buffer.byteLength(chunk, encoding) : chunk.byteLength; msg._contentLength = len; } msg._implicitHeader(); } return msg._send(chunk, encoding, callback); } // deno-lint-ignore no-explicit-any addTrailers(_headers) { // TODO(crowlKats): finish it notImplemented("OutgoingMessage.addTrailers"); } // deno-lint-ignore no-explicit-any end(_chunk, _encoding, _callback) { notImplemented("OutgoingMessage.end"); } flushHeaders() { if (!this._header) { this._implicitHeader(); } // Force-flush the headers. this._send(""); } pipe() { // OutgoingMessage should be write-only. Piping from it is disabled. this.emit("error", new ERR_STREAM_CANNOT_PIPE()); } _implicitHeader() { throw new ERR_METHOD_NOT_IMPLEMENTED("_implicitHeader()"); } _finish() { assert(this.socket); this.emit("prefinish"); } // This logic is probably a bit confusing. Let me explain a bit: // // In both HTTP servers and clients it is possible to queue up several // outgoing messages. This is easiest to imagine in the case of a client. // Take the following situation: // // req1 = client.request('GET', '/'); // req2 = client.request('POST', '/'); // // When the user does // // req2.write('hello world\n'); // // it's possible that the first request has not been completely flushed to // the socket yet. Thus the outgoing messages need to be prepared to queue // up data internally before sending it on further to the socket's queue. // // This function, outgoingFlush(), is called by both the Server and Client // to attempt to flush any pending messages out to the socket. _flush() { const socket = this.socket; if (socket && socket.writable) { // There might be remaining data in this.output; write it out const ret = this._flushOutput(socket); if (this.finished) { // This is a queue to the server or client to bring in the next this. this._finish(); } else if (ret && this[kNeedDrain]) { this[kNeedDrain] = false; this.emit("drain"); } } } _flushOutput(socket) { while(this[kCorked]){ this[kCorked]--; socket.cork(); } const outputLength = this.outputData.length; if (outputLength <= 0) { return undefined; } const outputData = this.outputData; socket.cork(); let ret; // Retain for(;;) loop for performance reasons // Refs: https://github.com/nodejs/node/pull/30958 for(let i = 0; i < outputLength; i++){ const { data, encoding, callback } = outputData[i]; ret = socket.write(data, encoding, callback); } socket.uncork(); this.outputData = []; this._onPendingData(-this.outputSize); this.outputSize = 0; return ret; } // deno-lint-ignore no-explicit-any _send(data, encoding, callback) { if (!this._headerSent && this._header !== null) { this._writeHeader(); this._headerSent = true; } return this._writeRaw(data, encoding, callback); } _writeHeader() { throw new ERR_METHOD_NOT_IMPLEMENTED("_writeHeader()"); } _writeRaw(// deno-lint-ignore no-explicit-any data, encoding, callback) { if (typeof data === "string") { data = Buffer.from(data, encoding); } if (data instanceof Buffer) { data = new Uint8Array(data.buffer); } if (data.buffer.byteLength > 0) { this._bodyWriter.write(data).then(()=>{ callback?.(); this.emit("drain"); }).catch((e)=>{ this._requestSendError = e; }); } return false; } _renderHeaders() { if (this._header) { throw new ERR_HTTP_HEADERS_SENT("render"); } const headersMap = this[kOutHeaders]; // deno-lint-ignore no-explicit-any const headers = {}; if (headersMap !== null) { const keys = Object.keys(headersMap); // Retain for(;;) loop for performance reasons // Refs: https://github.com/nodejs/node/pull/30958 for(let i = 0, l = keys.length; i < l; i++){ const key = keys[i]; headers[headersMap[key][0]] = headersMap[key][1]; } } return headers; } _storeHeader(firstLine, _headers) { // firstLine in the case of request is: 'GET /index.html HTTP/1.1\r\n' // in the case of response it is: 'HTTP/1.1 200 OK\r\n' const state = { connection: false, contLen: false, te: false, date: false, expect: false, trailer: false, header: firstLine }; const headers = this[kOutHeaders]; if (headers) { // headers is null-prototype object, so ignore the guard lint // deno-lint-ignore guard-for-in for(const key in headers){ const entry = headers[key]; this._matchHeader(state, entry[0], entry[1]); } } // Date header if (this.sendDate && !state.date) { this.setHeader("Date", utcDate()); } // Force the connection to close when the response is a 204 No Content or // a 304 Not Modified and the user has set a "Transfer-Encoding: chunked" // header. // // RFC 2616 mandates that 204 and 304 responses MUST NOT have a body but // node.js used to send out a zero chunk anyway to accommodate clients // that don't have special handling for those responses. // // It was pointed out that this might confuse reverse proxies to the point // of creating security liabilities, so suppress the zero chunk and force // the connection to close. if (this.chunkedEncoding && (this.statusCode === 204 || this.statusCode === 304)) { debug(this.statusCode + " response should not use chunked encoding," + " closing connection."); this.chunkedEncoding = false; this.shouldKeepAlive = false; } // TODO(osddeitf): this depends on agent and underlying socket // keep-alive logic // if (this._removedConnection) { // this._last = true; // this.shouldKeepAlive = false; // } else if (!state.connection) { // const shouldSendKeepAlive = this.shouldKeepAlive && // (state.contLen || this.useChunkedEncodingByDefault || this.agent); // if (shouldSendKeepAlive && this.maxRequestsOnConnectionReached) { // this.setHeader('Connection', 'close'); // } else if (shouldSendKeepAlive) { // this.setHeader('Connection', 'keep-alive'); // if (this._keepAliveTimeout && this._defaultKeepAlive) { // const timeoutSeconds = Math.floor(this._keepAliveTimeout / 1000); // let max = ''; // if (~~this._maxRequestsPerSocket > 0) { // max = `, max=${this._maxRequestsPerSocket}`; // } // this.setHeader('Keep-Alive', `timeout=${timeoutSeconds}${max}`); // } // } else { // this._last = true; // this.setHeader('Connection', 'close'); // } // } if (!state.contLen && !state.te) { if (!this._hasBody) { // Make sure we don't end the 0\r\n\r\n at the end of the message. this.chunkedEncoding = false; } else if (!this.useChunkedEncodingByDefault) { this._last = true; } else if (!state.trailer && !this._removedContLen && typeof this._contentLength === "number") { this.setHeader("Content-Length", this._contentLength); } else if (!this._removedTE) { this.setHeader("Transfer-Encoding", "chunked"); this.chunkedEncoding = true; } else { // We should only be able to get here if both Content-Length and // Transfer-Encoding are removed by the user. // See: test/parallel/test-http-remove-header-stays-removed.js debug("Both Content-Length and Transfer-Encoding are removed"); } } // Test non-chunked message does not have trailer header set, // message will be terminated by the first empty line after the // header fields, regardless of the header fields present in the // message, and thus cannot contain a message body or 'trailers'. if (this.chunkedEncoding !== true && state.trailer) { throw new ERR_HTTP_TRAILER_INVALID(); } const { header } = state; this._header = header + "\r\n"; this._headerSent = false; // Wait until the first body chunk, or close(), is sent to flush, // UNLESS we're sending Expect: 100-continue. if (state.expect) this._send(""); } _matchHeader(// deno-lint-ignore no-explicit-any state, field, // deno-lint-ignore no-explicit-any value) { // Ignore lint to keep the code as similar to Nodejs as possible // deno-lint-ignore no-this-alias const self = this; if (field.length < 4 || field.length > 17) { return; } field = field.toLowerCase(); switch(field){ case "connection": state.connection = true; self._removedConnection = false; if (RE_CONN_CLOSE.exec(value) !== null) { self._last = true; } else { self.shouldKeepAlive = true; } break; case "transfer-encoding": state.te = true; self._removedTE = false; if (RE_TE_CHUNKED.exec(value) !== null) { self.chunkedEncoding = true; } break; case "content-length": state.contLen = true; self._contentLength = value; self._removedContLen = false; break; case "date": case "expect": case "trailer": state[field] = true; break; case "keep-alive": self._defaultKeepAlive = false; break; } } // deno-lint-ignore no-explicit-any [EE.captureRejectionSymbol](err, _event) { this.destroy(err); } } Object.defineProperty(OutgoingMessage.prototype, "_headers", { get: deprecate(// deno-lint-ignore no-explicit-any function() { return this.getHeaders(); }, "OutgoingMessage.prototype._headers is deprecated", "DEP0066"), set: deprecate(// deno-lint-ignore no-explicit-any function(val) { if (val == null) { this[kOutHeaders] = null; } else if (typeof val === "object") { const headers = this[kOutHeaders] = Object.create(null); const keys = Object.keys(val); // Retain for(;;) loop for performance reasons // Refs: https://github.com/nodejs/node/pull/30958 for(let i = 0; i < keys.length; ++i){ const name = keys[i]; headers[name.toLowerCase()] = [ name, val[name] ]; } } }, "OutgoingMessage.prototype._headers is deprecated", "DEP0066") }); Object.defineProperty(OutgoingMessage.prototype, "_headerNames", { get: deprecate(// deno-lint-ignore no-explicit-any function() { const headers = this[kOutHeaders]; if (headers !== null) { const out = Object.create(null); const keys = Object.keys(headers); // Retain for(;;) loop for performance reasons // Refs: https://github.com/nodejs/node/pull/30958 for(let i = 0; i < keys.length; ++i){ const key = keys[i]; const val = headers[key][0]; out[key] = val; } return out; } return null; }, "OutgoingMessage.prototype._headerNames is deprecated", "DEP0066"), set: deprecate(// deno-lint-ignore no-explicit-any function(val) { if (typeof val === "object" && val !== null) { const headers = this[kOutHeaders]; if (!headers) { return; } const keys = Object.keys(val); // Retain for(;;) loop for performance reasons // Refs: https://github.com/nodejs/node/pull/30958 for(let i = 0; i < keys.length; ++i){ const header = headers[keys[i]]; if (header) { header[0] = val[keys[i]]; } } } }, "OutgoingMessage.prototype._headerNames is deprecated", "DEP0066") }); export const validateHeaderName = hideStackFrames((name)=>{ if (typeof name !== "string" || !name || !checkIsHttpToken(name)) { throw new ERR_INVALID_HTTP_TOKEN("Header name", name); } }); export const validateHeaderValue = hideStackFrames((name, value)=>{ if (value === undefined) { throw new ERR_HTTP_INVALID_HEADER_VALUE(value, name); } if (checkInvalidHeaderChar(value)) { debug('Header "%s" contains invalid characters', name); throw new ERR_INVALID_CHAR("header content", name); } }); export function parseUniqueHeadersOption(headers) { if (!Array.isArray(headers)) { return null; } const unique = new Set(); const l = headers.length; for(let i = 0; i < l; i++){ unique.add(headers[i].toLowerCasee()); } return unique; } Object.defineProperty(OutgoingMessage.prototype, "headersSent", { configurable: true, enumerable: true, get: function() { return !!this._header; } }); // TODO(bartlomieju): use it // deno-lint-ignore camelcase const _crlf_buf = Buffer.from("\r\n"); // TODO(bartlomieju): use it // deno-lint-ignore no-explicit-any function _onError(msg, err, callback) { const triggerAsyncId = msg.socket ? msg.socket[async_id_symbol] : undefined; defaultTriggerAsyncIdScope(triggerAsyncId, // deno-lint-ignore no-explicit-any globalThis.process.nextTick, emitErrorNt, msg, err, callback); } // deno-lint-ignore no-explicit-any function emitErrorNt(msg, err, callback) { callback(err); if (typeof msg.emit === "function" && !msg._closed) { msg.emit("error", err); } } // TODO(bartlomieju): use it function _write_(// deno-lint-ignore no-explicit-any _msg, // deno-lint-ignore no-explicit-any _chunk, _encoding, // deno-lint-ignore no-explicit-any _callback, // deno-lint-ignore no-explicit-any _fromEnd) { // TODO(crowlKats): finish } // TODO(bartlomieju): use it // deno-lint-ignore no-explicit-any function _connectionCorkNT(conn) { conn.uncork(); } // TODO(bartlomieju): use it // deno-lint-ignore no-explicit-any function _onFinish(outmsg) { if (outmsg && outmsg.socket && outmsg.socket._hadError) return; outmsg.emit("finish"); } export default { validateHeaderName, validateHeaderValue, parseUniqueHeadersOption, OutgoingMessage }; QdBext:deno_node/_http_outgoing.tsa b;D`M`< T` LabM T  I`XYB Sb1   B  " f???????Ib*]`@L`  ]`/ ]`n"]`/ ]`: ]` ]`/ ]`pb]` ]`<ˆ ]` ]`M" ]`" ]`b ]`l]DL`` L`¶ ` L`¶ B ` L`B  ` L` b ` L`b ]xL`  D"{ "{ c D£ c Db b c  D  c  D­ ­ c 6 Db b c 8L D  c hx D  c z D" " c  D  c  D  c  Db  c# D" " c D cbh D"  c Db ¨ c D  c \d D  c f D  c DB B c' D" " c 6E D  c  D  c D  c Db b cZh D""c  D  c ' D  c z`!B a?a?£ a?" a? a? a? a? a?b a?"{ a?" a?b a?b a? a?"a?b a? a?­ a?b a? a? a?" a? a? a?" a? a? a? a?¶ a? a?b a?B a?a? b@7 T I`Y}Z" 1b@8 T  I`Z[ b@9 T I`[[ b@: T I`S\\b b@;$Lc T I`VrWB b!@5b6a "  b T I`IbKB    T B `/5B bK" 4Sb @md???n3L  `-T ``/ `/ `?  `  an3LD]!f%@3 a"  } `F`   `F`  a  a&,D a$*Dna#D a(.  `F` B aD  ` F`  aD aD aD" a"(D"aD ah ` F` DB a'-D aB a &D a#)"  ` F` B a*0ba!Ba$"a a%aD  `F`  a!'" a a `  a" ab a%+B a)/HcD La"  T  I` ¶ = b Ճ   T I`.Qcget writableFinishedb T I`GaQcget writableObjectModeb T I`vQcget writableLengthb T I`=Qdget writableHighWaterMarkb T I`RQcget writableCorkedb T I`Qbget connectionb  T I`"Qbset connectionb  T I`6XQcget writableEndedb  T I`pQcget writableNeedDrainb  T I`$ b  T I`-" b T I`b ''@"b  TI`/b +,@ b T I`;B b  T I`b  T I`Z b  T I` b  T I` b  T I` "b  T I`!Y! b T I`!i# b T I`q#.$bb T I`7$' b T I`9''nb  T I`'(Bb T I`((( b  T I`(/)B b  T I`A)) b! T I`))" b" T I`,. b# T I`.X1 b $ T I`1Q2b b% T I``22 b & T I`2~4B b ' T I`46 b* T I`6.GB b + T I`=GKB b ,£   T I`L1L`b- Tl`hL`B · B ¸ "  "   B  B ½ B ¾ "  bB b    `(Kh@< 8 8 0 4 $ L L  T | 0 X L 8 H 04 < 0@ 0  (0 @ T Еt333333 3 333 3 3 3 3 333 5"3$3&5(3*3,3.503234(Sbqq¶ `Da3L=e6 0 0 0 0 0 0 0 0 0 b. "/ bCC  T  I`LLI1 b@/b b  T I`YMFOIb@0  bCC T I` PQIb@1B  T I`RR!TIb@2"  T I`T,UIbK3 T I`bUnVIbK4B (bGGC T y``` Qa.get`WX1 b@6"{ e0b Cb CB C¶ C b B ¶   !`Dh %%%%%%Ă% ‚ei h  0 - %0  c%0a%!b%%z %%%%00t%t%0t%      !"#$߂%ނ&݂'܂(ۂ)ڂ*ق+؂,ׂ-ւ.Ղ/Ԃ0ӂ1 ҂2!т3"Ђ4#ς5$΂6%͂7&̂8'˂9(ʂ:)ɂ;*Ȃ<+ǂ=,0>-? tł@-e+-A.2B  1!C-D0-EF~G)0HI/JK`3L0M0JK`3N\!C-D0-EO~P )0Q1RK`!3L#0S2RK`%3N'\)0TU3b+10V4b-1!C-D0-EW~X/)Y53L0\20Z-[4\^6~]8)03^903_;03`=03a? 1  fA7@0 ` I L& PLbA-5yɌՌD D%-5=EMU]emu}Dō͍Սݍ!)%5) D`RD]DH QVF 8H// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file import { Duplex } from "ext:deno_node/_stream.mjs"; const { from, fromWeb, toWeb } = Duplex; export default Duplex; export { from, fromWeb, toWeb };  Qf)ext:deno_node/internal/streams/duplex.mjsa b<D` M` TP`[(La!Lda B eb    m`Dm h ei h  0-1-1-101 dSb1IbH` L`  ]`]8L` ` L`` L`b ` L`b  ` L` ] L`  DB B c`B a?ea?b a? a?a? aPYbAD`RD]DH Q"^// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file import { PassThrough } from "ext:deno_node/_stream.mjs"; export default PassThrough;  Qf^F.ext:deno_node/internal/streams/passthrough.mjsa b=D` M` TD`BLa! Laa "   `Dj h ei h  01 @Sb1Ib` L`  ]`]L`` L`] L`  D" " c`" a?a? bAD`RD]DH QrDΎ// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file import { Readable } from "ext:deno_node/_stream.mjs"; const { ReadableState, _fromList, from, fromWeb, toWeb, wrap } = Readable; export default Readable; export { _fromList, from, fromWeb, ReadableState, toWeb, wrap };  Qf+ext:deno_node/internal/streams/readable.mjsa b>D` M` TX`p4La !$Lga    eb  v   `Do h ei h  0-1-1-1-1- 1- 101 Sb1Ib` L`  ]`]\L`` L` ` L`  ` L` ` L`b ` L`b  ` L` v ` L`v ] L`  D  c` a? a? a?ea?b a? a?v a?a? a PPbAD`RD]DH Qr// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file import { Transform } from "ext:deno_node/_stream.mjs"; export default Transform;  Qfs,ext:deno_node/internal/streams/transform.mjsa b?D` M` TD`BLa! Laa    e`Dj h ei h  01 @Sb1Ib` L`  ]`]L`` L`] L`  D  c` a?a? QbAD`RD]DH Q `// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file import { Writable } from "ext:deno_node/_stream.mjs"; const { WritableState, fromWeb, toWeb } = Writable; export default Writable; export { fromWeb, toWeb, WritableState };  QfvH+ext:deno_node/internal/streams/writable.mjsa b@D` M` TP`[(La!Lda   b    `Dm h ei h  0-1-1-101 dSb1Ib`` L`  ]`]8L` ` L` ` L` b ` L`b  ` L` ] L`  D  c` a? a?b a? a?a? aPbAD`RD]DH &Q&J7M// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file ban-types prefer-primordials import { AssertionError } from "ext:deno_node/assertion_error.ts"; import * as asserts from "ext:deno_node/_util/std_asserts.ts"; import { inspect } from "node:util"; import { ERR_AMBIGUOUS_ARGUMENT, ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, ERR_INVALID_RETURN_VALUE, ERR_MISSING_ARGS } from "ext:deno_node/internal/errors.ts"; import { isDeepEqual } from "ext:deno_node/internal/util/comparisons.ts"; function innerFail(obj) { if (obj.message instanceof Error) { throw obj.message; } throw new AssertionError({ actual: obj.actual, expected: obj.expected, message: obj.message, operator: obj.operator }); } // TODO(uki00a): This function is a workaround for setting the `generatedMessage` property flexibly. function createAssertionError(options) { const error = new AssertionError(options); if (options.generatedMessage) { error.generatedMessage = true; } return error; } /** Converts the std assertion error to node.js assertion error */ function toNode(fn, opts) { const { operator, message, actual, expected } = opts || {}; try { fn(); } catch (e) { if (e instanceof asserts.AssertionError) { if (typeof message === "string") { throw new AssertionError({ operator, message, actual, expected }); } else if (message instanceof Error) { throw message; } else { throw new AssertionError({ operator, message: e.message, actual, expected }); } } throw e; } } function assert(actual, message) { if (arguments.length === 0) { throw new AssertionError({ message: "No value argument passed to `assert.ok()`" }); } toNode(()=>asserts.assert(actual), { message, actual, expected: true }); } const ok = assert; function throws(fn, error, message) { // Check arg types if (typeof fn !== "function") { throw new ERR_INVALID_ARG_TYPE("fn", "function", fn); } if (typeof error === "object" && error !== null && Object.getPrototypeOf(error) === Object.prototype && Object.keys(error).length === 0) { // error is an empty object throw new ERR_INVALID_ARG_VALUE("error", error, "may not be an empty object"); } if (typeof message === "string") { if (!(error instanceof RegExp) && typeof error !== "function" && !(error instanceof Error) && typeof error !== "object") { throw new ERR_INVALID_ARG_TYPE("error", [ "Function", "Error", "RegExp", "Object" ], error); } } else { if (typeof error !== "undefined" && typeof error !== "string" && !(error instanceof RegExp) && typeof error !== "function" && !(error instanceof Error) && typeof error !== "object") { throw new ERR_INVALID_ARG_TYPE("error", [ "Function", "Error", "RegExp", "Object" ], error); } } // Checks test function try { fn(); } catch (e) { if (validateThrownError(e, error, message, { operator: throws })) { return; } } if (message) { let msg = `Missing expected exception: ${message}`; if (typeof error === "function" && error?.name) { msg = `Missing expected exception (${error.name}): ${message}`; } throw new AssertionError({ message: msg, operator: "throws", actual: undefined, expected: error }); } else if (typeof error === "string") { // Use case of throws(fn, message) throw new AssertionError({ message: `Missing expected exception: ${error}`, operator: "throws", actual: undefined, expected: undefined }); } else if (typeof error === "function" && error?.prototype !== undefined) { throw new AssertionError({ message: `Missing expected exception (${error.name}).`, operator: "throws", actual: undefined, expected: error }); } else { throw new AssertionError({ message: "Missing expected exception.", operator: "throws", actual: undefined, expected: error }); } } function doesNotThrow(fn, expected, message) { // Check arg type if (typeof fn !== "function") { throw new ERR_INVALID_ARG_TYPE("fn", "function", fn); } else if (!(expected instanceof RegExp) && typeof expected !== "function" && typeof expected !== "string" && typeof expected !== "undefined") { throw new ERR_INVALID_ARG_TYPE("expected", [ "Function", "RegExp" ], fn); } // Checks test function try { fn(); } catch (e) { gotUnwantedException(e, expected, message, doesNotThrow); } } function equal(actual, expected, message) { if (arguments.length < 2) { throw new ERR_MISSING_ARGS("actual", "expected"); } if (actual == expected) { return; } if (Number.isNaN(actual) && Number.isNaN(expected)) { return; } if (typeof message === "string") { throw new AssertionError({ message }); } else if (message instanceof Error) { throw message; } toNode(()=>asserts.assertStrictEquals(actual, expected), { message: message || `${actual} == ${expected}`, operator: "==", actual, expected }); } function notEqual(actual, expected, message) { if (arguments.length < 2) { throw new ERR_MISSING_ARGS("actual", "expected"); } if (Number.isNaN(actual) && Number.isNaN(expected)) { throw new AssertionError({ message: `${actual} != ${expected}`, operator: "!=", actual, expected }); } if (actual != expected) { return; } if (typeof message === "string") { throw new AssertionError({ message }); } else if (message instanceof Error) { throw message; } toNode(()=>asserts.assertNotStrictEquals(actual, expected), { message: message || `${actual} != ${expected}`, operator: "!=", actual, expected }); } function strictEqual(actual, expected, message) { if (arguments.length < 2) { throw new ERR_MISSING_ARGS("actual", "expected"); } toNode(()=>asserts.assertStrictEquals(actual, expected), { message, operator: "strictEqual", actual, expected }); } function notStrictEqual(actual, expected, message) { if (arguments.length < 2) { throw new ERR_MISSING_ARGS("actual", "expected"); } toNode(()=>asserts.assertNotStrictEquals(actual, expected), { message, actual, expected, operator: "notStrictEqual" }); } function deepEqual(actual, expected, message) { if (arguments.length < 2) { throw new ERR_MISSING_ARGS("actual", "expected"); } if (!isDeepEqual(actual, expected)) { innerFail({ actual, expected, message, operator: "deepEqual" }); } } function notDeepEqual(actual, expected, message) { if (arguments.length < 2) { throw new ERR_MISSING_ARGS("actual", "expected"); } if (isDeepEqual(actual, expected)) { innerFail({ actual, expected, message, operator: "notDeepEqual" }); } } function deepStrictEqual(actual, expected, message) { if (arguments.length < 2) { throw new ERR_MISSING_ARGS("actual", "expected"); } toNode(()=>asserts.assertEquals(actual, expected), { message, actual, expected, operator: "deepStrictEqual" }); } function notDeepStrictEqual(actual, expected, message) { if (arguments.length < 2) { throw new ERR_MISSING_ARGS("actual", "expected"); } toNode(()=>asserts.assertNotEquals(actual, expected), { message, actual, expected, operator: "deepNotStrictEqual" }); } function fail(message) { if (typeof message === "string" || message == null) { throw createAssertionError({ message: message ?? "Failed", operator: "fail", generatedMessage: message == null }); } else { throw message; } } function match(actual, regexp, message) { if (arguments.length < 2) { throw new ERR_MISSING_ARGS("actual", "regexp"); } if (!(regexp instanceof RegExp)) { throw new ERR_INVALID_ARG_TYPE("regexp", "RegExp", regexp); } toNode(()=>asserts.assertMatch(actual, regexp), { message, actual, expected: regexp, operator: "match" }); } function doesNotMatch(string, regexp, message) { if (arguments.length < 2) { throw new ERR_MISSING_ARGS("string", "regexp"); } if (!(regexp instanceof RegExp)) { throw new ERR_INVALID_ARG_TYPE("regexp", "RegExp", regexp); } if (typeof string !== "string") { if (message instanceof Error) { throw message; } throw new AssertionError({ message: message || `The "string" argument must be of type string. Received type ${typeof string} (${inspect(string)})`, actual: string, expected: regexp, operator: "doesNotMatch" }); } toNode(()=>asserts.assertNotMatch(string, regexp), { message, actual: string, expected: regexp, operator: "doesNotMatch" }); } function strict(actual, message) { if (arguments.length === 0) { throw new AssertionError({ message: "No value argument passed to `assert.ok()`" }); } assert(actual, message); } // Intentionally avoid using async/await because test-assert-async.js requires it function rejects(// deno-lint-ignore no-explicit-any asyncFn, error, message) { let promise; if (typeof asyncFn === "function") { try { promise = asyncFn(); } catch (err) { // If `asyncFn` throws an error synchronously, this function returns a rejected promise. return Promise.reject(err); } if (!isValidThenable(promise)) { return Promise.reject(new ERR_INVALID_RETURN_VALUE("instance of Promise", "promiseFn", promise)); } } else if (!isValidThenable(asyncFn)) { return Promise.reject(new ERR_INVALID_ARG_TYPE("promiseFn", [ "function", "Promise" ], asyncFn)); } else { promise = asyncFn; } function onFulfilled() { let message = "Missing expected rejection"; if (typeof error === "string") { message += `: ${error}`; } else if (typeof error === "function" && error.prototype !== undefined) { message += ` (${error.name}).`; } else { message += "."; } return Promise.reject(createAssertionError({ message, operator: "rejects", generatedMessage: true })); } // deno-lint-ignore camelcase function rejects_onRejected(e) { if (validateThrownError(e, error, message, { operator: rejects, validationFunctionName: "validate" })) { return; } } return promise.then(onFulfilled, rejects_onRejected); } // Intentionally avoid using async/await because test-assert-async.js requires it function doesNotReject(// deno-lint-ignore no-explicit-any asyncFn, error, message) { // deno-lint-ignore no-explicit-any let promise; if (typeof asyncFn === "function") { try { const value = asyncFn(); if (!isValidThenable(value)) { return Promise.reject(new ERR_INVALID_RETURN_VALUE("instance of Promise", "promiseFn", value)); } promise = value; } catch (e) { // If `asyncFn` throws an error synchronously, this function returns a rejected promise. return Promise.reject(e); } } else if (!isValidThenable(asyncFn)) { return Promise.reject(new ERR_INVALID_ARG_TYPE("promiseFn", [ "function", "Promise" ], asyncFn)); } else { promise = asyncFn; } return promise.then(()=>{}, (e)=>gotUnwantedException(e, error, message, doesNotReject)); } function gotUnwantedException(// deno-lint-ignore no-explicit-any e, expected, message, operator) { if (typeof expected === "string") { // The use case of doesNotThrow(fn, message); throw new AssertionError({ message: `Got unwanted exception: ${expected}\nActual message: "${e.message}"`, operator: operator.name }); } else if (typeof expected === "function" && expected.prototype !== undefined) { // The use case of doesNotThrow(fn, Error, message); if (e instanceof expected) { let msg = `Got unwanted exception: ${e.constructor?.name}`; if (message) { msg += ` ${String(message)}`; } throw new AssertionError({ message: msg, operator: operator.name }); } else if (expected.prototype instanceof Error) { throw e; } else { const result = expected(e); if (result === true) { let msg = `Got unwanted rejection.\nActual message: "${e.message}"`; if (message) { msg += ` ${String(message)}`; } throw new AssertionError({ message: msg, operator: operator.name }); } } throw e; } else { if (message) { throw new AssertionError({ message: `Got unwanted exception: ${message}\nActual message: "${e ? e.message : String(e)}"`, operator: operator.name }); } throw new AssertionError({ message: `Got unwanted exception.\nActual message: "${e ? e.message : String(e)}"`, operator: operator.name }); } } /** * Throws `value` if the value is not `null` or `undefined`. * * @param err */ // deno-lint-ignore no-explicit-any function ifError(err) { if (err !== null && err !== undefined) { let message = "ifError got unwanted exception: "; if (typeof err === "object" && typeof err.message === "string") { if (err.message.length === 0 && err.constructor) { message += err.constructor.name; } else { message += err.message; } } else { message += inspect(err); } const newErr = new AssertionError({ actual: err, expected: null, operator: "ifError", message, stackStartFn: ifError }); // Make sure we actually have a stack trace! const origStack = err.stack; if (typeof origStack === "string") { // This will remove any duplicated frames from the error frames taken // from within `ifError` and add the original error frames to the newly // created ones. const tmp2 = origStack.split("\n"); tmp2.shift(); // Filter all frames existing in err.stack. let tmp1 = newErr.stack?.split("\n"); for (const errFrame of tmp2){ // Find the first occurrence of the frame. const pos = tmp1?.indexOf(errFrame); if (pos !== -1) { // Only keep new frames. tmp1 = tmp1?.slice(0, pos); break; } } newErr.stack = `${tmp1?.join("\n")}\n${tmp2.join("\n")}`; } throw newErr; } } function validateThrownError(// deno-lint-ignore no-explicit-any e, error, message, options) { if (typeof error === "string") { if (message != null) { throw new ERR_INVALID_ARG_TYPE("error", [ "Object", "Error", "Function", "RegExp" ], error); } else if (typeof e === "object" && e !== null) { if (e.message === error) { throw new ERR_AMBIGUOUS_ARGUMENT("error/message", `The error message "${e.message}" is identical to the message.`); } } else if (e === error) { throw new ERR_AMBIGUOUS_ARGUMENT("error/message", `The error "${e}" is identical to the message.`); } message = error; error = undefined; } if (error instanceof Function && error.prototype !== undefined && error.prototype instanceof Error) { // error is a constructor if (e instanceof error) { return true; } throw createAssertionError({ message: `The error is expected to be an instance of "${error.name}". Received "${e?.constructor?.name}"\n\nError message:\n\n${e?.message}`, actual: e, expected: error, operator: options.operator.name, generatedMessage: true }); } if (error instanceof Function) { const received = error(e); if (received === true) { return true; } throw createAssertionError({ message: `The ${options.validationFunctionName ? `"${options.validationFunctionName}" validation` : "validation"} function is expected to return "true". Received ${inspect(received)}\n\nCaught error:\n\n${e}`, actual: e, expected: error, operator: options.operator.name, generatedMessage: true }); } if (error instanceof RegExp) { if (error.test(String(e))) { return true; } throw createAssertionError({ message: `The input did not match the regular expression ${error.toString()}. Input:\n\n'${String(e)}'\n`, actual: e, expected: error, operator: options.operator.name, generatedMessage: true }); } if (typeof error === "object" && error !== null) { const keys = Object.keys(error); if (error instanceof Error) { keys.push("name", "message"); } for (const k of keys){ if (e == null) { throw createAssertionError({ message: message || "object is expected to thrown, but got null", actual: e, expected: error, operator: options.operator.name, generatedMessage: message == null }); } if (typeof e === "string") { throw createAssertionError({ message: message || `object is expected to thrown, but got string: ${e}`, actual: e, expected: error, operator: options.operator.name, generatedMessage: message == null }); } if (typeof e === "number") { throw createAssertionError({ message: message || `object is expected to thrown, but got number: ${e}`, actual: e, expected: error, operator: options.operator.name, generatedMessage: message == null }); } if (!(k in e)) { throw createAssertionError({ message: message || `A key in the expected object is missing: ${k}`, actual: e, expected: error, operator: options.operator.name, generatedMessage: message == null }); } const actual = e[k]; // deno-lint-ignore no-explicit-any const expected = error[k]; if (typeof actual === "string" && expected instanceof RegExp) { match(actual, expected); } else { deepStrictEqual(actual, expected); } } return true; } if (typeof error === "undefined") { return true; } throw createAssertionError({ message: `Invalid expectation: ${error}`, operator: options.operator.name, generatedMessage: true }); } // deno-lint-ignore no-explicit-any function isValidThenable(maybeThennable) { if (!maybeThennable) { return false; } if (maybeThennable instanceof Promise) { return true; } const isThenable = typeof maybeThennable.then === "function" && typeof maybeThennable.catch === "function"; return isThenable && typeof maybeThennable !== "function"; } Object.assign(strict, { AssertionError, deepEqual: deepStrictEqual, deepStrictEqual, doesNotMatch, doesNotReject, doesNotThrow, equal: strictEqual, fail, ifError, match, notDeepEqual: notDeepStrictEqual, notDeepStrictEqual, notEqual: notStrictEqual, notStrictEqual, ok, rejects, strict, strictEqual, throws }); export default Object.assign(assert, { AssertionError, deepEqual, deepStrictEqual, doesNotMatch, doesNotReject, doesNotThrow, equal, fail, ifError, match, notDeepEqual, notDeepStrictEqual, notEqual, notStrictEqual, ok, rejects, strict, strictEqual, throws }); export { AssertionError, deepEqual, deepStrictEqual, doesNotMatch, doesNotReject, doesNotThrow, equal, fail, ifError, match, notDeepEqual, notDeepStrictEqual, notEqual, notStrictEqual, ok, rejects, strict, strictEqual, throws }; QbVx node:asserta bAD`M`& T`La"U T  I`kAB Sb1" B  b    " g????????IbM`L` b ]` ]` : ]`^ ]`B ]`+ L`  DcL`9` L`b ` L`b b ` L`b  ` L` B ` L`B  ` L`  ` L`  ` L`  `  L` bN`  L`bN `  L`  `  L`  `  L`  ` L` ` L`b ` L`b u` L`b ` L`b  ` L`  L` D" Dc(L` Dc Db b ct Db b c D  c D  c DB B c DcOV D  c#`a?a?b a?b a? a? a?B a? a?a? a? a? a? a ?b a? a?b a? a ?b a? a ? a?bNa ? a?a?b a?B a? a ?a?b@ T  I`W  b@ T I`b b@ T I` b@ T I`-3 b@" T I`9H b@$ T I`7IeJ" b@%La5 T I`  b@a T I` b@a T I` b@a  T I`  b@ a  T I`b b@ a  T I` b@a  T I` b b@a  T I`% b@a  T I`>9b b@a T I`UV b@a  T I`dX b @a T I`g bNb@a  T I` # b@a T I`#e$b@a T I`$*cNR@RS@b b@a T I`*-B b@a T I`I49 b@#b a b&b&Cb Cb C CB C C C C CbNC C C C CCb CuCb C Cb b  B     bN    b b  b&Cb Cb C CB C C C C CbNC C C C CCb CCb C C  `D0h Ƃ%%%%%% % ei e% h   1! - 0~ )030303 03 03 0303030 30 30 30 3030303!03#03%03'03 )_+! - ~!-)03.03003203403603803:03<0 3>0 3@0 3B0 3D0 3F03H03J03L03N03P03 R_T1  (hV0 0 0 0 0 0 0bADDDD D%D-D5=DEDMUDaDɐiѐِD`RD]DH QC// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { strict } from "node:assert"; export { AssertionError, deepEqual, deepStrictEqual, doesNotMatch, doesNotReject, doesNotThrow, equal, fail, ifError, match, notDeepEqual, notDeepStrictEqual, notEqual, notStrictEqual, ok, rejects, strictEqual, throws } from "node:assert"; export { strict }; export default strict; Qcbnode:assert/stricta bBD` M` TD`BLa! Laa u  `Dj h ei h  01 @Sb1Ib` L` ]`bTL`  Dcz b Db c b Db c  D c B DB c  D c  D c  D c  D c bNDbNc  D c  D c  D c  D c( Dc*, b Db c.5 b Db c7B  D cDJ DcTZL`` L`] L` DucTZ`a?a? bAD`RD]DH  Q ^D// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // This implementation is inspired by "workerd" AsyncLocalStorage implementation: // https://github.com/cloudflare/workerd/blob/77fd0ed6ddba184414f0216508fc62b06e716cab/src/workerd/api/node/async-hooks.c++#L9 // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { core } from "ext:core/mod.js"; import { op_node_is_promise_rejected } from "ext:core/ops"; import { validateFunction } from "ext:deno_node/internal/validators.mjs"; function assert(cond) { if (!cond) throw new Error("Assertion failed"); } const asyncContextStack = []; function pushAsyncFrame(frame) { asyncContextStack.push(frame); } function popAsyncFrame() { if (asyncContextStack.length > 0) { asyncContextStack.pop(); } } let rootAsyncFrame = undefined; let promiseHooksSet = false; const asyncContext = Symbol("asyncContext"); function setPromiseHooks() { if (promiseHooksSet) { return; } promiseHooksSet = true; const init = (promise)=>{ const currentFrame = AsyncContextFrame.current(); if (!currentFrame.isRoot()) { if (typeof promise[asyncContext] !== "undefined") { throw new Error("Promise already has async context"); } AsyncContextFrame.attachContext(promise); } }; const before = (promise)=>{ const maybeFrame = promise[asyncContext]; if (maybeFrame) { pushAsyncFrame(maybeFrame); } else { pushAsyncFrame(AsyncContextFrame.getRootAsyncContext()); } }; const after = (promise)=>{ popAsyncFrame(); if (!op_node_is_promise_rejected(promise)) { // @ts-ignore promise async context promise[asyncContext] = undefined; } }; const resolve = (promise)=>{ const currentFrame = AsyncContextFrame.current(); if (!currentFrame.isRoot() && op_node_is_promise_rejected(promise) && typeof promise[asyncContext] === "undefined") { AsyncContextFrame.attachContext(promise); } }; core.setPromiseHooks(init, before, after, resolve); } class AsyncContextFrame { storage; constructor(maybeParent, maybeStorageEntry, isRoot = false){ this.storage = []; setPromiseHooks(); const propagate = (parent)=>{ parent.storage = parent.storage.filter((entry)=>!entry.key.isDead()); parent.storage.forEach((entry)=>this.storage.push(entry.clone())); if (maybeStorageEntry) { const existingEntry = this.storage.find((entry)=>entry.key === maybeStorageEntry.key); if (existingEntry) { existingEntry.value = maybeStorageEntry.value; } else { this.storage.push(maybeStorageEntry); } } }; if (!isRoot) { if (maybeParent) { propagate(maybeParent); } else { propagate(AsyncContextFrame.current()); } } } static tryGetContext(promise) { // @ts-ignore promise async context return promise[asyncContext]; } static attachContext(promise) { // @ts-ignore promise async context promise[asyncContext] = AsyncContextFrame.current(); } static getRootAsyncContext() { if (typeof rootAsyncFrame !== "undefined") { return rootAsyncFrame; } rootAsyncFrame = new AsyncContextFrame(null, null, true); return rootAsyncFrame; } static current() { if (asyncContextStack.length === 0) { return AsyncContextFrame.getRootAsyncContext(); } return asyncContextStack[asyncContextStack.length - 1]; } static create(maybeParent, maybeStorageEntry) { return new AsyncContextFrame(maybeParent, maybeStorageEntry); } static wrap(fn, maybeFrame, // deno-lint-ignore no-explicit-any thisArg) { // deno-lint-ignore no-explicit-any return (...args)=>{ const frame = maybeFrame || AsyncContextFrame.current(); Scope.enter(frame); try { return fn.apply(thisArg, args); } finally{ Scope.exit(); } }; } get(key) { assert(!key.isDead()); this.storage = this.storage.filter((entry)=>!entry.key.isDead()); const entry = this.storage.find((entry)=>entry.key === key); if (entry) { return entry.value; } return undefined; } isRoot() { return AsyncContextFrame.getRootAsyncContext() == this; } } export class AsyncResource { frame; type; constructor(type){ this.type = type; this.frame = AsyncContextFrame.current(); } runInAsyncScope(fn, thisArg, ...args) { Scope.enter(this.frame); try { return fn.apply(thisArg, args); } finally{ Scope.exit(); } } bind(fn, thisArg = this) { validateFunction(fn, "fn"); const frame = AsyncContextFrame.current(); const bound = AsyncContextFrame.wrap(fn, frame, thisArg); Object.defineProperties(bound, { "length": { configurable: true, enumerable: false, value: fn.length, writable: false }, "asyncResource": { configurable: true, enumerable: true, value: this, writable: true } }); return bound; } static bind(fn, type, thisArg) { type = type || fn.name; return new AsyncResource(type || "AsyncResource").bind(fn, thisArg); } } class Scope { static enter(maybeFrame) { if (maybeFrame) { pushAsyncFrame(maybeFrame); } else { pushAsyncFrame(AsyncContextFrame.getRootAsyncContext()); } } static exit() { popAsyncFrame(); } } class StorageEntry { key; value; constructor(key, value){ this.key = key; this.value = value; } clone() { return new StorageEntry(this.key, this.value); } } class StorageKey { #dead = false; reset() { this.#dead = true; } isDead() { return this.#dead; } } const fnReg = new FinalizationRegistry((key)=>{ key.reset(); }); export class AsyncLocalStorage { #key; constructor(){ this.#key = new StorageKey(); fnReg.register(this, this.#key); } // deno-lint-ignore no-explicit-any run(store, callback, ...args) { const frame = AsyncContextFrame.create(null, new StorageEntry(this.#key, store)); Scope.enter(frame); let res; try { res = callback(...args); } finally{ Scope.exit(); } return res; } // deno-lint-ignore no-explicit-any exit(callback, ...args) { return this.run(undefined, callback, args); } // deno-lint-ignore no-explicit-any getStore() { const currentFrame = AsyncContextFrame.current(); return currentFrame.get(this.#key); } } export function executionAsyncId() { return 1; } class AsyncHook { enable() {} disable() {} } export function createHook() { return new AsyncHook(); } // Placing all exports down here because the exported classes won't export // otherwise. export default { // Embedder API AsyncResource, executionAsyncId, createHook, AsyncLocalStorage }; Qb6Q:node:async_hooksa bCD`M`4 TA`9 LaAW T  I` Sb1  "  "       B  m??????????????IbD`L` bS]`B]`," ]`]]DL`` L` ` L` B ` L`B " ` L`" b ` L`b ]L`  D  c D  c $ D  cEU` a? a? a?B a? a?b a?" a?a?b@  T I`3 9b@  T  I`J" b@  T I`n b@ ,Lb  T I`b b@/a& T I`]}" b@3b'a   $Sb @ b?o  `  ` `/  `/ `?   `  aoB aj ajB ajaj)ajv ajD]0 ` ajaj  aj ] T  I`  b Ճ  T I` B b  T I` y  b  T I` K B b T I`\ b T I`~)b T I`v b T I`b T I` b T$` L`Ÿ  ` KaD Db3(Sbqq `Da a b $Sb @B b?%9  `` ``/ `/  `?  `  a%1ajD]0 ` ajB ajaj] T  I`YB b Ճ T I`LB b T I`S@b T I`Nb T(` L`  U`Kb  $ c33(SbqqB `Da9 a 0b  `l ``/ `/  `?   `  a aj" ajD] ` aj] T  I` 9bD! T I` b T I`" b $Sb @ b?i  `T``/ `/ `?  `  aiD]$ ` aj"aj] T  I`$ b Ճ" T I`,g"b#  T(` L`a   `Kb   c33(Sbqq `Dai a 0b$!$Sb @ b?j9  `T ``/ `/ `?  `  ajD]0 ` ajaj aj]  T  I`jj ՓbDԃ'" T I`b%# T I` b&$ T(` ]  `Kb 0c5(Sbqq `Da{ a b(%Q T  I`I9bK)&$Sb @B b?)  `T ``/ `/ `?  `  a)D]< ` aj aj" aj aj]B  T  I`X !b Ճ*' T I` b+( T I`E" b,) T I`v b-* T(` ]  Y`Kb   c5(Sbqq `DaA a b.+  `T ``/ `/ `?  `  aBD]0 ` ajb aj aj] T  I` 9bD2, T I`,1b b0- T I`;@ b1.0bB Cb C" C CB b "    )`D)xh Ƃ%%%%%%% % % % % %%%ei h  }%%%! b% %  ‚     e+ % 2 % %‚e+ %2 1 !e+ % "%$#‚%e+ %&2  % '))e%*(‚+,e+-2  %!. Ă/ i%022e%31‚45 6!e+7"2 19#8Â:$;%e+ %~<)03=03>03?03@ 1 c(``2 0bA1yDDɒђْDD19AIQ}5=EMU}D`RD]DH Q4t// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @deno-types="./internal/buffer.d.ts" export { atob, Blob, btoa, Buffer, constants, default, kMaxLength, kStringMaxLength, SlowBuffer } from "ext:deno_node/internal/buffer.mjs"; Qb< node:buffera bDD` M` T8`-Lc   `Dg h Ʊh   (Sb1Ib` L` " ]`,L`   "D"c| bDbc Dc "{ D"{ c bDbc Dc  D c " D" c  D c]` bA/D`RD]DH MQI]f:<// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // This module implements 'child_process' module of Node.JS API. // ref: https://nodejs.org/api/child_process.html // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { internals } from "ext:core/mod.js"; import { op_bootstrap_unstable_args, op_node_child_ipc_pipe, op_npm_process_state } from "ext:core/ops"; import { ChildProcess, normalizeSpawnArguments, setupChannel, spawnSync as _spawnSync, stdioStringToArray } from "ext:deno_node/internal/child_process.ts"; import { validateAbortSignal, validateFunction, validateObject, validateString } from "ext:deno_node/internal/validators.mjs"; import { ERR_CHILD_PROCESS_IPC_REQUIRED, ERR_CHILD_PROCESS_STDIO_MAXBUFFER, ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, ERR_OUT_OF_RANGE, genericNodeError } from "ext:deno_node/internal/errors.ts"; import { ArrayIsArray, ArrayPrototypeJoin, ArrayPrototypePush, ArrayPrototypeSlice, ObjectAssign, StringPrototypeSlice } from "ext:deno_node/internal/primordials.mjs"; import { getSystemErrorName, promisify } from "node:util"; import { createDeferredPromise } from "ext:deno_node/internal/util.mjs"; import process from "node:process"; import { Buffer } from "node:buffer"; import { convertToValidSignal, kEmptyObject } from "ext:deno_node/internal/util.mjs"; const MAX_BUFFER = 1024 * 1024; /** * Spawns a new Node.js process + fork. * @param modulePath * @param args * @param option * @returns */ export function fork(modulePath, _args, _options) { validateString(modulePath, "modulePath"); // Get options and args arguments. let execArgv; let options = {}; let args = []; let pos = 1; if (pos < arguments.length && Array.isArray(arguments[pos])) { args = arguments[pos++]; } if (pos < arguments.length && arguments[pos] == null) { pos++; } if (pos < arguments.length && arguments[pos] != null) { if (typeof arguments[pos] !== "object") { throw new ERR_INVALID_ARG_VALUE(`arguments[${pos}]`, arguments[pos]); } options = { ...arguments[pos++] }; } // Prepare arguments for fork: execArgv = options.execArgv || process.execArgv; if (execArgv === process.execArgv && process._eval != null) { const index = execArgv.lastIndexOf(process._eval); if (index > 0) { // Remove the -e switch to avoid fork bombing ourselves. execArgv = execArgv.slice(0); execArgv.splice(index - 1, 2); } } // TODO(bartlomieju): this is incomplete, currently only handling a single // V8 flag to get Prisma integration running, we should fill this out with // more const v8Flags = []; if (Array.isArray(execArgv)) { for(let index = 0; index < execArgv.length; index++){ const flag = execArgv[index]; if (flag.startsWith("--max-old-space-size")) { execArgv.splice(index, 1); v8Flags.push(flag); } } } const stringifiedV8Flags = []; if (v8Flags.length > 0) { stringifiedV8Flags.push("--v8-flags=" + v8Flags.join(",")); } args = [ "run", ...op_bootstrap_unstable_args(), "--node-modules-dir", "-A", ...stringifiedV8Flags, ...execArgv, modulePath, ...args ]; if (typeof options.stdio === "string") { options.stdio = stdioStringToArray(options.stdio, "ipc"); } else if (!Array.isArray(options.stdio)) { // Use a separate fd=3 for the IPC channel. Inherit stdin, stdout, // and stderr from the parent if silent isn't set. options.stdio = stdioStringToArray(options.silent ? "pipe" : "inherit", "ipc"); } else if (!options.stdio.includes("ipc")) { throw new ERR_CHILD_PROCESS_IPC_REQUIRED("options.stdio"); } options.execPath = options.execPath || Deno.execPath(); options.shell = false; Object.assign(options.env ??= {}, { DENO_DONT_USE_INTERNAL_NODE_COMPAT_STATE: op_npm_process_state() }); return spawn(options.execPath, args, options); } /** * Spawns a child process using `command`. */ export function spawn(command, argsOrOptions, maybeOptions) { const args = Array.isArray(argsOrOptions) ? argsOrOptions : []; let options = !Array.isArray(argsOrOptions) && argsOrOptions != null ? argsOrOptions : maybeOptions; options = normalizeSpawnArguments(command, args, options); validateAbortSignal(options?.signal, "options.signal"); return new ChildProcess(command, args, options); } function validateTimeout(timeout) { if (timeout != null && !(Number.isInteger(timeout) && timeout >= 0)) { throw new ERR_OUT_OF_RANGE("timeout", "an unsigned integer", timeout); } } function validateMaxBuffer(maxBuffer) { if (maxBuffer != null && !(typeof maxBuffer === "number" && maxBuffer >= 0)) { throw new ERR_OUT_OF_RANGE("options.maxBuffer", "a positive number", maxBuffer); } } function sanitizeKillSignal(killSignal) { if (typeof killSignal === "string" || typeof killSignal === "number") { return convertToValidSignal(killSignal); } else if (killSignal != null) { throw new ERR_INVALID_ARG_TYPE("options.killSignal", [ "string", "number" ], killSignal); } } export function spawnSync(command, argsOrOptions, maybeOptions) { const args = Array.isArray(argsOrOptions) ? argsOrOptions : []; let options = !Array.isArray(argsOrOptions) && argsOrOptions ? argsOrOptions : maybeOptions; options = { maxBuffer: MAX_BUFFER, ...normalizeSpawnArguments(command, args, options) }; // Validate the timeout, if present. validateTimeout(options.timeout); // Validate maxBuffer, if present. validateMaxBuffer(options.maxBuffer); // Validate and translate the kill signal, if present. sanitizeKillSignal(options.killSignal); return _spawnSync(command, args, options); } function normalizeExecArgs(command, optionsOrCallback, maybeCallback) { let callback = maybeCallback; if (typeof optionsOrCallback === "function") { callback = optionsOrCallback; optionsOrCallback = undefined; } // Make a shallow copy so we don't clobber the user's options object. const options = { ...optionsOrCallback }; options.shell = typeof options.shell === "string" ? options.shell : true; return { file: command, options: options, callback: callback }; } export function exec(command, optionsOrCallback, maybeCallback) { const opts = normalizeExecArgs(command, optionsOrCallback, maybeCallback); return execFile(opts.file, opts.options, opts.callback); } const customPromiseExecFunction = (orig)=>{ return (...args)=>{ const { promise, resolve, reject } = createDeferredPromise(); promise.child = orig(...args, (err, stdout, stderr)=>{ if (err !== null) { const _err = err; _err.stdout = stdout; _err.stderr = stderr; reject && reject(_err); } else { resolve && resolve({ stdout, stderr }); } }); return promise; }; }; Object.defineProperty(exec, promisify.custom, { enumerable: false, value: customPromiseExecFunction(exec) }); class ExecFileError extends Error { code; constructor(message){ super(message); this.code = "UNKNOWN"; } } export function execFile(file, argsOrOptionsOrCallback, optionsOrCallback, maybeCallback) { let args = []; let options = {}; let callback; if (Array.isArray(argsOrOptionsOrCallback)) { args = argsOrOptionsOrCallback; } else if (argsOrOptionsOrCallback instanceof Function) { callback = argsOrOptionsOrCallback; } else if (argsOrOptionsOrCallback) { options = argsOrOptionsOrCallback; } if (optionsOrCallback instanceof Function) { callback = optionsOrCallback; } else if (optionsOrCallback) { options = optionsOrCallback; callback = maybeCallback; } const execOptions = { encoding: "utf8", timeout: 0, maxBuffer: MAX_BUFFER, killSignal: "SIGTERM", shell: false, ...options }; validateTimeout(execOptions.timeout); if (execOptions.maxBuffer < 0) { throw new ERR_OUT_OF_RANGE("options.maxBuffer", "a positive number", execOptions.maxBuffer); } const spawnOptions = { cwd: execOptions.cwd, env: execOptions.env, gid: execOptions.gid, shell: execOptions.shell, signal: execOptions.signal, uid: execOptions.uid, windowsHide: !!execOptions.windowsHide, windowsVerbatimArguments: !!execOptions.windowsVerbatimArguments }; const child = spawn(file, args, spawnOptions); let encoding; const _stdout = []; const _stderr = []; if (execOptions.encoding !== "buffer" && Buffer.isEncoding(execOptions.encoding)) { encoding = execOptions.encoding; } else { encoding = null; } let stdoutLen = 0; let stderrLen = 0; let killed = false; let exited = false; let timeoutId; let ex = null; let cmd = file; function exithandler(code = 0, signal) { if (exited) return; exited = true; if (timeoutId) { clearTimeout(timeoutId); timeoutId = null; } if (!callback) return; // merge chunks let stdout; let stderr; if (encoding || child.stdout && child.stdout.readableEncoding) { stdout = _stdout.join(""); } else { stdout = Buffer.concat(_stdout); } if (encoding || child.stderr && child.stderr.readableEncoding) { stderr = _stderr.join(""); } else { stderr = Buffer.concat(_stderr); } if (!ex && code === 0 && signal === null) { callback(null, stdout, stderr); return; } if (args?.length) { cmd += ` ${args.join(" ")}`; } if (!ex) { ex = new ExecFileError("Command failed: " + cmd + "\n" + stderr); ex.code = code < 0 ? getSystemErrorName(code) : code; ex.killed = child.killed || killed; ex.signal = signal; } ex.cmd = cmd; callback(ex, stdout, stderr); } function errorhandler(e) { ex = e; if (child.stdout) { child.stdout.destroy(); } if (child.stderr) { child.stderr.destroy(); } exithandler(); } function kill() { if (child.stdout) { child.stdout.destroy(); } if (child.stderr) { child.stderr.destroy(); } killed = true; try { child.kill(execOptions.killSignal); } catch (e) { if (e) { ex = e; } exithandler(); } } if (execOptions.timeout > 0) { timeoutId = setTimeout(function delayedKill() { kill(); timeoutId = null; }, execOptions.timeout); } if (child.stdout) { if (encoding) { child.stdout.setEncoding(encoding); } child.stdout.on("data", function onChildStdout(chunk) { // Do not need to count the length if (execOptions.maxBuffer === Infinity) { ArrayPrototypePush(_stdout, chunk); return; } const encoding = child.stdout?.readableEncoding; const length = encoding ? Buffer.byteLength(chunk, encoding) : chunk.length; const slice = encoding ? StringPrototypeSlice : (buf, ...args)=>buf.slice(...args); stdoutLen += length; if (stdoutLen > execOptions.maxBuffer) { const truncatedLen = execOptions.maxBuffer - (stdoutLen - length); ArrayPrototypePush(_stdout, slice(chunk, 0, truncatedLen)); ex = new ERR_CHILD_PROCESS_STDIO_MAXBUFFER("stdout"); kill(); } else { ArrayPrototypePush(_stdout, chunk); } }); } if (child.stderr) { if (encoding) { child.stderr.setEncoding(encoding); } child.stderr.on("data", function onChildStderr(chunk) { // Do not need to count the length if (execOptions.maxBuffer === Infinity) { ArrayPrototypePush(_stderr, chunk); return; } const encoding = child.stderr?.readableEncoding; const length = encoding ? Buffer.byteLength(chunk, encoding) : chunk.length; const slice = encoding ? StringPrototypeSlice : (buf, ...args)=>buf.slice(...args); stderrLen += length; if (stderrLen > execOptions.maxBuffer) { const truncatedLen = execOptions.maxBuffer - (stderrLen - length); ArrayPrototypePush(_stderr, slice(chunk, 0, truncatedLen)); ex = new ERR_CHILD_PROCESS_STDIO_MAXBUFFER("stderr"); kill(); } else { ArrayPrototypePush(_stderr, chunk); } }); } child.addListener("close", exithandler); child.addListener("error", errorhandler); return child; } const customPromiseExecFileFunction = (orig)=>{ return (...args)=>{ const { promise, resolve, reject } = createDeferredPromise(); promise.child = orig(...args, (err, stdout, stderr)=>{ if (err !== null) { const _err = err; _err.stdout = stdout; _err.stderr = stderr; reject && reject(_err); } else { resolve && resolve({ stdout, stderr }); } }); return promise; }; }; Object.defineProperty(execFile, promisify.custom, { enumerable: false, value: customPromiseExecFileFunction(execFile) }); function checkExecSyncError(ret, args, cmd) { let err; if (ret.error) { err = ret.error; ObjectAssign(err, ret); } else if (ret.status !== 0) { let msg = "Command failed: "; msg += cmd || ArrayPrototypeJoin(args, " "); if (ret.stderr && ret.stderr.length > 0) { msg += `\n${ret.stderr.toString()}`; } err = genericNodeError(msg, ret); } return err; } export function execSync(command, options) { const opts = normalizeExecArgs(command, options); const inheritStderr = !opts.options.stdio; const ret = spawnSync(opts.file, opts.options); if (inheritStderr && ret.stderr) { process.stderr.write(ret.stderr); } const err = checkExecSyncError(ret, [], command); if (err) { throw err; } return ret.stdout; } function normalizeExecFileArgs(file, args, options, callback) { if (ArrayIsArray(args)) { args = ArrayPrototypeSlice(args); } else if (args != null && typeof args === "object") { callback = options; options = args; args = null; } else if (typeof args === "function") { callback = args; options = null; args = null; } if (args == null) { args = []; } if (typeof options === "function") { callback = options; } else if (options != null) { validateObject(options, "options"); } if (options == null) { options = kEmptyObject; } args = args; options = options; if (callback != null) { validateFunction(callback, "callback"); } // Validate argv0, if present. if (options.argv0 != null) { validateString(options.argv0, "options.argv0"); } return { file, args, options, callback }; } export function execFileSync(file, args, options) { ({ file, args, options } = normalizeExecFileArgs(file, args, options)); const inheritStderr = !options.stdio; const ret = spawnSync(file, args, options); if (inheritStderr && ret.stderr) { process.stderr.write(ret.stderr); } const errArgs = [ options.argv0 || file, ...args ]; const err = checkExecSyncError(ret, errArgs); if (err) { throw err; } return ret.stdout; } function setupChildProcessIpcChannel() { const fd = op_node_child_ipc_pipe(); if (typeof fd != "number" || fd < 0) return; setupChannel(process, fd); } internals.__setupChildProcessIpcChannel = setupChildProcessIpcChannel; export default { fork, spawn, exec, execFile, execFileSync, execSync, ChildProcess, spawnSync }; export { ChildProcess }; QcVnode:child_processa bED`M` T`ELa$P T  I`s ISb1B   " B # - b/ g????????Ib<`0L`  bS]`GB]`]`4" ]` ]` ]`#: ]`{" ]`* ]`b]`  L`   D chL`` L`E` L`" ` L`" 0 ` L`0 . ` L`.  ` L`  ` L`  ` L` ]L`  DTTc D!!c DAAc Daac D"{ "{ c  D  c Db b c D" " c( Db b c*> D  c@U D" " cWg Dc Dbbc D"  c  D" " c$8 D  c D  ciy Db b cVh DBKBKc6? D  c:F D  c D  cc} D  c D  c D* c D  cjs D" " c D  c, DB B ch{ D  c} D  c D  c`(BKa? a? a? a? a? a?" a?" a? a?B a? a? a? a?b a?" a?b a? a?" a? a?Ta?!a?Aa?aa?a?ba?b a? a? a?* a?"{ a?" a? a? a? a? a?a?" a?. a?0 a?a?b@8 T I`3 b@9 T  I`$" b@: T I`B b@; T I`2`4- b@< T I`5N9b/ b@= T I`=;;0 b$@>`L` T I` b @1a  T I`Z b@2a  T I`> b@3a  T I`\b @4a T I`6}0$g3EL@MN@NP@QQ@SY@Z`@ " b@5a T I`y45. b@6a T I`k9;0 b@7ba  T(`L`0SbbpW"# `b" `b" a1 T I`.I}bK   u`Dc %`bK ? #  bHC  `T ``/ `/ `?  `  aD] ` aj]  T  I`# b Ճ @ T$` L`q  `Kb  b3(Sbqq# `Da a b A  T(`L`0SbbpW"# `"- `"- a0V2 T  I`0S2IՖbK  ͖`Dc %`bKB bHCBK1 Pb C CEC" C0 C. C C C  " 0 .     `D`h %%%%%%% % ei h    % ! - 00-~)0b3 \ ! e+ 2 % ! - 00-~)0b3\0 2~)03030303!03 #03!%0"3"'03#) 1 d+P&0@ LbA05= EMqDUDɖٖDa!i)D`RD]DH QRfR // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. import { notImplemented } from "ext:deno_node/_utils.ts"; /** A Worker object contains all public information and method about a worker. * In the primary it can be obtained using cluster.workers. In a worker it can * be obtained using cluster.worker. */ export class Worker { constructor(){ notImplemented("cluster.Worker.prototype.constructor"); } } /** Calls .disconnect() on each worker in cluster.workers. */ export function disconnected() { notImplemented("cluster.disconnected"); } /** Spawn a new worker process. */ export function fork() { notImplemented("cluster.fork"); } /** True if the process is a primary. This is determined by * the process.env.NODE_UNIQUE_ID. If process.env.NODE_UNIQUE_ID is undefined, * then isPrimary is true. */ export const isPrimary = undefined; /** True if the process is not a primary (it is the negation of * cluster.isPrimary). */ export const isWorker = undefined; /** Deprecated alias for cluster.isPrimary. details. */ export const isMaster = isPrimary; /** The scheduling policy, either cluster.SCHED_RR for round-robin or * cluster.SCHED_NONE to leave it to the operating system. This is a global * setting and effectively frozen once either the first worker is spawned, or * .setupPrimary() is called, whichever comes first. */ export const schedulingPolicy = undefined; /** The settings object */ export const settings = undefined; /** Deprecated alias for .setupPrimary(). */ export function setupMaster() { notImplemented("cluster.setupMaster"); } /** setupPrimary is used to change the default 'fork' behavior. Once called, * the settings will be present in cluster.settings. */ export function setupPrimary() { notImplemented("cluster.setupPrimary"); } /** A reference to the current worker object. Not available in the primary * process. */ export const worker = undefined; /** A hash that stores the active worker objects, keyed by id field. Makes it * easy to loop through all the workers. It is only available in the primary * process. */ export const workers = undefined; export default { Worker, disconnected, fork, isPrimary, isWorker, isMaster, schedulingPolicy, settings, setupMaster, setupPrimary, worker, workers }; Qb7 node:clustera bFD` M` T`TLa!\La T  I`\2 Sb1IbR ` L`  ]`]L`'` L`b2 ` L`b2 2 ` L`2  ` L` "4 ` L`"4 B3 ` L`B3 3 ` L`3 4 ` L`4 B`  L`B5 `  L`5 5 `  L`5 6 `  L`6 b6 `  L`b6 ] L`  Db b c`b a?b2 a?2 a? a?B3 a?3 a?"4 a?4 a?Ba ?5 a ?5 a ?6 a ?b6 a ?a?b@Da T I` !b @Ef  T I`[5 b@Fa  T I`,\5 b@Gd a   `T ``/ `/ `?  `  aD] ` aj] T  I`b2 !b Hpb b2 C2 C CB3 C3 C"4 C4 CBC5 C5 C6 Cb6 Cb2 2  B3 3 "4 4 B5 5 6 b6    `D{0h ei h  e+ 1110111 1 1 ~)030303 03 03 03 03 0 30 30 30 30 3 1 cbACqyD`RD]DH Qv// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { Console } from "ext:deno_node/internal/console/constructor.mjs"; import { windowOrWorkerGlobalScope } from "ext:runtime/98_global_scope_shared.js"; // Don't rely on global `console` because during bootstrapping, it is pointing // to native `console` object provided by V8. const console = windowOrWorkerGlobalScope.console.value; export default Object.assign({}, console, { Console }); export { Console }; export const { assert, clear, count, countReset, debug, dir, dirxml, error, group, groupCollapsed, groupEnd, info, log, profile, profileEnd, table, time, timeEnd, timeLog, timeStamp, trace, warn } = console; // deno-lint-ignore no-explicit-any export const indentLevel = console?.indentLevel; QbB /q node:consolea bGD` M` T`La"!hLx  a 7 b&bC BB1I""bbI  `D@h ei h  0--!-~ )0 3 \ 1- 1- 1- 1-1-1-1-1-1 -1 -1 -!1 -#1-%1-'1-)1-+1--1-/1-11-31-51- 71 -!91 aSb1Ib`L` 6 ]`8 ]`. L`  Dc)L`H` L` ` L`` L`` L`B` L`B` L`` L`B` L`B1`  L`I`  L``  L``  L`I`  L`I"` L`"` L`` L`"` L`"` L`` L`b` L`b` L`` L`b` L`b` L`]L` Dc D7 7 c &`a?7 a?a?a?a?a?Ba?a?a?Ba?a ?a ?a ?a ?"a?a?a?"a?a?a?ba?a?a?ba?a?Ia ?e;`L       bAID`RD]DH EQAt// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Based on: https://github.com/nodejs/node/blob/0646eda/lib/constants.js import { constants as fsConstants } from "node:fs"; import { constants as osConstants } from "node:os"; export default { ...fsConstants, ...osConstants.dlopen, ...osConstants.errno, ...osConstants.signals, ...osConstants.priority }; export const { F_OK, R_OK, W_OK, X_OK, O_RDONLY, O_WRONLY, O_RDWR, O_NOCTTY, O_TRUNC, O_APPEND, O_DIRECTORY, O_NOFOLLOW, O_SYNC, O_DSYNC, O_SYMLINK, O_NONBLOCK, O_CREAT, O_EXCL, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, COPYFILE_EXCL, COPYFILE_FICLONE, COPYFILE_FICLONE_FORCE, UV_FS_COPYFILE_EXCL, UV_FS_COPYFILE_FICLONE, UV_FS_COPYFILE_FICLONE_FORCE } = fsConstants; export const { RTLD_DEEPBIND, RTLD_GLOBAL, RTLD_LAZY, RTLD_LOCAL, RTLD_NOW } = osConstants.dlopen; export const { E2BIG, EACCES, EADDRINUSE, EADDRNOTAVAIL, EAFNOSUPPORT, EAGAIN, EALREADY, EBADF, EBADMSG, EBUSY, ECANCELED, ECHILD, ECONNABORTED, ECONNREFUSED, ECONNRESET, EDEADLK, EDESTADDRREQ, EDOM, EDQUOT, EEXIST, EFAULT, EFBIG, EHOSTUNREACH, EIDRM, EILSEQ, EINPROGRESS, EINTR, EINVAL, EIO, EISCONN, EISDIR, ELOOP, EMFILE, EMLINK, EMSGSIZE, EMULTIHOP, ENAMETOOLONG, ENETDOWN, ENETRESET, ENETUNREACH, ENFILE, ENOBUFS, ENODATA, ENODEV, ENOENT, ENOEXEC, ENOLCK, ENOLINK, ENOMEM, ENOMSG, ENOPROTOOPT, ENOSPC, ENOSR, ENOSTR, ENOSYS, ENOTCONN, ENOTDIR, ENOTEMPTY, ENOTSOCK, ENOTSUP, ENOTTY, ENXIO, EOPNOTSUPP, EOVERFLOW, EPERM, EPIPE, EPROTO, EPROTONOSUPPORT, EPROTOTYPE, ERANGE, EROFS, ESPIPE, ESRCH, ESTALE, ETIME, ETIMEDOUT, ETXTBSY, EWOULDBLOCK, EXDEV } = osConstants.errno; export const { PRIORITY_ABOVE_NORMAL, PRIORITY_BELOW_NORMAL, PRIORITY_HIGH, PRIORITY_HIGHEST, PRIORITY_LOW, PRIORITY_NORMAL } = osConstants.priority; export const { SIGABRT, SIGALRM, SIGBUS, SIGCHLD, SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT, SIGIO, SIGIOT, SIGKILL, SIGPIPE, SIGPOLL, SIGPROF, SIGPWR, SIGQUIT, SIGSEGV, SIGSTKFLT, SIGSTOP, SIGSYS, SIGTERM, SIGTRAP, SIGTSTP, SIGTTIN, SIGTTOU, SIGUNUSED, SIGURG, SIGUSR1, SIGUSR2, SIGVTALRM, SIGWINCH, SIGXCPU, SIGXFSZ } = osConstants.signals; Qb9node:constantsa bHD` M` T`La!L}Tn]b^ZaUW[`X_\VYijklm  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRScdefghopqrstuvwxyz{|}~a b9 9 +b: : "; ; ; B< < = b= = "> > > b? ? B@ @ "A A B bB B "C C C BD D E bE E BF F bG H H bI I bJ J bK K "L L M M N bN N "O O O bP P BQ Q BR R "S S S BT T U U U BV V "W W W BX X Y bY Y "Z Z "[ [ \ \ \ B] ] ^ b^ ^ "_ _ _ B` ` "a a a Bb b c c c Bd d e e f bf f "g g "h h h Bi i j bj j Bk k "l l bm m bn n bo o "p p p Bq q r br r "s s s Bt t u bu u "v v w bw w "x x x By y "z z z b{ { "|   y`D0h ei h  0À)0-h0-h0-h0- h 10- 1T- 1n- 1- 1-1]-1b-1^-1Z-1a-1U-1W- 1[-"1`-$1X-&1_-(1\-*1V-,1Y-.1-01-21-41- 61-!81-":1-#<1-$>1-%@1-&B1-'D1-(F1-)H1-*J10--+L1i-,N1j--P1k-.R1l-/T1m0--0V1-1X1-2Z1-3\1-4^1 -5`1 -6b1 -7d1 -8f1 -9h1-:j1-;l1-r1-?t1-@v1-Ax1-Bz1-C|1-D~1-E1-F1-G1-H1-I1-J1-K1 -L1!-M1"-N1#-O1$-P1%-Q1&-R1'-S1(-T1)-U1*-V1+-W1,-X1--Y1.-Z1/-[10-\11-]12-^13-_14-`15-a16-b17-c18-d19-e1:-f1;-g1<-h1=-i1>-j1?-k1@-l1A-m1B-n1C-o1D-p1E-q1F-r1G-s1H-t1I-u1J-v1K-w1L-x1M-y1N-z1O-{1P-|1Q-}1R-~1S0- -1c-1d-1e-1f-1g-1h0--1o-1p-1q-1r-1s- 1t- 1u-1v-1w-1x-1y-1z-1{-1|-1}-1~- 1-"1-$1-&1-(1-*1-,1-.1-01-21-41-61-81-:1-<1->1-@1-B1 Sb1Ibt`L` ]`% ]`]qL`` L`E ` L`E BF ` L`BF F ` L`F K ` L`K "L ` L`"L L ` L`L M ` L`M M `  L`M N `  L`N bN `  L`bN N `  L`N "O `  L`"O O ` L`O O ` L`O bP ` L`bP P ` L`P BQ ` L`BQ Q ` L`Q BR ` L`BR R ` L`R "S ` L`"S S ` L`S S ` L`S BT ` L`BT T ` L`T U ` L`U U ` L`U U ` L`U BV ` L`BV V ` L`V "W `  L`"W W `! L`W W `" L`W BX `# L`BX X `$ L`X Y `% L`Y bY `& L`bY Y `' L`Y "Z `( L`"Z Z `) L`Z "[ `* L`"[ [ `+ L`[ \ `, L`\ \ `- L`\ \ `. L`\ B] `/ L`B] ] `0 L`] ^ `1 L`^ b^ `2 L`b^ ^ `3 L`^ "_ `4 L`"_ _ `5 L`_ _ `6 L`_ B` `7 L`B` ` `8 L`` "a `9 L`"a a `: L`a a `; L`a Bb `< L`Bb b `= L`b c `> L`c c `? L`c c `@ L`c Bd `A L`Bd d `B L`d e `C L`e e `D L`e f `E L`f bf `F L`bf f `G L`f "g `H L`"g g `I L`g "h `J L`"h h `K L`h h `L L`h Bi `M L`Bi i `N L`i j `O L`j bj `P L`bj j `Q L`j Bk `R L`Bk k `S L`k "; `T L`"; > `U L`> A `V L`A > `W L`> B@ `X L`B@ B `Y L`B = `Z L`= b? `[ L`b? "A `\ L`"A < `] L`< b= `^ L`b= @ `_ L`@ ? `` L`? "> `a L`"> = `b L`= "l `c L`"l l `d L`l bm `e L`bm m `f L`m bn `g L`bn n `h L`n bI `i L`bI I `j L`I bJ `k L`bJ J `l L`J bK `m L`bK ; `n L`; bo `o L`bo o `p L`o "p `q L`"p p `r L`p p `s L`p Bq `t L`Bq q `u L`q r `v L`r br `w L`br r `x L`r "s `y L`"s s `z L`s s `{ L`s Bt `| L`Bt t `} L`t u `~ L`u bu ` L`bu u ` L`u "v ` L`"v v ` L`v w ` L`w bw ` L`bw w ` L`w "x ` L`"x x ` L`x x ` L`x By ` L`By y ` L`y "z ` L`"z z ` L`z z ` L`z b{ ` L`b{ { ` L`{ "| ` L`"| C ` L`C D ` L`D bB ` L`bB C ` L`C E ` L`E B ` L`B BD ` L`BD bE ` L`bE "C ` L`"C bG ` L`bG H ` L`H H ` L`H ; ` L`; B< ` L`B< ]L`  Db9 bc D9 bc`b9 a?9 a?a?"; aT?; an?; a?B< a?< a]?= ab?b= a^?= aZ?"> aa?> aU?> aW?b? a[?? a`?B@ aX?@ a_?"A a\?A aV?B aY?bB a?B a?"C a?C a?C a?BD a?D a?E a?bE a?E a?BF a?F a?bG a?H a?H a?bI ai?I aj?bJ ak?J al?bK am?K a?"L a?L a?M a?M a ?N a ?bN a ?N a ?"O a ?O a?O a?bP a?P a?BQ a?Q a?BR a?R a?"S a?S a?S a?BT a?T a?U a?U a?U a?BV a?V a?"W a ?W a!?W a"?BX a#?X a$?Y a%?bY a&?Y a'?"Z a(?Z a)?"[ a*?[ a+?\ a,?\ a-?\ a.?B] a/?] a0?^ a1?b^ a2?^ a3?"_ a4?_ a5?_ a6?B` a7?` a8?"a a9?a a:?a a;?Bb a<?b a=?c a>?c a??c a@?Bd aA?d aB?e aC?e aD?f aE?bf aF?f aG?"g aH?g aI?"h aJ?h aK?h aL?Bi aM?i aN?j aO?bj aP?j aQ?Bk aR?k aS?"l ac?l ad?bm ae?m af?bn ag?n ah?bo ao?o ap?"p aq?p ar?p as?Bq at?q au?r av?br aw?r ax?"s ay?s az?s a{?Bt a|?t a}?u a~?bu a?u a?"v a?v a?w a?bw a?w a?"x a?x a?x a?By a?y a?"z a?z a?z a?b{ a?{ a?"| a?t{DPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPebAJD`RD]DH i Qe S// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { ERR_CRYPTO_FIPS_FORCED } from "ext:deno_node/internal/errors.ts"; import { crypto as constants } from "ext:deno_node/internal_binding/constants.ts"; import { getOptionValue } from "ext:deno_node/internal/options.ts"; import { getFipsCrypto, setFipsCrypto, timingSafeEqual } from "ext:deno_node/internal_binding/crypto.ts"; import { checkPrime, checkPrimeSync, generatePrime, generatePrimeSync, randomBytes, randomFill, randomFillSync, randomInt, randomUUID } from "ext:deno_node/internal/crypto/random.ts"; import { pbkdf2, pbkdf2Sync } from "ext:deno_node/internal/crypto/pbkdf2.ts"; import { scrypt, scryptSync } from "ext:deno_node/internal/crypto/scrypt.ts"; import { hkdf, hkdfSync } from "ext:deno_node/internal/crypto/hkdf.ts"; import { generateKey, generateKeyPair, generateKeyPairSync, generateKeySync } from "ext:deno_node/internal/crypto/keygen.ts"; import { createPrivateKey, createPublicKey, createSecretKey, KeyObject } from "ext:deno_node/internal/crypto/keys.ts"; import { DiffieHellman, diffieHellman, DiffieHellmanGroup, ECDH } from "ext:deno_node/internal/crypto/diffiehellman.ts"; import { Cipheriv, Decipheriv, getCipherInfo, privateDecrypt, privateEncrypt, publicDecrypt, publicEncrypt } from "ext:deno_node/internal/crypto/cipher.ts"; import { Sign, signOneShot, Verify, verifyOneShot } from "ext:deno_node/internal/crypto/sig.ts"; import { createHash, getHashes, Hash, Hmac } from "ext:deno_node/internal/crypto/hash.ts"; import { X509Certificate } from "ext:deno_node/internal/crypto/x509.ts"; import { getCiphers, getCurves, secureHeapUsed, setEngine } from "ext:deno_node/internal/crypto/util.ts"; import Certificate from "ext:deno_node/internal/crypto/certificate.ts"; import { crypto as webcrypto } from "ext:deno_crypto/00_crypto.js"; const fipsForced = getOptionValue("--force-fips"); function createCipheriv(cipher, key, iv, options) { return new Cipheriv(cipher, key, iv, options); } function createDecipheriv(algorithm, key, iv, options) { return new Decipheriv(algorithm, key, iv, options); } function createDiffieHellman(sizeOrKey, keyEncoding, generator, generatorEncoding) { return new DiffieHellman(sizeOrKey, keyEncoding, generator, generatorEncoding); } function createDiffieHellmanGroup(name) { return new DiffieHellmanGroup(name); } function createECDH(curve) { return new ECDH(curve); } function createHmac(hmac, key, options) { return Hmac(hmac, key, options); } function createSign(algorithm, options) { return new Sign(algorithm, options); } function createVerify(algorithm, options) { return new Verify(algorithm, options); } function setFipsForced(val) { if (val) { return; } throw new ERR_CRYPTO_FIPS_FORCED(); } function getFipsForced() { return 1; } Object.defineProperty(constants, "defaultCipherList", { value: getOptionValue("--tls-cipher-list") }); const getDiffieHellman = createDiffieHellmanGroup; const getFips = fipsForced ? getFipsForced : getFipsCrypto; const setFips = fipsForced ? setFipsForced : setFipsCrypto; const sign = signOneShot; const verify = verifyOneShot; /* Deprecated in Node.js, alias of randomBytes */ const pseudoRandomBytes = randomBytes; export default { Certificate, checkPrime, checkPrimeSync, Cipheriv, constants, createCipheriv, createDecipheriv, createDiffieHellman, createDiffieHellmanGroup, createECDH, createHash, createHmac, createPrivateKey, createPublicKey, createSecretKey, createSign, createVerify, Decipheriv, DiffieHellman, diffieHellman, DiffieHellmanGroup, ECDH, generateKey, generateKeyPair, generateKeyPairSync, generateKeySync, generatePrime, generatePrimeSync, getCipherInfo, getCiphers, getCurves, getDiffieHellman, getFips, getHashes, Hash, hkdf, hkdfSync, Hmac, KeyObject, pbkdf2, pbkdf2Sync, privateDecrypt, privateEncrypt, publicDecrypt, publicEncrypt, randomBytes, pseudoRandomBytes, randomFill, randomFillSync, randomInt, randomUUID, scrypt, scryptSync, secureHeapUsed, setEngine, setFips, Sign, sign, timingSafeEqual, Verify, verify, webcrypto, X509Certificate }; export { Certificate, checkPrime, checkPrimeSync, Cipheriv, constants, createCipheriv, createDecipheriv, createDiffieHellman, createDiffieHellmanGroup, createECDH, createHash, createHmac, createPrivateKey, createPublicKey, createSecretKey, createSign, createVerify, Decipheriv, DiffieHellman, diffieHellman, DiffieHellmanGroup, ECDH, generateKey, generateKeyPair, generateKeyPairSync, generateKeySync, generatePrime, generatePrimeSync, getCipherInfo, getCiphers, getCurves, getDiffieHellman, getFips, getHashes, Hash, hkdf, hkdfSync, Hmac, KeyObject, pbkdf2, pbkdf2Sync, privateDecrypt, privateEncrypt, /* Deprecated in Node.js, alias of randomBytes */ pseudoRandomBytes, publicDecrypt, publicEncrypt, randomBytes, randomFill, randomFillSync, randomInt, randomUUID, scrypt, scryptSync, secureHeapUsed, setEngine, setFips, Sign, sign, timingSafeEqual, Verify, verify, webcrypto, X509Certificate }; Qbf node:cryptoa bID`4M`  T`QLaR+ T  I`M b qSb1Ib`PL`  ]`7"} ]`~ ]` ]`0 ]`B ]`7B ]` ]`B ]`K ]`]`4]` ]`<B ]` ]`B ]`Ib]`" ]`L`1  " Dcy  D c ow " D" c y " D" c  " D" c & µDµc (,  D c  B DB c   D c  " D" c   D c %  D c  D ceo b Db cq bDcdj  D c mw " D" c   D c  " D" c   D c  Dc   D c  D c2  D c4C  D c b Db c  D c  " D" c  D c& b Db c y ‡ D‡ c " D" c  D c# b Db c%/ " D" c   D c  " D" c   D c   D c  D c  D c  D c Dc  D ckq B DB cs} " D" c(6  D c8A  D c(  DcL`-` L` ` L` š ` L`š B ` L`B  ` L`  ` L`  ` L` b ` L`b  `  L`  `  L` " `  L`"  `  L`  `  L` ` L`¥` L`¥]L`7 D" cy D  c ow D" " c y D" " c  D" " c & Dµµc (, D| | c/ D  c  DB B c  D  c  D" " c  D  c % D  c D  ceo Db b cq Dbcdj D  c mw D" " c  D  c  D" " c  D  c  Dc  D  c D  c2 D  c4C D  c Db b c D  c  D" " c D  c& D  c Db b c y D"~ "~ c D‡ ‡ c D" " c D  c# Db b c%/ D" " c  D  c  D" " c  D  c  D  c D  c D  c D  c Dc D  ckq DB B cs} D" " c(6 D  c8A D  c  D  c  D  c( Db b c '4 D c`F| a?ba?"~ a? a? a? a? a?b a? a?b a? a? a? a? a?a? a?b a? a?B a?‡ a?" a?a? a? a? a?" a? a?" a? a?" a? a?" a?µa? a?" a? a?" a? a?" a? a?" a? a? a?b a? a?b a? a?B a? a?" a? a?" a? a?" a? a? a?š a?B a? a? a? a?b a? a ? a ?" a ? a ?a?¥a? a ?a?)b@ T T I`  Mb@ UL` T  I`H b@La T I` š b@Ma T I`% B b@Na T I`   b!@Oa T I` =  b@Pa T I`Q  b@Qa T I` b b@Ra T I` 6  b@Sh  a "~ b bb bC    b   b~?" C Cb C CbC Cš CB C C C C C" C C" Cb C C" C" C C" CµCC C C C Cb C C" C C C" Cb C C‡ C" CB C C Cb C" C C" C C C C C C CC CB C" C C C" CC C C¥C C C"  b   š B     "  " b  " "  " µ    b  "   " b  ‡ " B   b "  "       B "   "   ¥    =`Dy`h ƂĂei h  0b!- 0  ~ )0 b3 \ 01  01  01 010101 ~ )0303030303 0303030303 03"03$0 3 &0!3!(0"3"*03#,0 3$.0%3%00&3&20'3'40(3(60)3)80*3*:0+3+<0,3,>0-3-@0.3.B0/3/D0030F0131H0232J0 33L0 34N0535P0636R0737T0838V0939X0:3:Z0;3;\0<3<^0=3=`0>3>b0?3?d0@3@f03h0 3Aj0B3Bl0C3Cn0D3Dp0E3Er0F3Ft0G3Gv0H3Hx0I3Iz0 3J|0K3K~03L0M3M0N3N03O0P3P0Q3Q 1 M8l P`2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 )bAKŝ͝ED`RD]DH =Q=@{// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { Buffer } from "node:buffer"; import { EventEmitter } from "node:events"; import { ERR_BUFFER_OUT_OF_BOUNDS, ERR_INVALID_ARG_TYPE, ERR_INVALID_FD_TYPE, ERR_MISSING_ARGS, ERR_SOCKET_ALREADY_BOUND, ERR_SOCKET_BAD_BUFFER_SIZE, ERR_SOCKET_BUFFER_SIZE, ERR_SOCKET_DGRAM_IS_CONNECTED, ERR_SOCKET_DGRAM_NOT_CONNECTED, ERR_SOCKET_DGRAM_NOT_RUNNING, errnoException, exceptionWithHostPort } from "ext:deno_node/internal/errors.ts"; import { kStateSymbol, newHandle } from "ext:deno_node/internal/dgram.ts"; import { asyncIdSymbol, defaultTriggerAsyncIdScope, ownerSymbol } from "ext:deno_node/internal/async_hooks.ts"; import { SendWrap } from "ext:deno_node/internal_binding/udp_wrap.ts"; import { isInt32, validateAbortSignal, validateNumber, validatePort, validateString } from "ext:deno_node/internal/validators.mjs"; import { guessHandleType } from "ext:deno_node/internal_binding/util.ts"; import { os } from "ext:deno_node/internal_binding/constants.ts"; import { nextTick } from "node:process"; import { channel } from "node:diagnostics_channel"; import { isArrayBufferView } from "ext:deno_node/internal/util/types.ts"; const { UV_UDP_REUSEADDR, UV_UDP_IPV6ONLY } = os; const udpSocketChannel = channel("udp.socket"); const BIND_STATE_UNBOUND = 0; const BIND_STATE_BINDING = 1; const BIND_STATE_BOUND = 2; const CONNECT_STATE_DISCONNECTED = 0; const CONNECT_STATE_CONNECTING = 1; const CONNECT_STATE_CONNECTED = 2; const RECV_BUFFER = true; const SEND_BUFFER = false; const isSocketOptions = (socketOption)=>socketOption !== null && typeof socketOption === "object"; const isUdpHandle = (handle)=>handle !== null && typeof handle === "object" && typeof handle.recvStart === "function"; const isBindOptions = (options)=>options !== null && typeof options === "object"; /** * Encapsulates the datagram functionality. * * New instances of `dgram.Socket` are created using `createSocket`. * The `new` keyword is not to be used to create `dgram.Socket` instances. */ export class Socket extends EventEmitter { [asyncIdSymbol]; [kStateSymbol]; type; constructor(type, listener){ super(); let lookup; let recvBufferSize; let sendBufferSize; let options; if (isSocketOptions(type)) { options = type; type = options.type; lookup = options.lookup; recvBufferSize = options.recvBufferSize; sendBufferSize = options.sendBufferSize; } const handle = newHandle(type, lookup); handle[ownerSymbol] = this; this[asyncIdSymbol] = handle.getAsyncId(); this.type = type; if (typeof listener === "function") { this.on("message", listener); } this[kStateSymbol] = { handle, receiving: false, bindState: BIND_STATE_UNBOUND, connectState: CONNECT_STATE_DISCONNECTED, queue: undefined, reuseAddr: options && options.reuseAddr, ipv6Only: options && options.ipv6Only, recvBufferSize, sendBufferSize }; if (options?.signal !== undefined) { const { signal } = options; validateAbortSignal(signal, "options.signal"); const onAborted = ()=>{ this.close(); }; if (signal.aborted) { onAborted(); } else { signal.addEventListener("abort", onAborted); this.once("close", ()=>signal.removeEventListener("abort", onAborted)); } } if (udpSocketChannel.hasSubscribers) { udpSocketChannel.publish({ socket: this }); } } /** * Tells the kernel to join a multicast group at the given `multicastAddress` * and `multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If * the`multicastInterface` argument is not specified, the operating system * will choose one interface and will add membership to it. To add membership * to every available interface, call `addMembership` multiple times, once * per interface. * * When called on an unbound socket, this method will implicitly bind to a * random port, listening on all interfaces. * * When sharing a UDP socket across multiple `cluster` workers, the * `socket.addMembership()` function must be called only once or an * `EADDRINUSE` error will occur: * * ```js * import cluster from "ext:deno_node/cluster"; * import dgram from "ext:deno_node/dgram"; * * if (cluster.isPrimary) { * cluster.fork(); // Works ok. * cluster.fork(); // Fails with EADDRINUSE. * } else { * const s = dgram.createSocket('udp4'); * s.bind(1234, () => { * s.addMembership('224.0.0.114'); * }); * } * ``` */ addMembership(multicastAddress, interfaceAddress) { healthCheck(this); if (!multicastAddress) { throw new ERR_MISSING_ARGS("multicastAddress"); } const { handle } = this[kStateSymbol]; const err = handle.addMembership(multicastAddress, interfaceAddress); if (err) { throw errnoException(err, "addMembership"); } } /** * Tells the kernel to join a source-specific multicast channel at the given * `sourceAddress` and `groupAddress`, using the `multicastInterface` with * the `IP_ADD_SOURCE_MEMBERSHIP` socket option. If the `multicastInterface` * argument is not specified, the operating system will choose one interface * and will add membership to it. To add membership to every available * interface, call `socket.addSourceSpecificMembership()` multiple times, * once per interface. * * When called on an unbound socket, this method will implicitly bind to a * random port, listening on all interfaces. */ addSourceSpecificMembership(sourceAddress, groupAddress, interfaceAddress) { healthCheck(this); validateString(sourceAddress, "sourceAddress"); validateString(groupAddress, "groupAddress"); const err = this[kStateSymbol].handle.addSourceSpecificMembership(sourceAddress, groupAddress, interfaceAddress); if (err) { throw errnoException(err, "addSourceSpecificMembership"); } } /** * Returns an object containing the address information for a socket. * For UDP sockets, this object will contain `address`, `family` and `port`properties. * * This method throws `EBADF` if called on an unbound socket. */ address() { healthCheck(this); const out = {}; const err = this[kStateSymbol].handle.getsockname(out); if (err) { throw errnoException(err, "getsockname"); } return out; } bind(port_, address_ /* callback */ ) { let port = typeof port_ === "function" ? null : port_; healthCheck(this); const state = this[kStateSymbol]; if (state.bindState !== BIND_STATE_UNBOUND) { throw new ERR_SOCKET_ALREADY_BOUND(); } state.bindState = BIND_STATE_BINDING; const cb = arguments.length && arguments[arguments.length - 1]; if (typeof cb === "function") { // deno-lint-ignore no-inner-declarations function removeListeners() { this.removeListener("error", removeListeners); this.removeListener("listening", onListening); } // deno-lint-ignore no-inner-declarations function onListening() { removeListeners.call(this); cb.call(this); } this.on("error", removeListeners); this.on("listening", onListening); } if (isUdpHandle(port)) { replaceHandle(this, port); startListening(this); return this; } // Open an existing fd instead of creating a new one. if (isBindOptions(port) && isInt32(port.fd) && port.fd > 0) { const fd = port.fd; const state = this[kStateSymbol]; // TODO(cmorten): here we deviate somewhat from the Node implementation which // makes use of the https://nodejs.org/api/cluster.html module to run servers // across a "cluster" of Node processes to take advantage of multi-core // systems. // // Though Deno has has a Worker capability from which we could simulate this, // for now we assert that we are _always_ on the primary process. const type = guessHandleType(fd); if (type !== "UDP") { throw new ERR_INVALID_FD_TYPE(type); } const err = state.handle.open(fd); if (err) { throw errnoException(err, "open"); } startListening(this); return this; } let address; if (isBindOptions(port)) { address = port.address || ""; port = port.port; } else { address = typeof address_ === "function" ? "" : address_; } // Defaulting address for bind to all interfaces if (!address) { if (this.type === "udp4") { address = "0.0.0.0"; } else { address = "::"; } } // Resolve address first state.handle.lookup(address, (lookupError, ip)=>{ if (lookupError) { state.bindState = BIND_STATE_UNBOUND; this.emit("error", lookupError); return; } let flags = 0; if (state.reuseAddr) { flags |= UV_UDP_REUSEADDR; } if (state.ipv6Only) { flags |= UV_UDP_IPV6ONLY; } // TODO(cmorten): here we deviate somewhat from the Node implementation which // makes use of the https://nodejs.org/api/cluster.html module to run servers // across a "cluster" of Node processes to take advantage of multi-core // systems. // // Though Deno has has a Worker capability from which we could simulate this, // for now we assert that we are _always_ on the primary process. if (!state.handle) { return; // Handle has been closed in the mean time } const err = state.handle.bind(ip, port || 0, flags); if (err) { const ex = exceptionWithHostPort(err, "bind", ip, port); state.bindState = BIND_STATE_UNBOUND; this.emit("error", ex); // Todo(@bartlomieju): close? return; } startListening(this); }); return this; } /** * Close the underlying socket and stop listening for data on it. If a * callback is provided, it is added as a listener for the `'close'` event. * * @param callback Called when the socket has been closed. */ close(callback) { const state = this[kStateSymbol]; const queue = state.queue; if (typeof callback === "function") { this.on("close", callback); } if (queue !== undefined) { queue.push(this.close.bind(this)); return this; } healthCheck(this); stopReceiving(this); state.handle.close(); state.handle = null; defaultTriggerAsyncIdScope(this[asyncIdSymbol], nextTick, socketCloseNT, this); return this; } connect(port, address, callback) { port = validatePort(port, "Port", false); if (typeof address === "function") { callback = address; address = ""; } else if (address === undefined) { address = ""; } validateString(address, "address"); const state = this[kStateSymbol]; if (state.connectState !== CONNECT_STATE_DISCONNECTED) { throw new ERR_SOCKET_DGRAM_IS_CONNECTED(); } state.connectState = CONNECT_STATE_CONNECTING; if (state.bindState === BIND_STATE_UNBOUND) { this.bind({ port: 0, exclusive: true }); } if (state.bindState !== BIND_STATE_BOUND) { enqueue(this, _connect.bind(this, port, address, callback)); return; } Reflect.apply(_connect, this, [ port, address, callback ]); } /** * A synchronous function that disassociates a connected `dgram.Socket` from * its remote address. Trying to call `disconnect()` on an unbound or already * disconnected socket will result in an `ERR_SOCKET_DGRAM_NOT_CONNECTED` * exception. */ disconnect() { const state = this[kStateSymbol]; if (state.connectState !== CONNECT_STATE_CONNECTED) { throw new ERR_SOCKET_DGRAM_NOT_CONNECTED(); } const err = state.handle.disconnect(); if (err) { throw errnoException(err, "connect"); } else { state.connectState = CONNECT_STATE_DISCONNECTED; } } /** * Instructs the kernel to leave a multicast group at `multicastAddress` * using the `IP_DROP_MEMBERSHIP` socket option. This method is automatically * called by the kernel when the socket is closed or the process terminates, * so most apps will never have reason to call this. * * If `multicastInterface` is not specified, the operating system will * attempt to drop membership on all valid interfaces. */ dropMembership(multicastAddress, interfaceAddress) { healthCheck(this); if (!multicastAddress) { throw new ERR_MISSING_ARGS("multicastAddress"); } const err = this[kStateSymbol].handle.dropMembership(multicastAddress, interfaceAddress); if (err) { throw errnoException(err, "dropMembership"); } } /** * Instructs the kernel to leave a source-specific multicast channel at the * given `sourceAddress` and `groupAddress` using the * `IP_DROP_SOURCE_MEMBERSHIP` socket option. This method is automatically * called by the kernel when the socket is closed or the process terminates, * so most apps will never have reason to call this. * * If `multicastInterface` is not specified, the operating system will * attempt to drop membership on all valid interfaces. */ dropSourceSpecificMembership(sourceAddress, groupAddress, interfaceAddress) { healthCheck(this); validateString(sourceAddress, "sourceAddress"); validateString(groupAddress, "groupAddress"); const err = this[kStateSymbol].handle.dropSourceSpecificMembership(sourceAddress, groupAddress, interfaceAddress); if (err) { throw errnoException(err, "dropSourceSpecificMembership"); } } /** * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound * socket. * * @return the `SO_RCVBUF` socket receive buffer size in bytes. */ getRecvBufferSize() { return bufferSize(this, 0, RECV_BUFFER); } /** * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound * socket. * * @return the `SO_SNDBUF` socket send buffer size in bytes. */ getSendBufferSize() { return bufferSize(this, 0, SEND_BUFFER); } /** * By default, binding a socket will cause it to block the Node.js process * from exiting as long as the socket is open. The `socket.unref()` method * can be used to exclude the socket from the reference counting that keeps * the Node.js process active. The `socket.ref()` method adds the socket back * to the reference counting and restores the default behavior. * * Calling `socket.ref()` multiples times will have no additional effect. * * The `socket.ref()` method returns a reference to the socket so calls can * be chained. */ ref() { const handle = this[kStateSymbol].handle; if (handle) { handle.ref(); } return this; } /** * Returns an object containing the `address`, `family`, and `port` of the * remote endpoint. This method throws an `ERR_SOCKET_DGRAM_NOT_CONNECTED` * exception if the socket is not connected. */ remoteAddress() { healthCheck(this); const state = this[kStateSymbol]; if (state.connectState !== CONNECT_STATE_CONNECTED) { throw new ERR_SOCKET_DGRAM_NOT_CONNECTED(); } const out = {}; const err = state.handle.getpeername(out); if (err) { throw errnoException(err, "getpeername"); } return out; } send(buffer, offset, length, port, address, callback) { let list; const state = this[kStateSymbol]; const connected = state.connectState === CONNECT_STATE_CONNECTED; if (!connected) { if (address || port && typeof port !== "function") { buffer = sliceBuffer(buffer, offset, length); } else { callback = port; port = offset; address = length; } } else { if (typeof length === "number") { buffer = sliceBuffer(buffer, offset, length); if (typeof port === "function") { callback = port; port = null; } } else { callback = offset; } if (port || address) { throw new ERR_SOCKET_DGRAM_IS_CONNECTED(); } } if (!Array.isArray(buffer)) { if (typeof buffer === "string") { list = [ Buffer.from(buffer) ]; } else if (!isArrayBufferView(buffer)) { throw new ERR_INVALID_ARG_TYPE("buffer", [ "Buffer", "TypedArray", "DataView", "string" ], buffer); } else { list = [ buffer ]; } } else if (!(list = fixBufferList(buffer))) { throw new ERR_INVALID_ARG_TYPE("buffer list arguments", [ "Buffer", "TypedArray", "DataView", "string" ], buffer); } if (!connected) { port = validatePort(port, "Port", false); } // Normalize callback so it's either a function or undefined but not anything // else. if (typeof callback !== "function") { callback = undefined; } if (typeof address === "function") { callback = address; address = undefined; } else if (address && typeof address !== "string") { throw new ERR_INVALID_ARG_TYPE("address", [ "string", "falsy" ], address); } healthCheck(this); if (state.bindState === BIND_STATE_UNBOUND) { this.bind({ port: 0, exclusive: true }); } if (list.length === 0) { list.push(Buffer.alloc(0)); } // If the socket hasn't been bound yet, push the outbound packet onto the // send queue and send after binding is complete. if (state.bindState !== BIND_STATE_BOUND) { // @ts-ignore mapping unknowns back onto themselves doesn't type nicely enqueue(this, this.send.bind(this, list, port, address, callback)); return; } const afterDns = (ex, ip)=>{ defaultTriggerAsyncIdScope(this[asyncIdSymbol], doSend, ex, this, ip, list, address, port, callback); }; if (!connected) { state.handle.lookup(address, afterDns); } else { afterDns(null, ""); } } /** * Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP * packets may be sent to a local interface's broadcast address. * * This method throws `EBADF` if called on an unbound socket. */ setBroadcast(arg) { const err = this[kStateSymbol].handle.setBroadcast(arg ? 1 : 0); if (err) { throw errnoException(err, "setBroadcast"); } } /** * _All references to scope in this section are referring to [IPv6 Zone Indices](https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses), which are defined by [RFC * 4007](https://tools.ietf.org/html/rfc4007). In string form, an IP_ * _with a scope index is written as `'IP%scope'` where scope is an interface name_ * _or interface number._ * * Sets the default outgoing multicast interface of the socket to a chosen * interface or back to system interface selection. The `multicastInterface` must * be a valid string representation of an IP from the socket's family. * * For IPv4 sockets, this should be the IP configured for the desired physical * interface. All packets sent to multicast on the socket will be sent on the * interface determined by the most recent successful use of this call. * * For IPv6 sockets, `multicastInterface` should include a scope to indicate the * interface as in the examples that follow. In IPv6, individual `send` calls can * also use explicit scope in addresses, so only packets sent to a multicast * address without specifying an explicit scope are affected by the most recent * successful use of this call. * * This method throws `EBADF` if called on an unbound socket. * * #### Example: IPv6 outgoing multicast interface * * On most systems, where scope format uses the interface name: * * ```js * const socket = dgram.createSocket('udp6'); * * socket.bind(1234, () => { * socket.setMulticastInterface('::%eth1'); * }); * ``` * * On Windows, where scope format uses an interface number: * * ```js * const socket = dgram.createSocket('udp6'); * * socket.bind(1234, () => { * socket.setMulticastInterface('::%2'); * }); * ``` * * #### Example: IPv4 outgoing multicast interface * * All systems use an IP of the host on the desired physical interface: * * ```js * const socket = dgram.createSocket('udp4'); * * socket.bind(1234, () => { * socket.setMulticastInterface('10.0.0.2'); * }); * ``` */ setMulticastInterface(interfaceAddress) { healthCheck(this); validateString(interfaceAddress, "interfaceAddress"); const err = this[kStateSymbol].handle.setMulticastInterface(interfaceAddress); if (err) { throw errnoException(err, "setMulticastInterface"); } } /** * Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`, * multicast packets will also be received on the local interface. * * This method throws `EBADF` if called on an unbound socket. */ setMulticastLoopback(arg) { const err = this[kStateSymbol].handle.setMulticastLoopback(arg ? 1 : 0); if (err) { throw errnoException(err, "setMulticastLoopback"); } return arg; // 0.4 compatibility } /** * Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for * "Time to Live", in this context it specifies the number of IP hops that a * packet is allowed to travel through, specifically for multicast traffic. Each * router or gateway that forwards a packet decrements the TTL. If the TTL is * decremented to 0 by a router, it will not be forwarded. * * The `ttl` argument may be between 0 and 255\. The default on most systems is `1`. * * This method throws `EBADF` if called on an unbound socket. */ setMulticastTTL(ttl) { validateNumber(ttl, "ttl"); const err = this[kStateSymbol].handle.setMulticastTTL(ttl); if (err) { throw errnoException(err, "setMulticastTTL"); } return ttl; } /** * Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer * in bytes. * * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. */ setRecvBufferSize(size) { bufferSize(this, size, RECV_BUFFER); } /** * Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer * in bytes. * * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. */ setSendBufferSize(size) { bufferSize(this, size, SEND_BUFFER); } /** * Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live", * in this context it specifies the number of IP hops that a packet is allowed to * travel through. Each router or gateway that forwards a packet decrements the * TTL. If the TTL is decremented to 0 by a router, it will not be forwarded. * Changing TTL values is typically done for network probes or when multicasting. * * The `ttl` argument may be between between 1 and 255\. The default on most systems * is 64. * * This method throws `EBADF` if called on an unbound socket. */ setTTL(ttl) { validateNumber(ttl, "ttl"); const err = this[kStateSymbol].handle.setTTL(ttl); if (err) { throw errnoException(err, "setTTL"); } return ttl; } /** * By default, binding a socket will cause it to block the Node.js process from * exiting as long as the socket is open. The `socket.unref()` method can be used * to exclude the socket from the reference counting that keeps the Node.js * process active, allowing the process to exit even if the socket is still * listening. * * Calling `socket.unref()` multiple times will have no addition effect. * * The `socket.unref()` method returns a reference to the socket so calls can be * chained. */ unref() { const handle = this[kStateSymbol].handle; if (handle) { handle.unref(); } return this; } } export function createSocket(type, listener) { return new Socket(type, listener); } function startListening(socket) { const state = socket[kStateSymbol]; state.handle.onmessage = onMessage; // Todo(@bartlomieju): handle errors state.handle.recvStart(); state.receiving = true; state.bindState = BIND_STATE_BOUND; if (state.recvBufferSize) { bufferSize(socket, state.recvBufferSize, RECV_BUFFER); } if (state.sendBufferSize) { bufferSize(socket, state.sendBufferSize, SEND_BUFFER); } socket.emit("listening"); } function replaceHandle(self, newHandle) { const state = self[kStateSymbol]; const oldHandle = state.handle; // Set up the handle that we got from primary. newHandle.lookup = oldHandle.lookup; newHandle.bind = oldHandle.bind; newHandle.send = oldHandle.send; newHandle[ownerSymbol] = self; // Replace the existing handle by the handle we got from primary. oldHandle.close(); state.handle = newHandle; } function bufferSize(self, size, buffer) { if (size >>> 0 !== size) { throw new ERR_SOCKET_BAD_BUFFER_SIZE(); } const ctx = {}; const ret = self[kStateSymbol].handle.bufferSize(size, buffer, ctx); if (ret === undefined) { throw new ERR_SOCKET_BUFFER_SIZE(ctx); } return ret; } function socketCloseNT(self) { self.emit("close"); } function healthCheck(socket) { if (!socket[kStateSymbol].handle) { // Error message from dgram_legacy.js. throw new ERR_SOCKET_DGRAM_NOT_RUNNING(); } } function stopReceiving(socket) { const state = socket[kStateSymbol]; if (!state.receiving) { return; } state.handle.recvStop(); state.receiving = false; } function onMessage(nread, handle, buf, rinfo) { const self = handle[ownerSymbol]; if (nread < 0) { self.emit("error", errnoException(nread, "recvmsg")); return; } rinfo.size = buf.length; // compatibility self.emit("message", buf, rinfo); } function sliceBuffer(buffer, offset, length) { if (typeof buffer === "string") { buffer = Buffer.from(buffer); } else if (!isArrayBufferView(buffer)) { throw new ERR_INVALID_ARG_TYPE("buffer", [ "Buffer", "TypedArray", "DataView", "string" ], buffer); } offset = offset >>> 0; length = length >>> 0; if (offset > buffer.byteLength) { throw new ERR_BUFFER_OUT_OF_BOUNDS("offset"); } if (offset + length > buffer.byteLength) { throw new ERR_BUFFER_OUT_OF_BOUNDS("length"); } return Buffer.from(buffer.buffer, buffer.byteOffset + offset, length); } function fixBufferList(list) { const newList = new Array(list.length); for(let i = 0, l = list.length; i < l; i++){ const buf = list[i]; if (typeof buf === "string") { newList[i] = Buffer.from(buf); } else if (!isArrayBufferView(buf)) { return null; } else { newList[i] = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); } } return newList; } function enqueue(self, toEnqueue) { const state = self[kStateSymbol]; // If the send queue hasn't been initialized yet, do it, and install an // event handler that flushes the send queue after binding is done. if (state.queue === undefined) { state.queue = []; self.once(EventEmitter.errorMonitor, onListenError); self.once("listening", onListenSuccess); } state.queue.push(toEnqueue); } function onListenSuccess() { this.removeListener(EventEmitter.errorMonitor, onListenError); clearQueue.call(this); } function onListenError() { this.removeListener("listening", onListenSuccess); this[kStateSymbol].queue = undefined; } function clearQueue() { const state = this[kStateSymbol]; const queue = state.queue; state.queue = undefined; // Flush the send queue. for (const queueEntry of queue){ queueEntry(); } } function _connect(port, address, callback) { const state = this[kStateSymbol]; if (callback) { this.once("connect", callback); } const afterDns = (ex, ip)=>{ defaultTriggerAsyncIdScope(this[asyncIdSymbol], doConnect, ex, this, ip, address, port, callback); }; state.handle.lookup(address, afterDns); } function doConnect(ex, self, ip, address, port, callback) { const state = self[kStateSymbol]; if (!state.handle) { return; } if (!ex) { const err = state.handle.connect(ip, port); if (err) { ex = exceptionWithHostPort(err, "connect", address, port); } } if (ex) { state.connectState = CONNECT_STATE_DISCONNECTED; return nextTick(()=>{ if (callback) { self.removeListener("connect", callback); callback(ex); } else { self.emit("error", ex); } }); } state.connectState = CONNECT_STATE_CONNECTED; nextTick(()=>self.emit("connect")); } function doSend(ex, self, ip, list, address, port, callback) { const state = self[kStateSymbol]; if (ex) { if (typeof callback === "function") { nextTick(callback, ex); return; } nextTick(()=>self.emit("error", ex)); return; } else if (!state.handle) { return; } const req = new SendWrap(); req.list = list; // Keep reference alive. req.address = address; req.port = port; if (callback) { req.callback = callback; req.oncomplete = afterSend; } let err; if (port) { err = state.handle.send(req, list, list.length, port, ip, !!callback); } else { err = state.handle.send(req, list, list.length, !!callback); } if (err >= 1) { // Synchronous finish. The return code is msg_length + 1 so that we can // distinguish between synchronous success and asynchronous success. if (callback) { nextTick(callback, null, err - 1); } return; } if (err && callback) { // Don't emit as error, dgram_legacy.js compatibility const ex = exceptionWithHostPort(err, "send", address, port); nextTick(callback, ex); } } function afterSend(err, sent) { let ex; if (err) { ex = exceptionWithHostPort(err, "send", this.address, this.port); } else { ex = null; } this.callback(ex, sent); } export default { createSocket, Socket }; Qb^5 node:dgrama bJD`M`8 T`La> T  I`ce Sb1"  " " ´ b   B  b      "  " b  B   " " b "   ~???????????????????????????????Ib@{`8L`  b]`>"]`j ]`" ]`ˆ ]`g ]`" ]`2 ]`{"} ]`* ]` b]`( " ]`f ],L` ` L`b ` L`b ™ ` L`™ ]L`  D"{ "{ c06 D  c Db b c D" " c DB B c D¦ ¦ c Db b c  D" " c% D¨ ¨ c'D D  cFd DB B cf D  cVb D" " c D" " c)6 Dc   D  c8R D  c D  c Db b cds D"3"3c M ^  D  c D" " c D  c D± ± c  Dc D  cT_ DB B c D  c  D  c D  c*`!"{ a? a? a?b a?" a?B a?¦ a?b a?" a?¨ a? a?B a? a? a?" a? a?" a? a? a?" a? a?B a? a? a? a?b a?a?± a?a?"3a?b a?™ a?a?b@#X T I`ePg  b@$Y T I`dgzh" b@%Z T I`hh b@&[ T I`hUi" b@'\ T I`liib b@(] T I`jk b@)^ T I`kcmB b@*_ T I`zmn b@+` T I`opb@,a T I`pq b@-b T I`qq" b@.c T I`qIr" b@/d T I`[rsb b@0e T I`su" b@2f T I` vZz b@5g T I`mz{ b@7hLa T I`cc™ b@"Wb,a "    T  ` K  bKi T  `a  bKj T  `   bKk,Sb @c?? c  `T ``/ `/ `?  `  a cD]! ` aj aj ajb aj1aj,aj >aj*  aj B aj$  aj(  aj ajB'ajB aj baj  aj aj" aj aj&B aj" aj  aj'aj]  T  I`B b ub Ճl" "  T I`q b m T I` bn T I`y=b b o T I`D+d@A@AB@:@b p T I`,.bq T I`.1>br T I`244 b s T I`577B bt T I`@9: bu T I`z;; bv T I`g<< bw T I`>N?B'bx T I`1@AB b y T I`A$Lbbz T I`MM b { T I` VW b| T I`XX" b} T I`[[ b~ T I`\\B b T I`]] b T I`H`` b T I`cc'b  T0` L`  I`Kb h L D e553(Sbqqb `Da cu a 4b!  b™ Cb C™ b  `Dh %%%%%%% % % % % %%%%%%%%%%% % % % % % %%% %!ei h  0-%-%0b% % % % % % % % % %%%%%0 0!t%0"t%#$%&'()*+,-. /!0"1#2$3%4&߂5'ނ6(݂7)܂8*e+9+2: 1~;)03< 03= 1  b -@ LbAV]emDDş͟՟ݟD %-5=EUўٞ !)1D9DADID`RD]DH Q<ɧk// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { ERR_INVALID_ARG_TYPE } from "ext:deno_node/internal/errors.ts"; import { validateFunction } from "ext:deno_node/internal/validators.mjs"; import { nextTick } from "node:process"; export class Channel { _subscribers; name; constructor(name){ this._subscribers = []; this.name = name; } publish(message) { for (const subscriber of this._subscribers){ try { subscriber(message, this.name); } catch (err) { nextTick(()=>{ throw err; }); } } } subscribe(subscription) { validateFunction(subscription, "subscription"); this._subscribers.push(subscription); } unsubscribe(subscription) { if (!this._subscribers.includes(subscription)) { return false; } this._subscribers.splice(this._subscribers.indexOf(subscription), 1); return true; } get hasSubscribers() { return this._subscribers.length > 0; } } const channels = {}; export function channel(name) { if (typeof name !== "string" && typeof name !== "symbol") { throw new ERR_INVALID_ARG_TYPE("channel", [ "string", "symbol" ], name); } if (!Object.hasOwn(channels, name)) { channels[name] = new Channel(name); } return channels[name]; } export function hasSubscribers(name) { if (!Object.hasOwn(channels, name)) { return false; } return channels[name].hasSubscribers; } export function subscribe(name, subscription) { const c = channel(name); return c.subscribe(subscription); } export function unsubscribe(name, subscription) { const c = channel(name); return c.unsubscribe(subscription); } export default { channel, hasSubscribers, subscribe, unsubscribe, Channel }; QcZdinode:diagnostics_channela bKD`8M`  Tp`PLa$@La TL`X$L`b   `M` (   `Dl   !  0{% i!-_0 i 4  / (SbqA`DaSb1`?Ibk`L`  ]`" ]`$* ]`f]PL`` L` ` L` ` L` ` L` B ` L`B B ` L`B ]L`  Db b c D± ± cV^ D  c ` b a? a?± a? a?a? a?B a?B a?a?b mb@a T  I`- b@ a T I`GB b@ a T I`B b@ b a   `T ``/ `/ `?  `  a}[D]H ` ajb ajB ajB aj `+ } `F] T0`L`    !`De- ]}2 2(SbpG `Da a 0`mb Ճ T  I`b b T I`GB b  T I`UB b  T I`(YQcget hasSubscribersb T(` L`   ]`Kb   @ c33(Sbqq `Da[ a 0mb 8b C CB CB C C B B   `DuPh %ei h   e+ 2 1%~ )03 030303 03 1 b LbA5D=EMYD`RD]DH QQM1̉6// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { nextTick } from "ext:deno_node/_next_tick.ts"; import { customPromisifyArgs } from "ext:deno_node/internal/util.mjs"; import { validateBoolean, validateFunction, validateNumber, validateOneOf, validateString } from "ext:deno_node/internal/validators.mjs"; import { isIP } from "ext:deno_node/internal/net.ts"; import { emitInvalidHostnameWarning, getDefaultResolver, getDefaultVerbatim, isFamily, isLookupCallback, isLookupOptions, isResolveCallback, Resolver as CallbackResolver, setDefaultResolver, setDefaultResultOrder, validateHints } from "ext:deno_node/internal/dns/utils.ts"; import promisesBase from "ext:deno_node/internal/dns/promises.ts"; import { dnsException, ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE } from "ext:deno_node/internal/errors.ts"; import { AI_ADDRCONFIG as ADDRCONFIG, AI_ALL as ALL, AI_V4MAPPED as V4MAPPED } from "ext:deno_node/internal_binding/ares.ts"; import { getaddrinfo, GetAddrInfoReqWrap, QueryReqWrap } from "ext:deno_node/internal_binding/cares_wrap.ts"; import { toASCII } from "node:punycode"; import { notImplemented } from "ext:deno_node/_utils.ts"; function onlookup(err, addresses) { if (err) { return this.callback(dnsException(err, "getaddrinfo", this.hostname)); } this.callback(null, addresses[0], this.family || isIP(addresses[0])); } function onlookupall(err, addresses) { if (err) { return this.callback(dnsException(err, "getaddrinfo", this.hostname)); } const family = this.family; const parsedAddresses = []; for(let i = 0; i < addresses.length; i++){ const addr = addresses[i]; parsedAddresses[i] = { address: addr, family: family || isIP(addr) }; } this.callback(null, parsedAddresses); } const validFamilies = [ 0, 4, 6 ]; export function lookup(hostname, options, callback) { let hints = 0; let family = 0; let all = false; let verbatim = getDefaultVerbatim(); // Parse arguments if (hostname) { validateString(hostname, "hostname"); } if (isLookupCallback(options)) { callback = options; family = 0; } else if (isFamily(options)) { validateFunction(callback, "callback"); validateOneOf(options, "family", validFamilies); family = options; } else if (!isLookupOptions(options)) { validateFunction(arguments.length === 2 ? options : callback, "callback"); throw new ERR_INVALID_ARG_TYPE("options", [ "integer", "object" ], options); } else { validateFunction(callback, "callback"); if (options?.hints != null) { validateNumber(options.hints, "options.hints"); hints = options.hints >>> 0; validateHints(hints); } if (options?.family != null) { validateOneOf(options.family, "options.family", validFamilies); family = options.family; } if (options?.all != null) { validateBoolean(options.all, "options.all"); all = options.all; } if (options?.verbatim != null) { validateBoolean(options.verbatim, "options.verbatim"); verbatim = options.verbatim; } } if (!hostname) { emitInvalidHostnameWarning(hostname); if (all) { nextTick(callback, null, []); } else { nextTick(callback, null, null, family === 6 ? 6 : 4); } return {}; } const matchedFamily = isIP(hostname); if (matchedFamily) { if (all) { nextTick(callback, null, [ { address: hostname, family: matchedFamily } ]); } else { nextTick(callback, null, hostname, matchedFamily); } return {}; } const req = new GetAddrInfoReqWrap(); req.callback = callback; req.family = family; req.hostname = hostname; req.oncomplete = all ? onlookupall : onlookup; const err = getaddrinfo(req, toASCII(hostname), family, hints, verbatim); if (err) { nextTick(callback, dnsException(err, "getaddrinfo", hostname)); return {}; } return req; } Object.defineProperty(lookup, customPromisifyArgs, { value: [ "address", "family" ], enumerable: false }); function onresolve(err, records, ttls) { if (err) { this.callback(dnsException(err, this.bindingName, this.hostname)); return; } const parsedRecords = ttls && this.ttl ? records.map((address, index)=>({ address, ttl: ttls[index] })) : records; this.callback(null, parsedRecords); } function resolver(bindingName) { function query(name, options, callback) { if (isResolveCallback(options)) { callback = options; options = {}; } validateString(name, "name"); validateFunction(callback, "callback"); const req = new QueryReqWrap(); req.bindingName = bindingName; req.callback = callback; req.hostname = name; req.oncomplete = onresolve; if (options && options.ttl) { notImplemented("dns.resolve* with ttl option"); } req.ttl = !!(options && options.ttl); const err = this._handle[bindingName](req, toASCII(name)); if (err) { throw dnsException(err, bindingName, name); } return req; } Object.defineProperty(query, "name", { value: bindingName }); return query; } const resolveMap = Object.create(null); export class Resolver extends CallbackResolver { constructor(options){ super(options); } } Resolver.prototype.resolveAny = resolveMap.ANY = resolver("queryAny"); Resolver.prototype.resolve4 = resolveMap.A = resolver("queryA"); Resolver.prototype.resolve6 = resolveMap.AAAA = resolver("queryAaaa"); Resolver.prototype.resolveCaa = resolveMap.CAA = resolver("queryCaa"); Resolver.prototype.resolveCname = resolveMap.CNAME = resolver("queryCname"); Resolver.prototype.resolveMx = resolveMap.MX = resolver("queryMx"); Resolver.prototype.resolveNs = resolveMap.NS = resolver("queryNs"); Resolver.prototype.resolveTxt = resolveMap.TXT = resolver("queryTxt"); Resolver.prototype.resolveSrv = resolveMap.SRV = resolver("querySrv"); Resolver.prototype.resolvePtr = resolveMap.PTR = resolver("queryPtr"); Resolver.prototype.resolveNaptr = resolveMap.NAPTR = resolver("queryNaptr"); Resolver.prototype.resolveSoa = resolveMap.SOA = resolver("querySoa"); Resolver.prototype.reverse = resolver("getHostByAddr"); Resolver.prototype.resolve = _resolve; function _resolve(hostname, rrtype, callback) { let resolver; if (typeof hostname !== "string") { throw new ERR_INVALID_ARG_TYPE("name", "string", hostname); } if (typeof rrtype === "string") { resolver = resolveMap[rrtype]; } else if (typeof rrtype === "function") { resolver = resolveMap.A; callback = rrtype; } else { throw new ERR_INVALID_ARG_TYPE("rrtype", "string", rrtype); } if (typeof resolver === "function") { return Reflect.apply(resolver, this, [ hostname, callback ]); } throw new ERR_INVALID_ARG_VALUE("rrtype", rrtype); } /** * Sets the IP address and port of servers to be used when performing DNS * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted * addresses. If the port is the IANA default DNS port (53) it can be omitted. * * ```js * dns.setServers([ * '4.4.4.4', * '[2001:4860:4860::8888]', * '4.4.4.4:1053', * '[2001:4860:4860::8888]:1053', * ]); * ``` * * An error will be thrown if an invalid address is provided. * * The `dns.setServers()` method must not be called while a DNS query is in * progress. * * The `setServers` method affects only `resolve`,`dns.resolve*()` and `reverse` (and specifically _not_ `lookup`). * * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). * That is, if attempting to resolve with the first server provided results in a * `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with * subsequent servers provided. Fallback DNS servers will only be used if the * earlier ones time out or result in some other error. * * @param servers array of `RFC 5952` formatted addresses */ export function setServers(servers) { const resolver = new Resolver(); resolver.setServers(servers); setDefaultResolver(resolver); } // The Node implementation uses `bindDefaultResolver` to set the follow methods // on `module.exports` bound to the current `defaultResolver`. We don't have // the same ability in ESM but can simulate this (at some cost) by explicitly // exporting these methods which dynamically bind to the default resolver when // called. /** * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), * that are currently configured for DNS resolution. A string will include a port * section if a custom port is used. * * ```js * [ * '4.4.4.4', * '2001:4860:4860::8888', * '4.4.4.4:1053', * '[2001:4860:4860::8888]:1053', * ] * ``` */ export function getServers() { return Resolver.prototype.getServers.bind(getDefaultResolver())(); } export function resolveAny(...args) { return Resolver.prototype.resolveAny.bind(getDefaultResolver())(...args); } export function resolve4(hostname, options, callback) { return Resolver.prototype.resolve4.bind(getDefaultResolver())(hostname, options, callback); } export function resolve6(hostname, options, callback) { return Resolver.prototype.resolve6.bind(getDefaultResolver())(hostname, options, callback); } export function resolveCaa(...args) { return Resolver.prototype.resolveCaa.bind(getDefaultResolver())(...args); } export function resolveCname(...args) { return Resolver.prototype.resolveCname.bind(getDefaultResolver())(...args); } export function resolveMx(...args) { return Resolver.prototype.resolveMx.bind(getDefaultResolver())(...args); } export function resolveNs(...args) { return Resolver.prototype.resolveNs.bind(getDefaultResolver())(...args); } export function resolveTxt(...args) { return Resolver.prototype.resolveTxt.bind(getDefaultResolver())(...args); } export function resolveSrv(...args) { return Resolver.prototype.resolveSrv.bind(getDefaultResolver())(...args); } export function resolvePtr(...args) { return Resolver.prototype.resolvePtr.bind(getDefaultResolver())(...args); } export function resolveNaptr(...args) { return Resolver.prototype.resolveNaptr.bind(getDefaultResolver())(...args); } export function resolveSoa(...args) { return Resolver.prototype.resolveSoa.bind(getDefaultResolver())(...args); } export function reverse(...args) { return Resolver.prototype.reverse.bind(getDefaultResolver())(...args); } export function resolve(hostname, rrtype, callback) { return Resolver.prototype.resolve.bind(getDefaultResolver())(hostname, rrtype, callback); } // ERROR CODES export const NODATA = "ENODATA"; export const FORMERR = "EFORMERR"; export const SERVFAIL = "ESERVFAIL"; export const NOTFOUND = "ENOTFOUND"; export const NOTIMP = "ENOTIMP"; export const REFUSED = "EREFUSED"; export const BADQUERY = "EBADQUERY"; export const BADNAME = "EBADNAME"; export const BADFAMILY = "EBADFAMILY"; export const BADRESP = "EBADRESP"; export const CONNREFUSED = "ECONNREFUSED"; export const TIMEOUT = "ETIMEOUT"; export const EOF = "EOF"; export const FILE = "EFILE"; export const NOMEM = "ENOMEM"; export const DESTRUCTION = "EDESTRUCTION"; export const BADSTR = "EBADSTR"; export const BADFLAGS = "EBADFLAGS"; export const NONAME = "ENONAME"; export const BADHINTS = "EBADHINTS"; export const NOTINITIALIZED = "ENOTINITIALIZED"; export const LOADIPHLPAPI = "ELOADIPHLPAPI"; export const ADDRGETNETWORKPARAMS = "EADDRGETNETWORKPARAMS"; export const CANCELLED = "ECANCELLED"; const promises = { ...promisesBase, setDefaultResultOrder, setServers, // ERROR CODES NODATA, FORMERR, SERVFAIL, NOTFOUND, NOTIMP, REFUSED, BADQUERY, BADNAME, BADFAMILY, BADRESP, CONNREFUSED, TIMEOUT, EOF, FILE, NOMEM, DESTRUCTION, BADSTR, BADFLAGS, NONAME, BADHINTS, NOTINITIALIZED, LOADIPHLPAPI, ADDRGETNETWORKPARAMS, CANCELLED }; export { ADDRCONFIG, ALL, promises, setDefaultResultOrder, V4MAPPED }; export default { ADDRCONFIG, ALL, V4MAPPED, lookup, getServers, resolveAny, resolve4, resolve6, resolveCaa, resolveCname, resolveMx, resolveNs, resolveTxt, resolveSrv, resolvePtr, resolveNaptr, resolveSoa, resolve, Resolver, reverse, setServers, setDefaultResultOrder, promises, NODATA, FORMERR, SERVFAIL, NOTFOUND, NOTIMP, REFUSED, BADQUERY, BADNAME, BADFAMILY, BADRESP, CONNREFUSED, TIMEOUT, EOF, FILE, NOMEM, DESTRUCTION, BADSTR, BADFLAGS, NONAME, BADHINTS, NOTINITIALIZED, LOADIPHLPAPI, ADDRGETNETWORKPARAMS, CANCELLED };  Qa}node:dnsa bLD`pM` T`LatC T  I` A B Sb1B "  B  d?????Ib6`4L`  B ]`@" ]`" ]` ]`E ]`Q ]` ]`b ]`} ]`* ]`-  ]`] L`  B D c2? " D cOU  D c^i  D c%:L`` L` ` L`  ` L`  ` L`  ` L`  ` L` " ` L`"  ` L` B `  L`B  `  L`  `  L` B `  L`B  `  L` " ` L`" " ` L`"  ` L`  ` L`  ` L`  ` L`  ` L`  ` L`  ` L` b ` L`b B ` L`B  ` L`  ` L` B ` L`B » ` L`»  ` L`  ` L` ` L` b `  L`b b `! L`b  `" L`  `# L` B `$ L`B  `% L`  `& L` B `' L`B  `( L`  `) L`  `* L` b8`+ L`b8b `, L`b ]L` DB  c2? D"  cOU D B c Db b c D  c D  c Db b c D  c^i D  ch{ DB B c DB B co D  c D  c DB B c DB B c D" " c9= D  c D" " c D  c D± ± c08 Db b c G U  D c D" " c# D  c%: D  c  %  D  c D  c Db b c<I D  c D" " c D  c`K± a? a? a? a? a?" a? a?" a?B a? a? a?B a? a?" a? a? a?" a? a?b a? a?B a?b a? a?B a?" a? a?B a? a?b a? a?b a?» a?B a?b a,?B a?b a!? a?b a ? a"? a#?B a$? a&? a*? a)?B a'? a%? a(?b8a+?a? a?" a? a? a? a?b a?" a? a? a? a? a ? a? a ?" a? a?B a ?B a ? a? a? a? a? a? a? a ? a?a?b@ T I`V " b@ T  I`B b@ T8`0$L`0SbqAb ` `Da,& T I`L,Ab@bC  9`Dg8 %!-~)3\ A a 0b@ T  I`v b@ AL`N T I` g» b@b T I`h$$b b@ a, T I`'(B b@ a T I`(v(b b@ a ! T I`() b@ a  T I`'))b b@a  T I`)* b@a " T I`7** b@a # T I`*+B b@a$ T I`+v+ b@a& T I`++ b@a* T I`,^, b@a) T I`y,,B b@a' T I`,J- b@a% T I`e-- b@a( T I`-,.b8b@a+ T I`D.. b@{    a   `Mc  b `M`b  H)  `T ``/ `/ `?  `  aVD] ` aj]  T  I`B b B  b   "  b  "   b  "  B b    B     "  B b    b  " b8 B]  B "    b B " BQ b   _   b B    " B   b  "    b "      "  B B        b^/B C" C C» CB Cb C Cb C C CB C C C CB C C CCB Cb8Cb C C C C" C C C Cb C" C C C C C C C" C CB CB C C C C C C C CB "  » B B    `DqHh Ƃ%%%%%ei h  { %%! - 00 ~  \! -^ %0e+ 10- b2 20- b2 20- b2 20- b 2" 2$0- b&2 ( 2!*0- "b,2#. 2$00- %b22&4 2'60- (b82): 2*<0- +b>2,@ 2-B0- .bD2/F 20H0- 1bJ22L 23N0- 4bP25R 26T0- 7bV28X0- 29Z:1;1<1=1>1?1@1A1B1C1D1 E1F1 G1H1I1 J1 K1L1M1N1O1P1Q1 0R)\0S3S^0,3T`03Ub03Vd03Wf03Xh03Yj03Zl03[n03\p03]r03^t0 3_v03`x0 3Fz03a|03b~0 3c0 3d03e03f03g03h03i03j0 3k 1~l)0m3m0n3n0o3o03p03q0!3030 30"30#3!0$3$0&3'0*3*0)3-0'300%330(3603903r0+380,3T03S03s03U03V03W03X03Y03Z03[03\03]03^0 3_03`0 3F03a03b0 3c0 3d03e03f03g03h03i03j0 3k 1 \uӀ&@             X 0 0 0 0 0 0 0 0 LbA%e-D5EYmu}ţͣգݣD`RD]DH Q6// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. import { promises } from "node:dns"; export const { getServers, lookup, resolve, resolve4, resolve6, resolveAny, resolveCaa, resolveCname, resolveMx, resolveNaptr, resolveNs, resolvePtr, Resolver, resolveSoa, resolveSrv, resolveTxt, reverse, setDefaultResultOrder, setServers, // ERROR CODES NODATA, FORMERR, SERVFAIL, NOTFOUND, NOTIMP, REFUSED, BADQUERY, BADNAME, BADFAMILY, BADRESP, CONNREFUSED, TIMEOUT, EOF, FILE, NOMEM, DESTRUCTION, BADSTR, BADFLAGS, NONAME, BADHINTS, NOTINITIALIZED, LOADIPHLPAPI, ADDRGETNETWORKPARAMS, CANCELLED } = promises; export default promises; QcZnode:dns/promisesa bMD` M` T`sLa0!L, !"#$%&'()*+,    a  B »   b b   B   B B    b8 b  "    b "       "  B B          9`D h ei h  0-1-1-1-1- 1- 1 - 1!- 1"- 1#-1$-1%-1&-1-1'-1(-1)- 1*-"1+-$1,-&1-(1-*1-,1-.1-01-21-41- 61-!81-":1 -#<1-$>1 -%@1-&B1-'D1 -(F1 -)H1-*J1-+L1-,N1--P1-.R1-/T1 01 ESb1Ib` L` b]`]L`` L` ` L`  ` L`  ` L`  ` L`  ` L` " ` L`"  ` L` B `  L`B  `  L`  `  L` B `  L`B  `  L` " ` L`" " ` L`"  ` L`  ` L`  ` L`  ` L`  ` L`  ` L`  ` L` b ` L`b B ` L`B  ` L`  ` L` B ` L`B » ` L`» ` L` ` L` b ` L`b b `  L`b  `! L`  `" L` B `# L`B  `$ L`  `% L` B `& L`B  `' L`  `( L`  `) L` b8`* L`b8 `+ L` b `, L`b ] L`  D  c`- a?B a?» a? a? a?b a?b a ? a!? a"?B a#? a$? a%?B a&?B a? a'? a(? a)?b8a*? a+?b a,? a?" a? a? a? a?b a?" a? a? a? a? a ? a? a ?" a? a?B a ?B a ? a? a? a? a? a? a? a ?a?(hVPPPPPPPPPPPPPP%bAD`RD]DH Q؊F(x// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. import { notImplemented } from "ext:deno_node/_utils.ts"; export function create() { notImplemented("domain.create"); } export class Domain { constructor(){ notImplemented("domain.Domain.prototype.constructor"); } } export default { create, Domain }; Qb node:domaina bND`M` TX`i,La !L` T  I`)XSb1Ib` L`  ]`],L` ` L`" ` L`" )` L`)] L`  Db b c`b a?)a?" a?a?b@ca   `T ``/ `/ `?  `  ayD] ` aj] T  I`5w" Ab  b)C" C)"   -`Do0h ei h  e+ 1~)0303 1  abA9yD`RD]DH Qk&// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @deno-types="./_events.d.ts" export { captureRejectionSymbol, default, defaultMaxListeners, errorMonitor, EventEmitter, getEventListeners, listenerCount, on, once, setMaxListeners } from "ext:deno_node/_events.mjs"; Qb# node:eventsa bOD` M` T8`-Lc   `Dg h Ʊh   (Sb1Ib&` L` " ]` 0L`    D ct Dc  D c " D" c  D c  D c bDbc B DB c BDBc  D c]` bAD`RD]DH  Q Fzg// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { access, accessPromise, accessSync } from "ext:deno_node/_fs/_fs_access.ts"; import { appendFile, appendFilePromise, appendFileSync } from "ext:deno_node/_fs/_fs_appendFile.ts"; import { chmod, chmodPromise, chmodSync } from "ext:deno_node/_fs/_fs_chmod.ts"; import { chown, chownPromise, chownSync } from "ext:deno_node/_fs/_fs_chown.ts"; import { close, closeSync } from "ext:deno_node/_fs/_fs_close.ts"; import * as constants from "ext:deno_node/_fs/_fs_constants.ts"; import { copyFile, copyFilePromise, copyFileSync } from "ext:deno_node/_fs/_fs_copy.ts"; import { cp, cpPromise, cpSync } from "ext:deno_node/_fs/_fs_cp.js"; import Dir from "ext:deno_node/_fs/_fs_dir.ts"; import Dirent from "ext:deno_node/_fs/_fs_dirent.ts"; import { exists, existsSync } from "ext:deno_node/_fs/_fs_exists.ts"; import { fdatasync, fdatasyncSync } from "ext:deno_node/_fs/_fs_fdatasync.ts"; import { fstat, fstatSync } from "ext:deno_node/_fs/_fs_fstat.ts"; import { fsync, fsyncSync } from "ext:deno_node/_fs/_fs_fsync.ts"; import { ftruncate, ftruncateSync } from "ext:deno_node/_fs/_fs_ftruncate.ts"; import { futimes, futimesSync } from "ext:deno_node/_fs/_fs_futimes.ts"; import { link, linkPromise, linkSync } from "ext:deno_node/_fs/_fs_link.ts"; import { lstat, lstatPromise, lstatSync } from "ext:deno_node/_fs/_fs_lstat.ts"; import { mkdir, mkdirPromise, mkdirSync } from "ext:deno_node/_fs/_fs_mkdir.ts"; import { mkdtemp, mkdtempPromise, mkdtempSync } from "ext:deno_node/_fs/_fs_mkdtemp.ts"; import { open, openPromise, openSync } from "ext:deno_node/_fs/_fs_open.ts"; import { opendir, opendirPromise, opendirSync } from "ext:deno_node/_fs/_fs_opendir.ts"; import { read, readSync } from "ext:deno_node/_fs/_fs_read.ts"; import { readdir, readdirPromise, readdirSync } from "ext:deno_node/_fs/_fs_readdir.ts"; import { readFile, readFilePromise, readFileSync } from "ext:deno_node/_fs/_fs_readFile.ts"; import { readlink, readlinkPromise, readlinkSync } from "ext:deno_node/_fs/_fs_readlink.ts"; import { realpath, realpathPromise, realpathSync } from "ext:deno_node/_fs/_fs_realpath.ts"; import { rename, renamePromise, renameSync } from "ext:deno_node/_fs/_fs_rename.ts"; import { rmdir, rmdirPromise, rmdirSync } from "ext:deno_node/_fs/_fs_rmdir.ts"; import { rm, rmPromise, rmSync } from "ext:deno_node/_fs/_fs_rm.ts"; import { stat, statPromise, statSync } from "ext:deno_node/_fs/_fs_stat.ts"; import { symlink, symlinkPromise, symlinkSync } from "ext:deno_node/_fs/_fs_symlink.ts"; import { truncate, truncatePromise, truncateSync } from "ext:deno_node/_fs/_fs_truncate.ts"; import { unlink, unlinkPromise, unlinkSync } from "ext:deno_node/_fs/_fs_unlink.ts"; import { utimes, utimesPromise, utimesSync } from "ext:deno_node/_fs/_fs_utimes.ts"; import { unwatchFile, watch, watchFile, watchPromise } from "ext:deno_node/_fs/_fs_watch.ts"; // @deno-types="./_fs/_fs_write.d.ts" import { write, writeSync } from "ext:deno_node/_fs/_fs_write.mjs"; // @deno-types="./_fs/_fs_writev.d.ts" import { writev, writevSync } from "ext:deno_node/_fs/_fs_writev.mjs"; import { writeFile, writeFilePromise, writeFileSync } from "ext:deno_node/_fs/_fs_writeFile.ts"; import { Stats } from "ext:deno_node/internal/fs/utils.mjs"; // @deno-types="./internal/fs/streams.d.ts" import { createReadStream, createWriteStream, ReadStream, WriteStream } from "ext:deno_node/internal/fs/streams.mjs"; const { F_OK, R_OK, W_OK, X_OK, O_RDONLY, O_WRONLY, O_RDWR, O_NOCTTY, O_TRUNC, O_APPEND, O_DIRECTORY, O_NOFOLLOW, O_SYNC, O_DSYNC, O_SYMLINK, O_NONBLOCK, O_CREAT, O_EXCL } = constants; const promises = { access: accessPromise, constants, copyFile: copyFilePromise, cp: cpPromise, open: openPromise, opendir: opendirPromise, rename: renamePromise, truncate: truncatePromise, rm: rmPromise, rmdir: rmdirPromise, mkdir: mkdirPromise, readdir: readdirPromise, readlink: readlinkPromise, symlink: symlinkPromise, lstat: lstatPromise, stat: statPromise, link: linkPromise, unlink: unlinkPromise, chmod: chmodPromise, // lchmod: promisify(lchmod), // lchown: promisify(lchown), chown: chownPromise, utimes: utimesPromise, // lutimes = promisify(lutimes), realpath: realpathPromise, mkdtemp: mkdtempPromise, writeFile: writeFilePromise, appendFile: appendFilePromise, readFile: readFilePromise, watch: watchPromise }; export default { access, accessSync, appendFile, appendFileSync, chmod, chmodSync, chown, chownSync, close, closeSync, constants, copyFile, copyFileSync, cp, cpSync, createReadStream, createWriteStream, Dir, Dirent, exists, existsSync, F_OK, fdatasync, fdatasyncSync, fstat, fstatSync, fsync, fsyncSync, ftruncate, ftruncateSync, futimes, futimesSync, link, linkSync, lstat, lstatSync, mkdir, mkdirSync, mkdtemp, mkdtempSync, O_APPEND, O_CREAT, O_DIRECTORY, O_DSYNC, O_EXCL, O_NOCTTY, O_NOFOLLOW, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYMLINK, O_SYNC, O_TRUNC, O_WRONLY, open, openSync, opendir, opendirSync, read, readSync, promises, R_OK, readdir, readdirSync, readFile, readFileSync, readlink, readlinkSync, ReadStream, realpath, realpathSync, rename, renameSync, rmdir, rmdirSync, rm, rmSync, stat, Stats, statSync, symlink, symlinkSync, truncate, truncateSync, unlink, unlinkSync, unwatchFile, utimes, utimesSync, W_OK, watch, watchFile, write, writeFile, writev, writevSync, writeFileSync, WriteStream, writeSync, X_OK }; export { access, accessSync, appendFile, appendFileSync, chmod, chmodSync, chown, chownSync, close, closeSync, constants, copyFile, copyFileSync, cp, cpSync, createReadStream, createWriteStream, Dir, Dirent, exists, existsSync, F_OK, fdatasync, fdatasyncSync, fstat, fstatSync, fsync, fsyncSync, ftruncate, ftruncateSync, futimes, futimesSync, link, linkSync, lstat, lstatSync, mkdir, mkdirSync, mkdtemp, mkdtempSync, O_APPEND, O_CREAT, O_DIRECTORY, O_DSYNC, O_EXCL, O_NOCTTY, O_NOFOLLOW, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYMLINK, O_SYNC, O_TRUNC, O_WRONLY, open, opendir, opendirSync, openSync, promises, R_OK, read, readdir, readdirSync, readFile, readFileSync, readlink, readlinkSync, ReadStream, readSync, realpath, realpathSync, rename, renameSync, rm, rmdir, rmdirSync, rmSync, stat, Stats, statSync, symlink, symlinkSync, truncate, truncateSync, unlink, unlinkSync, unwatchFile, utimes, utimesSync, W_OK, watch, watchFile, write, writeFile, writeFileSync, WriteStream, writeSync, writev, writevSync, X_OK };  Qa25node:fsa bPD` M` T`pLa,XLt    a "; ; ; B< < = b= = "> > > b? ? B@ @ "A A B b6 CbC¦Cb& CBvCB8 CC¿CF CbD CC"; C> CC"CCMCbL CC"CN C@ C4 CbC CCWCB  b"% ¦& b& 7 Bv8 B8 "C K ¿F F D bD 3 ; "; ? > I b2 "H "1 ML bL  ! "N N BA @ B5 4 BU b  B= Q W1bd C C C" CCC"CCC# CbC¦CCb& CB' CW CW Cb( C) C* C+ C"; CbCC»CBCbCC¾CBC/ C/ CMCC"CCCbC4 C5 C> CA C> CB@ CB C= Cb? C"A C< Cb= C@ C? C"> C= CBvC"CB8 C"9 CCC C; C"; C< CCC> C? C"X C@ CA CCbCbD CBE CF CbG CCV CbCCC¿CBCbL CBM CP CN CbO C; CWC"Q CbCbCS CT CCX CCB< C " # B' W W b( ) * + b»Bb¾B/ / b5 ""9  < ? "X A bBE bG V bBBM P bO "Q bS T X   `D h ei e1 h  0-1-1-1-1-1 - 1- 1 - 1- 1- 1-1-1 -1-1-1 -1 - 1-"1~$)03%03'03)03+03-0 3!/0"3#10$3%30&3'50(3)70*3+90,3-;0.3/=0031?0233A0435C0637E0839G0:3;I0<3=K0>3?M0@3AO0B3CQ0D3ES0F3GU0H3IW0J3KY 1~L[)03\0M3M^0G3G`0N3Nb0;3;d0O3Of0=3=h0P3Pj0Q3Ql0R3Rn03p03r0S3St03v0T3Tx0U3Uz0V3V|0W3W~0X3X0Y3Y0Z3Z030[3[0\3\0]3]0^3^0_3_0`3`0a3a0b3b0c3c0d3d07370e3e03330f3f0+3+0g3g0C3C0h3h03 0303030303 0 30 30 30 3 0 30303 03 030i3i0!3!0j3j0k3k0l3l03m030-3-0n3n0I3I0o3o0/3/0p3p0q3q0A3A0r3r0#3#0s3s0)3)0t3t0'3'0u3u05350v3v0w3w01310x3x0%3%0y3y09390z3z0{3{0?3? 0|3| 030K3K0}3}0~3~0E3E0303030303 03" 1 Sb1Ib`L`) B ]`} ]`! ]`4B" ]`# ]`B$ ]`% ]`c' ]`( ]`) ]` + ]`RB, ]`"- ]`- ]`(. ]`sb0 ]`1 ]`2 ]`^"4 ]`B6 ]`7 ]`V9 ]`b: ]`< ]`E= ]`@ ]`BB ]`[C ]`E ]` G ]`L I ]` BJ ]` K ]`I M ]` O ]` "R ]`T R ]` T ]`* U ]`  ]` "Y ]`e IL`P  b( Dc ) Dc  "X D"X c(F P  V DV c'  X DX c(R ]   D cTZ  D cku  D c " D" c Dc Dc#, "D"c_d Dct} Dc # D# c ¦D¦c4< DcO[ b& Db& c B' DB' c W DW c(! 1  W DW c(3 D  * D* c 8> + D+ c @J bDbc ~ Dc  »D»c  BDBc  bDbc  Dc   ¾D¾cS\ BDBc^k / D/ c / D/ c MDMc Dc "D"c8= DcMV Dc bDbc 4 D4 c 5 D5 c BvDBvc37 "D"cFN B8 DB8 c "9 D"9 c Dc Dcrz Dc Dc "; D"; c  < D< c2= > D> c ? D? c @ D@ c,4 A DA cGS Dc bDbc F DF c/ 1  bG DbG c> D  bD DbD c BE DBE c Dct x  bDbc  Dc  Dc  ¿D¿c  "  BDBc 5 A  bL DbL c!w }  BM DBM c!  P DP c#! ,  N DN c"  bO DbO c"  WDWc#. 3  "Q D"Q c#5 >  bDbc$  bDbc&W `  Dc&t  Dc$  S DS c%   T DT c% " L`?` L`"; ` L`"; > ` L`> A ` L`A > ` L`> B@ ` L`B@ B ` L`B = ` L`= b? `  L`b? "A `  L`"A < `  L`< b= `  L`b= @ `  L`@ ? ` L`? "> ` L`"> = ` L`= ; ` L`; ; ` L`; B< ` L`B< b` L`b ` L`  L` DbDcL`j Db( c D) c  D"X "X c(F P  DV V c'  DX X c(R ]  D  cTZ DB B c\i D  cku D  c D  c D" " c Dc D  c! Dc#, D""c_d D! ! cfr Dct} Dc D# # c D¦¦c4< D"% "% c>M DcO[ Db& b& c D& & c DB' B' c DW W c(! 1  DW W c(3 D  D* * c 8> D+ + c @J Dbbc ~ Dc  D»»c  DBBc  Dbbc  Dc   D¾¾cS\ DBBc^k D/ / c D/ / c DMMc D"1 "1 c Dc D""c8= Db2 b2 c?K DcMV Dc D3 3 c Dbbc D4 4 c DB5 B5 c D5 5 c DBvBvc37 D7 7 c9D D""cFN DB8 B8 c D8 8 c D"9 "9 c Dc Dcrz DB= B= c| Dc Dc D"; "; c  D; ; c"0 D< < c2= D> > c D? ? c D? ? c D@ @ c,4 DBA BA c6E DA A cGS Dc D"C "C c Dbbc DF F c/ 1  DF F c3 <  DbG bG c> D  DbD bD c DD D c DBE BE c Dct x  DH H cz  Dbbc  Dc  DI I c  Dc  D¿¿c  "  DK K c $ 3  DBBc 5 A  DbL bL c!w }  DL L c!  DBM BM c!  DP P c#! ,  DN N c"  DN N c"  DbO bO c"  DWWc#. 3  D"Q "Q c#5 >  DQ Q c#@ L  Dbbc$  Dbbc&W `  DBU BU c&b r  Dc&t  Dc$  DS S c%   DT T c% " ` a?B a? a? a? a?" a?a? a?a?"a?! a?a?a?# a?ba?¦a?"% a?a?b& a?& a?B' a?b( a?) a?* a?+ a?ba?a?»a?Ba?ba?a?¾a?Ba?/ a?/ a?Ma?"1 a?a?"a?b2 a?a?a?3 a?ba?4 a?B5 a?5 a?Bva?7 a?"a?B8 a?8 a?"9 a?a?a?"; a?; a?< a?a?B= a?a?> a?? a?? a?@ a?BA a?A a?a?"C a?ba?bD a?D a?BE a?F a?F a?bG a?a?H a?ba?a?I a?a?¿a?K a?Ba?bL a?L a?BM a?N a?N a?bO a?P a?Wa?"Q a?Q a?ba?a?S a?T a?ba?BU a?a?V a?W a?W a?"X a?X a?"; a?; a?; a?B< a?< a ?= a?b= a ?= a?"> a?> a?> a?b? a ?? a?B@ a?@ a ?"A a ?A a?B a? a?a?ly$PPPPPP`2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0bAD`RD]DH QtJa// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { promises as fsPromises } from "node:fs"; export const access = fsPromises.access; export const constants = fsPromises.constants; export const copyFile = fsPromises.copyFile; export const open = fsPromises.open; export const opendir = fsPromises.opendir; export const rename = fsPromises.rename; export const truncate = fsPromises.truncate; export const rm = fsPromises.rm; export const rmdir = fsPromises.rmdir; export const mkdir = fsPromises.mkdir; export const readdir = fsPromises.readdir; export const readlink = fsPromises.readlink; export const symlink = fsPromises.symlink; export const lstat = fsPromises.lstat; export const stat = fsPromises.stat; export const link = fsPromises.link; export const unlink = fsPromises.unlink; export const chmod = fsPromises.chmod; // export const lchmod = fs.lchmod; // export const lchown = fs.lchown; export const chown = fsPromises.chown; export const utimes = fsPromises.utimes; // export const lutimes = fs.lutimes; export const realpath = fsPromises.realpath; export const mkdtemp = fsPromises.mkdtemp; export const writeFile = fsPromises.writeFile; export const appendFile = fsPromises.appendFile; export const readFile = fsPromises.readFile; export const watch = fsPromises.watch; export const cp = fsPromises.cp; export default fsPromises; QbPhnode:fs/promisesa bQD` M` T`kLa !xL|     a b b¦BvB8 ¿F bD "; > "MbL "N @ 4 b Wb&   -`D h ei h  0-10-10-10-1 0- 10- 10- 10- 10- 10-1 0-10-10-10-1 0-10-1 0- 10-"10-$10-&10-(10-*1 0-,10-.10-010-210-4101 Sb1Iba` L` ]`r]YL`T` L` ` L`  ` L` ` L`"` L`"b` L`b¦` L`¦b& ` L`b& M`  L`M"`  L`"`  L`4 `  L`4 Bv`  L`BvB8 ` L`B8 ` L`"; ` L`"; > ` L`> @ ` L`@ ` L`F ` L`F bD ` L`bD ` L`` L`¿` L`¿bL ` L`bL N ` L`N W` L`Wb` L`b] L`  Db cT\`ba? a?ba?¦a?Bva ?B8 a?a?¿a?F a?bD a?a ?"; a?> a?a?"a ?a?Ma ?bL a?a?"a?N a?@ a?4 a ?ba? a?a?Wa?b& a?a?e6PPPPPPPPPbAD`RD]DH M_QI_// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { core } from "ext:core/mod.js"; import { op_fetch_response_upgrade, op_fetch_send, op_node_http_request } from "ext:core/ops"; import { TextEncoder } from "ext:deno_web/08_text_encoding.js"; import { setTimeout } from "ext:deno_web/02_timers.js"; import { _normalizeArgs, Socket } from "node:net"; import { Buffer } from "node:buffer"; import { ERR_SERVER_NOT_RUNNING } from "ext:deno_node/internal/errors.ts"; import { EventEmitter } from "node:events"; import { nextTick } from "ext:deno_node/_next_tick.ts"; import { validateBoolean, validateInteger, validateObject, validatePort } from "ext:deno_node/internal/validators.mjs"; import { addAbortSignal, finished, Readable as NodeReadable, Writable as NodeWritable } from "node:stream"; import { OutgoingMessage, parseUniqueHeadersOption, validateHeaderName } from "ext:deno_node/_http_outgoing.ts"; import { ok as assert } from "node:assert"; import { kOutHeaders } from "ext:deno_node/internal/http.ts"; import { _checkIsHttpToken as checkIsHttpToken } from "ext:deno_node/_http_common.ts"; import { Agent, globalAgent } from "ext:deno_node/_http_agent.mjs"; // import { chunkExpression as RE_TE_CHUNKED } from "ext:deno_node/_http_common.ts"; import { urlToHttpOptions } from "ext:deno_node/internal/url.ts"; import { kEmptyObject } from "ext:deno_node/internal/util.mjs"; import { constants, TCP } from "ext:deno_node/internal_binding/tcp_wrap.ts"; import { notImplemented, warnNotImplemented } from "ext:deno_node/_utils.ts"; import { connResetException, ERR_HTTP_HEADERS_SENT, ERR_INVALID_ARG_TYPE, ERR_INVALID_HTTP_TOKEN, ERR_INVALID_PROTOCOL, ERR_UNESCAPED_CHARACTERS } from "ext:deno_node/internal/errors.ts"; import { getTimerDuration } from "ext:deno_node/internal/timers.mjs"; import { serve, upgradeHttpRaw } from "ext:deno_http/00_serve.js"; import { createHttpClient } from "ext:deno_fetch/22_http_client.js"; import { headersEntries } from "ext:deno_fetch/20_headers.js"; import { timerId } from "ext:deno_web/03_abort_signal.js"; import { clearTimeout as webClearTimeout } from "ext:deno_web/02_timers.js"; import { resourceForReadableStream } from "ext:deno_web/06_streams.js"; import { TcpConn } from "ext:deno_net/01_net.js"; const { internalRidSymbol } = core; var STATUS_CODES; (function(STATUS_CODES) { /** RFC 7231, 6.2.1 */ STATUS_CODES[STATUS_CODES["Continue"] = 100] = "Continue"; /** RFC 7231, 6.2.2 */ STATUS_CODES[STATUS_CODES["SwitchingProtocols"] = 101] = "SwitchingProtocols"; /** RFC 2518, 10.1 */ STATUS_CODES[STATUS_CODES["Processing"] = 102] = "Processing"; /** RFC 8297 **/ STATUS_CODES[STATUS_CODES["EarlyHints"] = 103] = "EarlyHints"; /** RFC 7231, 6.3.1 */ STATUS_CODES[STATUS_CODES["OK"] = 200] = "OK"; /** RFC 7231, 6.3.2 */ STATUS_CODES[STATUS_CODES["Created"] = 201] = "Created"; /** RFC 7231, 6.3.3 */ STATUS_CODES[STATUS_CODES["Accepted"] = 202] = "Accepted"; /** RFC 7231, 6.3.4 */ STATUS_CODES[STATUS_CODES["NonAuthoritativeInfo"] = 203] = "NonAuthoritativeInfo"; /** RFC 7231, 6.3.5 */ STATUS_CODES[STATUS_CODES["NoContent"] = 204] = "NoContent"; /** RFC 7231, 6.3.6 */ STATUS_CODES[STATUS_CODES["ResetContent"] = 205] = "ResetContent"; /** RFC 7233, 4.1 */ STATUS_CODES[STATUS_CODES["PartialContent"] = 206] = "PartialContent"; /** RFC 4918, 11.1 */ STATUS_CODES[STATUS_CODES["MultiStatus"] = 207] = "MultiStatus"; /** RFC 5842, 7.1 */ STATUS_CODES[STATUS_CODES["AlreadyReported"] = 208] = "AlreadyReported"; /** RFC 3229, 10.4.1 */ STATUS_CODES[STATUS_CODES["IMUsed"] = 226] = "IMUsed"; /** RFC 7231, 6.4.1 */ STATUS_CODES[STATUS_CODES["MultipleChoices"] = 300] = "MultipleChoices"; /** RFC 7231, 6.4.2 */ STATUS_CODES[STATUS_CODES["MovedPermanently"] = 301] = "MovedPermanently"; /** RFC 7231, 6.4.3 */ STATUS_CODES[STATUS_CODES["Found"] = 302] = "Found"; /** RFC 7231, 6.4.4 */ STATUS_CODES[STATUS_CODES["SeeOther"] = 303] = "SeeOther"; /** RFC 7232, 4.1 */ STATUS_CODES[STATUS_CODES["NotModified"] = 304] = "NotModified"; /** RFC 7231, 6.4.5 */ STATUS_CODES[STATUS_CODES["UseProxy"] = 305] = "UseProxy"; /** RFC 7231, 6.4.7 */ STATUS_CODES[STATUS_CODES["TemporaryRedirect"] = 307] = "TemporaryRedirect"; /** RFC 7538, 3 */ STATUS_CODES[STATUS_CODES["PermanentRedirect"] = 308] = "PermanentRedirect"; /** RFC 7231, 6.5.1 */ STATUS_CODES[STATUS_CODES["BadRequest"] = 400] = "BadRequest"; /** RFC 7235, 3.1 */ STATUS_CODES[STATUS_CODES["Unauthorized"] = 401] = "Unauthorized"; /** RFC 7231, 6.5.2 */ STATUS_CODES[STATUS_CODES["PaymentRequired"] = 402] = "PaymentRequired"; /** RFC 7231, 6.5.3 */ STATUS_CODES[STATUS_CODES["Forbidden"] = 403] = "Forbidden"; /** RFC 7231, 6.5.4 */ STATUS_CODES[STATUS_CODES["NotFound"] = 404] = "NotFound"; /** RFC 7231, 6.5.5 */ STATUS_CODES[STATUS_CODES["MethodNotAllowed"] = 405] = "MethodNotAllowed"; /** RFC 7231, 6.5.6 */ STATUS_CODES[STATUS_CODES["NotAcceptable"] = 406] = "NotAcceptable"; /** RFC 7235, 3.2 */ STATUS_CODES[STATUS_CODES["ProxyAuthRequired"] = 407] = "ProxyAuthRequired"; /** RFC 7231, 6.5.7 */ STATUS_CODES[STATUS_CODES["RequestTimeout"] = 408] = "RequestTimeout"; /** RFC 7231, 6.5.8 */ STATUS_CODES[STATUS_CODES["Conflict"] = 409] = "Conflict"; /** RFC 7231, 6.5.9 */ STATUS_CODES[STATUS_CODES["Gone"] = 410] = "Gone"; /** RFC 7231, 6.5.10 */ STATUS_CODES[STATUS_CODES["LengthRequired"] = 411] = "LengthRequired"; /** RFC 7232, 4.2 */ STATUS_CODES[STATUS_CODES["PreconditionFailed"] = 412] = "PreconditionFailed"; /** RFC 7231, 6.5.11 */ STATUS_CODES[STATUS_CODES["RequestEntityTooLarge"] = 413] = "RequestEntityTooLarge"; /** RFC 7231, 6.5.12 */ STATUS_CODES[STATUS_CODES["RequestURITooLong"] = 414] = "RequestURITooLong"; /** RFC 7231, 6.5.13 */ STATUS_CODES[STATUS_CODES["UnsupportedMediaType"] = 415] = "UnsupportedMediaType"; /** RFC 7233, 4.4 */ STATUS_CODES[STATUS_CODES["RequestedRangeNotSatisfiable"] = 416] = "RequestedRangeNotSatisfiable"; /** RFC 7231, 6.5.14 */ STATUS_CODES[STATUS_CODES["ExpectationFailed"] = 417] = "ExpectationFailed"; /** RFC 7168, 2.3.3 */ STATUS_CODES[STATUS_CODES["Teapot"] = 418] = "Teapot"; /** RFC 7540, 9.1.2 */ STATUS_CODES[STATUS_CODES["MisdirectedRequest"] = 421] = "MisdirectedRequest"; /** RFC 4918, 11.2 */ STATUS_CODES[STATUS_CODES["UnprocessableEntity"] = 422] = "UnprocessableEntity"; /** RFC 4918, 11.3 */ STATUS_CODES[STATUS_CODES["Locked"] = 423] = "Locked"; /** RFC 4918, 11.4 */ STATUS_CODES[STATUS_CODES["FailedDependency"] = 424] = "FailedDependency"; /** RFC 8470, 5.2 */ STATUS_CODES[STATUS_CODES["TooEarly"] = 425] = "TooEarly"; /** RFC 7231, 6.5.15 */ STATUS_CODES[STATUS_CODES["UpgradeRequired"] = 426] = "UpgradeRequired"; /** RFC 6585, 3 */ STATUS_CODES[STATUS_CODES["PreconditionRequired"] = 428] = "PreconditionRequired"; /** RFC 6585, 4 */ STATUS_CODES[STATUS_CODES["TooManyRequests"] = 429] = "TooManyRequests"; /** RFC 6585, 5 */ STATUS_CODES[STATUS_CODES["RequestHeaderFieldsTooLarge"] = 431] = "RequestHeaderFieldsTooLarge"; /** RFC 7725, 3 */ STATUS_CODES[STATUS_CODES["UnavailableForLegalReasons"] = 451] = "UnavailableForLegalReasons"; /** RFC 7231, 6.6.1 */ STATUS_CODES[STATUS_CODES["InternalServerError"] = 500] = "InternalServerError"; /** RFC 7231, 6.6.2 */ STATUS_CODES[STATUS_CODES["NotImplemented"] = 501] = "NotImplemented"; /** RFC 7231, 6.6.3 */ STATUS_CODES[STATUS_CODES["BadGateway"] = 502] = "BadGateway"; /** RFC 7231, 6.6.4 */ STATUS_CODES[STATUS_CODES["ServiceUnavailable"] = 503] = "ServiceUnavailable"; /** RFC 7231, 6.6.5 */ STATUS_CODES[STATUS_CODES["GatewayTimeout"] = 504] = "GatewayTimeout"; /** RFC 7231, 6.6.6 */ STATUS_CODES[STATUS_CODES["HTTPVersionNotSupported"] = 505] = "HTTPVersionNotSupported"; /** RFC 2295, 8.1 */ STATUS_CODES[STATUS_CODES["VariantAlsoNegotiates"] = 506] = "VariantAlsoNegotiates"; /** RFC 4918, 11.5 */ STATUS_CODES[STATUS_CODES["InsufficientStorage"] = 507] = "InsufficientStorage"; /** RFC 5842, 7.2 */ STATUS_CODES[STATUS_CODES["LoopDetected"] = 508] = "LoopDetected"; /** RFC 2774, 7 */ STATUS_CODES[STATUS_CODES["NotExtended"] = 510] = "NotExtended"; /** RFC 6585, 6 */ STATUS_CODES[STATUS_CODES["NetworkAuthenticationRequired"] = 511] = "NetworkAuthenticationRequired"; })(STATUS_CODES || (STATUS_CODES = {})); const METHODS = [ "ACL", "BIND", "CHECKOUT", "CONNECT", "COPY", "DELETE", "GET", "HEAD", "LINK", "LOCK", "M-SEARCH", "MERGE", "MKACTIVITY", "MKCALENDAR", "MKCOL", "MOVE", "NOTIFY", "OPTIONS", "PATCH", "POST", "PROPFIND", "PROPPATCH", "PURGE", "PUT", "REBIND", "REPORT", "SEARCH", "SOURCE", "SUBSCRIBE", "TRACE", "UNBIND", "UNLINK", "UNLOCK", "UNSUBSCRIBE" ]; const ENCODER = new TextEncoder(); function validateHost(host, name) { if (host !== null && host !== undefined && typeof host !== "string") { throw new ERR_INVALID_ARG_TYPE(`options.${name}`, [ "string", "undefined", "null" ], host); } return host; } const INVALID_PATH_REGEX = /[^\u0021-\u00ff]/; const kError = Symbol("kError"); const kUniqueHeaders = Symbol("kUniqueHeaders"); class FakeSocket extends EventEmitter { constructor(opts = {}){ super(); this.remoteAddress = opts.remoteAddress; this.remotePort = opts.remotePort; this.encrypted = opts.encrypted; this.writable = true; this.readable = true; } setKeepAlive() {} end() {} destroy() {} setTimeout(callback, timeout = 0, ...args) { setTimeout(callback, timeout, args); } } /** ClientRequest represents the http(s) request from the client */ class ClientRequest extends OutgoingMessage { defaultProtocol = "http:"; aborted = false; destroyed = false; agent; method; maxHeaderSize; insecureHTTPParser; useChunkedEncodingByDefault; path; constructor(input, options, cb){ super(); if (typeof input === "string") { const urlStr = input; input = urlToHttpOptions(new URL(urlStr)); } else if (input instanceof URL) { // url.URL instance input = urlToHttpOptions(input); } else { cb = options; options = input; input = null; } if (typeof options === "function") { cb = options; options = input || kEmptyObject; } else { options = Object.assign(input || {}, options); } let agent = options.agent; const defaultAgent = options._defaultAgent || globalAgent; if (agent === false) { agent = new defaultAgent.constructor(); } else if (agent === null || agent === undefined) { if (typeof options.createConnection !== "function") { agent = defaultAgent; } // Explicitly pass through this statement as agent will not be used // when createConnection is provided. } else if (typeof agent.addRequest !== "function") { throw new ERR_INVALID_ARG_TYPE("options.agent", [ "Agent-like Object", "undefined", "false" ], agent); } this.agent = agent; const protocol = options.protocol || defaultAgent.protocol; let expectedProtocol = defaultAgent.protocol; if (this.agent?.protocol) { expectedProtocol = this.agent.protocol; } if (options.path) { const path = String(options.path); if (INVALID_PATH_REGEX.exec(path) !== null) { throw new ERR_UNESCAPED_CHARACTERS("Request path"); } } if (protocol !== expectedProtocol) { throw new ERR_INVALID_PROTOCOL(protocol, expectedProtocol); } const defaultPort = options.defaultPort || this.agent?.defaultPort; const port = options.port = options.port || defaultPort || 80; const host = options.host = validateHost(options.hostname, "hostname") || validateHost(options.host, "host") || "localhost"; const setHost = options.setHost === undefined || Boolean(options.setHost); this.socketPath = options.socketPath; if (options.timeout !== undefined) { this.setTimeout(options.timeout); } const signal = options.signal; if (signal) { addAbortSignal(signal, this); } let method = options.method; const methodIsString = typeof method === "string"; if (method !== null && method !== undefined && !methodIsString) { throw new ERR_INVALID_ARG_TYPE("options.method", "string", method); } if (methodIsString && method) { if (!checkIsHttpToken(method)) { throw new ERR_INVALID_HTTP_TOKEN("Method", method); } method = this.method = method.toUpperCase(); } else { method = this.method = "GET"; } const maxHeaderSize = options.maxHeaderSize; if (maxHeaderSize !== undefined) { validateInteger(maxHeaderSize, "maxHeaderSize", 0); } this.maxHeaderSize = maxHeaderSize; const insecureHTTPParser = options.insecureHTTPParser; if (insecureHTTPParser !== undefined) { validateBoolean(insecureHTTPParser, "options.insecureHTTPParser"); } this.insecureHTTPParser = insecureHTTPParser; if (options.joinDuplicateHeaders !== undefined) { validateBoolean(options.joinDuplicateHeaders, "options.joinDuplicateHeaders"); } this.joinDuplicateHeaders = options.joinDuplicateHeaders; this.path = options.path || "/"; if (cb) { this.once("response", cb); } if (method === "GET" || method === "HEAD" || method === "DELETE" || method === "OPTIONS" || method === "TRACE" || method === "CONNECT") { this.useChunkedEncodingByDefault = false; } else { this.useChunkedEncodingByDefault = true; } this._ended = false; this.res = null; this.aborted = false; this.upgradeOrConnect = false; this.parser = null; this.maxHeadersCount = null; this.reusedSocket = false; this.host = host; this.protocol = protocol; this.port = port; this.hash = options.hash; this.search = options.search; this.auth = options.auth; if (this.agent) { // If there is an agent we should default to Connection:keep-alive, // but only if the Agent will actually reuse the connection! // If it's not a keepAlive agent, and the maxSockets==Infinity, then // there's never a case where this socket will actually be reused if (!this.agent.keepAlive && !Number.isFinite(this.agent.maxSockets)) { this._last = true; this.shouldKeepAlive = false; } else { this._last = false; this.shouldKeepAlive = true; } } const headersArray = Array.isArray(options.headers); if (!headersArray) { if (options.headers) { const keys = Object.keys(options.headers); // Retain for(;;) loop for performance reasons // Refs: https://github.com/nodejs/node/pull/30958 for(let i = 0; i < keys.length; i++){ const key = keys[i]; this.setHeader(key, options.headers[key]); } } if (host && !this.getHeader("host") && setHost) { let hostHeader = host; // For the Host header, ensure that IPv6 addresses are enclosed // in square brackets, as defined by URI formatting // https://tools.ietf.org/html/rfc3986#section-3.2.2 const posColon = hostHeader.indexOf(":"); if (posColon !== -1 && hostHeader.includes(":", posColon + 1) && hostHeader.charCodeAt(0) !== 91 /* '[' */ ) { hostHeader = `[${hostHeader}]`; } if (port && +port !== defaultPort) { hostHeader += ":" + port; } this.setHeader("Host", hostHeader); } if (options.auth && !this.getHeader("Authorization")) { this.setHeader("Authorization", "Basic " + Buffer.from(options.auth).toString("base64")); } if (this.getHeader("expect") && this._header) { throw new ERR_HTTP_HEADERS_SENT("render"); } } else { for (const [key, val] of options.headers){ this.setHeader(key, val); } } this[kUniqueHeaders] = parseUniqueHeadersOption(options.uniqueHeaders); let optsWithoutSignal = options; if (optsWithoutSignal.signal) { optsWithoutSignal = Object.assign({}, options); delete optsWithoutSignal.signal; } if (options.createConnection) { warnNotImplemented("ClientRequest.options.createConnection"); } if (options.lookup) { notImplemented("ClientRequest.options.lookup"); } // initiate connection // TODO(crowlKats): finish this /*if (this.agent) { this.agent.addRequest(this, optsWithoutSignal); } else { // No agent, default to Connection:close. this._last = true; this.shouldKeepAlive = false; if (typeof optsWithoutSignal.createConnection === "function") { const oncreate = once((err, socket) => { if (err) { this.emit("error", err); } else { this.onSocket(socket); } }); try { const newSocket = optsWithoutSignal.createConnection( optsWithoutSignal, oncreate, ); if (newSocket) { oncreate(null, newSocket); } } catch (err) { oncreate(err); } } else { debug("CLIENT use net.createConnection", optsWithoutSignal); this.onSocket(createConnection(optsWithoutSignal)); } }*/ this.onSocket(new FakeSocket({ encrypted: this._encrypted })); } _writeHeader() { const url = this._createUrlStrFromOptions(); const headers = []; for(const key in this[kOutHeaders]){ if (Object.hasOwn(this[kOutHeaders], key)) { const entry = this[kOutHeaders][key]; this._processHeader(headers, entry[0], entry[1], false); } } const client = this._getClient() ?? createHttpClient({ http2: false }); this._client = client; if (this.method === "POST" || this.method === "PATCH" || this.method === "PUT") { const { readable, writable } = new TransformStream({ cancel: (e)=>{ this._requestSendError = e; } }); this._bodyWritable = writable; this._bodyWriter = writable.getWriter(); this._bodyWriteRid = resourceForReadableStream(readable); } this._req = op_node_http_request(this.method, url, headers, client[internalRidSymbol], this._bodyWriteRid); } _implicitHeader() { if (this._header) { throw new ERR_HTTP_HEADERS_SENT("render"); } this._storeHeader(this.method + " " + this.path + " HTTP/1.1\r\n", this[kOutHeaders]); } _getClient() { return undefined; } // TODO(bartlomieju): handle error onSocket(socket, _err) { nextTick(()=>{ this.socket = socket; this.emit("socket", socket); }); } // deno-lint-ignore no-explicit-any end(chunk, encoding, cb) { if (typeof chunk === "function") { cb = chunk; chunk = null; encoding = null; } else if (typeof encoding === "function") { cb = encoding; encoding = null; } this.finished = true; if (chunk) { this.write_(chunk, encoding, null, true); } else if (!this._headerSent) { this._contentLength = 0; this._implicitHeader(); this._send("", "latin1"); } this._bodyWriter?.close(); (async ()=>{ try { const res = await op_fetch_send(this._req.requestRid); try { cb?.(); } catch (_) { // } if (this._timeout) { this._timeout.removeEventListener("abort", this._timeoutCb); webClearTimeout(this._timeout[timerId]); } this._client.close(); const incoming = new IncomingMessageForClient(this.socket); incoming.req = this; this.res = incoming; // TODO(@crowlKats): // incoming.httpVersionMajor = versionMajor; // incoming.httpVersionMinor = versionMinor; // incoming.httpVersion = `${versionMajor}.${versionMinor}`; // incoming.joinDuplicateHeaders = socket?.server?.joinDuplicateHeaders || // parser.joinDuplicateHeaders; incoming.url = res.url; incoming.statusCode = res.status; incoming.statusMessage = res.statusText; incoming.upgrade = null; for (const [key, _value] of res.headers){ if (key.toLowerCase() === "upgrade") { incoming.upgrade = true; break; } } incoming._addHeaderLines(res.headers, Object.entries(res.headers).flat().length); if (this._req.cancelHandleRid !== null) { core.tryClose(this._req.cancelHandleRid); } if (incoming.upgrade) { if (this.listenerCount("upgrade") === 0) { // No listeners, so we got nothing to do // destroy? return; } if (this.method === "CONNECT") { throw new Error("not implemented CONNECT"); } const upgradeRid = await op_fetch_response_upgrade(res.responseRid); assert(typeof res.remoteAddrIp !== "undefined"); assert(typeof res.remoteAddrIp !== "undefined"); const conn = new TcpConn(upgradeRid, { transport: "tcp", hostname: res.remoteAddrIp, port: res.remoteAddrIp }, // TODO(bartlomieju): figure out actual values { transport: "tcp", hostname: "127.0.0.1", port: 80 }); const socket = new Socket({ handle: new TCP(constants.SERVER, conn) }); this.upgradeOrConnect = true; this.emit("upgrade", incoming, socket, Buffer.from([])); this.destroyed = true; this._closed = true; this.emit("close"); } else { { incoming._bodyRid = res.responseRid; } this.emit("response", incoming); } } catch (err) { if (this._req.cancelHandleRid !== null) { core.tryClose(this._req.cancelHandleRid); } if (this._requestSendError !== undefined) { // if the request body stream errored, we want to propagate that error // instead of the original error from opFetchSend throw new TypeError("Failed to fetch: request body stream errored", { cause: this._requestSendError }); } if (err.message.includes("connection closed before message completed")) { // Node.js seems ignoring this error } else if (err.message.includes("The signal has been aborted")) { // Remap this error this.emit("error", connResetException("socket hang up")); } else { this.emit("error", err); } } })(); } abort() { if (this.aborted) { return; } this.aborted = true; this.emit("abort"); //process.nextTick(emitAbortNT, this); this.destroy(); } // deno-lint-ignore no-explicit-any destroy(err) { if (this.destroyed) { return this; } this.destroyed = true; const rid = this._client?.[internalRidSymbol]; if (rid) { core.tryClose(rid); } if (this._req.cancelHandleRid !== null) { core.tryClose(this._req.cancelHandleRid); } // If we're aborting, we don't care about any more response data. if (this.res) { this.res._dump(); } this[kError] = err; this.socket?.destroy(err); return this; } _createCustomClient() { return Promise.resolve(undefined); } _createUrlStrFromOptions() { if (this.href) { return this.href; } const protocol = this.protocol ?? this.defaultProtocol; const auth = this.auth; const host = this.host ?? this.hostname ?? "localhost"; const hash = this.hash ? `#${this.hash}` : ""; const defaultPort = this.agent?.defaultPort; const port = this.port ?? defaultPort ?? 80; let path = this.path ?? "/"; if (!path.startsWith("/")) { path = "/" + path; } const url = new URL(`${protocol}//${auth ? `${auth}@` : ""}${host}${port === 80 ? "" : `:${port}`}${path}`); url.hash = hash; return url.href; } setTimeout(msecs, callback) { if (msecs === 0) { if (this._timeout) { this.removeAllListeners("timeout"); this._timeout.removeEventListener("abort", this._timeoutCb); this._timeout = undefined; } return this; } if (this._ended || this._timeout) { return this; } msecs = getTimerDuration(msecs, "msecs"); if (callback) this.once("timeout", callback); const timeout = AbortSignal.timeout(msecs); this._timeoutCb = ()=>this.emit("timeout"); timeout.addEventListener("abort", this._timeoutCb); this._timeout = timeout; return this; } _processHeader(headers, key, value, validate) { if (validate) { validateHeaderName(key); } // If key is content-disposition and there is content-length // encode the value in latin1 // https://www.rfc-editor.org/rfc/rfc6266#section-4.3 // Refs: https://github.com/nodejs/node/pull/46528 if (isContentDispositionField(key) && this._contentLength) { value = Buffer.from(value, "latin1"); } if (Array.isArray(value)) { if ((value.length < 2 || !isCookieField(key)) && (!this[kUniqueHeaders] || !this[kUniqueHeaders].has(key.toLowerCase()))) { // Retain for(;;) loop for performance reasons // Refs: https://github.com/nodejs/node/pull/30958 for(let i = 0; i < value.length; i++){ headers.push([ key, value[i] ]); } return; } value = value.join("; "); } headers.push([ key, value ]); } // Once a socket is assigned to this request and is connected socket.setNoDelay() will be called. setNoDelay() { this.socket?.setNoDelay?.(); } } // isCookieField performs a case-insensitive comparison of a provided string // against the word "cookie." As of V8 6.6 this is faster than handrolling or // using a case-insensitive RegExp. function isCookieField(s) { return s.length === 6 && s.toLowerCase() === "cookie"; } function isContentDispositionField(s) { return s.length === 19 && s.toLowerCase() === "content-disposition"; } const kHeaders = Symbol("kHeaders"); const kHeadersDistinct = Symbol("kHeadersDistinct"); const kHeadersCount = Symbol("kHeadersCount"); const kTrailers = Symbol("kTrailers"); const kTrailersDistinct = Symbol("kTrailersDistinct"); const kTrailersCount = Symbol("kTrailersCount"); /** IncomingMessage for http(s) client */ export class IncomingMessageForClient extends NodeReadable { decoder = new TextDecoder(); constructor(socket){ super(); this._readableState.readingMore = true; this.socket = socket; this.httpVersionMajor = null; this.httpVersionMinor = null; this.httpVersion = null; this.complete = false; this[kHeaders] = null; this[kHeadersCount] = 0; this.rawHeaders = []; this[kTrailers] = null; this[kTrailersCount] = 0; this.rawTrailers = []; this.joinDuplicateHeaders = false; this.aborted = false; this.upgrade = null; // request (server) only this.url = ""; this.method = null; // response (client) only this.statusCode = null; this.statusMessage = null; this.client = socket; this._consuming = false; // Flag for when we decide that this message cannot possibly be // read by the user, so there's no point continuing to handle it. this._dumped = false; } get connection() { return this.socket; } set connection(val) { this.socket = val; } get headers() { if (!this[kHeaders]) { this[kHeaders] = {}; const src = this.rawHeaders; const dst = this[kHeaders]; for(let n = 0; n < this[kHeadersCount]; n += 2){ this._addHeaderLine(src[n + 0], src[n + 1], dst); } } return this[kHeaders]; } set headers(val) { this[kHeaders] = val; } get headersDistinct() { if (!this[kHeadersDistinct]) { this[kHeadersDistinct] = {}; const src = this.rawHeaders; const dst = this[kHeadersDistinct]; for(let n = 0; n < this[kHeadersCount]; n += 2){ this._addHeaderLineDistinct(src[n + 0], src[n + 1], dst); } } return this[kHeadersDistinct]; } set headersDistinct(val) { this[kHeadersDistinct] = val; } get trailers() { if (!this[kTrailers]) { this[kTrailers] = {}; const src = this.rawTrailers; const dst = this[kTrailers]; for(let n = 0; n < this[kTrailersCount]; n += 2){ this._addHeaderLine(src[n + 0], src[n + 1], dst); } } return this[kTrailers]; } set trailers(val) { this[kTrailers] = val; } get trailersDistinct() { if (!this[kTrailersDistinct]) { this[kTrailersDistinct] = {}; const src = this.rawTrailers; const dst = this[kTrailersDistinct]; for(let n = 0; n < this[kTrailersCount]; n += 2){ this._addHeaderLineDistinct(src[n + 0], src[n + 1], dst); } } return this[kTrailersDistinct]; } set trailersDistinct(val) { this[kTrailersDistinct] = val; } setTimeout(msecs, callback) { if (callback) { this.on("timeout", callback); } this.socket.setTimeout(msecs); return this; } _read(_n) { if (!this._consuming) { this._readableState.readingMore = false; this._consuming = true; } const buf = new Uint8Array(16 * 1024); core.read(this._bodyRid, buf).then((bytesRead)=>{ if (bytesRead === 0) { this.push(null); } else { this.push(Buffer.from(buf.subarray(0, bytesRead))); } }); } // It's possible that the socket will be destroyed, and removed from // any messages, before ever calling this. In that case, just skip // it, since something else is destroying this connection anyway. _destroy(err, cb) { this.complete = true; if (!this.readableEnded || !this.complete) { this.aborted = true; this.emit("aborted"); } core.tryClose(this._bodyRid); // If aborted and the underlying socket is not already destroyed, // destroy it. // We have to check if the socket is already destroyed because finished // does not call the callback when this method is invoked from `_http_client` // in `test/parallel/test-http-client-spurious-aborted.js` if (this.socket && !this.socket.destroyed && this.aborted) { this.socket.destroy(err); const cleanup = finished(this.socket, (e)=>{ if (e?.code === "ERR_STREAM_PREMATURE_CLOSE") { e = null; } cleanup(); onError(this, e || err, cb); }); } else { onError(this, err, cb); } } _addHeaderLines(headers, n) { if (headers && headers.length) { let dest; if (this.complete) { this.rawTrailers = headers.flat(); this[kTrailersCount] = n; dest = this[kTrailers]; } else { this.rawHeaders = headers.flat(); this[kHeadersCount] = n; dest = this[kHeaders]; } if (dest) { for (const header of headers){ this._addHeaderLine(header[0], header[1], dest); } } } } // Add the given (field, value) pair to the message // // Per RFC2616, section 4.2 it is acceptable to join multiple instances of the // same header with a ', ' if the header in question supports specification of // multiple values this way. The one exception to this is the Cookie header, // which has multiple values joined with a '; ' instead. If a header's values // cannot be joined in either of these ways, we declare the first instance the // winner and drop the second. Extended header fields (those beginning with // 'x-') are always joined. _addHeaderLine(field, value, dest) { field = matchKnownFields(field); const flag = field.charCodeAt(0); if (flag === 0 || flag === 2) { field = field.slice(1); // Make a delimited list if (typeof dest[field] === "string") { dest[field] += (flag === 0 ? ", " : "; ") + value; } else { dest[field] = value; } } else if (flag === 1) { // Array header -- only Set-Cookie at the moment if (dest["set-cookie"] !== undefined) { dest["set-cookie"].push(value); } else { dest["set-cookie"] = [ value ]; } } else if (this.joinDuplicateHeaders) { // RFC 9110 https://www.rfc-editor.org/rfc/rfc9110#section-5.2 // https://github.com/nodejs/node/issues/45699 // allow authorization multiple fields // Make a delimited list if (dest[field] === undefined) { dest[field] = value; } else { dest[field] += ", " + value; } } else if (dest[field] === undefined) { // Drop duplicates dest[field] = value; } } _addHeaderLineDistinct(field, value, dest) { field = field.toLowerCase(); if (!dest[field]) { dest[field] = [ value ]; } else { dest[field].push(value); } } // Call this instead of resume() if we want to just // dump all the data to /dev/null _dump() { if (!this._dumped) { this._dumped = true; // If there is buffered data, it may trigger 'data' events. // Remove 'data' event listeners explicitly. this.removeAllListeners("data"); this.resume(); } } } // This function is used to help avoid the lowercasing of a field name if it // matches a 'traditional cased' version of a field name. It then returns the // lowercased name to both avoid calling toLowerCase() a second time and to // indicate whether the field was a 'no duplicates' field. If a field is not a // 'no duplicates' field, a `0` byte is prepended as a flag. The one exception // to this is the Set-Cookie header which is indicated by a `1` byte flag, since // it is an 'array' field and thus is treated differently in _addHeaderLines(). function matchKnownFields(field, lowercased) { switch(field.length){ case 3: if (field === "Age" || field === "age") return "age"; break; case 4: if (field === "Host" || field === "host") return "host"; if (field === "From" || field === "from") return "from"; if (field === "ETag" || field === "etag") return "etag"; if (field === "Date" || field === "date") return "\u0000date"; if (field === "Vary" || field === "vary") return "\u0000vary"; break; case 6: if (field === "Server" || field === "server") return "server"; if (field === "Cookie" || field === "cookie") return "\u0002cookie"; if (field === "Origin" || field === "origin") return "\u0000origin"; if (field === "Expect" || field === "expect") return "\u0000expect"; if (field === "Accept" || field === "accept") return "\u0000accept"; break; case 7: if (field === "Referer" || field === "referer") return "referer"; if (field === "Expires" || field === "expires") return "expires"; if (field === "Upgrade" || field === "upgrade") return "\u0000upgrade"; break; case 8: if (field === "Location" || field === "location") { return "location"; } if (field === "If-Match" || field === "if-match") { return "\u0000if-match"; } break; case 10: if (field === "User-Agent" || field === "user-agent") { return "user-agent"; } if (field === "Set-Cookie" || field === "set-cookie") { return "\u0001"; } if (field === "Connection" || field === "connection") { return "\u0000connection"; } break; case 11: if (field === "Retry-After" || field === "retry-after") { return "retry-after"; } break; case 12: if (field === "Content-Type" || field === "content-type") { return "content-type"; } if (field === "Max-Forwards" || field === "max-forwards") { return "max-forwards"; } break; case 13: if (field === "Authorization" || field === "authorization") { return "authorization"; } if (field === "Last-Modified" || field === "last-modified") { return "last-modified"; } if (field === "Cache-Control" || field === "cache-control") { return "\u0000cache-control"; } if (field === "If-None-Match" || field === "if-none-match") { return "\u0000if-none-match"; } break; case 14: if (field === "Content-Length" || field === "content-length") { return "content-length"; } break; case 15: if (field === "Accept-Encoding" || field === "accept-encoding") { return "\u0000accept-encoding"; } if (field === "Accept-Language" || field === "accept-language") { return "\u0000accept-language"; } if (field === "X-Forwarded-For" || field === "x-forwarded-for") { return "\u0000x-forwarded-for"; } break; case 16: if (field === "Content-Encoding" || field === "content-encoding") { return "\u0000content-encoding"; } if (field === "X-Forwarded-Host" || field === "x-forwarded-host") { return "\u0000x-forwarded-host"; } break; case 17: if (field === "If-Modified-Since" || field === "if-modified-since") { return "if-modified-since"; } if (field === "Transfer-Encoding" || field === "transfer-encoding") { return "\u0000transfer-encoding"; } if (field === "X-Forwarded-Proto" || field === "x-forwarded-proto") { return "\u0000x-forwarded-proto"; } break; case 19: if (field === "Proxy-Authorization" || field === "proxy-authorization") { return "proxy-authorization"; } if (field === "If-Unmodified-Since" || field === "if-unmodified-since") { return "if-unmodified-since"; } break; } if (lowercased) { return "\u0000" + field; } return matchKnownFields(field.toLowerCase(), true); } function onError(self, error, cb) { // This is to keep backward compatible behavior. // An error is emitted only if there are listeners attached to the event. if (self.listenerCount("error") === 0) { cb(); } else { cb(error); } } export class ServerResponse extends NodeWritable { statusCode = undefined; statusMessage = undefined; #headers = new Headers({}); #readable; writable = true; // used by `npm:on-finished` finished = false; headersSent = false; #firstChunk = null; #resolve; static #enqueue(controller, chunk) { if (typeof chunk === "string") { controller.enqueue(ENCODER.encode(chunk)); } else { controller.enqueue(chunk); } } /** Returns true if the response body should be null with the given * http status code */ static #bodyShouldBeNull(status) { return status === 101 || status === 204 || status === 205 || status === 304; } constructor(resolve, socket){ let controller; const readable = new ReadableStream({ start (c) { controller = c; } }); super({ autoDestroy: true, defaultEncoding: "utf-8", emitClose: true, write: (chunk, _encoding, cb)=>{ if (!this.headersSent) { if (this.#firstChunk === null) { this.#firstChunk = chunk; return cb(); } else { ServerResponse.#enqueue(controller, this.#firstChunk); this.#firstChunk = null; this.respond(false); } } ServerResponse.#enqueue(controller, chunk); return cb(); }, final: (cb)=>{ if (this.#firstChunk) { this.respond(true, this.#firstChunk); } else if (!this.headersSent) { this.respond(true); } controller.close(); return cb(); }, destroy: (err, cb)=>{ if (err) { controller.error(err); } return cb(null); } }); this.#readable = readable; this.#resolve = resolve; this.socket = socket; } setHeader(name, value) { this.#headers.set(name, value); return this; } getHeader(name) { return this.#headers.get(name) ?? undefined; } removeHeader(name) { return this.#headers.delete(name); } getHeaderNames() { return Array.from(this.#headers.keys()); } hasHeader(name) { return this.#headers.has(name); } writeHead(status, headers = {}) { this.statusCode = status; for(const k in headers){ if (Object.hasOwn(headers, k)) { this.#headers.set(k, headers[k]); } } return this; } #ensureHeaders(singleChunk) { if (this.statusCode === undefined) { this.statusCode = 200; this.statusMessage = "OK"; } if (typeof singleChunk === "string" && !this.hasHeader("content-type")) { this.setHeader("content-type", "text/plain;charset=UTF-8"); } } respond(final, singleChunk) { this.headersSent = true; this.#ensureHeaders(singleChunk); let body = singleChunk ?? (final ? null : this.#readable); if (ServerResponse.#bodyShouldBeNull(this.statusCode)) { body = null; } this.#resolve(new Response(body, { headers: this.#headers, status: this.statusCode, statusText: this.statusMessage })); } // deno-lint-ignore no-explicit-any end(chunk, encoding, cb) { this.finished = true; if (!chunk && this.#headers.has("transfer-encoding")) { // FIXME(bnoordhuis) Node sends a zero length chunked body instead, i.e., // the trailing "0\r\n", but respondWith() just hangs when I try that. this.#headers.set("content-length", "0"); this.#headers.delete("transfer-encoding"); } // @ts-expect-error The signature for cb is stricter than the one implemented here return super.end(chunk, encoding, cb); } flushHeaders() { // no-op } // Undocumented API used by `npm:compression`. _implicitHeader() { this.writeHead(this.statusCode); } } // TODO(@AaronO): optimize export class IncomingMessageForServer extends NodeReadable { #req; #headers; url; method; // Polyfills part of net.Socket object. // These properties are used by `npm:forwarded` for example. socket; constructor(req, socket){ // Check if no body (GET/HEAD/OPTIONS/...) const reader = req.body?.getReader(); super({ autoDestroy: true, emitClose: true, objectMode: false, read: async function(_size) { if (!reader) { return this.push(null); } try { const { value } = await reader.read(); this.push(value !== undefined ? Buffer.from(value) : null); } catch (err) { this.destroy(err); } }, destroy: (err, cb)=>{ reader?.cancel().finally(()=>cb(err)); } }); // TODO(@bartlomieju): consider more robust path extraction, e.g: // url: (new URL(request.url).pathname), this.url = req.url?.slice(req.url.indexOf("/", 8)); this.method = req.method; this.socket = socket; this.#req = req; } get aborted() { return false; } get httpVersion() { return "1.1"; } get headers() { if (!this.#headers) { this.#headers = {}; const entries = headersEntries(this.#req.headers); for(let i = 0; i < entries.length; i++){ const entry = entries[i]; this.#headers[entry[0]] = entry[1]; } } return this.#headers; } get upgrade() { return Boolean(this.#req.headers.get("connection")?.toLowerCase().includes("upgrade") && this.#req.headers.get("upgrade")); } // connection is deprecated, but still tested in unit test. get connection() { return this.socket; } } export function Server(opts, requestListener) { return new ServerImpl(opts, requestListener); } export class ServerImpl extends EventEmitter { #httpConnections = new Set(); #listener; #addr; #hasClosed = false; #server; #unref = false; #ac; #serveDeferred; listening = false; constructor(opts, requestListener){ super(); if (typeof opts === "function") { requestListener = opts; opts = kEmptyObject; } else if (opts == null) { opts = kEmptyObject; } else { validateObject(opts, "options"); } this._opts = opts; this.#serveDeferred = Promise.withResolvers(); this.#serveDeferred.promise.then(()=>this.emit("close")); if (requestListener !== undefined) { this.on("request", requestListener); } } listen(...args) { // TODO(bnoordhuis) Delegate to net.Server#listen(). const normalized = _normalizeArgs(args); const options = normalized[0]; const cb = normalized[1]; if (cb !== null) { // @ts-ignore change EventEmitter's sig to use CallableFunction this.once("listening", cb); } let port = 0; if (typeof options.port === "number" || typeof options.port === "string") { validatePort(options.port, "options.port"); port = options.port | 0; } // TODO(bnoordhuis) Node prefers [::] when host is omitted, // we on the other hand default to 0.0.0.0. const hostname = options.host ?? "0.0.0.0"; this.#addr = { hostname, port }; this.listening = true; nextTick(()=>this._serve()); return this; } _serve() { const ac = new AbortController(); const handler = (request, info)=>{ const socket = new FakeSocket({ remoteAddress: info.remoteAddr.hostname, remotePort: info.remoteAddr.port, encrypted: this._encrypted }); const req = new IncomingMessageForServer(request, socket); if (req.upgrade && this.listenerCount("upgrade") > 0) { const { conn, response } = upgradeHttpRaw(request); const socket = new Socket({ handle: new TCP(constants.SERVER, conn) }); // Update socket held by `req`. req.socket = socket; this.emit("upgrade", req, socket, Buffer.from([])); return response; } else { return new Promise((resolve)=>{ const res = new ServerResponse(resolve, socket); this.emit("request", req, res); }); } }; if (this.#hasClosed) { return; } this.#ac = ac; try { this.#server = serve({ handler: handler, ...this.#addr, signal: ac.signal, // @ts-ignore Might be any without `--unstable` flag onListen: ({ port })=>{ this.#addr.port = port; this.emit("listening"); }, ...this._additionalServeOptions?.() }); } catch (e) { this.emit("error", e); return; } if (this.#unref) { this.#server.unref(); } this.#server.finished.then(()=>this.#serveDeferred.resolve()); } setTimeout() { console.error("Not implemented: Server.setTimeout()"); } ref() { if (this.#server) { this.#server.ref(); } this.#unref = false; } unref() { if (this.#server) { this.#server.unref(); } this.#unref = true; } close(cb) { const listening = this.listening; this.listening = false; this.#hasClosed = true; if (typeof cb === "function") { if (listening) { this.once("close", cb); } else { this.once("close", function close() { cb(new ERR_SERVER_NOT_RUNNING()); }); } } if (listening && this.#ac) { this.#ac.abort(); this.#ac = undefined; } else { this.#serveDeferred.resolve(); } this.#server = undefined; return this; } address() { return { port: this.#addr.port, address: this.#addr.hostname }; } } Server.prototype = ServerImpl.prototype; export function createServer(opts, requestListener) { return Server(opts, requestListener); } // deno-lint-ignore no-explicit-any export function request(...args) { return new ClientRequest(args[0], args[1], args[2]); } // deno-lint-ignore no-explicit-any export function get(...args) { const req = request(args[0], args[1], args[2]); req.end(); return req; } export { Agent, ClientRequest, globalAgent, IncomingMessageForServer as IncomingMessage, METHODS, OutgoingMessage, STATUS_CODES }; export default { Agent, globalAgent, ClientRequest, STATUS_CODES, METHODS, createServer, Server, IncomingMessage: IncomingMessageForServer, IncomingMessageForClient, IncomingMessageForServer, OutgoingMessage, ServerResponse, request, get }; QbBP| node:httpa bRD`M`d TY`p%Lac T  I`"# Sb1&b  B b ‘ B   "       |p?????????????????Ib`tL` bS]`B]`1]`]]`b% ]`b]` ]`9"]`zB ]`" ]`/ ]`b]`]`3 ]`^ ]`"]`] ]`" ]`^ ]` ]`rb! ]`j]`"-]`b,]`6]`n"t]` >]`> L`  B DB c ¶ D¶ c  ¡ D¡ cL`$` L`’ ` L`’ š ` L`š b `L`b B B ` L`B Bc ` L`Bc  ` L` ® ` L`®  `  L` ³ `  L`³ `  L`.`  L`.]L`1 DB B c D"{ "{ c Db b c Db b c D  c Da a c DZ Z c1 Da a c D  cfr D"\  c \d D\  c v~ D¶ ¶ c  Db b c Db^ b^ c  DB3B3c/ 6  DBBcJU DZ Z c D[ [ c BP D c ! Db ¨ c Db` b` c Dbbc D  c DB)B)c Dc RZ DBb Bb cRb D¡ ¡ c Dc . D  c D  c KV D± ± c Db b cHV D ! !c D 9 9c D % %c) DB B c  D||c  D||c D""c Dc_f Dbnbnc D"] "] cy D  c  D  c  D"[ "[ c  D  c  D  c  D_ _ cXj Db c`= a? !a? 9a? %a?Ba?"a?Z a?b a?"{ a?Z a? a?± a? a?"[ a? a? a?[ a?a?"\ a?\ a?¶ a?B a? a?a? a?b a?B a?¡ a?"] a? a?ba?b^ a?b a?_ a?b` a?b a?b a? a?a a?a a?Bb a?|a?bna?B)a?a?a?b a?|a?B3a?Bc a?B a?’ a?š a? a ?b a? a?® a?³ a ?.a ?a ?a?ͪb@ T  I`Fff b@ T I`ff b"@ T I`j] b@1 T I`nU|b@2TLe  T I`5 b@PbK T I`³ b@aaL  T I`b.b@baM  T I`b @cbN a  & T`L`>c "d d Be e "f f f g h h i i j bj j bk k "l l m m Bn n Bo o Bp p "q q Br r "s s t t Bu u v Bw w Bx x y y bz z B{ { b| "} } ~   "  B       `D d24 e24 f24 g2 4 24 24 24 24 2 4" 2 $ 4& 2 ( 4* 2 , 4. 2 0 42 2 4 46 ,284: -2<4> .2@4B /2D4F 02H4J 12L4N 32P4R 42T4V 2X4Z 2\4^ 2`4b 2d4f 2h4j 2l4n 2p4r 2t4v 2x4z 2|4~ 2  4 2!!4 2""4 2##4 2$$4 2%%4 2&&4 2''4 2((4 2))4 2**4 2++4 2,,4 2--4 2..4 2//4 2004 2114 2224 2334 2444 2554 2664 2774 2884 2994 2::4 2;;4 2<<4 2==4(SbqAI`Da \u 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8b@  `M`"  b … " 9B::  B     b ‰ ;b;"<"   <b ‹ "   b  "   B  b ‘   `T ``/ `/ `?  `  a/$%D]H ` aj4ajBaj aj"aj]  T  I`d$.%B ͪb  T I`=%B%4b  T I`H%M%Bb T I`W%\% b T I`i%%"b   `T``/ `/ `?  `  a%peD] `  aj aj aj aj ajBajaj  aj › aj b aj "aj b aj 3aj]¶  T  I`&bD’ ͪb Ճ T I`qDG b   T I` HH b  T I`HH b   T I`II b  T I`I'YBb T I`/YYb T I`Z[ b T I`['\› b T I`B\^b b T I`^a"b  T I`%adb b T I`Eene3b  T8`00L` “ B bB " 3"   I  `KdX T T $ $ ( D X | g333333 3 33 (Sbqq’ `Da+&peb 0 0 0b "        `T ``/ `/ `?  `  aAh*D] `  aj`+  } aB`+ a" `+ a `+ a  `+ a "aj  ajB aj aj aj aj" ajD]"\  T  I`hkš ͪb Ճ T I` l-lQbget connectionb T I`>l`lQbset connectionb T I`nlmQb get headersb  T I`mmQb set headersb   T I`moQcget headersDistinctb! T I`/o\oQcset headersDistinctb" T I`kopQb get trailersb # T I`ppQb set trailersb $ T I`p%rQcget trailersDistinctb% T I` T I`؞ b ? T I`РTObA T I`wBbB T I` b C T I`ܤ  bD TH`K L` MB   )`Kd D t`L `  \\ mk33! i55 3 3355(Sbqq `Da b 0`4 0 4ͪbE,Sb @  c??.ӫ  `T ``/ `/ `?  `  a.ӫD]T ` ajb`+ } `Fb `+  `FB`+ `FŽ`+  `F`+ `F]  T I` Pb@ b Aͪb ՃF T  I`^xQb get abortedb J T I`Qbget httpVersionbK T I`̪Qb get headersb L T I`ڪbQb get upgradeb M T I`ѫQbget connectionbN T4`#L`3B  `Kc  0   .f55333(Sbqqb `Dabӫ a 4 0bO\Sb @B ¯ B6B ° b/"  i????????=Y  ` T ``/ `/ `?  `  a=YD]l ` aj;aj aj"aj B'aj'aj ajb aj ]B ¯ B6B ° b/"   T  I` ® ͯͪb ՃQ T I`;bS T I`ַ bU T I`&"b Z T I`,B'b[ T I`'b\ T I`b @b] T I`Wb b_ TL`WL`   )`Kd \ 44X$P$ x sl!i5555 5 55 53(Sbqq® `DacYͯb 4 4 0ͪb`bB C¡ C’ CBc CB C³ C CB Cš Cb C¶ C C.CCB ¡ ’ Bc B ³  B š b .  `DAh %%%%%%% % % % % %%%%%%ei h  0 - % 01b{ %10 i%z%!b %!b %0  e+ % 0    !"#$%&'e+(2) 1!*b% !+b% !,b%!-b%!.b%!/b%0120Â3456789 :!;"<#=$>%?&@'A(B)C*e+D+2) 1E% Ge% HHe%IIe%JJe%KKe%L,%M-%N.%0OP/F‚Q0R1S2T3U4V5W6X7Y8Z9e+ % % % [:2) 1 \^^e%HHe%0_;]‚`<a=b>c?d@e+eA2)  1fhhe%iie%jje%kke%lle%mme%nne%ooe% 0pBg‚qCrDsEtFuGvHwIe+ xJ2)" 100-y$2y&~z()0{3{)0|3|+03}-03~/0310 3303503703903;03=0 3G?0 3A0 3C 1  fEO0 `@,@@ ,,0ͪbA !)D19ADIDQYaiqDyu}ɭѭݭ %1=IQDYDaiqyɮDծݮ %iDuDDD D%D`RD]DH fQf5E// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { core } from "ext:core/mod.js"; import { op_http2_client_get_response, op_http2_client_get_response_body_chunk, op_http2_client_get_response_trailers, op_http2_client_request, op_http2_client_reset_stream, op_http2_client_send_data, op_http2_client_send_trailers, op_http2_connect, op_http2_poll_client_connection } from "ext:core/ops"; import { notImplemented, warnNotImplemented } from "ext:deno_node/_utils.ts"; import { EventEmitter } from "node:events"; import { Buffer } from "node:buffer"; import { connect as netConnect, Server } from "node:net"; import { connect as tlsConnect } from "node:tls"; import { kHandle, kMaybeDestroy, kUpdateTimer, setStreamTimeout } from "ext:deno_node/internal/stream_base_commons.ts"; import { kStreamBaseField } from "ext:deno_node/internal_binding/stream_wrap.ts"; import { addTrailers, serveHttpOnConnection } from "ext:deno_http/00_serve.js"; import { nextTick } from "ext:deno_node/_next_tick.ts"; import { TextEncoder } from "ext:deno_web/08_text_encoding.js"; import { Duplex } from "node:stream"; import { AbortError, ERR_HTTP2_CONNECT_AUTHORITY, ERR_HTTP2_CONNECT_PATH, ERR_HTTP2_CONNECT_SCHEME, ERR_HTTP2_GOAWAY_SESSION, ERR_HTTP2_INVALID_PSEUDOHEADER, ERR_HTTP2_INVALID_SESSION, ERR_HTTP2_INVALID_STREAM, ERR_HTTP2_SESSION_ERROR, ERR_HTTP2_STREAM_CANCEL, ERR_HTTP2_STREAM_ERROR, ERR_HTTP2_TRAILERS_ALREADY_SENT, ERR_HTTP2_TRAILERS_NOT_READY, ERR_HTTP2_UNSUPPORTED_PROTOCOL, ERR_INVALID_HTTP_TOKEN, ERR_SOCKET_CLOSED } from "ext:deno_node/internal/errors.ts"; import { _checkIsHttpToken } from "ext:deno_node/_http_common.ts"; const kSession = Symbol("session"); const kAlpnProtocol = Symbol("alpnProtocol"); const kAuthority = Symbol("authority"); const kEncrypted = Symbol("encrypted"); const kID = Symbol("id"); const kInit = Symbol("init"); const kInfoHeaders = Symbol("sent-info-headers"); const kOrigin = Symbol("origin"); const kPendingRequestCalls = Symbol("kPendingRequestCalls"); const kProtocol = Symbol("protocol"); const kSentHeaders = Symbol("sent-headers"); const kSentTrailers = Symbol("sent-trailers"); const kState = Symbol("state"); const kType = Symbol("type"); const kTimeout = Symbol("timeout"); const kDenoResponse = Symbol("kDenoResponse"); const kDenoRid = Symbol("kDenoRid"); const kDenoClientRid = Symbol("kDenoClientRid"); const kDenoConnRid = Symbol("kDenoConnRid"); const kPollConnPromise = Symbol("kPollConnPromise"); const STREAM_FLAGS_PENDING = 0x0; const STREAM_FLAGS_READY = 0x1; const STREAM_FLAGS_CLOSED = 0x2; const STREAM_FLAGS_HEADERS_SENT = 0x4; const STREAM_FLAGS_HEAD_REQUEST = 0x8; const STREAM_FLAGS_ABORTED = 0x10; const STREAM_FLAGS_HAS_TRAILERS = 0x20; const SESSION_FLAGS_PENDING = 0x0; const SESSION_FLAGS_READY = 0x1; const SESSION_FLAGS_CLOSED = 0x2; const SESSION_FLAGS_DESTROYED = 0x4; const ENCODER = new TextEncoder(); const debugHttp2Enabled = false; function debugHttp2(...args) { if (debugHttp2Enabled) { console.log(...args); } } export class Http2Session extends EventEmitter { constructor(type, _options /* socket */ ){ super(); // TODO(bartlomieju): Handle sockets here this[kState] = { destroyCode: constants.NGHTTP2_NO_ERROR, flags: SESSION_FLAGS_PENDING, goawayCode: null, goawayLastStreamID: null, streams: new Map(), pendingStreams: new Set(), pendingAck: 0, writeQueueSize: 0, originSet: undefined }; this[kEncrypted] = undefined; this[kAlpnProtocol] = undefined; this[kType] = type; this[kTimeout] = null; // this[kProxySocket] = null; // this[kSocket] = socket; // this[kHandle] = undefined; // TODO(bartlomieju): connecting via socket } get encrypted() { return this[kEncrypted]; } get alpnProtocol() { return this[kAlpnProtocol]; } get originSet() { if (!this.encrypted || this.destroyed) { return undefined; } // TODO(bartlomieju): return []; } get connecting() { return (this[kState].flags & SESSION_FLAGS_READY) === 0; } get closed() { return !!(this[kState].flags & SESSION_FLAGS_CLOSED); } get destroyed() { return !!(this[kState].flags & SESSION_FLAGS_DESTROYED); } [kUpdateTimer]() { if (this.destroyed) { return; } if (this[kTimeout]) { this[kTimeout].refresh(); } } setLocalWindowSize(_windowSize) { notImplemented("Http2Session.setLocalWindowSize"); } ping(_payload, _callback) { notImplemented("Http2Session.ping"); return false; } get socket() { warnNotImplemented("Http2Session.socket"); return {}; } get type() { return this[kType]; } get pendingSettingsAck() { return this[kState].pendingAck > 0; } get state() { return {}; } get localSettings() { notImplemented("Http2Session.localSettings"); return {}; } get remoteSettings() { notImplemented("Http2Session.remoteSettings"); return {}; } settings(_settings, _callback) { notImplemented("Http2Session.settings"); } goaway(code, lastStreamID, opaqueData) { // TODO(satyarohith): create goaway op and pass the args debugHttp2(">>> goaway - ignored args", code, lastStreamID, opaqueData); if (this[kDenoConnRid]) { core.tryClose(this[kDenoConnRid]); } if (this[kDenoClientRid]) { core.tryClose(this[kDenoClientRid]); } } destroy(error = constants.NGHTTP2_NO_ERROR, code) { if (this.destroyed) { return; } if (typeof error === "number") { code = error; error = code !== constants.NGHTTP2_NO_ERROR ? new ERR_HTTP2_SESSION_ERROR(code) : undefined; } if (code === undefined && error != null) { code = constants.NGHTTP2_INTERNAL_ERROR; } closeSession(this, code, error); } close(callback) { if (this.closed || this.destroyed) { return; } this[kState].flags |= SESSION_FLAGS_CLOSED; if (typeof callback === "function") { this.once("close", callback); } this.goaway(); this[kMaybeDestroy](); } [kMaybeDestroy](error) { if (!error) { const state = this[kState]; // Don't destroy if the session is not closed or there are pending or open // streams. if (!this.closed || state.streams.size > 0 || state.pendingStreams.size > 0) { return; } } this.destroy(error); } ref() { warnNotImplemented("Http2Session.ref"); } unref() { warnNotImplemented("Http2Session.unref"); } setTimeout(msecs, callback) { setStreamTimeout.call(this, msecs, callback); } } function emitClose(session, error) { if (error) { session.emit("error", error); } session.emit("close"); } function finishSessionClose(session, error) { // TODO(bartlomieju): handle sockets nextTick(emitClose, session, error); } function closeSession(session, code, error) { const state = session[kState]; state.flags |= SESSION_FLAGS_DESTROYED; state.destroyCode = code; session.setTimeout(0); session.removeAllListeners("timeout"); // Destroy open and pending streams if (state.pendingStreams.size > 0 || state.streams.size > 0) { const cancel = new ERR_HTTP2_STREAM_CANCEL(error); state.pendingStreams.forEach((stream)=>stream.destroy(cancel)); state.streams.forEach((stream)=>stream.destroy(cancel)); } // TODO(bartlomieju): handle sockets debugHttp2(">>> closeSession", session[kDenoConnRid], session[kDenoClientRid]); console.table(Deno[Deno.internal].core.resources()); if (session[kDenoConnRid]) { core.tryClose(session[kDenoConnRid]); } if (session[kDenoClientRid]) { core.tryClose(session[kDenoClientRid]); } finishSessionClose(session, error); } export class ServerHttp2Session extends Http2Session { constructor(){ super(constants.NGHTTP2_SESSION_SERVER, {}); } altsvc(_alt, _originOrStream) { notImplemented("ServerHttp2Session.altsvc"); } origin(..._origins) { notImplemented("ServerHttp2Session.origins"); } } function assertValidPseudoHeader(header) { switch(header){ case ":authority": case ":path": case ":method": case ":scheme": case ":status": return; default: throw new ERR_HTTP2_INVALID_PSEUDOHEADER(header); } } export class ClientHttp2Session extends Http2Session { #connectPromise; #refed = true; constructor(// deno-lint-ignore no-explicit-any socket, url, options){ super(constants.NGHTTP2_SESSION_CLIENT, options); this[kPendingRequestCalls] = null; this[kDenoClientRid] = undefined; this[kDenoConnRid] = undefined; this[kPollConnPromise] = undefined; socket.on("error", socketOnError); socket.on("close", socketOnClose); const connPromise = new Promise((resolve)=>{ const eventName = url.startsWith("https") ? "secureConnect" : "connect"; socket.once(eventName, ()=>{ const rid = socket[kHandle][kStreamBaseField].rid; nextTick(()=>{ resolve(rid); }); }); }); socket[kSession] = this; // TODO(bartlomieju): cleanup this.#connectPromise = (async ()=>{ debugHttp2(">>> before connect"); const connRid_ = await connPromise; // console.log(">>>> awaited connRid", connRid_, url); const [clientRid, connRid] = await op_http2_connect(connRid_, url); debugHttp2(">>> after connect", clientRid, connRid); this[kDenoClientRid] = clientRid; this[kDenoConnRid] = connRid; (async ()=>{ try { const promise = op_http2_poll_client_connection(this[kDenoConnRid]); this[kPollConnPromise] = promise; if (!this.#refed) { this.unref(); } await promise; } catch (e) { this.emit("error", e); } })(); this.emit("connect", this, {}); })(); } ref() { this.#refed = true; if (this[kPollConnPromise]) { core.refOpPromise(this[kPollConnPromise]); } } unref() { this.#refed = false; if (this[kPollConnPromise]) { core.unrefOpPromise(this[kPollConnPromise]); } } request(headers, options) { if (this.destroyed) { throw new ERR_HTTP2_INVALID_SESSION(); } if (this.closed) { throw new ERR_HTTP2_GOAWAY_SESSION(); } this[kUpdateTimer](); if (headers !== null && headers !== undefined) { const keys = Object.keys(headers); for(let i = 0; i < keys.length; i++){ const header = keys[i]; if (header[0] === ":") { assertValidPseudoHeader(header); } else if (header && !_checkIsHttpToken(header)) { this.destroy(new ERR_INVALID_HTTP_TOKEN("Header name", header)); } } } headers = Object.assign({ __proto__: null }, headers); options = { ...options }; if (headers[constants.HTTP2_HEADER_METHOD] === undefined) { headers[constants.HTTP2_HEADER_METHOD] = constants.HTTP2_METHOD_GET; } const connect = headers[constants.HTTP2_HEADER_METHOD] === constants.HTTP2_METHOD_CONNECT; if (!connect || headers[constants.HTTP2_HEADER_PROTOCOL] !== undefined) { if (getAuthority(headers) === undefined) { headers[constants.HTTP2_HEADER_AUTHORITY] = this[kAuthority]; } if (headers[constants.HTTP2_HEADER_SCHEME] === undefined) { headers[constants.HTTP2_HEADER_SCHEME] = this[kProtocol].slice(0, -1); } if (headers[constants.HTTP2_HEADER_PATH] === undefined) { headers[constants.HTTP2_HEADER_PATH] = "/"; } } else { if (headers[constants.HTTP2_HEADER_AUTHORITY] === undefined) { throw new ERR_HTTP2_CONNECT_AUTHORITY(); } if (headers[constants.HTTP2_HEADER_SCHEME] === undefined) { throw new ERR_HTTP2_CONNECT_SCHEME(); } if (headers[constants.HTTP2_HEADER_PATH] === undefined) { throw new ERR_HTTP2_CONNECT_PATH(); } } if (options.endStream === undefined) { const method = headers[constants.HTTP2_HEADER_METHOD]; options.endStream = method === constants.HTTP2_METHOD_DELETE || method === constants.HTTP2_METHOD_GET || method === constants.HTTP2_METHOD_HEAD; } else { options.endStream = !!options.endStream; } const stream = new ClientHttp2Stream(options, this, this.#connectPromise, headers); stream[kSentHeaders] = headers; stream[kOrigin] = `${headers[constants.HTTP2_HEADER_SCHEME]}://${getAuthority(headers)}`; if (options.endStream) { stream.end(); } if (options.waitForTrailers) { stream[kState].flags |= STREAM_FLAGS_HAS_TRAILERS; } const { signal } = options; if (signal) { const aborter = ()=>{ stream.destroy(new AbortError(undefined, { cause: signal.reason })); }; if (signal.aborted) { aborter(); } else { // TODO(bartlomieju): handle this // const disposable = EventEmitter.addAbortListener(signal, aborter); // stream.once("close", disposable[Symbol.dispose]); } } // TODO(bartlomieju): handle this const onConnect = ()=>{}; if (this.connecting) { if (this[kPendingRequestCalls] !== null) { this[kPendingRequestCalls].push(onConnect); } else { this[kPendingRequestCalls] = [ onConnect ]; this.once("connect", ()=>{ this[kPendingRequestCalls].forEach((f)=>f()); this[kPendingRequestCalls] = null; }); } } else { onConnect(); } return stream; } } function getAuthority(headers) { if (headers[constants.HTTP2_HEADER_AUTHORITY] !== undefined) { return headers[constants.HTTP2_HEADER_AUTHORITY]; } if (headers[constants.HTTP2_HEADER_HOST] !== undefined) { return headers[constants.HTTP2_HEADER_HOST]; } return undefined; } export class Http2Stream extends EventEmitter { #session; #headers; #controllerPromise; #readerPromise; #closed; _response; constructor(session, headers, controllerPromise, readerPromise){ super(); this.#session = session; this.#headers = headers; this.#controllerPromise = controllerPromise; this.#readerPromise = readerPromise; this.#closed = false; nextTick(()=>{ (async ()=>{ const headers = await this.#headers; this.emit("headers", headers); })(); (async ()=>{ const reader = await this.#readerPromise; if (reader) { for await (const data of reader){ this.emit("data", new Buffer(data)); } } this.emit("end"); })(); }); } // TODO(mmastrac): Implement duplex end() { (async ()=>{ const controller = await this.#controllerPromise; controller.close(); })(); } write(buffer, callback) { (async ()=>{ const controller = await this.#controllerPromise; if (typeof buffer === "string") { controller.enqueue(ENCODER.encode(buffer)); } else { controller.enqueue(buffer); } callback?.(); })(); } setEncoding(_encoding) {} resume() {} pause() {} get aborted() { notImplemented("Http2Stream.aborted"); return false; } get bufferSize() { notImplemented("Http2Stream.bufferSize"); return 0; } close(_code, _callback) { this.#closed = true; this.emit("close"); } get closed() { return this.#closed; } get destroyed() { return false; } get endAfterHeaders() { notImplemented("Http2Stream.endAfterHeaders"); return false; } get id() { notImplemented("Http2Stream.id"); return undefined; } get pending() { notImplemented("Http2Stream.pending"); return false; } priority(_options) { notImplemented("Http2Stream.priority"); } get rstCode() { // notImplemented("Http2Stream.rstCode"); return 0; } get sentHeaders() { notImplemented("Http2Stream.sentHeaders"); return false; } get sentInfoHeaders() { notImplemented("Http2Stream.sentInfoHeaders"); return {}; } get sentTrailers() { notImplemented("Http2Stream.sentTrailers"); return {}; } get session() { return this.#session; } setTimeout(msecs, callback) { setStreamTimeout(this, msecs, callback); } get state() { notImplemented("Http2Stream.state"); return {}; } sendTrailers(_headers) { addTrailers(this._response, [ [ "grpc-status", "0" ], [ "grpc-message", "OK" ] ]); } } async function clientHttp2Request(session, sessionConnectPromise, headers, options) { debugHttp2(">>> waiting for connect promise", sessionConnectPromise, headers, options); await sessionConnectPromise; const reqHeaders = []; const pseudoHeaders = {}; for (const [key, value] of Object.entries(headers)){ if (key[0] === ":") { pseudoHeaders[key] = value; } else { reqHeaders.push([ key, Array.isArray(value) ? value[0] : value ]); } } debugHttp2("waited for connect promise", !!options.waitForTrailers, pseudoHeaders, reqHeaders); return await op_http2_client_request(session[kDenoClientRid], pseudoHeaders, reqHeaders); } export class ClientHttp2Stream extends Duplex { #requestPromise; #responsePromise; #rid = undefined; #encoding = "utf8"; constructor(options, session, sessionConnectPromise, headers){ options.allowHalfOpen = true; options.decodeString = false; options.autoDestroy = false; super(options); this.cork(); this[kSession] = session; session[kState].pendingStreams.add(this); this._readableState.readingMore = true; this[kState] = { didRead: false, flags: STREAM_FLAGS_PENDING | STREAM_FLAGS_HEADERS_SENT, rstCode: constants.NGHTTP2_NO_ERROR, writeQueueSize: 0, trailersReady: false, endAfterHeaders: false, shutdownWritableCalled: false }; this[kDenoResponse] = undefined; this[kDenoRid] = undefined; this.#requestPromise = clientHttp2Request(session, sessionConnectPromise, headers, options); debugHttp2(">>> created clienthttp2stream"); // TODO(bartlomieju): save it so we can unref this.#responsePromise = (async ()=>{ debugHttp2(">>> before request promise", session[kDenoClientRid]); const [streamRid, streamId] = await this.#requestPromise; this.#rid = streamRid; this[kDenoRid] = streamRid; this[kInit](streamId); debugHttp2(">>> after request promise", session[kDenoClientRid], this.#rid); const response = await op_http2_client_get_response(this.#rid); debugHttp2(">>> after get response", response); const headers = { ":status": response.statusCode, ...Object.fromEntries(response.headers) }; debugHttp2(">>> emitting response", headers); this.emit("response", headers, 0); this[kDenoResponse] = response; this.emit("ready"); })(); } [kUpdateTimer]() { if (this.destroyed) { return; } if (this[kTimeout]) { this[kTimeout].refresh(); } if (this[kSession]) { this[kSession][kUpdateTimer](); } } [kInit](id) { const state = this[kState]; state.flags |= STREAM_FLAGS_READY; const session = this[kSession]; session[kState].pendingStreams.delete(this); session[kState].streams.set(id, this); // TODO(bartlomieju): handle socket handle this[kID] = id; this.uncork(); this.emit("ready"); } get bufferSize() { return this[kState].writeQueueSize + this.writableLength; } get endAfterHeaders() { return this[kState].endAfterHeaders; } get sentHeaders() { return this[kSentHeaders]; } get sentTrailers() { return this[kSentTrailers]; } get sendInfoHeaders() { return this[kInfoHeaders]; } get pending() { return this[kID] === undefined; } get id() { return this[kID]; } get session() { return this[kSession]; } _onTimeout() { callTimeout(this, kSession); } get headersSent() { return !!(this[kState].flags & STREAM_FLAGS_HEADERS_SENT); } get aborted() { return !!(this[kState].flags & STREAM_FLAGS_ABORTED); } get headRequest() { return !!(this[kState].flags & STREAM_FLAGS_HEAD_REQUEST); } get rstCode() { return this[kState].rstCode; } get state() { notImplemented("Http2Stream.state"); return {}; } // [kAfterAsyncWrite]() {} // [kWriteGeneric]() {} // TODO(bartlomieju): clean up _write(chunk, encoding, callback) { debugHttp2(">>> _write", callback); if (typeof encoding === "function") { callback = encoding; encoding = "utf8"; } let data; if (typeof encoding === "string") { data = ENCODER.encode(chunk); } else { data = chunk.buffer; } this.#requestPromise.then(()=>{ debugHttp2(">>> _write", this.#rid, data, encoding, callback); return op_http2_client_send_data(this.#rid, data); }).then(()=>{ callback?.(); debugHttp2("this.writableFinished", this.pending, this.destroyed, this.writableFinished); }).catch((e)=>{ callback?.(e); }); } // TODO(bartlomieju): finish this method _writev(_chunks, _callback) { notImplemented("ClientHttp2Stream._writev"); } _final(cb) { debugHttp2("_final", new Error()); if (this.pending) { this.once("ready", ()=>this._final(cb)); return; } shutdownWritable(this, cb); } // TODO(bartlomieju): needs a proper cleanup _read() { if (this.destroyed) { this.push(null); return; } if (!this[kState].didRead) { this._readableState.readingMore = false; this[kState].didRead = true; } // if (!this.pending) { // streamOnResume(this); // } else { // this.once("ready", () => streamOnResume(this)); // } if (!this[kDenoResponse]) { this.once("ready", this._read); return; } debugHttp2(">>> read"); (async ()=>{ const [chunk, finished] = await op_http2_client_get_response_body_chunk(this[kDenoResponse].bodyRid); debugHttp2(">>> chunk", chunk, finished, this[kDenoResponse].bodyRid); if (chunk === null) { const trailerList = await op_http2_client_get_response_trailers(this[kDenoResponse].bodyRid); if (trailerList) { const trailers = Object.fromEntries(trailerList); this.emit("trailers", trailers); } debugHttp2("tryClose"); core.tryClose(this[kDenoResponse].bodyRid); this.push(null); debugHttp2(">>> read null chunk"); this[kMaybeDestroy](); return; } let result; if (this.#encoding === "utf8") { result = this.push(new TextDecoder().decode(new Uint8Array(chunk))); } else { result = this.push(new Uint8Array(chunk)); } debugHttp2(">>> read result", result); })(); } // TODO(bartlomieju): priority(_options) { notImplemented("Http2Stream.priority"); } sendTrailers(trailers) { debugHttp2("sendTrailers", trailers); if (this.destroyed || this.closed) { throw new ERR_HTTP2_INVALID_STREAM(); } if (this[kSentTrailers]) { throw new ERR_HTTP2_TRAILERS_ALREADY_SENT(); } if (!this[kState].trailersReady) { throw new ERR_HTTP2_TRAILERS_NOT_READY(); } trailers = Object.assign({ __proto__: null }, trailers); const trailerList = []; for (const [key, value] of Object.entries(trailers)){ trailerList.push([ key, value ]); } this[kSentTrailers] = trailers; // deno-lint-ignore no-this-alias const stream = this; stream[kState].flags &= ~STREAM_FLAGS_HAS_TRAILERS; debugHttp2("sending trailers", this.#rid, trailers); op_http2_client_send_trailers(this.#rid, trailerList).then(()=>{ stream[kMaybeDestroy](); core.tryClose(this.#rid); }).catch((e)=>{ debugHttp2(">>> send trailers error", e); core.tryClose(this.#rid); stream._destroy(e); }); } get closed() { return !!(this[kState].flags & STREAM_FLAGS_CLOSED); } close(code = constants.NGHTTP2_NO_ERROR, callback) { debugHttp2(">>> close", code, this.closed, callback); if (this.closed) { return; } if (typeof callback !== "undefined") { this.once("close", callback); } closeStream(this, code); } _destroy(err, callback) { debugHttp2(">>> ClientHttp2Stream._destroy", err, callback); const session = this[kSession]; const id = this[kID]; const state = this[kState]; const sessionState = session[kState]; const sessionCode = sessionState.goawayCode || sessionState.destroyCode; let code = this.closed ? this.rstCode : sessionCode; if (err != null) { if (sessionCode) { code = sessionCode; } else if (err instanceof AbortError) { code = constants.NGHTTP2_CANCEL; } else { code = constants.NGHTTP2_INTERNAL_ERROR; } } if (!this.closed) { // TODO(bartlomieju): this not handle `socket handle` closeStream(this, code, kNoRstStream); } sessionState.streams.delete(id); sessionState.pendingStreams.delete(this); sessionState.writeQueueSize -= state.writeQueueSize; state.writeQueueSize = 0; const nameForErrorCode = {}; if (err == null && code !== constants.NGHTTP2_NO_ERROR && code !== constants.NGHTTP2_CANCEL) { err = new ERR_HTTP2_STREAM_ERROR(nameForErrorCode[code] || code); } this[kSession] = undefined; session[kMaybeDestroy](); callback(err); } [kMaybeDestroy](code = constants.NGHTTP2_NO_ERROR) { debugHttp2(">>> ClientHttp2Stream[kMaybeDestroy]", code, this.writableFinished, this.readable, this.closed); if (code !== constants.NGHTTP2_NO_ERROR) { this._destroy(); return; } if (this.writableFinished) { if (!this.readable && this.closed) { debugHttp2("going into _destroy"); this._destroy(); return; } } } setTimeout(msecs, callback) { // TODO(bartlomieju): fix this call, it's crashing on `this` being undefined; // some strange transpilation quirk going on here. setStreamTimeout.call(this, msecs, callback); } } function shutdownWritable(stream, callback) { debugHttp2(">>> shutdownWritable", callback); const state = stream[kState]; if (state.shutdownWritableCalled) { return callback(); } state.shutdownWritableCalled = true; onStreamTrailers(stream); callback(); // TODO(bartlomieju): might have to add "finish" event listener here, // check it. } function onStreamTrailers(stream) { stream[kState].trailersReady = true; debugHttp2(">>> onStreamTrailers", stream.destroyed, stream.closed); if (stream.destroyed || stream.closed) { return; } if (!stream.emit("wantTrailers")) { debugHttp2(">>> onStreamTrailers no wantTrailers"); stream.sendTrailers({}); } debugHttp2(">>> onStreamTrailers wantTrailers"); } const kNoRstStream = 0; const kSubmitRstStream = 1; const kForceRstStream = 2; function closeStream(stream, code, rstStreamStatus = kSubmitRstStream) { const state = stream[kState]; state.flags |= STREAM_FLAGS_CLOSED; state.rstCode = code; stream.setTimeout(0); stream.removeAllListeners("timeout"); const { ending } = stream._writableState; if (!ending) { if (!stream.aborted) { state.flags |= STREAM_FLAGS_ABORTED; stream.emit("aborted"); } stream.end(); } if (rstStreamStatus != kNoRstStream) { debugHttp2(">>> closeStream", !ending, stream.writableFinished, code !== constants.NGHTTP2_NO_ERROR, rstStreamStatus === kForceRstStream); if (!ending || stream.writableFinished || code !== constants.NGHTTP2_NO_ERROR || rstStreamStatus === kForceRstStream) { finishCloseStream(stream, code); } else { stream.once("finish", ()=>finishCloseStream(stream, code)); } } } function finishCloseStream(stream, code) { debugHttp2(">>> finishCloseStream", stream.readableEnded, code); if (stream.pending) { stream.push(null); stream.once("ready", ()=>{ op_http2_client_reset_stream(stream[kDenoRid], code).then(()=>{ debugHttp2(">>> finishCloseStream close", stream[kDenoRid], stream[kDenoResponse].bodyRid); core.tryClose(stream[kDenoRid]); core.tryClose(stream[kDenoResponse].bodyRid); stream.emit("close"); }); }); } else { stream.resume(); op_http2_client_reset_stream(stream[kDenoRid], code).then(()=>{ debugHttp2(">>> finishCloseStream close2", stream[kDenoRid], stream[kDenoResponse].bodyRid); core.tryClose(stream[kDenoRid]); core.tryClose(stream[kDenoResponse].bodyRid); nextTick(()=>{ stream.emit("close"); }); }).catch(()=>{ debugHttp2(">>> finishCloseStream close2 catch", stream[kDenoRid], stream[kDenoResponse].bodyRid); core.tryClose(stream[kDenoRid]); core.tryClose(stream[kDenoResponse].bodyRid); nextTick(()=>{ stream.emit("close"); }); }); } } function callTimeout() { notImplemented("callTimeout"); } export class ServerHttp2Stream extends Http2Stream { _deferred; #body; #waitForTrailers; #headersSent; constructor(session, headers, controllerPromise, reader, body){ super(session, headers, controllerPromise, Promise.resolve(reader)); this._deferred = Promise.withResolvers(); this.#body = body; } additionalHeaders(_headers) { notImplemented("ServerHttp2Stream.additionalHeaders"); } end() { super.end(); if (this.#waitForTrailers) { this.emit("wantTrailers"); } } get headersSent() { return this.#headersSent; } get pushAllowed() { notImplemented("ServerHttp2Stream.pushAllowed"); return false; } pushStream(_headers, _options, _callback) { notImplemented("ServerHttp2Stream.pushStream"); } respond(headers, options) { this.#headersSent = true; const response = {}; if (headers) { for (const [name, value] of Object.entries(headers)){ if (name == constants.HTTP2_HEADER_STATUS) { response.status = Number(value); } } } if (options?.endStream) { this._deferred.resolve(this._response = new Response("", response)); } else { this.#waitForTrailers = options?.waitForTrailers; this._deferred.resolve(this._response = new Response(this.#body, response)); } } respondWithFD(_fd, _headers, _options) { notImplemented("ServerHttp2Stream.respondWithFD"); } respondWithFile(_path, _headers, _options) { notImplemented("ServerHttp2Stream.respondWithFile"); } } export class Http2Server extends Server { #options = {}; #abortController; #server; timeout = 0; constructor(options, requestListener){ super(options); this.#abortController = new AbortController(); this.on("connection", (conn)=>{ try { const session = new ServerHttp2Session(); this.emit("session", session); this.#server = serveHttpOnConnection(conn, this.#abortController.signal, async (req)=>{ try { const controllerDeferred = Promise.withResolvers(); const body = new ReadableStream({ start (controller) { controllerDeferred.resolve(controller); } }); const headers = {}; for (const [name, value] of req.headers){ headers[name] = value; } headers[constants.HTTP2_HEADER_PATH] = new URL(req.url).pathname; const stream = new ServerHttp2Stream(session, Promise.resolve(headers), controllerDeferred.promise, req.body, body); session.emit("stream", stream, headers); this.emit("stream", stream, headers); return await stream._deferred.promise; } catch (e) { console.log(">>> Error in serveHttpOnConnection", e); } return new Response(""); }, ()=>{ console.log(">>> error"); }, ()=>{}); } catch (e) { console.log(">>> Error in Http2Server", e); } }); this.on("newListener", (event)=>console.log(`Event in newListener: ${event}`)); this.#options = options; if (typeof requestListener === "function") { this.on("request", requestListener); } } // Prevent the TCP server from wrapping this in a socket, since we need it to serve HTTP _createSocket(clientHandle) { return clientHandle[kStreamBaseField]; } close(callback) { if (callback) { this.on("close", callback); } this.#abortController.abort(); super.close(); } setTimeout(msecs, callback) { this.timeout = msecs; if (callback !== undefined) { this.on("timeout", callback); } } updateSettings(settings) { this.#options.settings = { ...this.#options.settings, ...settings }; } } export class Http2SecureServer extends Server { #options = {}; timeout = 0; constructor(options, requestListener){ super(options, function() { notImplemented("connectionListener"); }); this.#options = options; if (typeof requestListener === "function") { this.on("request", requestListener); } } close(_callback) { notImplemented("Http2SecureServer.close"); } setTimeout(msecs, callback) { this.timeout = msecs; if (callback !== undefined) { this.on("timeout", callback); } } updateSettings(settings) { this.#options.settings = { ...this.#options.settings, ...settings }; } } export function createServer(options, onRequestHandler) { if (typeof options === "function") { onRequestHandler = options; options = {}; } return new Http2Server(options, onRequestHandler); } export function createSecureServer(_options, _onRequestHandler) { notImplemented("http2.createSecureServer"); return new Http2SecureServer(); } export function connect(authority, options, callback) { debugHttp2(">>> http2.connect", options); if (typeof options === "function") { callback = options; options = undefined; } options = { ...options }; if (typeof authority === "string") { authority = new URL(authority); } const protocol = authority.protocol || options.protocol || "https:"; let port = 0; if (authority.port !== "") { port = Number(authority.port); } else if (protocol === "http:") { port = 80; } else { port = 443; } if (port == 0) { throw new Error("Invalid port"); } let host = "localhost"; if (authority.hostname) { host = authority.hostname; if (host[0] === "[") { host = host.slice(1, -1); } } else if (authority.host) { host = authority.host; } let url, socket; if (typeof options.createConnection === "function") { url = `http://${host}${port == 80 ? "" : ":" + port}`; socket = options.createConnection(host, options); } else { switch(protocol){ case "http:": url = `http://${host}${port == 80 ? "" : ":" + port}`; socket = netConnect({ port, host, ...options, pauseOnCreate: true }); break; case "https:": // TODO(bartlomieju): handle `initializeTLSOptions` here url = `https://${host}${port == 443 ? "" : ":" + port}`; socket = tlsConnect(port, host, { manualStart: true }); break; default: throw new ERR_HTTP2_UNSUPPORTED_PROTOCOL(protocol); } } // Pause so no "socket.read()" starts in the background that would // prevent us from taking ownership of the socket in `ClientHttp2Session` socket.pause(); const session = new ClientHttp2Session(socket, url, options); session[kAuthority] = `${options.servername || host}:${port}`; session[kProtocol] = protocol; if (typeof callback === "function") { session.once("connect", callback); } return session; } function socketOnError(error) { const session = this[kSession]; if (session !== undefined) { if (error.code === "ECONNRESET" && session[kState].goawayCode !== null) { return session.destroy(); } debugHttp2(">>>> socket error", error); session.destroy(error); } } function socketOnClose() { const session = this[kSession]; if (session !== undefined) { debugHttp2(">>>> socket closed"); const err = session.connecting ? new ERR_SOCKET_CLOSED() : null; const state = session[kState]; state.streams.forEach((stream)=>stream.close(constants.NGHTTP2_CANCEL)); state.pendingStreams.forEach((stream)=>stream.close(constants.NGHTTP2_CANCEL)); session.close(); session[kMaybeDestroy](err); } } export const constants = { NGHTTP2_ERR_FRAME_SIZE_ERROR: -522, NGHTTP2_NV_FLAG_NONE: 0, NGHTTP2_NV_FLAG_NO_INDEX: 1, NGHTTP2_SESSION_SERVER: 0, NGHTTP2_SESSION_CLIENT: 1, NGHTTP2_STREAM_STATE_IDLE: 1, NGHTTP2_STREAM_STATE_OPEN: 2, NGHTTP2_STREAM_STATE_RESERVED_LOCAL: 3, NGHTTP2_STREAM_STATE_RESERVED_REMOTE: 4, NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: 5, NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: 6, NGHTTP2_STREAM_STATE_CLOSED: 7, NGHTTP2_FLAG_NONE: 0, NGHTTP2_FLAG_END_STREAM: 1, NGHTTP2_FLAG_END_HEADERS: 4, NGHTTP2_FLAG_ACK: 1, NGHTTP2_FLAG_PADDED: 8, NGHTTP2_FLAG_PRIORITY: 32, DEFAULT_SETTINGS_HEADER_TABLE_SIZE: 4096, DEFAULT_SETTINGS_ENABLE_PUSH: 1, DEFAULT_SETTINGS_MAX_CONCURRENT_STREAMS: 4294967295, DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: 65535, DEFAULT_SETTINGS_MAX_FRAME_SIZE: 16384, DEFAULT_SETTINGS_MAX_HEADER_LIST_SIZE: 65535, DEFAULT_SETTINGS_ENABLE_CONNECT_PROTOCOL: 0, MAX_MAX_FRAME_SIZE: 16777215, MIN_MAX_FRAME_SIZE: 16384, MAX_INITIAL_WINDOW_SIZE: 2147483647, NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: 1, NGHTTP2_SETTINGS_ENABLE_PUSH: 2, NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: 3, NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: 4, NGHTTP2_SETTINGS_MAX_FRAME_SIZE: 5, NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: 6, NGHTTP2_SETTINGS_ENABLE_CONNECT_PROTOCOL: 8, PADDING_STRATEGY_NONE: 0, PADDING_STRATEGY_ALIGNED: 1, PADDING_STRATEGY_MAX: 2, PADDING_STRATEGY_CALLBACK: 1, NGHTTP2_NO_ERROR: 0, NGHTTP2_PROTOCOL_ERROR: 1, NGHTTP2_INTERNAL_ERROR: 2, NGHTTP2_FLOW_CONTROL_ERROR: 3, NGHTTP2_SETTINGS_TIMEOUT: 4, NGHTTP2_STREAM_CLOSED: 5, NGHTTP2_FRAME_SIZE_ERROR: 6, NGHTTP2_REFUSED_STREAM: 7, NGHTTP2_CANCEL: 8, NGHTTP2_COMPRESSION_ERROR: 9, NGHTTP2_CONNECT_ERROR: 10, NGHTTP2_ENHANCE_YOUR_CALM: 11, NGHTTP2_INADEQUATE_SECURITY: 12, NGHTTP2_HTTP_1_1_REQUIRED: 13, NGHTTP2_DEFAULT_WEIGHT: 16, HTTP2_HEADER_STATUS: ":status", HTTP2_HEADER_METHOD: ":method", HTTP2_HEADER_AUTHORITY: ":authority", HTTP2_HEADER_SCHEME: ":scheme", HTTP2_HEADER_PATH: ":path", HTTP2_HEADER_PROTOCOL: ":protocol", HTTP2_HEADER_ACCEPT_ENCODING: "accept-encoding", HTTP2_HEADER_ACCEPT_LANGUAGE: "accept-language", HTTP2_HEADER_ACCEPT_RANGES: "accept-ranges", HTTP2_HEADER_ACCEPT: "accept", HTTP2_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS: "access-control-allow-credentials", HTTP2_HEADER_ACCESS_CONTROL_ALLOW_HEADERS: "access-control-allow-headers", HTTP2_HEADER_ACCESS_CONTROL_ALLOW_METHODS: "access-control-allow-methods", HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: "access-control-allow-origin", HTTP2_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS: "access-control-expose-headers", HTTP2_HEADER_ACCESS_CONTROL_REQUEST_HEADERS: "access-control-request-headers", HTTP2_HEADER_ACCESS_CONTROL_REQUEST_METHOD: "access-control-request-method", HTTP2_HEADER_AGE: "age", HTTP2_HEADER_AUTHORIZATION: "authorization", HTTP2_HEADER_CACHE_CONTROL: "cache-control", HTTP2_HEADER_CONNECTION: "connection", HTTP2_HEADER_CONTENT_DISPOSITION: "content-disposition", HTTP2_HEADER_CONTENT_ENCODING: "content-encoding", HTTP2_HEADER_CONTENT_LENGTH: "content-length", HTTP2_HEADER_CONTENT_TYPE: "content-type", HTTP2_HEADER_COOKIE: "cookie", HTTP2_HEADER_DATE: "date", HTTP2_HEADER_ETAG: "etag", HTTP2_HEADER_FORWARDED: "forwarded", HTTP2_HEADER_HOST: "host", HTTP2_HEADER_IF_MODIFIED_SINCE: "if-modified-since", HTTP2_HEADER_IF_NONE_MATCH: "if-none-match", HTTP2_HEADER_IF_RANGE: "if-range", HTTP2_HEADER_LAST_MODIFIED: "last-modified", HTTP2_HEADER_LINK: "link", HTTP2_HEADER_LOCATION: "location", HTTP2_HEADER_RANGE: "range", HTTP2_HEADER_REFERER: "referer", HTTP2_HEADER_SERVER: "server", HTTP2_HEADER_SET_COOKIE: "set-cookie", HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: "strict-transport-security", HTTP2_HEADER_TRANSFER_ENCODING: "transfer-encoding", HTTP2_HEADER_TE: "te", HTTP2_HEADER_UPGRADE_INSECURE_REQUESTS: "upgrade-insecure-requests", HTTP2_HEADER_UPGRADE: "upgrade", HTTP2_HEADER_USER_AGENT: "user-agent", HTTP2_HEADER_VARY: "vary", HTTP2_HEADER_X_CONTENT_TYPE_OPTIONS: "x-content-type-options", HTTP2_HEADER_X_FRAME_OPTIONS: "x-frame-options", HTTP2_HEADER_KEEP_ALIVE: "keep-alive", HTTP2_HEADER_PROXY_CONNECTION: "proxy-connection", HTTP2_HEADER_X_XSS_PROTECTION: "x-xss-protection", HTTP2_HEADER_ALT_SVC: "alt-svc", HTTP2_HEADER_CONTENT_SECURITY_POLICY: "content-security-policy", HTTP2_HEADER_EARLY_DATA: "early-data", HTTP2_HEADER_EXPECT_CT: "expect-ct", HTTP2_HEADER_ORIGIN: "origin", HTTP2_HEADER_PURPOSE: "purpose", HTTP2_HEADER_TIMING_ALLOW_ORIGIN: "timing-allow-origin", HTTP2_HEADER_X_FORWARDED_FOR: "x-forwarded-for", HTTP2_HEADER_PRIORITY: "priority", HTTP2_HEADER_ACCEPT_CHARSET: "accept-charset", HTTP2_HEADER_ACCESS_CONTROL_MAX_AGE: "access-control-max-age", HTTP2_HEADER_ALLOW: "allow", HTTP2_HEADER_CONTENT_LANGUAGE: "content-language", HTTP2_HEADER_CONTENT_LOCATION: "content-location", HTTP2_HEADER_CONTENT_MD5: "content-md5", HTTP2_HEADER_CONTENT_RANGE: "content-range", HTTP2_HEADER_DNT: "dnt", HTTP2_HEADER_EXPECT: "expect", HTTP2_HEADER_EXPIRES: "expires", HTTP2_HEADER_FROM: "from", HTTP2_HEADER_IF_MATCH: "if-match", HTTP2_HEADER_IF_UNMODIFIED_SINCE: "if-unmodified-since", HTTP2_HEADER_MAX_FORWARDS: "max-forwards", HTTP2_HEADER_PREFER: "prefer", HTTP2_HEADER_PROXY_AUTHENTICATE: "proxy-authenticate", HTTP2_HEADER_PROXY_AUTHORIZATION: "proxy-authorization", HTTP2_HEADER_REFRESH: "refresh", HTTP2_HEADER_RETRY_AFTER: "retry-after", HTTP2_HEADER_TRAILER: "trailer", HTTP2_HEADER_TK: "tk", HTTP2_HEADER_VIA: "via", HTTP2_HEADER_WARNING: "warning", HTTP2_HEADER_WWW_AUTHENTICATE: "www-authenticate", HTTP2_HEADER_HTTP2_SETTINGS: "http2-settings", HTTP2_METHOD_ACL: "ACL", HTTP2_METHOD_BASELINE_CONTROL: "BASELINE-CONTROL", HTTP2_METHOD_BIND: "BIND", HTTP2_METHOD_CHECKIN: "CHECKIN", HTTP2_METHOD_CHECKOUT: "CHECKOUT", HTTP2_METHOD_CONNECT: "CONNECT", HTTP2_METHOD_COPY: "COPY", HTTP2_METHOD_DELETE: "DELETE", HTTP2_METHOD_GET: "GET", HTTP2_METHOD_HEAD: "HEAD", HTTP2_METHOD_LABEL: "LABEL", HTTP2_METHOD_LINK: "LINK", HTTP2_METHOD_LOCK: "LOCK", HTTP2_METHOD_MERGE: "MERGE", HTTP2_METHOD_MKACTIVITY: "MKACTIVITY", HTTP2_METHOD_MKCALENDAR: "MKCALENDAR", HTTP2_METHOD_MKCOL: "MKCOL", HTTP2_METHOD_MKREDIRECTREF: "MKREDIRECTREF", HTTP2_METHOD_MKWORKSPACE: "MKWORKSPACE", HTTP2_METHOD_MOVE: "MOVE", HTTP2_METHOD_OPTIONS: "OPTIONS", HTTP2_METHOD_ORDERPATCH: "ORDERPATCH", HTTP2_METHOD_PATCH: "PATCH", HTTP2_METHOD_POST: "POST", HTTP2_METHOD_PRI: "PRI", HTTP2_METHOD_PROPFIND: "PROPFIND", HTTP2_METHOD_PROPPATCH: "PROPPATCH", HTTP2_METHOD_PUT: "PUT", HTTP2_METHOD_REBIND: "REBIND", HTTP2_METHOD_REPORT: "REPORT", HTTP2_METHOD_SEARCH: "SEARCH", HTTP2_METHOD_TRACE: "TRACE", HTTP2_METHOD_UNBIND: "UNBIND", HTTP2_METHOD_UNCHECKOUT: "UNCHECKOUT", HTTP2_METHOD_UNLINK: "UNLINK", HTTP2_METHOD_UNLOCK: "UNLOCK", HTTP2_METHOD_UPDATE: "UPDATE", HTTP2_METHOD_UPDATEREDIRECTREF: "UPDATEREDIRECTREF", HTTP2_METHOD_VERSION_CONTROL: "VERSION-CONTROL", HTTP_STATUS_CONTINUE: 100, HTTP_STATUS_SWITCHING_PROTOCOLS: 101, HTTP_STATUS_PROCESSING: 102, HTTP_STATUS_EARLY_HINTS: 103, HTTP_STATUS_OK: 200, HTTP_STATUS_CREATED: 201, HTTP_STATUS_ACCEPTED: 202, HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: 203, HTTP_STATUS_NO_CONTENT: 204, HTTP_STATUS_RESET_CONTENT: 205, HTTP_STATUS_PARTIAL_CONTENT: 206, HTTP_STATUS_MULTI_STATUS: 207, HTTP_STATUS_ALREADY_REPORTED: 208, HTTP_STATUS_IM_USED: 226, HTTP_STATUS_MULTIPLE_CHOICES: 300, HTTP_STATUS_MOVED_PERMANENTLY: 301, HTTP_STATUS_FOUND: 302, HTTP_STATUS_SEE_OTHER: 303, HTTP_STATUS_NOT_MODIFIED: 304, HTTP_STATUS_USE_PROXY: 305, HTTP_STATUS_TEMPORARY_REDIRECT: 307, HTTP_STATUS_PERMANENT_REDIRECT: 308, HTTP_STATUS_BAD_REQUEST: 400, HTTP_STATUS_UNAUTHORIZED: 401, HTTP_STATUS_PAYMENT_REQUIRED: 402, HTTP_STATUS_FORBIDDEN: 403, HTTP_STATUS_NOT_FOUND: 404, HTTP_STATUS_METHOD_NOT_ALLOWED: 405, HTTP_STATUS_NOT_ACCEPTABLE: 406, HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: 407, HTTP_STATUS_REQUEST_TIMEOUT: 408, HTTP_STATUS_CONFLICT: 409, HTTP_STATUS_GONE: 410, HTTP_STATUS_LENGTH_REQUIRED: 411, HTTP_STATUS_PRECONDITION_FAILED: 412, HTTP_STATUS_PAYLOAD_TOO_LARGE: 413, HTTP_STATUS_URI_TOO_LONG: 414, HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: 415, HTTP_STATUS_RANGE_NOT_SATISFIABLE: 416, HTTP_STATUS_EXPECTATION_FAILED: 417, HTTP_STATUS_TEAPOT: 418, HTTP_STATUS_MISDIRECTED_REQUEST: 421, HTTP_STATUS_UNPROCESSABLE_ENTITY: 422, HTTP_STATUS_LOCKED: 423, HTTP_STATUS_FAILED_DEPENDENCY: 424, HTTP_STATUS_TOO_EARLY: 425, HTTP_STATUS_UPGRADE_REQUIRED: 426, HTTP_STATUS_PRECONDITION_REQUIRED: 428, HTTP_STATUS_TOO_MANY_REQUESTS: 429, HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: 431, HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: 451, HTTP_STATUS_INTERNAL_SERVER_ERROR: 500, HTTP_STATUS_NOT_IMPLEMENTED: 501, HTTP_STATUS_BAD_GATEWAY: 502, HTTP_STATUS_SERVICE_UNAVAILABLE: 503, HTTP_STATUS_GATEWAY_TIMEOUT: 504, HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: 505, HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: 506, HTTP_STATUS_INSUFFICIENT_STORAGE: 507, HTTP_STATUS_LOOP_DETECTED: 508, HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: 509, HTTP_STATUS_NOT_EXTENDED: 510, HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: 511 }; // const kSingleValueHeaders = new Set([ // constants.HTTP2_HEADER_STATUS, // constants.HTTP2_HEADER_METHOD, // constants.HTTP2_HEADER_AUTHORITY, // constants.HTTP2_HEADER_SCHEME, // constants.HTTP2_HEADER_PATH, // constants.HTTP2_HEADER_PROTOCOL, // constants.HTTP2_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS, // constants.HTTP2_HEADER_ACCESS_CONTROL_MAX_AGE, // constants.HTTP2_HEADER_ACCESS_CONTROL_REQUEST_METHOD, // constants.HTTP2_HEADER_AGE, // constants.HTTP2_HEADER_AUTHORIZATION, // constants.HTTP2_HEADER_CONTENT_ENCODING, // constants.HTTP2_HEADER_CONTENT_LANGUAGE, // constants.HTTP2_HEADER_CONTENT_LENGTH, // constants.HTTP2_HEADER_CONTENT_LOCATION, // constants.HTTP2_HEADER_CONTENT_MD5, // constants.HTTP2_HEADER_CONTENT_RANGE, // constants.HTTP2_HEADER_CONTENT_TYPE, // constants.HTTP2_HEADER_DATE, // constants.HTTP2_HEADER_DNT, // constants.HTTP2_HEADER_ETAG, // constants.HTTP2_HEADER_EXPIRES, // constants.HTTP2_HEADER_FROM, // constants.HTTP2_HEADER_HOST, // constants.HTTP2_HEADER_IF_MATCH, // constants.HTTP2_HEADER_IF_MODIFIED_SINCE, // constants.HTTP2_HEADER_IF_NONE_MATCH, // constants.HTTP2_HEADER_IF_RANGE, // constants.HTTP2_HEADER_IF_UNMODIFIED_SINCE, // constants.HTTP2_HEADER_LAST_MODIFIED, // constants.HTTP2_HEADER_LOCATION, // constants.HTTP2_HEADER_MAX_FORWARDS, // constants.HTTP2_HEADER_PROXY_AUTHORIZATION, // constants.HTTP2_HEADER_RANGE, // constants.HTTP2_HEADER_REFERER, // constants.HTTP2_HEADER_RETRY_AFTER, // constants.HTTP2_HEADER_TK, // constants.HTTP2_HEADER_UPGRADE_INSECURE_REQUESTS, // constants.HTTP2_HEADER_USER_AGENT, // constants.HTTP2_HEADER_X_CONTENT_TYPE_OPTIONS, // ]); export function getDefaultSettings() { notImplemented("http2.getDefaultSettings"); return {}; } export function getPackedSettings(_settings) { notImplemented("http2.getPackedSettings"); return {}; } export function getUnpackedSettings(_buffer) { notImplemented("http2.getUnpackedSettings"); return {}; } export const sensitiveHeaders = Symbol("nodejs.http2.sensitiveHeaders"); export class Http2ServerRequest { constructor(){} get aborted() { notImplemented("Http2ServerRequest.aborted"); return false; } get authority() { notImplemented("Http2ServerRequest.authority"); return ""; } get complete() { notImplemented("Http2ServerRequest.complete"); return false; } get connection() { notImplemented("Http2ServerRequest.connection"); return {}; } destroy(_error) { notImplemented("Http2ServerRequest.destroy"); } get headers() { notImplemented("Http2ServerRequest.headers"); return {}; } get httpVersion() { notImplemented("Http2ServerRequest.httpVersion"); return ""; } get method() { notImplemented("Http2ServerRequest.method"); return ""; } get rawHeaders() { notImplemented("Http2ServerRequest.rawHeaders"); return []; } get rawTrailers() { notImplemented("Http2ServerRequest.rawTrailers"); return []; } get scheme() { notImplemented("Http2ServerRequest.scheme"); return ""; } setTimeout(msecs, callback) { this.stream.setTimeout(callback, msecs); } get socket() { notImplemented("Http2ServerRequest.socket"); return {}; } get stream() { notImplemented("Http2ServerRequest.stream"); return new Http2Stream(); } get trailers() { notImplemented("Http2ServerRequest.trailers"); return {}; } get url() { notImplemented("Http2ServerRequest.url"); return ""; } } export class Http2ServerResponse { constructor(){} addTrailers(_headers) { notImplemented("Http2ServerResponse.addTrailers"); } get connection() { notImplemented("Http2ServerResponse.connection"); return {}; } createPushResponse(_headers, _callback) { notImplemented("Http2ServerResponse.createPushResponse"); } end(_data, _encoding, _callback) { notImplemented("Http2ServerResponse.end"); } get finished() { notImplemented("Http2ServerResponse.finished"); return false; } getHeader(_name) { notImplemented("Http2ServerResponse.getHeader"); return ""; } getHeaderNames() { notImplemented("Http2ServerResponse.getHeaderNames"); return []; } getHeaders() { notImplemented("Http2ServerResponse.getHeaders"); return {}; } hasHeader(_name) { notImplemented("Http2ServerResponse.hasHeader"); } get headersSent() { notImplemented("Http2ServerResponse.headersSent"); return false; } removeHeader(_name) { notImplemented("Http2ServerResponse.removeHeader"); } get req() { notImplemented("Http2ServerResponse.req"); return new Http2ServerRequest(); } get sendDate() { notImplemented("Http2ServerResponse.sendDate"); return false; } setHeader(_name, _value) { notImplemented("Http2ServerResponse.setHeader"); } setTimeout(msecs, callback) { this.stream.setTimeout(msecs, callback); } get socket() { notImplemented("Http2ServerResponse.socket"); return {}; } get statusCode() { notImplemented("Http2ServerResponse.statusCode"); return 0; } get statusMessage() { notImplemented("Http2ServerResponse.statusMessage"); return ""; } get stream() { notImplemented("Http2ServerResponse.stream"); return new Http2Stream(); } get writableEnded() { notImplemented("Http2ServerResponse.writableEnded"); return false; } write(_chunk, _encoding, _callback) { notImplemented("Http2ServerResponse.write"); return this.write; } writeContinue() { notImplemented("Http2ServerResponse.writeContinue"); } writeEarlyHints(_hints) { notImplemented("Http2ServerResponse.writeEarlyHints"); } writeHead(_statusCode, _statusMessage, _headers) { notImplemented("Http2ServerResponse.writeHead"); } } export default { createServer, createSecureServer, connect, constants, getDefaultSettings, getPackedSettings, getUnpackedSettings, sensitiveHeaders, Http2ServerRequest, Http2ServerResponse }; Qb)d node:http2a bSD`MM` T`La T  I`L  Sb12B     b   B  b b b  "   b  b   "   B   B   b "   " "   " "   "  "   "  ??????????????????????????????????????????????????IbE`DL` bS]`B]`P ]`"]`b]`b% ]`.7 ]``B ]`¸ ]`]`iB ]`]`/ ]` ]` ]`]L`9` L` ` L` b ` L`b  ` L` b ` L`b " ` L`"  ` L` B ` L`B  `  L`  `  L` B `  L`B >`  L`>b`  L`b ` L` ³ ` L`³  ` L` B ` L`B  ` L`  ` L` ]L`,  DBiBic -7 D"{ "{ c DB B c   D¹ ¹ c 9T D  c Vl D" " c n D» » c  Db b c  D" " c  D  c  D  c  D" " c ' D¿ ¿ c )? Db b c A` D" " c b~ D  c  D  c  D  c  D  c D  c & DBBc  D¨ ¨ c Dnnc ?J D  c Dcu| Dµ µ c~ DB B c DB B c D´ >c  D± ± c  Db b ciw D ) )c8T D - -cV} D 1 1c D 5 5c D 9 9c D = =c D A Ac D E Ec' D I Ic)H DBBc La D¶ ¶ c DB >cCJ D_ _ cy`? a? )a? -a? 1a? 5a? 9a? =a? Aa? Ea? Ia?b a?_ a? a?"{ a?´ a? a?B a?a?µ a?B a?¶ a?B a?na?Ba?± a?Ba?B a?Bia?¹ a? a?" a?» a?b a?" a? a? a?" a?¿ a?b a?" a? a? a? a?¨ a?B a? a ? a? a ?b a?B a ?b a? a?³ a? a?>a ?ba ? a?B a? a? a?" a? a?a?Mb@ T I`  qb@ T I`&" b@ T I`" b@ T I`= ! b @"  T I`56 b@1  T I`AD" b!MQO  T I`gh" b@u  T I`ij b@v  T I`j)n" b@w T I`Dnr b@y T I`rr b@ T I`̎" b@ T I` b@Lh    T I`2³ b@a T I`Uƅ b@a T I`ޅ>b@b  T I`L b@a T I`B b@a T I`e b@ea       B B   !H  b  b B  `T ``/ `/ `?  `  a D]!f@"D  } `F` D a DBaD! `F` D  `F` DaD'a DB'a `F` D aB  `F`  a DB  `F` D  `F` D  `F` M `F` B  `F` D aD a D"a!D  `F` DB ` F` DHcDLb$\  T  I` _B qMb  T I`oQb get encryptedb  T I`Qbget alpnProtocolb T I`[Qb get originSetb  T I`lQbget connectingb T I`Qb get closedb  T I`UQb get destroyedb B  T I`f`b  T I`; b  T I`B b  T I`Qb get socketb   T I` Qaget typeb  T I`/_Qcget pendingSettingsAckb T I`kQb get stateb   T I`Qcget localSettingsb! T I`>Qcget remoteSettingsb" T I`IBb# T I` b$ T I`| b% T I`b&µ  T I``b' T I`B'b( T I`='b) T I`J"b *  `T ``/ `/ `?  `  a D]0 ` ajb ajaj] T  I`=u qMb + T I`~b b , T I` b!-,Sb @B  c??!5  `T``/ `/ `?  `  a!5D]< ` ajB'aj'aj.aj]B   T  I`!F' Mb Ճ#. T I`L''B'b)/ T I`'I('b*0 T I`S(5.b+1 T,`]  `Kb  p̢d55(Sbqq `DaM!5 a 4b02 DSb @b   b f?????6hAq  `T ``/ `/ `?  `  a6hAD]! ` aj Bajbaj aj( aj, aj"b`+ } `F" `+ ` Faj$ M`+ ` FB `+ ` FB `+ ` F`++ `F`+ `F: aj `+ `F" `+  `F `+ `F" `+ `F `+  `F"aj&!`+ `F aj ]b   b  T  I`y79 Mb Ճ23 T I`::Bb64 T I`:;bb85 T I`;; b :6 T I`;; b;7 T I`;; b<8 T I`;8<Qb get abortedb =9 T I`I<<Qbget bufferSizeb>: T I`<<b?; T I`< =Qb get closedb @< T I`=6=Qb get destroyedb A= T I`L==Qcget endAfterHeadersbB> T I`== Qaget idbC? T I`=9>Qb get pendingb D@ T I`D>>: bEA T I`>>Qb get rstCodeb FB T I`>-?Qbget sentHeadersbGC T I`C??Qcget sentInfoHeadersbHD T I`??Qbget sentTrailersbIE T I`?@Qb get sessionb JF T I`$@h@"b KG T I`t@@Qb get stateb LH T I`@fA b MI T<`4 L`J  =`Kc̸ 00XH , Ph555553 (Sbqq `Da7hA a 4 4bNJbt T I`̀J"b u T I`[āb bv T4`" L`H  `Kb<P T Df555 3(Sbqqb `DayƁ a 4 bw$Sb @ b?΁dq  `T ``/ `/ `?  `  a΁dD]< ` ajaj"ajb aj] T I`$b ۄ@ Mb Ճx T  I`^by T I`k"b z T I`bb b{ T(` L`H  `Kb ؏< @ c5 3(Sbqq `Dad a 0b|bB ` ` `B ` ` `B ` ` ` ` ` `B ` ` `" ` `B `  ` ` Y`Ab `B `@ ` ` `b `@ ` ` `B `" `! `! `" `# `"$ `$ `b% `"& `& `B' `' `( `B) `) `* `"+ `+ ` b, ` - ` - ` . ` B/ `/ 0 0 1 1 2 3 3 4 4 5 5 "6 6 b7 "8 8 b9 9 7: ; B< B= > ? ? @ bA bB "C "D D E F "G G BH H I J J bK L XL M N BZN bO O BbP Q bQ R R B"S S T BU U bV V W X MX "BY Y BZ Z B[ [ B\ \ b] B^ _ _ b` ` Ba "b b Žc "d d Be e f "g g bh i i Bj j k l l m m n "o o Bp p bq r br "s s t u : u bv v w bx y by BY"z Yz { | | B} } "~ ~ "  " e€ b   "  b  b " †  " ˆ " ‰ B B  b ‹ B  B  b   "   b    "  b " … ” " b 9 B: :" — "  ˜  b      B    "  B b  ; "  b;B "< b ¢ " b   < b " ‹ ¥ " b b    B ¨ " b     « b "  `dB `e `f `gB `° `b ` ` ` `b `" `µ ` `" `, `- `.B `/ `0 `1" `3 `4 `B ` ` `B ` ` `b `b `" ` `B ` ` ` `" ` ` ` `B ` ` `b `" ` ` `b `" `" `" ` ` `b `" ` ` ` `b `" ` ` `b   `T ``/ `/ `?  `  ajD] ` ajb`+ } `F `+ `F `+ `F`+! `F ajB`+ `Fb `+ ` F3`+ ` F"`+ ` F" `+ ` Fb`+ ` F"aj B`+ `FN`+  `F `+  `F`+ `F] T  I`޽" qMb } T I`<Qb get abortedb ~ T I`LQb get authorityb  T I`Qb get completeb  T I`PQbget connectionb T I`Z b T I`Qb get headersb  T I`PQbget httpVersionb T I`]Qb get methodb  T I`Qbget rawHeadersb T I`aQbget rawTrailersb T I`nQb get schemeb  T I`"b  T I`\Qb get socketb  T I`iQb get streamb  T I`Qb get trailersb  T I`#h Qaget urlb  `T``/ `/ `?  `  arpD]9 ` aj$naj.`+- } `FB ajBaj*`+ `F"aj aj(  aj  aj B `+1 ` F aj" ]`+ `FB `+  `FB aj"ajB`+ `F `+! `FM`+ `FN`+' `F `+  `Fbaj ajb aj aj] T  I` qMb  T I`nb  T I`RQbget connectionb T I`gB b T I`Bb T I`'uQb get finishedb  T I`"b  T I`4 b T I`A b  T I` b  T I`?Qbget headersSentb T I`N b  T I` Qaget reqb T I`VQb get sendDateb  T I`bB b  T I`"b  T I` SQb get socketb  T I`dQbget statusCodeb T I`Qcget statusMessageb T I`!yQb get streamb  T I`Qcget writableEndedb T I`Tbb T I`d b  T I`b b T I` n b `b ³ C C>CbC CB C C C" C C³  >b B   "    a`D(h %%%%%%% % % % % %%%%%%%%%%%%%%%%%%% %!%"%#%$%%%&%'%(%)%*%+ %,%-%.%/ %0 %1 %2 %3 %4ei h  !b%!b%!b%!b%!b %!b %!b% !b% !b% !b% !b% !b%!b%! b%!!b%!"b %!#b"%!$b$%!%b&%!&b(% % % % % % % % % % % %!0'i*%"%#0)*(Â+,-./001t23456789:;<= >!0?t߂@"ނA#݂B$܂C%e+ 10E&DÂF'G(e+ 1 HJJe%KKe%0L)I‚M*N+O,e+P-2Q, 1RTTe%UUe%VVe%WWe%XXe%0Y.S‚Z/[0\1]2^3_4`5a6b7c8d9e:f;g<h=i>j?k@lAmB߂nCނoDe+pE2Q. 1 qsse%tte%uue%vve%0wxFr0tyGtzH{I|J}K~LMN邁O肂P炃Q悄R傅S䂆TょU₈VႉWX߂YނZ݂[܂\ۂ]ڂ^ق_0tׂ`ւae+!b2Q0 1 %- %. %/e%e%e%0 c‚defghijke+ % %l2Q2 1 e%e%e%0m‚nopqe+% %r2Q4 1e%0s‚tuve+w2Q6 1~8)1 !b91xÂyz{|}~€ÁĂŃƄDžȆɇʈe+ 1̉Â͊΋όЍюҏӐԑՒ֓הٖؕڗۘܙݚޛߜ߂ނ݂e+ 1~;)03<03>0 3@0 3B03D03F03H03J03L03N 1 $gP@@@@@@@, , L& 0 0 0 bAiͲٲ !-9EQYaiqyűͱDձͳDճݳ峂DݱMDUD]Demu}ʹٴ%19D͵ٵ !)5AMYeDmuD}DDDD  )19AIyDշD)19DAIQemyɸո ]emyɹչ !-5=ED`RD]DH Qjn// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { notImplemented } from "ext:deno_node/_utils.ts"; import { urlToHttpOptions } from "ext:deno_node/internal/url.ts"; import { ClientRequest } from "node:http"; import { Agent as HttpAgent } from "ext:deno_node/_http_agent.mjs"; import { createHttpClient } from "ext:deno_fetch/22_http_client.js"; import { ServerImpl as HttpServer } from "node:http"; import { validateObject } from "ext:deno_node/internal/validators.mjs"; import { kEmptyObject } from "ext:deno_node/internal/util.mjs"; import { Buffer } from "node:buffer"; export class Server extends HttpServer { constructor(opts, requestListener){ if (typeof opts === "function") { requestListener = opts; opts = kEmptyObject; } else if (opts == null) { opts = kEmptyObject; } else { validateObject(opts, "options"); } if (opts.cert && Array.isArray(opts.cert)) { notImplemented("https.Server.opts.cert array type"); } if (opts.key && Array.isArray(opts.key)) { notImplemented("https.Server.opts.key array type"); } super(opts, requestListener); } _additionalServeOptions() { return { cert: this._opts.cert instanceof Buffer ? this._opts.cert.toString() : this._opts.cert, key: this._opts.key instanceof Buffer ? this._opts.key.toString() : this._opts.key }; } _encrypted = true; } export function createServer(opts, requestListener) { return new Server(opts, requestListener); } // Store additional root CAs. // undefined means NODE_EXTRA_CA_CERTS is not checked yet. // null means there's no additional root CAs. let caCerts; // deno-lint-ignore no-explicit-any export function get(...args) { const req = request(args[0], args[1], args[2]); req.end(); return req; } export class Agent extends HttpAgent { constructor(options){ super(options); this.defaultPort = 443; this.protocol = "https:"; this.maxCachedSessions = this.options.maxCachedSessions; if (this.maxCachedSessions === undefined) { this.maxCachedSessions = 100; } this._sessionCache = { map: {}, list: [] }; } } export const globalAgent = new Agent({ keepAlive: true, scheduling: "lifo", timeout: 5000 }); /** HttpsClientRequest class loosely follows http.ClientRequest class API. */ class HttpsClientRequest extends ClientRequest { _encrypted; defaultProtocol = "https:"; _getClient() { if (caCerts === null) { return undefined; } if (caCerts !== undefined) { return createHttpClient({ caCerts, http2: false }); } // const status = await Deno.permissions.query({ // name: "env", // variable: "NODE_EXTRA_CA_CERTS", // }); // if (status.state !== "granted") { // caCerts = null; // return undefined; // } const certFilename = Deno.env.get("NODE_EXTRA_CA_CERTS"); if (!certFilename) { caCerts = null; return undefined; } const caCert = Deno.readTextFileSync(certFilename); caCerts = [ caCert ]; return createHttpClient({ caCerts, http2: false }); } } // deno-lint-ignore no-explicit-any export function request(...args) { let options = {}; if (typeof args[0] === "string") { const urlStr = args.shift(); options = urlToHttpOptions(new URL(urlStr)); } else if (args[0] instanceof URL) { options = urlToHttpOptions(args.shift()); } if (args[0] && typeof args[0] !== "function") { Object.assign(options, args.shift()); } options._defaultAgent = globalAgent; args.unshift(options); return new HttpsClientRequest(args[0], args[1]); } export default { Agent, Server, createServer, get, globalAgent, request }; Qb܉p node:httpsa bTD`4M`  T`pLa'a DHcD La   T  I`b Ab Ճ T I`=>b T I`- b T I`A`b T I`-<b T I` b  T0`]  `Kb  XH e555(Sbqqb `DaV a 4b @b CCBvCb CC CBvb   ջ`Dh ei h  !b!b!b!bƒ %%%0  t% t% t%  te+ 2  1! -1~)030303030303 1 c @0bA]emu})19D`RD]DH 53Q13JRf// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // This module implements 'child_process' module of Node.JS API. // ref: https://nodejs.org/api/child_process.html // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { core, internals } from "ext:core/mod.js"; import { op_node_ipc_read, op_node_ipc_write } from "ext:core/ops"; import { ArrayIsArray, ArrayPrototypeFilter, ArrayPrototypeJoin, ArrayPrototypePush, ArrayPrototypeSlice, ArrayPrototypeSort, ArrayPrototypeUnshift, ObjectHasOwn, StringPrototypeToUpperCase } from "ext:deno_node/internal/primordials.mjs"; import { assert } from "ext:deno_node/_util/asserts.ts"; import { EventEmitter } from "node:events"; import { os } from "ext:deno_node/internal_binding/constants.ts"; import { notImplemented, warnNotImplemented } from "ext:deno_node/_utils.ts"; import { Readable, Stream, Writable } from "node:stream"; import { isWindows } from "ext:deno_node/_util/os.ts"; import { nextTick } from "ext:deno_node/_next_tick.ts"; import { AbortError, ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, ERR_UNKNOWN_SIGNAL } from "ext:deno_node/internal/errors.ts"; import { Buffer } from "node:buffer"; import { errnoException } from "ext:deno_node/internal/errors.ts"; import { codeMap } from "ext:deno_node/internal_binding/uv.ts"; import { isInt32, validateBoolean, validateObject, validateString } from "ext:deno_node/internal/validators.mjs"; import { kEmptyObject } from "ext:deno_node/internal/util.mjs"; import { getValidatedPath } from "ext:deno_node/internal/fs/utils.mjs"; import process from "node:process"; export function mapValues(record, transformer) { const ret = {}; const entries = Object.entries(record); for (const [key, value] of entries){ if (typeof value === "undefined") { continue; } if (value === null) { continue; } const mappedValue = transformer(value); ret[key] = mappedValue; } return ret; } export function stdioStringToArray(stdio, channel) { const options = []; switch(stdio){ case "ignore": case "overlapped": case "pipe": options.push(stdio, stdio, stdio); break; case "inherit": options.push(stdio, stdio, stdio); break; default: throw new ERR_INVALID_ARG_VALUE("stdio", stdio); } if (channel) options.push(channel); return options; } export class ChildProcess extends EventEmitter { /** * The exit code of the child process. This property will be `null` until the child process exits. */ exitCode = null; /** * This property is set to `true` after `kill()` is called. */ killed = false; /** * The PID of this child process. */ pid; /** * The signal received by this child process. */ signalCode = null; /** * Command line arguments given to this child process. */ spawnargs; /** * The executable file name of this child process. */ spawnfile; /** * This property represents the child process's stdin. */ stdin = null; /** * This property represents the child process's stdout. */ stdout = null; /** * This property represents the child process's stderr. */ stderr = null; /** * Pipes to this child process. */ stdio = [ null, null, null ]; #process; #spawned = Promise.withResolvers(); constructor(command, args, options){ super(); const { env = {}, stdio = [ "pipe", "pipe", "pipe" ], cwd, shell = false, signal, windowsVerbatimArguments = false } = options || {}; const normalizedStdio = normalizeStdioOption(stdio); const [stdin = "pipe", stdout = "pipe", stderr = "pipe", _channel] = normalizedStdio; const [cmd, cmdArgs] = buildCommand(command, args || [], shell); this.spawnfile = cmd; this.spawnargs = [ cmd, ...cmdArgs ]; const ipc = normalizedStdio.indexOf("ipc"); const stringEnv = mapValues(env, (value)=>value.toString()); try { this.#process = new Deno.Command(cmd, { args: cmdArgs, cwd, env: stringEnv, stdin: toDenoStdio(stdin), stdout: toDenoStdio(stdout), stderr: toDenoStdio(stderr), windowsRawArguments: windowsVerbatimArguments, ipc }).spawn(); this.pid = this.#process.pid; if (stdin === "pipe") { assert(this.#process.stdin); this.stdin = Writable.fromWeb(this.#process.stdin); } if (stdin instanceof Stream) { this.stdin = stdin; } if (stdout instanceof Stream) { this.stdout = stdout; } if (stderr instanceof Stream) { this.stderr = stderr; } if (stdout === "pipe") { assert(this.#process.stdout); this.stdout = Readable.fromWeb(this.#process.stdout); } if (stderr === "pipe") { assert(this.#process.stderr); this.stderr = Readable.fromWeb(this.#process.stderr); } this.stdio[0] = this.stdin; this.stdio[1] = this.stdout; this.stdio[2] = this.stderr; nextTick(()=>{ this.emit("spawn"); this.#spawned.resolve(); }); if (signal) { const onAbortListener = ()=>{ try { if (this.kill("SIGKILL")) { this.emit("error", new AbortError()); } } catch (err) { this.emit("error", err); } }; if (signal.aborted) { nextTick(onAbortListener); } else { signal.addEventListener("abort", onAbortListener, { once: true }); this.addListener("exit", ()=>signal.removeEventListener("abort", onAbortListener)); } } const pipeFd = internals.getPipeFd(this.#process); if (typeof pipeFd == "number") { setupChannel(this, pipeFd); } (async ()=>{ const status = await this.#process.status; this.exitCode = status.code; this.#spawned.promise.then(async ()=>{ const exitCode = this.signalCode == null ? this.exitCode : null; const signalCode = this.signalCode == null ? null : this.signalCode; // The 'exit' and 'close' events must be emitted after the 'spawn' event. this.emit("exit", exitCode, signalCode); await this.#_waitForChildStreamsToClose(); this.#closePipes(); this.emit("close", exitCode, signalCode); }); })(); } catch (err) { this.#_handleError(err); } } /** * @param signal NOTE: this parameter is not yet implemented. */ kill(signal) { if (this.killed) { return this.killed; } const denoSignal = signal == null ? "SIGTERM" : toDenoSignal(signal); this.#closePipes(); try { this.#process.kill(denoSignal); } catch (err) { const alreadyClosed = err instanceof TypeError || err instanceof Deno.errors.PermissionDenied; if (!alreadyClosed) { throw err; } } /* Cancel any pending IPC I/O */ if (this.implementsDisconnect) { this.disconnect?.(); } this.killed = true; this.signalCode = denoSignal; return this.killed; } ref() { this.#process.ref(); } unref() { this.#process.unref(); } disconnect() { warnNotImplemented("ChildProcess.prototype.disconnect"); } async #_waitForChildStreamsToClose() { const promises = []; // Don't close parent process stdin if that's passed through if (this.stdin && !this.stdin.destroyed && this.stdin !== process.stdin) { assert(this.stdin); this.stdin.destroy(); promises.push(waitForStreamToClose(this.stdin)); } // Only readable streams need to be closed if (this.stdout && !this.stdout.destroyed && this.stdout instanceof Readable) { promises.push(waitForReadableToClose(this.stdout)); } // Only readable streams need to be closed if (this.stderr && !this.stderr.destroyed && this.stderr instanceof Readable) { promises.push(waitForReadableToClose(this.stderr)); } await Promise.all(promises); } #_handleError(err) { nextTick(()=>{ this.emit("error", err); // TODO(uki00a) Convert `err` into nodejs's `SystemError` class. }); } #closePipes() { if (this.stdin) { assert(this.stdin); this.stdin.destroy(); } } } const supportedNodeStdioTypes = [ "pipe", "ignore", "inherit" ]; function toDenoStdio(pipe) { if (pipe instanceof Stream) { return "inherit"; } if (!supportedNodeStdioTypes.includes(pipe) || typeof pipe === "number") { notImplemented(`toDenoStdio pipe=${typeof pipe} (${pipe})`); } switch(pipe){ case "pipe": case undefined: case null: return "piped"; case "ignore": return "null"; case "inherit": return "inherit"; default: notImplemented(`toDenoStdio pipe=${typeof pipe} (${pipe})`); } } function toDenoSignal(signal) { if (typeof signal === "number") { for (const name of keys(os.signals)){ if (os.signals[name] === signal) { return name; } } throw new ERR_UNKNOWN_SIGNAL(String(signal)); } const denoSignal = signal; if (denoSignal in os.signals) { return denoSignal; } throw new ERR_UNKNOWN_SIGNAL(signal); } function keys(object) { return Object.keys(object); } function copyProcessEnvToEnv(env, name, optionEnv) { if (Deno.env.get(name) && (!optionEnv || !ObjectHasOwn(optionEnv, name))) { env[name] = Deno.env.get(name); } } function normalizeStdioOption(stdio = [ "pipe", "pipe", "pipe" ]) { if (Array.isArray(stdio)) { // `[0, 1, 2]` is equivalent to `"inherit"` if (stdio.length === 3 && stdio[0] === 0 && stdio[1] === 1 && stdio[2] === 2) { return [ "inherit", "inherit", "inherit" ]; } // At least 3 stdio must be created to match node while(stdio.length < 3){ ArrayPrototypePush(stdio, undefined); } return stdio; } else { switch(stdio){ case "overlapped": if (isWindows) { notImplemented("normalizeStdioOption overlapped (on windows)"); } // 'overlapped' is same as 'piped' on non Windows system. return [ "pipe", "pipe", "pipe" ]; case "pipe": return [ "pipe", "pipe", "pipe" ]; case "inherit": return [ "inherit", "inherit", "inherit" ]; case "ignore": return [ "ignore", "ignore", "ignore" ]; default: notImplemented(`normalizeStdioOption stdio=${typeof stdio} (${stdio})`); } } } export function normalizeSpawnArguments(file, args, options) { validateString(file, "file"); if (file.length === 0) { throw new ERR_INVALID_ARG_VALUE("file", file, "cannot be empty"); } if (ArrayIsArray(args)) { args = ArrayPrototypeSlice(args); } else if (args == null) { args = []; } else if (typeof args !== "object") { throw new ERR_INVALID_ARG_TYPE("args", "object", args); } else { options = args; args = []; } if (options === undefined) { options = kEmptyObject; } else { validateObject(options, "options"); } let cwd = options.cwd; // Validate the cwd, if present. if (cwd != null) { cwd = getValidatedPath(cwd, "options.cwd"); } // Validate detached, if present. if (options.detached != null) { validateBoolean(options.detached, "options.detached"); } // Validate the uid, if present. if (options.uid != null && !isInt32(options.uid)) { throw new ERR_INVALID_ARG_TYPE("options.uid", "int32", options.uid); } // Validate the gid, if present. if (options.gid != null && !isInt32(options.gid)) { throw new ERR_INVALID_ARG_TYPE("options.gid", "int32", options.gid); } // Validate the shell, if present. if (options.shell != null && typeof options.shell !== "boolean" && typeof options.shell !== "string") { throw new ERR_INVALID_ARG_TYPE("options.shell", [ "boolean", "string" ], options.shell); } // Validate argv0, if present. if (options.argv0 != null) { validateString(options.argv0, "options.argv0"); } // Validate windowsHide, if present. if (options.windowsHide != null) { validateBoolean(options.windowsHide, "options.windowsHide"); } // Validate windowsVerbatimArguments, if present. let { windowsVerbatimArguments } = options; if (windowsVerbatimArguments != null) { validateBoolean(windowsVerbatimArguments, "options.windowsVerbatimArguments"); } if (options.shell) { const command = ArrayPrototypeJoin([ file, ...args ], " "); // Set the shell, switches, and commands. if (process.platform === "win32") { if (typeof options.shell === "string") { file = options.shell; } else { file = Deno.env.get("comspec") || "cmd.exe"; } // '/d /s /c' is used only for cmd.exe. if (/^(?:.*\\)?cmd(?:\.exe)?$/i.exec(file) !== null) { args = [ "/d", "/s", "/c", `"${command}"` ]; windowsVerbatimArguments = true; } else { args = [ "-c", command ]; } } else { /** TODO: add Android condition */ if (typeof options.shell === "string") { file = options.shell; } else { file = "/bin/sh"; } args = [ "-c", command ]; } } if (typeof options.argv0 === "string") { ArrayPrototypeUnshift(args, options.argv0); } else { ArrayPrototypeUnshift(args, file); } const env = options.env || Deno.env.toObject(); const envPairs = []; // process.env.NODE_V8_COVERAGE always propagates, making it possible to // collect coverage for programs that spawn with white-listed environment. copyProcessEnvToEnv(env, "NODE_V8_COVERAGE", options.env); /** TODO: add `isZOS` condition */ let envKeys = []; // Prototype values are intentionally included. for(const key in env){ if (Object.hasOwn(env, key)) { ArrayPrototypePush(envKeys, key); } } if (process.platform === "win32") { // On Windows env keys are case insensitive. Filter out duplicates, // keeping only the first one (in lexicographic order) /** TODO: implement SafeSet and makeSafe */ const sawKey = new Set(); envKeys = ArrayPrototypeFilter(ArrayPrototypeSort(envKeys), (key)=>{ const uppercaseKey = StringPrototypeToUpperCase(key); if (sawKey.has(uppercaseKey)) { return false; } sawKey.add(uppercaseKey); return true; }); } for (const key of envKeys){ const value = env[key]; if (value !== undefined) { ArrayPrototypePush(envPairs, `${key}=${value}`); } } return { // Make a shallow copy so we don't clobber the user's options object. ...options, args, cwd, detached: !!options.detached, envPairs, file, windowsHide: !!options.windowsHide, windowsVerbatimArguments: !!windowsVerbatimArguments }; } function waitForReadableToClose(readable) { readable.resume(); // Ensure buffered data will be consumed. return waitForStreamToClose(readable); } function waitForStreamToClose(stream) { const deferred = Promise.withResolvers(); const cleanup = ()=>{ stream.removeListener("close", onClose); stream.removeListener("error", onError); }; const onClose = ()=>{ cleanup(); deferred.resolve(); }; const onError = (err)=>{ cleanup(); deferred.reject(err); }; stream.once("close", onClose); stream.once("error", onError); return deferred.promise; } /** * This function is based on https://github.com/nodejs/node/blob/fc6426ccc4b4cb73076356fb6dbf46a28953af01/lib/child_process.js#L504-L528. * Copyright Joyent, Inc. and other Node contributors. All rights reserved. MIT license. */ function buildCommand(file, args, shell) { if (file === Deno.execPath()) { // The user is trying to spawn another Deno process as Node.js. args = toDenoArgs(args); } if (shell) { const command = [ file, ...args ].join(" "); // Set the shell, switches, and commands. if (isWindows) { if (typeof shell === "string") { file = shell; } else { file = Deno.env.get("comspec") || "cmd.exe"; } // '/d /s /c' is used only for cmd.exe. if (/^(?:.*\\)?cmd(?:\.exe)?$/i.test(file)) { args = [ "/d", "/s", "/c", `"${command}"` ]; } else { args = [ "-c", command ]; } } else { if (typeof shell === "string") { file = shell; } else { file = "/bin/sh"; } args = [ "-c", command ]; } } return [ file, args ]; } function _createSpawnSyncError(status, command, args = []) { const error = errnoException(codeMap.get(status), "spawnSync " + command); error.path = command; error.spawnargs = args; return error; } function parseSpawnSyncOutputStreams(output, name) { // new Deno.Command().outputSync() returns getters for stdout and stderr that throw when set // to 'inherit'. try { return Buffer.from(output[name]); } catch { return null; } } export function spawnSync(command, args, options) { const { env = Deno.env.toObject(), stdio = [ "pipe", "pipe", "pipe" ], shell = false, cwd, encoding, uid, gid, maxBuffer, windowsVerbatimArguments = false } = options; const [_stdin_ = "pipe", stdout_ = "pipe", stderr_ = "pipe", _channel] = normalizeStdioOption(stdio); [command, args] = buildCommand(command, args ?? [], shell); const result = {}; try { const output = new Deno.Command(command, { args, cwd, env: mapValues(env, (value)=>value.toString()), stdout: toDenoStdio(stdout_), stderr: toDenoStdio(stderr_), uid, gid, windowsRawArguments: windowsVerbatimArguments }).outputSync(); const status = output.signal ? null : output.code; let stdout = parseSpawnSyncOutputStreams(output, "stdout"); let stderr = parseSpawnSyncOutputStreams(output, "stderr"); if (stdout && stdout.length > maxBuffer || stderr && stderr.length > maxBuffer) { result.error = _createSpawnSyncError("ENOBUFS", command, args); } if (encoding && encoding !== "buffer") { stdout = stdout && stdout.toString(encoding); stderr = stderr && stderr.toString(encoding); } result.status = status; result.signal = output.signal; result.stdout = stdout; result.stderr = stderr; result.output = [ output.signal, stdout, stderr ]; } catch (err) { if (err instanceof Deno.errors.NotFound) { result.error = _createSpawnSyncError("ENOENT", command, args); } } return result; } // These are Node.js CLI flags that expect a value. It's necessary to // understand these flags in order to properly replace flags passed to the // child process. For example, -e is a Node flag for eval mode if it is part // of process.execArgv. However, -e could also be an application flag if it is // part of process.execv instead. We only want to process execArgv flags. const kLongArgType = 1; const kShortArgType = 2; const kLongArg = { type: kLongArgType }; const kShortArg = { type: kShortArgType }; const kNodeFlagsMap = new Map([ [ "--build-snapshot", kLongArg ], [ "-c", kShortArg ], [ "--check", kLongArg ], [ "-C", kShortArg ], [ "--conditions", kLongArg ], [ "--cpu-prof-dir", kLongArg ], [ "--cpu-prof-interval", kLongArg ], [ "--cpu-prof-name", kLongArg ], [ "--diagnostic-dir", kLongArg ], [ "--disable-proto", kLongArg ], [ "--dns-result-order", kLongArg ], [ "-e", kShortArg ], [ "--eval", kLongArg ], [ "--experimental-loader", kLongArg ], [ "--experimental-policy", kLongArg ], [ "--experimental-specifier-resolution", kLongArg ], [ "--heapsnapshot-near-heap-limit", kLongArg ], [ "--heapsnapshot-signal", kLongArg ], [ "--heap-prof-dir", kLongArg ], [ "--heap-prof-interval", kLongArg ], [ "--heap-prof-name", kLongArg ], [ "--icu-data-dir", kLongArg ], [ "--input-type", kLongArg ], [ "--inspect-publish-uid", kLongArg ], [ "--max-http-header-size", kLongArg ], [ "--openssl-config", kLongArg ], [ "-p", kShortArg ], [ "--print", kLongArg ], [ "--policy-integrity", kLongArg ], [ "--prof-process", kLongArg ], [ "-r", kShortArg ], [ "--require", kLongArg ], [ "--redirect-warnings", kLongArg ], [ "--report-dir", kLongArg ], [ "--report-directory", kLongArg ], [ "--report-filename", kLongArg ], [ "--report-signal", kLongArg ], [ "--secure-heap", kLongArg ], [ "--secure-heap-min", kLongArg ], [ "--snapshot-blob", kLongArg ], [ "--title", kLongArg ], [ "--tls-cipher-list", kLongArg ], [ "--tls-keylog", kLongArg ], [ "--unhandled-rejections", kLongArg ], [ "--use-largepages", kLongArg ], [ "--v8-pool-size", kLongArg ] ]); const kDenoSubcommands = new Set([ "bench", "bundle", "cache", "check", "compile", "completions", "coverage", "doc", "eval", "fmt", "help", "info", "init", "install", "lint", "lsp", "repl", "run", "tasks", "test", "types", "uninstall", "upgrade", "vendor" ]); function toDenoArgs(args) { if (args.length === 0) { return args; } // Update this logic as more CLI arguments are mapped from Node to Deno. const denoArgs = []; let useRunArgs = true; for(let i = 0; i < args.length; i++){ const arg = args[i]; if (arg.charAt(0) !== "-" || arg === "--") { // Not a flag or no more arguments. // If the arg is a Deno subcommand, then the child process is being // spawned as Deno, not Deno in Node compat mode. In this case, bail out // and return the original args. if (kDenoSubcommands.has(arg)) { return args; } // Copy of the rest of the arguments to the output. for(let j = i; j < args.length; j++){ denoArgs.push(args[j]); } break; } // Something that looks like a flag was passed. let flag = arg; let flagInfo = kNodeFlagsMap.get(arg); let isLongWithValue = false; let flagValue; if (flagInfo === undefined) { // If the flag was not found, it's either not a known flag or it's a long // flag containing an '='. const splitAt = arg.indexOf("="); if (splitAt !== -1) { flag = arg.slice(0, splitAt); flagInfo = kNodeFlagsMap.get(flag); flagValue = arg.slice(splitAt + 1); isLongWithValue = true; } } if (flagInfo === undefined) { // Not a known flag that expects a value. Just copy it to the output. denoArgs.push(arg); continue; } // This is a flag with a value. Get the value if we don't already have it. if (flagValue === undefined) { i++; if (i >= args.length) { // There was user error. There should be another arg for the value, but // there isn't one. Just copy the arg to the output. It's not going // to work anyway. denoArgs.push(arg); continue; } flagValue = args[i]; } // Remap Node's eval flags to Deno. if (flag === "-e" || flag === "--eval") { denoArgs.push("eval", flagValue); useRunArgs = false; } else if (isLongWithValue) { denoArgs.push(arg); } else { denoArgs.push(flag, flagValue); } } if (useRunArgs) { // -A is not ideal, but needed to propagate permissions. // --unstable is needed for Node compat. denoArgs.unshift("run", "-A", "--unstable"); } return denoArgs; } export function setupChannel(target, ipc) { async function readLoop() { try { while(true){ if (!target.connected || target.killed) { return; } const msg = await op_node_ipc_read(ipc); if (msg == null) { // Channel closed. target.disconnect(); return; } process.nextTick(handleMessage, msg); } } catch (err) { if (err instanceof Deno.errors.Interrupted || err instanceof Deno.errors.BadResource) { return; } } } function handleMessage(msg) { target.emit("message", msg); } target.send = function(message, handle, options, callback) { if (typeof handle === "function") { callback = handle; handle = undefined; options = undefined; } else if (typeof options === "function") { callback = options; options = undefined; } else if (options !== undefined) { validateObject(options, "options"); } options = { swallowErrors: false, ...options }; if (message === undefined) { throw new TypeError("ERR_MISSING_ARGS", "message"); } if (handle !== undefined) { notImplemented("ChildProcess.send with handle"); } op_node_ipc_write(ipc, message).then(()=>{ if (callback) { process.nextTick(callback, null); } }); }; target.connected = true; target.disconnect = function() { if (!this.connected) { this.emit("error", new Error("IPC channel is already disconnected")); return; } this.connected = false; process.nextTick(()=>{ core.close(ipc); target.emit("disconnect"); }); }; target.implementsDisconnect = true; // Start reading messages from the channel. readLoop(); } export default { ChildProcess, normalizeSpawnArguments, stdioStringToArray, spawnSync, setupChannel }; Qer`'ext:deno_node/internal/child_process.tsa bVD`M`, T`qLaZl T  I` !" Sb1  b %   b b   B $ b m??????????????IbRf`LL` bS]`MB]` ]`ib ]`"]`"} ]`  ]`m/ ]`" ]`B ]` ]`b]` ]`2" ]`" ]` ]`-* ]`h]\L`` L` ` L` B ` L`B  ` L` " ` L`"  ` L`  ` L` ]L`%  DBiBic :D DTTc Dffc D!!c DAAc Daac  Dababc  Dc"7 D"{ "{ c  Db b c FZ D  c \q D  c s D  c Dc9E D  c D" " c DbobocGa D  c D c D  c #* D  c6: D  c  D  c% DBKBKc<E D  c cj Dttc D  c D± ± c   Db b cCQ D M Mciy D Q Qc{ Dc D* c[b D  c l{ D  c } D  c  D_ _ cSe`, a?BKa? Ma? Qa?Ta?fa?!a?Aa?aa?aba?a?a?boa?a? a?a?b a?_ a? a?" a? a?ta?± a?Bia?b a? a? a?"{ a? a? a? a? a? a? a? a? a?* a?B a? a? a? a? a?" a?a?b@ T  I`"X$b ռb@ T I`f$$%b @ T I`$=% b@ T I`[%) b@ T I`];; b@ T I`;=b b@ T I`>?Bb b@ T I`^B C b@  T I`2CD b$@! T I`U^b b@$LL` T I`B b@a T I`n  b@b T I`!*=; b @a T I` D3J b@"a T I`_ee'@@@@ " b@%ba LSb @B  " b  g??????v   `T ``/ `/ `?  `  av D]H ` aj* ajB'aj'aj aj] B   T  I`" ]b"Q T I`F b b  T I`T  b   T I`2  b Ճ T I`* b  T I`"CB'b  T I`Kn'b  T I`{ b   TL`U%  6? 6 {6A%  6B 6 {7D%  6E 6 {8G%  6H 6 {9J%  6K 6 {:M%  6N 6 {;P%  6Q 6 {Y%  6Z 6 {?\%  6] 6 {@_%  6` 6 {Ab%  6c 6 {Be%  6f 6 {Ch%  6i 6 {Dk%  6l 6 {En%  6o 6 !{Fq%  6r 6 "{Gt%  6u 6 #{Hw%  6x 6 ${Iz%  6{ 6 %{J}%  6~ 6 &{K%  6 6 '{L%  6 6 ({M%  6 6 ){N%  6 6 *{O%  6 6 +{P%  6 6 ,{Q%  6 6 -{R%  6 6 i%!S{T% i%~U)0303V03W03X03Y 1 ռDo &&&&&&&&&&&&&&&&&&&&&&&&` 0 bA19DqyDͼݽADD ID%QDD`RD]DH EQAkHt// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. import { notImplemented } from "ext:deno_node/_utils.ts"; export class Certificate { static Certificate = Certificate; static exportChallenge(_spkac, _encoding) { notImplemented("crypto.Certificate.exportChallenge"); } static exportPublicKey(_spkac, _encoding) { notImplemented("crypto.Certificate.exportPublicKey"); } static verifySpkac(_spkac, _encoding) { notImplemented("crypto.Certificate.verifySpkac"); } } export default Certificate;  Qf'^,ext:deno_node/internal/crypto/certificate.tsa bWD` M` T``|4La !Lba $Sb @" b?WLSb1Ibt` L`  ]`] L`` L`" ` L`" ] L`  Db b c`b a?" a?a?  `x ` `/  `/ `?   `  aWB- aj". aj. ajD] ` aj] T  I`" qbD T I`2B- b T I`". b T I`U. b  T(`  L`"   ` Kad c3(Sbqs" `DaW a b `DqPh ei h  %‚ e+ % ] 101  abAD`RD]DH Qz#// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { core } from "ext:core/mod.js"; const { encode } = core; import { op_node_cipheriv_encrypt, op_node_cipheriv_final, op_node_cipheriv_set_aad, op_node_create_cipheriv, op_node_create_decipheriv, op_node_decipheriv_decrypt, op_node_decipheriv_final, op_node_decipheriv_set_aad, op_node_private_decrypt, op_node_private_encrypt, op_node_public_encrypt } from "ext:core/ops"; import { ERR_INVALID_ARG_TYPE } from "ext:deno_node/internal/errors.ts"; import { validateInt32, validateObject } from "ext:deno_node/internal/validators.mjs"; import { Buffer } from "node:buffer"; import { notImplemented } from "ext:deno_node/_utils.ts"; import { Transform } from "ext:deno_node/_stream.mjs"; import { getArrayBufferOrView } from "ext:deno_node/internal/crypto/keys.ts"; import { getDefaultEncoding } from "ext:deno_node/internal/crypto/util.ts"; import { isAnyArrayBuffer, isArrayBufferView } from "ext:deno_node/internal/util/types.ts"; export function isStringOrBuffer(val) { return typeof val === "string" || isArrayBufferView(val) || isAnyArrayBuffer(val) || Buffer.isBuffer(val); } const NO_TAG = new Uint8Array(); function toU8(input) { return typeof input === "string" ? encode(input) : input; } export class Cipheriv extends Transform { /** CipherContext resource id */ #context; /** plaintext data cache */ #cache; #needsBlockCache; #authTag; constructor(cipher, key, iv, options){ super({ transform (chunk, encoding, cb) { this.push(this.update(chunk, encoding)); cb(); }, final (cb) { this.push(this.final()); cb(); }, ...options }); this.#cache = new BlockModeCache(false); this.#context = op_node_create_cipheriv(cipher, toU8(key), toU8(iv)); this.#needsBlockCache = !(cipher == "aes-128-gcm" || cipher == "aes-256-gcm"); if (this.#context == 0) { throw new TypeError("Unknown cipher"); } } final(encoding = getDefaultEncoding()) { const buf = new Buffer(16); const maybeTag = op_node_cipheriv_final(this.#context, this.#cache.cache, buf); if (maybeTag) { this.#authTag = Buffer.from(maybeTag); return encoding === "buffer" ? Buffer.from([]) : ""; } return encoding === "buffer" ? buf : buf.toString(encoding); } getAuthTag() { return this.#authTag; } setAAD(buffer, _options) { op_node_cipheriv_set_aad(this.#context, buffer); return this; } setAutoPadding(_autoPadding) { notImplemented("crypto.Cipheriv.prototype.setAutoPadding"); return this; } update(data, inputEncoding, outputEncoding = getDefaultEncoding()) { // TODO(kt3k): throw ERR_INVALID_ARG_TYPE if data is not string, Buffer, or ArrayBufferView let buf = data; if (typeof data === "string" && typeof inputEncoding === "string") { buf = Buffer.from(data, inputEncoding); } let output; if (!this.#needsBlockCache) { output = Buffer.allocUnsafe(buf.length); op_node_cipheriv_encrypt(this.#context, buf, output); return outputEncoding === "buffer" ? output : output.toString(outputEncoding); } this.#cache.add(buf); const input = this.#cache.get(); if (input === null) { output = Buffer.alloc(0); } else { output = Buffer.allocUnsafe(input.length); op_node_cipheriv_encrypt(this.#context, input, output); } return outputEncoding === "buffer" ? output : output.toString(outputEncoding); } } /** Caches data and output the chunk of multiple of 16. * Used by CBC, ECB modes of block ciphers */ class BlockModeCache { cache; // The last chunk can be padded when decrypting. #lastChunkIsNonZero; constructor(lastChunkIsNotZero = false){ this.cache = new Uint8Array(0); this.#lastChunkIsNonZero = lastChunkIsNotZero; } add(data) { const cache = this.cache; this.cache = new Uint8Array(cache.length + data.length); this.cache.set(cache); this.cache.set(data, cache.length); } /** Gets the chunk of the length of largest multiple of 16. * Used for preparing data for encryption/decryption */ get() { let len = this.cache.length; if (this.#lastChunkIsNonZero) { // Reduces the available chunk length by 1 to keep the last chunk len -= 1; } if (len < 16) { return null; } len = Math.floor(len / 16) * 16; const out = this.cache.subarray(0, len); this.cache = this.cache.subarray(len); return out; } } export class Decipheriv extends Transform { /** DecipherContext resource id */ #context; /** ciphertext data cache */ #cache; #needsBlockCache; #authTag; constructor(cipher, key, iv, options){ super({ transform (chunk, encoding, cb) { this.push(this.update(chunk, encoding)); cb(); }, final (cb) { this.push(this.final()); cb(); }, ...options }); this.#cache = new BlockModeCache(true); this.#context = op_node_create_decipheriv(cipher, toU8(key), toU8(iv)); this.#needsBlockCache = !(cipher == "aes-128-gcm" || cipher == "aes-256-gcm"); if (this.#context == 0) { throw new TypeError("Unknown cipher"); } } final(encoding = getDefaultEncoding()) { let buf = new Buffer(16); op_node_decipheriv_final(this.#context, this.#cache.cache, buf, this.#authTag || NO_TAG); if (!this.#needsBlockCache) { return encoding === "buffer" ? Buffer.from([]) : ""; } buf = buf.subarray(0, 16 - buf.at(-1)); // Padded in Pkcs7 mode return encoding === "buffer" ? buf : buf.toString(encoding); } setAAD(buffer, _options) { op_node_decipheriv_set_aad(this.#context, buffer); return this; } setAuthTag(buffer, _encoding) { this.#authTag = buffer; return this; } setAutoPadding(_autoPadding) { notImplemented("crypto.Decipheriv.prototype.setAutoPadding"); } update(data, inputEncoding, outputEncoding = getDefaultEncoding()) { // TODO(kt3k): throw ERR_INVALID_ARG_TYPE if data is not string, Buffer, or ArrayBufferView let buf = data; if (typeof data === "string" && typeof inputEncoding === "string") { buf = Buffer.from(data, inputEncoding); } let output; if (!this.#needsBlockCache) { output = Buffer.allocUnsafe(buf.length); op_node_decipheriv_decrypt(this.#context, buf, output); return outputEncoding === "buffer" ? output : output.toString(outputEncoding); } this.#cache.add(buf); const input = this.#cache.get(); if (input === null) { output = Buffer.alloc(0); } else { output = new Buffer(input.length); op_node_decipheriv_decrypt(this.#context, input, output); } return outputEncoding === "buffer" ? output : output.toString(outputEncoding); } } export function getCipherInfo(nameOrNid, options) { if (typeof nameOrNid !== "string" && typeof nameOrNid !== "number") { throw new ERR_INVALID_ARG_TYPE("nameOrNid", [ "string", "number" ], nameOrNid); } if (typeof nameOrNid === "number") { validateInt32(nameOrNid, "nameOrNid"); } let keyLength, ivLength; if (options !== undefined) { validateObject(options, "options"); ({ keyLength, ivLength } = options); if (keyLength !== undefined) { validateInt32(keyLength, "options.keyLength"); } if (ivLength !== undefined) { validateInt32(ivLength, "options.ivLength"); } } notImplemented("crypto.getCipherInfo"); } export function privateEncrypt(privateKey, buffer) { const { data } = prepareKey(privateKey); const padding = privateKey.padding || 1; buffer = getArrayBufferOrView(buffer, "buffer"); return op_node_private_encrypt(data, buffer, padding); } export function privateDecrypt(privateKey, buffer) { const { data } = prepareKey(privateKey); const padding = privateKey.padding || 1; buffer = getArrayBufferOrView(buffer, "buffer"); return op_node_private_decrypt(data, buffer, padding); } export function publicEncrypt(publicKey, buffer) { const { data } = prepareKey(publicKey); const padding = publicKey.padding || 1; buffer = getArrayBufferOrView(buffer, "buffer"); return op_node_public_encrypt(data, buffer, padding); } export function prepareKey(key) { // TODO(@littledivy): handle these cases // - node KeyObject // - web CryptoKey if (isStringOrBuffer(key)) { return { data: getArrayBufferOrView(key, "key") }; } else if (typeof key == "object") { const { key: data, encoding } = key; if (!isStringOrBuffer(data)) { throw new TypeError("Invalid key type"); } return { data: getArrayBufferOrView(data, "key", encoding) }; } throw new TypeError("Invalid key type"); } export function publicDecrypt() { notImplemented("crypto.publicDecrypt"); } export default { privateDecrypt, privateEncrypt, publicDecrypt, publicEncrypt, Cipheriv, Decipheriv, prepareKey, getCipherInfo }; QeG]'ext:deno_node/internal/crypto/cipher.tsa bXD`M` T`La00 T  I`~1 Sb1,b1 1 b3 c????Ib#`0L`  bS]`%B]`| ]`" ]`b]`C ]`q ]` ]`B ]`4" ]`]L`` L` ` L` " ` L`"  ` L` 0 ` L`0 : ` L`: " ` L`"  ` L` " `  L`"  `  L` ]`L`  D"{ "{ c5; Db b c D  c D  c D/ / c DB0 B0 c, D11c fv D"3"3c x Db b c[i D U UcZr D Y Yct D ] ]c D a ac D e ec D i ic D m mc D q qc* D u uc,C D y ycE\ D } }c^t D"/ "/ c D  c` a? Ua? Ya? ]a? aa? ea? ia? ma? qa? ua? ya? }a?b a?"/ a? a?"{ a?b a? a?/ a?B0 a?1a?"3a?0 a? a?" a? a? a?" a? a ?: a?" a ?a? b @hL` T I`O0 1b@c T I` b@a T I`7 b@a T I`0 " b@a T I`(  b@a  T I`!": b@a T I`#I#" b@b a  ,I = 0x7fffffff) { throw new NodeError("ERR_OSSL_DH_BAD_GENERATOR", "bad generator"); } this.#generator.writeUint32BE(generator); } else if (typeof generator === "string") { generator = toBuf(generator, genEncoding); this.#generator = generator; } else if (!isArrayBufferView(generator) && !isAnyArrayBuffer(generator)) { throw new ERR_INVALID_ARG_TYPE("generator", [ "number", "string", "ArrayBuffer", "Buffer", "TypedArray", "DataView" ], generator); } else { this.#generator = Buffer.from(generator); } this.#checkGenerator(); // TODO(lev): actually implement this value this.verifyError = 0; } #checkGenerator() { let generator; if (this.#generator.length == 0) { throw new NodeError("ERR_OSSL_DH_BAD_GENERATOR", "bad generator"); } else if (this.#generator.length == 1) { generator = this.#generator.readUint8(); } else if (this.#generator.length == 2) { generator = this.#generator.readUint16BE(); } else { generator = this.#generator.readUint32BE(); } if (generator != 2 && generator != 5) { throw new NodeError("ERR_OSSL_DH_BAD_GENERATOR", "bad generator"); } return generator; } computeSecret(otherPublicKey, inputEncoding, outputEncoding) { let buf; if (inputEncoding != undefined && inputEncoding != "buffer") { buf = Buffer.from(otherPublicKey.buffer, inputEncoding); } else { buf = Buffer.from(otherPublicKey.buffer); } const sharedSecret = op_node_dh_compute_secret(this.#prime, this.#privateKey, buf); if (outputEncoding == undefined || outputEncoding == "buffer") { return Buffer.from(sharedSecret.buffer); } return Buffer.from(sharedSecret.buffer).toString(outputEncoding); } generateKeys(_encoding) { const generator = this.#checkGenerator(); const [privateKey, publicKey] = op_node_dh_generate2(this.#prime, this.#primeLength ?? 0, generator); this.#privateKey = Buffer.from(privateKey.buffer); this.#publicKey = Buffer.from(publicKey.buffer); return this.#publicKey; } getGenerator(encoding) { if (encoding !== undefined && encoding != "buffer") { return this.#generator.toString(encoding); } return this.#generator; } getPrime(encoding) { if (encoding !== undefined && encoding != "buffer") { return this.#prime.toString(encoding); } return this.#prime; } getPrivateKey(encoding) { if (encoding !== undefined && encoding != "buffer") { return this.#privateKey.toString(encoding); } return this.#privateKey; } getPublicKey(encoding) { if (encoding !== undefined && encoding != "buffer") { return this.#publicKey.toString(encoding); } return this.#publicKey; } setPrivateKey(privateKey, encoding) { if (encoding == undefined || encoding == "buffer") { this.#privateKey = Buffer.from(privateKey); } else { this.#privateKey = Buffer.from(privateKey, encoding); } } setPublicKey(publicKey, encoding) { if (encoding == undefined || encoding == "buffer") { this.#publicKey = Buffer.from(publicKey); } else { this.#publicKey = Buffer.from(publicKey, encoding); } } } const DH_GROUP_NAMES = [ "modp5", "modp14", "modp15", "modp16", "modp17", "modp18" ]; const DH_GROUPS = { "modp5": { prime: [ 0xFFFFFFFF, 0xFFFFFFFF, 0xC90FDAA2, 0x2168C234, 0xC4C6628B, 0x80DC1CD1, 0x29024E08, 0x8A67CC74, 0x020BBEA6, 0x3B139B22, 0x514A0879, 0x8E3404DD, 0xEF9519B3, 0xCD3A431B, 0x302B0A6D, 0xF25F1437, 0x4FE1356D, 0x6D51C245, 0xE485B576, 0x625E7EC6, 0xF44C42E9, 0xA637ED6B, 0x0BFF5CB6, 0xF406B7ED, 0xEE386BFB, 0x5A899FA5, 0xAE9F2411, 0x7C4B1FE6, 0x49286651, 0xECE45B3D, 0xC2007CB8, 0xA163BF05, 0x98DA4836, 0x1C55D39A, 0x69163FA8, 0xFD24CF5F, 0x83655D23, 0xDCA3AD96, 0x1C62F356, 0x208552BB, 0x9ED52907, 0x7096966D, 0x670C354E, 0x4ABC9804, 0xF1746C08, 0xCA237327, 0xFFFFFFFF, 0xFFFFFFFF ], generator: 2 }, "modp14": { prime: [ 0xFFFFFFFF, 0xFFFFFFFF, 0xC90FDAA2, 0x2168C234, 0xC4C6628B, 0x80DC1CD1, 0x29024E08, 0x8A67CC74, 0x020BBEA6, 0x3B139B22, 0x514A0879, 0x8E3404DD, 0xEF9519B3, 0xCD3A431B, 0x302B0A6D, 0xF25F1437, 0x4FE1356D, 0x6D51C245, 0xE485B576, 0x625E7EC6, 0xF44C42E9, 0xA637ED6B, 0x0BFF5CB6, 0xF406B7ED, 0xEE386BFB, 0x5A899FA5, 0xAE9F2411, 0x7C4B1FE6, 0x49286651, 0xECE45B3D, 0xC2007CB8, 0xA163BF05, 0x98DA4836, 0x1C55D39A, 0x69163FA8, 0xFD24CF5F, 0x83655D23, 0xDCA3AD96, 0x1C62F356, 0x208552BB, 0x9ED52907, 0x7096966D, 0x670C354E, 0x4ABC9804, 0xF1746C08, 0xCA18217C, 0x32905E46, 0x2E36CE3B, 0xE39E772C, 0x180E8603, 0x9B2783A2, 0xEC07A28F, 0xB5C55DF0, 0x6F4C52C9, 0xDE2BCBF6, 0x95581718, 0x3995497C, 0xEA956AE5, 0x15D22618, 0x98FA0510, 0x15728E5A, 0x8AACAA68, 0xFFFFFFFF, 0xFFFFFFFF ], generator: 2 }, "modp15": { prime: [ 0xFFFFFFFF, 0xFFFFFFFF, 0xC90FDAA2, 0x2168C234, 0xC4C6628B, 0x80DC1CD1, 0x29024E08, 0x8A67CC74, 0x020BBEA6, 0x3B139B22, 0x514A0879, 0x8E3404DD, 0xEF9519B3, 0xCD3A431B, 0x302B0A6D, 0xF25F1437, 0x4FE1356D, 0x6D51C245, 0xE485B576, 0x625E7EC6, 0xF44C42E9, 0xA637ED6B, 0x0BFF5CB6, 0xF406B7ED, 0xEE386BFB, 0x5A899FA5, 0xAE9F2411, 0x7C4B1FE6, 0x49286651, 0xECE45B3D, 0xC2007CB8, 0xA163BF05, 0x98DA4836, 0x1C55D39A, 0x69163FA8, 0xFD24CF5F, 0x83655D23, 0xDCA3AD96, 0x1C62F356, 0x208552BB, 0x9ED52907, 0x7096966D, 0x670C354E, 0x4ABC9804, 0xF1746C08, 0xCA18217C, 0x32905E46, 0x2E36CE3B, 0xE39E772C, 0x180E8603, 0x9B2783A2, 0xEC07A28F, 0xB5C55DF0, 0x6F4C52C9, 0xDE2BCBF6, 0x95581718, 0x3995497C, 0xEA956AE5, 0x15D22618, 0x98FA0510, 0x15728E5A, 0x8AAAC42D, 0xAD33170D, 0x04507A33, 0xA85521AB, 0xDF1CBA64, 0xECFB8504, 0x58DBEF0A, 0x8AEA7157, 0x5D060C7D, 0xB3970F85, 0xA6E1E4C7, 0xABF5AE8C, 0xDB0933D7, 0x1E8C94E0, 0x4A25619D, 0xCEE3D226, 0x1AD2EE6B, 0xF12FFA06, 0xD98A0864, 0xD8760273, 0x3EC86A64, 0x521F2B18, 0x177B200C, 0xBBE11757, 0x7A615D6C, 0x770988C0, 0xBAD946E2, 0x08E24FA0, 0x74E5AB31, 0x43DB5BFC, 0xE0FD108E, 0x4B82D120, 0xA93AD2CA, 0xFFFFFFFF, 0xFFFFFFFF ], generator: 2 }, "modp16": { prime: [ 0xFFFFFFFF, 0xFFFFFFFF, 0xC90FDAA2, 0x2168C234, 0xC4C6628B, 0x80DC1CD1, 0x29024E08, 0x8A67CC74, 0x020BBEA6, 0x3B139B22, 0x514A0879, 0x8E3404DD, 0xEF9519B3, 0xCD3A431B, 0x302B0A6D, 0xF25F1437, 0x4FE1356D, 0x6D51C245, 0xE485B576, 0x625E7EC6, 0xF44C42E9, 0xA637ED6B, 0x0BFF5CB6, 0xF406B7ED, 0xEE386BFB, 0x5A899FA5, 0xAE9F2411, 0x7C4B1FE6, 0x49286651, 0xECE45B3D, 0xC2007CB8, 0xA163BF05, 0x98DA4836, 0x1C55D39A, 0x69163FA8, 0xFD24CF5F, 0x83655D23, 0xDCA3AD96, 0x1C62F356, 0x208552BB, 0x9ED52907, 0x7096966D, 0x670C354E, 0x4ABC9804, 0xF1746C08, 0xCA18217C, 0x32905E46, 0x2E36CE3B, 0xE39E772C, 0x180E8603, 0x9B2783A2, 0xEC07A28F, 0xB5C55DF0, 0x6F4C52C9, 0xDE2BCBF6, 0x95581718, 0x3995497C, 0xEA956AE5, 0x15D22618, 0x98FA0510, 0x15728E5A, 0x8AAAC42D, 0xAD33170D, 0x04507A33, 0xA85521AB, 0xDF1CBA64, 0xECFB8504, 0x58DBEF0A, 0x8AEA7157, 0x5D060C7D, 0xB3970F85, 0xA6E1E4C7, 0xABF5AE8C, 0xDB0933D7, 0x1E8C94E0, 0x4A25619D, 0xCEE3D226, 0x1AD2EE6B, 0xF12FFA06, 0xD98A0864, 0xD8760273, 0x3EC86A64, 0x521F2B18, 0x177B200C, 0xBBE11757, 0x7A615D6C, 0x770988C0, 0xBAD946E2, 0x08E24FA0, 0x74E5AB31, 0x43DB5BFC, 0xE0FD108E, 0x4B82D120, 0xA9210801, 0x1A723C12, 0xA787E6D7, 0x88719A10, 0xBDBA5B26, 0x99C32718, 0x6AF4E23C, 0x1A946834, 0xB6150BDA, 0x2583E9CA, 0x2AD44CE8, 0xDBBBC2DB, 0x04DE8EF9, 0x2E8EFC14, 0x1FBECAA6, 0x287C5947, 0x4E6BC05D, 0x99B2964F, 0xA090C3A2, 0x233BA186, 0x515BE7ED, 0x1F612970, 0xCEE2D7AF, 0xB81BDD76, 0x2170481C, 0xD0069127, 0xD5B05AA9, 0x93B4EA98, 0x8D8FDDC1, 0x86FFB7DC, 0x90A6C08F, 0x4DF435C9, 0x34063199, 0xFFFFFFFF, 0xFFFFFFFF ], generator: 2 }, "modp17": { prime: [ 0xFFFFFFFF, 0xFFFFFFFF, 0xC90FDAA2, 0x2168C234, 0xC4C6628B, 0x80DC1CD1, 0x29024E08, 0x8A67CC74, 0x020BBEA6, 0x3B139B22, 0x514A0879, 0x8E3404DD, 0xEF9519B3, 0xCD3A431B, 0x302B0A6D, 0xF25F1437, 0x4FE1356D, 0x6D51C245, 0xE485B576, 0x625E7EC6, 0xF44C42E9, 0xA637ED6B, 0x0BFF5CB6, 0xF406B7ED, 0xEE386BFB, 0x5A899FA5, 0xAE9F2411, 0x7C4B1FE6, 0x49286651, 0xECE45B3D, 0xC2007CB8, 0xA163BF05, 0x98DA4836, 0x1C55D39A, 0x69163FA8, 0xFD24CF5F, 0x83655D23, 0xDCA3AD96, 0x1C62F356, 0x208552BB, 0x9ED52907, 0x7096966D, 0x670C354E, 0x4ABC9804, 0xF1746C08, 0xCA18217C, 0x32905E46, 0x2E36CE3B, 0xE39E772C, 0x180E8603, 0x9B2783A2, 0xEC07A28F, 0xB5C55DF0, 0x6F4C52C9, 0xDE2BCBF6, 0x95581718, 0x3995497C, 0xEA956AE5, 0x15D22618, 0x98FA0510, 0x15728E5A, 0x8AAAC42D, 0xAD33170D, 0x04507A33, 0xA85521AB, 0xDF1CBA64, 0xECFB8504, 0x58DBEF0A, 0x8AEA7157, 0x5D060C7D, 0xB3970F85, 0xA6E1E4C7, 0xABF5AE8C, 0xDB0933D7, 0x1E8C94E0, 0x4A25619D, 0xCEE3D226, 0x1AD2EE6B, 0xF12FFA06, 0xD98A0864, 0xD8760273, 0x3EC86A64, 0x521F2B18, 0x177B200C, 0xBBE11757, 0x7A615D6C, 0x770988C0, 0xBAD946E2, 0x08E24FA0, 0x74E5AB31, 0x43DB5BFC, 0xE0FD108E, 0x4B82D120, 0xA9210801, 0x1A723C12, 0xA787E6D7, 0x88719A10, 0xBDBA5B26, 0x99C32718, 0x6AF4E23C, 0x1A946834, 0xB6150BDA, 0x2583E9CA, 0x2AD44CE8, 0xDBBBC2DB, 0x04DE8EF9, 0x2E8EFC14, 0x1FBECAA6, 0x287C5947, 0x4E6BC05D, 0x99B2964F, 0xA090C3A2, 0x233BA186, 0x515BE7ED, 0x1F612970, 0xCEE2D7AF, 0xB81BDD76, 0x2170481C, 0xD0069127, 0xD5B05AA9, 0x93B4EA98, 0x8D8FDDC1, 0x86FFB7DC, 0x90A6C08F, 0x4DF435C9, 0x34028492, 0x36C3FAB4, 0xD27C7026, 0xC1D4DCB2, 0x602646DE, 0xC9751E76, 0x3DBA37BD, 0xF8FF9406, 0xAD9E530E, 0xE5DB382F, 0x413001AE, 0xB06A53ED, 0x9027D831, 0x179727B0, 0x865A8918, 0xDA3EDBEB, 0xCF9B14ED, 0x44CE6CBA, 0xCED4BB1B, 0xDB7F1447, 0xE6CC254B, 0x33205151, 0x2BD7AF42, 0x6FB8F401, 0x378CD2BF, 0x5983CA01, 0xC64B92EC, 0xF032EA15, 0xD1721D03, 0xF482D7CE, 0x6E74FEF6, 0xD55E702F, 0x46980C82, 0xB5A84031, 0x900B1C9E, 0x59E7C97F, 0xBEC7E8F3, 0x23A97A7E, 0x36CC88BE, 0x0F1D45B7, 0xFF585AC5, 0x4BD407B2, 0x2B4154AA, 0xCC8F6D7E, 0xBF48E1D8, 0x14CC5ED2, 0x0F8037E0, 0xA79715EE, 0xF29BE328, 0x06A1D58B, 0xB7C5DA76, 0xF550AA3D, 0x8A1FBFF0, 0xEB19CCB1, 0xA313D55C, 0xDA56C9EC, 0x2EF29632, 0x387FE8D7, 0x6E3C0468, 0x043E8F66, 0x3F4860EE, 0x12BF2D5B, 0x0B7474D6, 0xE694F91E, 0x6DCC4024, 0xFFFFFFFF, 0xFFFFFFFF ], generator: 2 }, "modp18": { prime: [ 0xFFFFFFFF, 0xFFFFFFFF, 0xC90FDAA2, 0x2168C234, 0xC4C6628B, 0x80DC1CD1, 0x29024E08, 0x8A67CC74, 0x020BBEA6, 0x3B139B22, 0x514A0879, 0x8E3404DD, 0xEF9519B3, 0xCD3A431B, 0x302B0A6D, 0xF25F1437, 0x4FE1356D, 0x6D51C245, 0xE485B576, 0x625E7EC6, 0xF44C42E9, 0xA637ED6B, 0x0BFF5CB6, 0xF406B7ED, 0xEE386BFB, 0x5A899FA5, 0xAE9F2411, 0x7C4B1FE6, 0x49286651, 0xECE45B3D, 0xC2007CB8, 0xA163BF05, 0x98DA4836, 0x1C55D39A, 0x69163FA8, 0xFD24CF5F, 0x83655D23, 0xDCA3AD96, 0x1C62F356, 0x208552BB, 0x9ED52907, 0x7096966D, 0x670C354E, 0x4ABC9804, 0xF1746C08, 0xCA18217C, 0x32905E46, 0x2E36CE3B, 0xE39E772C, 0x180E8603, 0x9B2783A2, 0xEC07A28F, 0xB5C55DF0, 0x6F4C52C9, 0xDE2BCBF6, 0x95581718, 0x3995497C, 0xEA956AE5, 0x15D22618, 0x98FA0510, 0x15728E5A, 0x8AAAC42D, 0xAD33170D, 0x04507A33, 0xA85521AB, 0xDF1CBA64, 0xECFB8504, 0x58DBEF0A, 0x8AEA7157, 0x5D060C7D, 0xB3970F85, 0xA6E1E4C7, 0xABF5AE8C, 0xDB0933D7, 0x1E8C94E0, 0x4A25619D, 0xCEE3D226, 0x1AD2EE6B, 0xF12FFA06, 0xD98A0864, 0xD8760273, 0x3EC86A64, 0x521F2B18, 0x177B200C, 0xBBE11757, 0x7A615D6C, 0x770988C0, 0xBAD946E2, 0x08E24FA0, 0x74E5AB31, 0x43DB5BFC, 0xE0FD108E, 0x4B82D120, 0xA9210801, 0x1A723C12, 0xA787E6D7, 0x88719A10, 0xBDBA5B26, 0x99C32718, 0x6AF4E23C, 0x1A946834, 0xB6150BDA, 0x2583E9CA, 0x2AD44CE8, 0xDBBBC2DB, 0x04DE8EF9, 0x2E8EFC14, 0x1FBECAA6, 0x287C5947, 0x4E6BC05D, 0x99B2964F, 0xA090C3A2, 0x233BA186, 0x515BE7ED, 0x1F612970, 0xCEE2D7AF, 0xB81BDD76, 0x2170481C, 0xD0069127, 0xD5B05AA9, 0x93B4EA98, 0x8D8FDDC1, 0x86FFB7DC, 0x90A6C08F, 0x4DF435C9, 0x34028492, 0x36C3FAB4, 0xD27C7026, 0xC1D4DCB2, 0x602646DE, 0xC9751E76, 0x3DBA37BD, 0xF8FF9406, 0xAD9E530E, 0xE5DB382F, 0x413001AE, 0xB06A53ED, 0x9027D831, 0x179727B0, 0x865A8918, 0xDA3EDBEB, 0xCF9B14ED, 0x44CE6CBA, 0xCED4BB1B, 0xDB7F1447, 0xE6CC254B, 0x33205151, 0x2BD7AF42, 0x6FB8F401, 0x378CD2BF, 0x5983CA01, 0xC64B92EC, 0xF032EA15, 0xD1721D03, 0xF482D7CE, 0x6E74FEF6, 0xD55E702F, 0x46980C82, 0xB5A84031, 0x900B1C9E, 0x59E7C97F, 0xBEC7E8F3, 0x23A97A7E, 0x36CC88BE, 0x0F1D45B7, 0xFF585AC5, 0x4BD407B2, 0x2B4154AA, 0xCC8F6D7E, 0xBF48E1D8, 0x14CC5ED2, 0x0F8037E0, 0xA79715EE, 0xF29BE328, 0x06A1D58B, 0xB7C5DA76, 0xF550AA3D, 0x8A1FBFF0, 0xEB19CCB1, 0xA313D55C, 0xDA56C9EC, 0x2EF29632, 0x387FE8D7, 0x6E3C0468, 0x043E8F66, 0x3F4860EE, 0x12BF2D5B, 0x0B7474D6, 0xE694F91E, 0x6DBE1159, 0x74A3926F, 0x12FEE5E4, 0x38777CB6, 0xA932DF8C, 0xD8BEC4D0, 0x73B931BA, 0x3BC832B6, 0x8D9DD300, 0x741FA7BF, 0x8AFC47ED, 0x2576F693, 0x6BA42466, 0x3AAB639C, 0x5AE4F568, 0x3423B474, 0x2BF1C978, 0x238F16CB, 0xE39D652D, 0xE3FDB8BE, 0xFC848AD9, 0x22222E04, 0xA4037C07, 0x13EB57A8, 0x1A23F0C7, 0x3473FC64, 0x6CEA306B, 0x4BCBC886, 0x2F8385DD, 0xFA9D4B7F, 0xA2C087E8, 0x79683303, 0xED5BDD3A, 0x062B3CF5, 0xB3A278A6, 0x6D2A13F8, 0x3F44F82D, 0xDF310EE0, 0x74AB6A36, 0x4597E899, 0xA0255DC1, 0x64F31CC5, 0x0846851D, 0xF9AB4819, 0x5DED7EA1, 0xB1D510BD, 0x7EE74D73, 0xFAF36BC3, 0x1ECFA268, 0x359046F4, 0xEB879F92, 0x4009438B, 0x481C6CD7, 0x889A002E, 0xD5EE382B, 0xC9190DA6, 0xFC026E47, 0x9558E447, 0x5677E9AA, 0x9E3050E2, 0x765694DF, 0xC81F56E8, 0x80B96E71, 0x60C980DD, 0x98EDD3DF, 0xFFFFFFFF, 0xFFFFFFFF ], generator: 2 } }; export class DiffieHellmanGroup { verifyError; #diffiehellman; constructor(name){ if (!DH_GROUP_NAMES.includes(name)) { throw new ERR_CRYPTO_UNKNOWN_DH_GROUP(); } this.#diffiehellman = new DiffieHellman(Buffer.from(DH_GROUPS[name].prime), DH_GROUPS[name].generator); this.verifyError = 0; } computeSecret(otherPublicKey, inputEncoding, outputEncoding) { return this.#diffiehellman.computeSecret(otherPublicKey, inputEncoding, outputEncoding); } generateKeys(encoding) { return this.#diffiehellman.generateKeys(encoding); } getGenerator(encoding) { return this.#diffiehellman.getGenerator(encoding); } getPrime(encoding) { return this.#diffiehellman.getPrime(encoding); } getPrivateKey(encoding) { return this.#diffiehellman.getPrivateKey(encoding); } getPublicKey(encoding) { return this.#diffiehellman.getPublicKey(encoding); } } export class ECDH { #curve; #privbuf; #pubbuf; constructor(curve){ validateString(curve, "curve"); const c = ellipticCurves.find((x)=>x.name == curve); if (c == undefined) { throw new Error("invalid curve"); } this.#curve = c; this.#pubbuf = Buffer.alloc(this.#curve.publicKeySize); this.#privbuf = Buffer.alloc(this.#curve.privateKeySize); } static convertKey(_key, _curve, _inputEncoding, _outputEncoding, _format) { notImplemented("crypto.ECDH.prototype.convertKey"); } computeSecret(otherPublicKey, _inputEncoding, _outputEncoding) { const secretBuf = Buffer.alloc(this.#curve.sharedSecretSize); op_node_ecdh_compute_secret(this.#curve.name, this.#privbuf, otherPublicKey, secretBuf); return secretBuf; } generateKeys(encoding, _format) { op_node_ecdh_generate_keys(this.#curve.name, this.#pubbuf, this.#privbuf); if (encoding !== undefined) { return this.#pubbuf.toString(encoding); } return this.#pubbuf; } getPrivateKey(encoding) { if (encoding !== undefined) { return this.#privbuf.toString(encoding); } return this.#privbuf; } getPublicKey(encoding, _format) { if (encoding !== undefined) { return this.#pubbuf.toString(encoding); } return this.#pubbuf; } setPrivateKey(privateKey, encoding) { this.#privbuf = privateKey; this.#pubbuf = Buffer.alloc(this.#curve.publicKeySize); op_node_ecdh_compute_public_key(this.#curve.name, this.#privbuf, this.#pubbuf); if (encoding !== undefined) { return this.#pubbuf.toString(encoding); } return this.#pubbuf; } } export function diffieHellman(_options) { notImplemented("crypto.diffieHellman"); } export default { DiffieHellman, DiffieHellmanGroup, ECDH, diffieHellman };  QfK.ext:deno_node/internal/crypto/diffiehellman.tsa bYD`M` T `La6*$Lc T  I`yZZ USb1B= F BI b???Ib[`$L` B]` ]`" ]`; ]`" ]`b]`BB ]`]DL`` L`" ` L`" " ` L`" µ` L`µ ` L` ]PL`  D"{ "{ c4: D"; "; cl Db b c D; ; c Db< b< cZh DB0 B0 cj| D11c  D"3"3c"3 Db b c D  c2 D  c4H D  cJi D  ck D  c D  c D< < c~ D"/ "/ c D  c` a? a? a? a? a? a?b a?1a?"3a?"; a?b a?; a?"/ a? a?"{ a?b< a?B0 a?< a?" a?" a?µa? a?a?=b@ba TSb @B> > "? ? "@ "A h???????e  ` T ``/ `/ `?  `  aD]x `  ajA aj"C aj C aj"D ajD ajE ajE aj F aj ]" B> > "? ? "@  T  I` "A =b T I`J{ " b Ճ T I`A b  T I`"C b  T I`)C b  T I`f"D b T I`vD b  T I`$E b  T I`E b   T I`F b   T<`4 L`=   Y`Kc<(@8< h355555 (Sbqq" `Da a 4 4b    ` M`G bG G "H H H @b G  bI  `N0AA@T!AaA`Q̘A A'ALA0]A͉A@RAA`6A`cHA6AKA@[MA@pTAAA ]A`AlAրA` A@gA AA@JAgA@Aw,AIAUAEA뙤A`lAuAVbA]BA A@%AS A&A.AdnDAAA `bG  bI  ` N@AA@T!AaA`Q̘A A'ALA0]A͉A@RAA`6A`cHA6AKA@[MA@pTAAA ]A`AlAրA` A@gA AA@JAgA@Aw,AIAUAEA뙤A`lAuAVbA]BA A@%AS A&A.A/CA#/HAgAsAA@tdAQAA@A~yAAA\RA&ҵA@AZrAMUAAA `G  bI  `N`AA@T!AaA`Q̘A A'ALA0]A͉A@RAA`6A`cHA6AKA@[MA@pTAAA ]A`AlAրA` A@gA AA@JAgA@Aw,AIAUAEA뙤A`lAuAVbA]BA A@%AS A&A.A/CA#/HAgAsAA@tdAQAA@A~yAAA\RA&ҵA@AZrAXUAbAAA`5 ALApA6A*N]A@AArAA@AR6A@tAНA@VAp)aAZA{A$A$A U ASvA AAA@r }AAAA `H  bI  ` NAA@T!AaA`Q̘A A'ALA0]A͉A@RAA`6A`cHA6AKA@[MA@pTAAA ]A`AlAրA` A@gA AA@JAgA@Aw,AIAUAEA뙤A`lAuAVbA]BA A@%AS A&A.A/CA#/HAgAsAA@tdAQAA@A~yAAA\RA&ҵA@AZrAXUAbAAA`5 ALApA6A*N]A@AArAA@AR6A@tAНA@VAp)aAZA{A$A$A U ASvA AAA@r }AIBAZaAOA@:A AΣ.AAAaʳAgAkLA}J A A'A#QA`}GAbA.3A`cAoA`A(AA@=A_iA@`A]rAB]A`C.AZA?AΫA A AcA_yA`A?A_DfAn:AX AAUAA;A^̴AoAAe|SA,VANAGACA 9cAzbA=JAKyAk?AA=Aw0A[-AA#A sAAA `H  bI  ` NAA@T!AaA`Q̘A A'ALA0]A͉A@RAA`6A`cHA6AKA@[MA@pTAAA ]A`AlAրA` A@gA AA@JAgA@Aw,AIAUAEA뙤A`lAuAVbA]BA A@%AS A&A.A/CA#/HAgAsAA@tdAQAA@A~yAAA\RA&ҵA@AZrAXUAbAAA`5 ALApA6A*N]A@AArAA@AR6A@tAНA@VAp)aAZA{A$A$A U ASvA AAA@r }AIBAZaAOA@:A AΣ.AAAaʳAgAkLA}J A A'A#QA`}GAbA.3A`cAoA`A(AA@=A_iA@`A]rAB]A`C.AZA?AΫA A AcA_yA`A?A_DfAn:AX AAUAA;A^̴AoAAe|SA,VANAGACA 9cAzbA=JAKyAk?AA=Aw0A[-AA#A@VoA(AA[;A[&AAnLA[A`AA_AI{A AαUAZ=A:AAeAsAA [AAoAWA#A29A:A!AAoSAXA ZA@{AAOtAJA|A!A*A@&eA A@1 instead of boolean when // https://bugs.chromium.org/p/v8/issues/detail?id=13600 is fixed. function unwrapErr(ok) { if (!ok) { throw new Error("Context is not initialized"); } } const coerceToBytes = (data)=>{ if (data instanceof Uint8Array) { return data; } else if (typeof data === "string") { // This assumes UTF-8, which may not be correct. return new TextEncoder().encode(data); } else if (ArrayBuffer.isView(data)) { return new Uint8Array(data.buffer, data.byteOffset, data.byteLength); } else if (data instanceof ArrayBuffer) { return new Uint8Array(data); } else { throw new TypeError("expected data to be string | BufferSource"); } }; /** * The Hash class is a utility for creating hash digests of data. It can be used in one of two ways: * * - As a stream that is both readable and writable, where data is written to produce a computed hash digest on the readable side, or * - Using the hash.update() and hash.digest() methods to produce the computed hash. * * The crypto.createHash() method is used to create Hash instances. Hash objects are not to be created directly using the new keyword. */ export class Hash extends Transform { #context; constructor(algorithm, _opts){ super({ transform (chunk, _encoding, callback) { op_node_hash_update(context, coerceToBytes(chunk)); callback(); }, flush (callback) { this.push(this.digest(undefined)); callback(); } }); if (typeof algorithm === "string") { this.#context = op_node_create_hash(algorithm.toLowerCase()); if (this.#context === 0) { throw new TypeError(`Unknown hash algorithm: ${algorithm}`); } } else { this.#context = algorithm; } const context = this.#context; } copy() { return new Hash(op_node_hash_clone(this.#context)); } /** * Updates the hash content with the given data. */ update(data, _encoding) { if (typeof data === "string") { unwrapErr(op_node_hash_update_str(this.#context, data)); } else { unwrapErr(op_node_hash_update(this.#context, coerceToBytes(data))); } return this; } /** * Calculates the digest of all of the data. * * If encoding is provided a string will be returned; otherwise a Buffer is returned. * * Supported encodings are currently 'hex', 'binary', 'base64', 'base64url'. */ digest(encoding) { if (encoding === "hex") { return op_node_hash_digest_hex(this.#context); } const digest = op_node_hash_digest(this.#context); if (encoding === undefined) { return Buffer.from(digest); } // TODO(@littedivy): Fast paths for below encodings. switch(encoding){ case "binary": return String.fromCharCode(...digest); case "base64": return encodeToBase64(digest); case "base64url": return encodeToBase64Url(digest); case "buffer": return Buffer.from(digest); default: return Buffer.from(digest).toString(encoding); } } } export function Hmac(hmac, key, options) { return new HmacImpl(hmac, key, options); } class HmacImpl extends Transform { #ipad; #opad; #ZEROES = Buffer.alloc(128); #algorithm; #hash; constructor(hmac, key, options){ super({ transform (chunk, encoding, callback) { // deno-lint-ignore no-explicit-any self.update(coerceToBytes(chunk), encoding); callback(); }, flush (callback) { this.push(self.digest()); callback(); } }); // deno-lint-ignore no-this-alias const self = this; validateString(hmac, "hmac"); const u8Key = key instanceof KeyObject ? getKeyMaterial(key) : prepareSecretKey(key, options?.encoding); const alg = hmac.toLowerCase(); this.#algorithm = alg; const blockSize = alg === "sha512" || alg === "sha384" ? 128 : 64; const keySize = u8Key.length; let bufKey; if (keySize > blockSize) { const hash = new Hash(alg, options); bufKey = hash.update(u8Key).digest(); } else { bufKey = Buffer.concat([ u8Key, this.#ZEROES ], blockSize); } this.#ipad = Buffer.allocUnsafe(blockSize); this.#opad = Buffer.allocUnsafe(blockSize); for(let i = 0; i < blockSize; i++){ this.#ipad[i] = bufKey[i] ^ 0x36; this.#opad[i] = bufKey[i] ^ 0x5C; } this.#hash = new Hash(alg); this.#hash.update(this.#ipad); } digest(encoding) { const result = this.#hash.digest(); return new Hash(this.#algorithm).update(this.#opad).update(result).digest(encoding); } update(data, inputEncoding) { this.#hash.update(data, inputEncoding); return this; } } Hmac.prototype = HmacImpl.prototype; /** * Creates and returns a Hash object that can be used to generate hash digests * using the given `algorithm`. Optional `options` argument controls stream behavior. */ export function createHash(algorithm, opts) { return new Hash(algorithm, opts); } /** * Get the list of implemented hash algorithms. * @returns Array of hash algorithm names. */ export function getHashes() { return op_node_get_hashes(); } export default { Hash, Hmac, createHash }; Qewf%ext:deno_node/internal/crypto/hash.tsa bZD`TM` T`8La - T  I`gQ =Sb1Q Q S b???Ib`$L` B]`]`b]`/ ]`Hn]`" ]` ]`^]DL`` L` ` L` B ` L`B  ` L` b ` L`b ]HL`  D"{ "{ c D  c;D DBBc D  c7@ DN =c`u DbO "Bc DP P c+9 D  c, D  c.@ D  cBT D  cVi D  ck D  c D  c DP P cFV D  c` a? a? a? a? a? a? a?Ba?"{ a? a?N a?bO a? a?P a? a?P a? a?B a? a?b a?a?b@4La  T I`B ŕb @ a  T I`K b@a  T I`b b@b a  T Q `~\Q bK,Sb @bp c??:  `T ``/ `/ `?  `  a:D]< ` ajaj"6 ajaj]bp  T I`r c@@  ib Ճ T  I` b T I`D , "6 b T I` b T(` ]  ` KaB  :c5(Sbqq `DaW a b  DSb @bS S "T T bU f?????%  `T ``/ `/ `?  `  a%D]0 ` ajaj"6 aj]bS S "T T bU  T I`r(c!"@"#@@S b Ճ ! T  I`1b" T I`#"6 b# TD`CL`"{ T   `Kc $h 88 .j 550- ^55 5 (SbqqS `Da%b 4P4 b$(b CB C C B   `DPh Ƃ%%%ei h  %%e%0 ‚   e+ %2 1e%e%e%e%e%0‚ e+ 2 %0-2~)03 03 03 1 b ,P LbAa}ƀDIƀDQYD`RD]DH %Q!>Y1 // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { op_node_hkdf, op_node_hkdf_async } from "ext:core/ops"; import { validateFunction, validateInteger, validateString } from "ext:deno_node/internal/validators.mjs"; import { ERR_CRYPTO_INVALID_DIGEST, ERR_INVALID_ARG_TYPE, ERR_OUT_OF_RANGE, hideStackFrames } from "ext:deno_node/internal/errors.ts"; import { toBuf, validateByteSource } from "ext:deno_node/internal/crypto/util.ts"; import { createSecretKey, isKeyObject } from "ext:deno_node/internal/crypto/keys.ts"; import { kMaxLength } from "ext:deno_node/internal/buffer.mjs"; import { isAnyArrayBuffer, isArrayBufferView } from "ext:deno_node/internal/util/types.ts"; const validateParameters = hideStackFrames((hash, key, salt, info, length)=>{ validateString(hash, "digest"); key = new Uint8Array(prepareKey(key)); validateByteSource(salt, "salt"); validateByteSource(info, "info"); salt = new Uint8Array(toBuf(salt)); info = new Uint8Array(toBuf(info)); validateInteger(length, "length", 0, kMaxLength); if (info.byteLength > 1024) { throw new ERR_OUT_OF_RANGE("info", "must not contain more than 1024 bytes", info.byteLength); } return { hash, key, salt, info, length }; }); function prepareKey(key) { if (isKeyObject(key)) { return key; } if (isAnyArrayBuffer(key)) { return createSecretKey(new Uint8Array(key)); } key = toBuf(key); if (!isArrayBufferView(key)) { throw new ERR_INVALID_ARG_TYPE("ikm", [ "string", "SecretKeyObject", "ArrayBuffer", "TypedArray", "DataView", "Buffer" ], key); } return createSecretKey(key); } export function hkdf(hash, key, salt, info, length, callback) { ({ hash, key, salt, info, length } = validateParameters(hash, key, salt, info, length)); validateFunction(callback, "callback"); op_node_hkdf_async(hash, key, salt, info, length).then((okm)=>callback(null, okm.buffer)).catch((err)=>callback(new ERR_CRYPTO_INVALID_DIGEST(err), undefined)); } export function hkdfSync(hash, key, salt, info, length) { ({ hash, key, salt, info, length } = validateParameters(hash, key, salt, info, length)); const okm = new Uint8Array(length); try { op_node_hkdf(hash, key, salt, info, okm); } catch (e) { throw new ERR_CRYPTO_INVALID_DIGEST(e); } return okm.buffer; } export default { hkdf, hkdfSync }; Qek9%ext:deno_node/internal/crypto/hkdf.tsa b[D`$M` TX`l0La * T  I`W: Sb1BY : a??Ib1 `$L` B]`A" ]` ]`B ]`m ]`" ]`" ]``],L` ` L`‡ ` L`‡ " ` L`" ]HL`  DbW bW c Db b c D" " c D" " c D" " c D11c5E D"3"3cGX DX X c D  c D  c% D  c'9 D< < cLQ D"X "X cSe D  cZj D"[ "[ cl{ D  c}` a? a? a?"[ a? a?bW a?b a?" a?" a?< a?"X a?" a?X a? a?1a?"3a?‡ a?" a?a?b@($L` T I`l‡ 5ǐb @&a T I` " b@'ba "  T I`IbK) b‡ C" C‡ "   %`Do h %%ei h  0Ăb%~)0303  1  aLbA%-ǀDD`RD]DH Q:?%// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file no-explicit-any prefer-primordials import { KeyObject } from "ext:deno_node/internal/crypto/keys.ts"; import { kAesKeyLengths } from "ext:deno_node/internal/crypto/util.ts"; import { SecretKeyObject, setOwnedKey } from "ext:deno_node/internal/crypto/keys.ts"; import { notImplemented } from "ext:deno_node/_utils.ts"; import { ERR_INCOMPATIBLE_OPTION_PAIR, ERR_INVALID_ARG_VALUE, ERR_MISSING_OPTION } from "ext:deno_node/internal/errors.ts"; import { validateBuffer, validateFunction, validateInt32, validateInteger, validateObject, validateOneOf, validateString, validateUint32 } from "ext:deno_node/internal/validators.mjs"; import { op_node_dh_generate, op_node_dh_generate_async, op_node_dh_generate_group, op_node_dh_generate_group_async, op_node_dsa_generate, op_node_dsa_generate_async, op_node_ec_generate, op_node_ec_generate_async, op_node_ed25519_generate, op_node_ed25519_generate_async, op_node_generate_rsa, op_node_generate_rsa_async, op_node_generate_secret, op_node_generate_secret_async, op_node_x25519_generate, op_node_x25519_generate_async } from "ext:core/ops"; function validateGenerateKey(type, options) { validateString(type, "type"); validateObject(options, "options"); const { length } = options; switch(type){ case "hmac": validateInteger(length, "options.length", 8, 2 ** 31 - 1); break; case "aes": validateOneOf(length, "options.length", kAesKeyLengths); break; default: throw new ERR_INVALID_ARG_VALUE("type", type, "must be a supported key type"); } } export function generateKeySync(type, options) { validateGenerateKey(type, options); const { length } = options; const key = new Uint8Array(Math.floor(length / 8)); op_node_generate_secret(key); return new SecretKeyObject(setOwnedKey(key)); } export function generateKey(type, options, callback) { validateGenerateKey(type, options); validateFunction(callback, "callback"); const { length } = options; op_node_generate_secret_async(Math.floor(length / 8)).then((key)=>{ callback(null, new SecretKeyObject(setOwnedKey(key))); }); } export function generateKeyPair(type, options, callback) { createJob(kAsync, type, options).then(([privateKey, publicKey])=>{ privateKey = new KeyObject("private", setOwnedKey(privateKey)); publicKey = new KeyObject("public", setOwnedKey(publicKey)); if (typeof options === "object" && options !== null) { const { publicKeyEncoding, privateKeyEncoding } = options; if (publicKeyEncoding) { publicKey = publicKey.export(publicKeyEncoding); } if (privateKeyEncoding) { privateKey = privateKey.export(privateKeyEncoding); } } callback(null, publicKey, privateKey); }).catch((err)=>{ callback(err, null, null); }); } export function generateKeyPairSync(type, options) { let [privateKey, publicKey] = createJob(kSync, type, options); privateKey = new KeyObject("private", setOwnedKey(privateKey)); publicKey = new KeyObject("public", setOwnedKey(publicKey)); if (typeof options === "object" && options !== null) { const { publicKeyEncoding, privateKeyEncoding } = options; if (publicKeyEncoding) { publicKey = publicKey.export(publicKeyEncoding); } if (privateKeyEncoding) { privateKey = privateKey.export(privateKeyEncoding); } } return { publicKey, privateKey }; } const kSync = 0; const kAsync = 1; function createJob(mode, type, options) { validateString(type, "type"); if (options !== undefined) { validateObject(options, "options"); } switch(type){ case "rsa": case "rsa-pss": { validateObject(options, "options"); const { modulusLength } = options; validateUint32(modulusLength, "options.modulusLength"); let { publicExponent } = options; if (publicExponent == null) { publicExponent = 0x10001; } else { validateUint32(publicExponent, "options.publicExponent"); } if (type === "rsa") { if (mode === kSync) { return op_node_generate_rsa(modulusLength, publicExponent); } else { return op_node_generate_rsa_async(modulusLength, publicExponent); } } const { hash, mgf1Hash, hashAlgorithm, mgf1HashAlgorithm, saltLength } = options; if (saltLength !== undefined) { validateInt32(saltLength, "options.saltLength", 0); } if (hashAlgorithm !== undefined) { validateString(hashAlgorithm, "options.hashAlgorithm"); } if (mgf1HashAlgorithm !== undefined) { validateString(mgf1HashAlgorithm, "options.mgf1HashAlgorithm"); } if (hash !== undefined) { process.emitWarning('"options.hash" is deprecated, ' + 'use "options.hashAlgorithm" instead.', "DeprecationWarning", "DEP0154"); validateString(hash, "options.hash"); if (hashAlgorithm && hash !== hashAlgorithm) { throw new ERR_INVALID_ARG_VALUE("options.hash", hash); } } if (mgf1Hash !== undefined) { process.emitWarning('"options.mgf1Hash" is deprecated, ' + 'use "options.mgf1HashAlgorithm" instead.', "DeprecationWarning", "DEP0154"); validateString(mgf1Hash, "options.mgf1Hash"); if (mgf1HashAlgorithm && mgf1Hash !== mgf1HashAlgorithm) { throw new ERR_INVALID_ARG_VALUE("options.mgf1Hash", mgf1Hash); } } if (mode === kSync) { return op_node_generate_rsa(modulusLength, publicExponent); } else { return op_node_generate_rsa_async(modulusLength, publicExponent); } } case "dsa": { validateObject(options, "options"); const { modulusLength } = options; validateUint32(modulusLength, "options.modulusLength"); let { divisorLength } = options; if (divisorLength == null) { divisorLength = 256; } else { validateInt32(divisorLength, "options.divisorLength", 0); } if (mode === kSync) { return op_node_dsa_generate(modulusLength, divisorLength); } return op_node_dsa_generate_async(modulusLength, divisorLength); } case "ec": { validateObject(options, "options"); const { namedCurve } = options; validateString(namedCurve, "options.namedCurve"); const { paramEncoding } = options; if (paramEncoding == null || paramEncoding === "named") { // pass. } else if (paramEncoding === "explicit") { // TODO(@littledivy): Explicit param encoding is very rarely used, and not supported by the ring crate. throw new TypeError("Explicit encoding is not supported"); } else { throw new ERR_INVALID_ARG_VALUE("options.paramEncoding", paramEncoding); } if (mode === kSync) { return op_node_ec_generate(namedCurve); } else { return op_node_ec_generate_async(namedCurve); } } case "ed25519": { if (mode === kSync) { return op_node_ed25519_generate(); } return op_node_ed25519_generate_async(); } case "x25519": { if (mode === kSync) { return op_node_x25519_generate(); } return op_node_x25519_generate_async(); } case "ed448": case "x448": { notImplemented(type); break; } case "dh": { validateObject(options, "options"); const { group, primeLength, prime, generator } = options; if (group != null) { if (prime != null) { throw new ERR_INCOMPATIBLE_OPTION_PAIR("group", "prime"); } if (primeLength != null) { throw new ERR_INCOMPATIBLE_OPTION_PAIR("group", "primeLength"); } if (generator != null) { throw new ERR_INCOMPATIBLE_OPTION_PAIR("group", "generator"); } validateString(group, "options.group"); if (mode === kSync) { return op_node_dh_generate_group(group); } else { return op_node_dh_generate_group_async(group); } } if (prime != null) { if (primeLength != null) { throw new ERR_INCOMPATIBLE_OPTION_PAIR("prime", "primeLength"); } validateBuffer(prime, "options.prime"); } else if (primeLength != null) { validateInt32(primeLength, "options.primeLength", 0); } else { throw new ERR_MISSING_OPTION("At least one of the group, prime, or primeLength options"); } if (generator != null) { validateInt32(generator, "options.generator", 0); } const g = generator == null ? 2 : generator; if (mode === kSync) { return op_node_dh_generate(prime, primeLength ?? 0, g); } else { return op_node_dh_generate_async(prime, primeLength ?? 0, g); } } default: } throw new ERR_INVALID_ARG_VALUE("type", type, "must be a supported key type"); } export default { generateKey, generateKeySync, generateKeyPair, generateKeyPairSync }; QeM'ext:deno_node/internal/crypto/keygen.tsa b\D`0M`  T``y4La 3 T  I`U_ Sb1_ a "` _ c????Ib%` L`  ]`:B ]` ]`  ]`" ]`GB]`)]DL`` L`` L` ` L`  ` L`  ` L` ]L`   D\ \ cD` D  cbw Db] b] cy D  c)2 D[ [ c D"[ "[ clz Db b c  D  cy D  c D  c D  c D  c D  c D  c* D  c,E D  cG_ D  ca D  c D  c D  c D  c D  c D  c! D"\ "\ c D^ ^ c D  c D"/ "/ c D"[ "[ c D  c D" " c D  c!/ D^ ^ c1?`% a?"[ a?[ a?"\ a?b a?\ a? a?b] a?^ a? a?"/ a?"[ a? a?" a? a?^ a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a?a? a? a?a?b@/ T I`j$_ Ǖb@ 0{ if (isAnyArrayBuffer(buffer)) { return buffer; } if (typeof buffer === "string") { if (encoding === "buffer") { encoding = "utf8"; } return Buffer.from(buffer, encoding); } if (!isArrayBufferView(buffer)) { throw new ERR_INVALID_ARG_TYPE(name, [ "string", "ArrayBuffer", "Buffer", "TypedArray", "DataView" ], buffer); } return buffer; }); export function isKeyObject(obj) { return isKeyObject_(obj); } export function isCryptoKey(obj) { return isCryptoKey_(obj); } function copyBuffer(input) { if (typeof input === "string") return Buffer.from(input); return (ArrayBuffer.isView(input) ? new Uint8Array(input.buffer, input.byteOffset, input.byteLength) : new Uint8Array(input)).slice(); } const KEY_STORE = new WeakMap(); export class KeyObject { [kKeyType]; [kHandle]; constructor(type, handle){ if (type !== "secret" && type !== "public" && type !== "private") { throw new ERR_INVALID_ARG_VALUE("type", type); } this[kKeyType] = type; this[kHandle] = handle; } get type() { return this[kKeyType]; } get symmetricKeySize() { notImplemented("crypto.KeyObject.prototype.symmetricKeySize"); return undefined; } static from(key) { if (!isCryptoKey(key)) { throw new ERR_INVALID_ARG_TYPE("key", "CryptoKey", key); } notImplemented("crypto.KeyObject.prototype.from"); } equals(otherKeyObject) { if (!isKeyObject(otherKeyObject)) { throw new ERR_INVALID_ARG_TYPE("otherKeyObject", "KeyObject", otherKeyObject); } notImplemented("crypto.KeyObject.prototype.equals"); } export(_options) { notImplemented("crypto.KeyObject.prototype.asymmetricKeyType"); } } export function prepareAsymmetricKey(key) { if (isStringOrBuffer(key)) { return { format: "pem", data: getArrayBufferOrView(key, "key") }; } else if (typeof key == "object") { const { key: data, encoding, format, type } = key; if (!isStringOrBuffer(data)) { throw new TypeError("Invalid key type"); } return { data: getArrayBufferOrView(data, "key", encoding), format: format ?? "pem", encoding, type }; } throw new TypeError("Invalid key type"); } export function createPrivateKey(key) { const { data, format, type } = prepareAsymmetricKey(key); const details = op_node_create_private_key(data, format, type); const handle = setOwnedKey(copyBuffer(data)); return new PrivateKeyObject(handle, details); } export function createPublicKey(_key) { notImplemented("crypto.createPublicKey"); } function getKeyTypes(allowKeyObject, bufferOnly = false) { const types = [ "ArrayBuffer", "Buffer", "TypedArray", "DataView", "string", "KeyObject", "CryptoKey" ]; if (bufferOnly) { return types.slice(0, 4); } else if (!allowKeyObject) { return types.slice(0, 5); } return types; } export function prepareSecretKey(key, encoding, bufferOnly = false) { if (!bufferOnly) { if (isKeyObject(key)) { if (key.type !== "secret") { throw new ERR_CRYPTO_INVALID_KEY_OBJECT_TYPE(key.type, "secret"); } return key[kHandle]; } else if (isCryptoKey(key)) { if (key.type !== "secret") { throw new ERR_CRYPTO_INVALID_KEY_OBJECT_TYPE(key.type, "secret"); } return key[kKeyObject][kHandle]; } } if (typeof key !== "string" && !isArrayBufferView(key) && !isAnyArrayBuffer(key)) { throw new ERR_INVALID_ARG_TYPE("key", getKeyTypes(!bufferOnly, bufferOnly), key); } return getArrayBufferOrView(key, "key", encoding); } export class SecretKeyObject extends KeyObject { constructor(handle){ super("secret", handle); } get symmetricKeySize() { return KEY_STORE.get(this[kHandle]).byteLength; } get asymmetricKeyType() { return undefined; } export(options) { const key = KEY_STORE.get(this[kHandle]); if (options !== undefined) { validateObject(options, "options"); validateOneOf(options.format, "options.format", [ undefined, "buffer", "jwk" ]); if (options.format === "jwk") { return { kty: "oct", k: encodeToBase64Url(key) }; } } return key.slice(); } } const kAsymmetricKeyType = Symbol("kAsymmetricKeyType"); const kAsymmetricKeyDetails = Symbol("kAsymmetricKeyDetails"); class AsymmetricKeyObject extends KeyObject { constructor(type, handle, details){ super(type, handle); this[kAsymmetricKeyType] = details.type; this[kAsymmetricKeyDetails] = { ...details }; } get asymmetricKeyType() { return this[kAsymmetricKeyType]; } get asymmetricKeyDetails() { return this[kAsymmetricKeyDetails]; } } class PrivateKeyObject extends AsymmetricKeyObject { constructor(handle, details){ super("private", handle, details); } export(_options) { notImplemented("crypto.PrivateKeyObject.prototype.export"); } } export function setOwnedKey(key) { const handle = {}; KEY_STORE.set(handle, key); return handle; } export function getKeyMaterial(key) { return KEY_STORE.get(key[kHandle]); } export function createSecretKey(key, encoding) { key = prepareSecretKey(key, encoding, true); const handle = setOwnedKey(copyBuffer(key)); return new SecretKeyObject(handle); } export default { createPrivateKey, createPublicKey, createSecretKey, isKeyObject, isCryptoKey, KeyObject, prepareSecretKey, setOwnedKey, SecretKeyObject }; Qe.ɗ%ext:deno_node/internal/crypto/keys.tsa b]D`|M` T`La.9 T  I`Sb1l n bo "l e??????Ib`0L`  B]`;"e ]`o]` ]`I ]`b]`" ]`h ]`" ]`n]`]L`'` L` ` L` [ ` L`[ " ` L`"  ` L` " ` L`" / ` L`/ P ` L`P g `  L`g X `  L`X "k `  L`"k P `  L`P "\ `  L`"\ ]PL`  D"{ "{ c D"f "f c Db b c* D  c,A DbO "Bc Jb D" " c2A D11c D"3"3c Dg g cv Dh X c D0 0 c DcT[ Dd d c]g Dh h c Db b cv D  c3 D  c D" " c` a?a?d a?0 a?"f a?b a? a?b a?"{ a?1a?"3a?" a?g a?h a?h a? a?" a?bO a?/ a?X a ?g a ? a?"k a ?" a? a?P a ?[ a?"\ a ?P a?" a?a?b@; T I`1fl ɔb@<La T I`X b@2a  T I` g b@3b  T I` "k b@ 4a  T I` " b@ 5a T I` b@6a T I`P b@7b  T I`"\ b@8a  T I`/P b@9a T I`O" b@:ba "  T I`IbK=q ,Sb @c??   ` ` ``/ `/ `?  `  a eajD]H ` aj`+  } `Fi `+ `Fajj aj ] T  I`P  -b Ճ>h  T I`( K  Qaget typeb? T I`b Qcget symmetricKeySizeb@ T I` u ebA T I`~ P b B T I`Y j b C T,`]  `Kb A 8 d55(Sbqq `Da&  a 4b D   `T ``/ `/ `?  `  a%D]< ` aji `+ } `F"n `+ `Fj aj] T  I`\[ b E T I`Qcget symmetricKeySizebF T I`Qcget asymmetricKeyTypebG T I`j bH n bo   `T ``/ `/ `?  `  a2D]0 ` aj"n `+ } `Fp `+ `F] T  I`m p b I T I`#PQcget asymmetricKeyTypebJ T I`kQcget asymmetricKeyDetailsbK  `T``/ `/ `?  `  axD]$ ` ajj aj] T  I`"l b L T I`&vj bMXb " C C" CX Cg C CP C"\ C[ C"  " X g  P "\ [    `Dxh Ƃ%%%%%%ei h  0Âb1!i% %%  0 t%0 t%e+  2 10 ‚   e+ 1!b %!b %0‚ e+"!‚#e+ %~$)03%03&03'0 3(0 3)03*0 3+0 3,03- 1 c!@ @LbA1%IQ]iqy!) D`RD]DH }Qy// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { op_node_pbkdf2, op_node_pbkdf2_async } from "ext:core/ops"; import { Buffer } from "node:buffer"; export const MAX_ALLOC = Math.pow(2, 30) - 1; /** * @param iterations Needs to be higher or equal than zero * @param keylen Needs to be higher or equal than zero but less than max allocation size (2^30) * @param digest Algorithm to be used for encryption */ export function pbkdf2Sync(password, salt, iterations, keylen, digest = "sha1") { if (typeof iterations !== "number" || iterations < 0) { throw new TypeError("Bad iterations"); } if (typeof keylen !== "number" || keylen < 0 || keylen > MAX_ALLOC) { throw new TypeError("Bad key length"); } const DK = new Uint8Array(keylen); if (!op_node_pbkdf2(password, salt, iterations, digest, DK)) { throw new Error("Invalid digest"); } return Buffer.from(DK); } /** * @param iterations Needs to be higher or equal than zero * @param keylen Needs to be higher or equal than zero but less than max allocation size (2^30) * @param digest Algorithm to be used for encryption */ export function pbkdf2(password, salt, iterations, keylen, digest = "sha1", callback) { if (typeof iterations !== "number" || iterations < 0) { throw new TypeError("Bad iterations"); } if (typeof keylen !== "number" || keylen < 0 || keylen > MAX_ALLOC) { throw new TypeError("Bad key length"); } op_node_pbkdf2_async(password, salt, iterations, digest, keylen).then((DK)=>callback(null, Buffer.from(DK))).catch((err)=>callback(err)); } export default { MAX_ALLOC, pbkdf2, pbkdf2Sync }; Qe\|'ext:deno_node/internal/crypto/pbkdf2.tsa b^D`M` T\`t0La !(La T  I`F b |Sb1Ib`L` B]`b]`]8L` ` L`Bq ` L`Bq  ` L` b ` L`b ]L`  D"{ "{ c D  c D  c` a? a?"{ a?Bq a?b a? a?a?=b@Oa T I` e˕b@Pba (bBq C Cb CBq  b   Q`Dp0h ei h  !-  _E1~)0303 03 1 bЀ`2 bAN]ˀDD`RD]DH  Q P// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { primordials } from "ext:core/mod.js"; import { op_node_check_prime, op_node_check_prime_async, op_node_check_prime_bytes, op_node_check_prime_bytes_async, op_node_gen_prime, op_node_gen_prime_async } from "ext:core/ops"; const { StringPrototypePadStart, StringPrototypeToString } = primordials; import { notImplemented } from "ext:deno_node/_utils.ts"; import randomBytes from "ext:deno_node/internal/crypto/_randomBytes.ts"; import randomFill, { randomFillSync } from "ext:deno_node/internal/crypto/_randomFill.mjs"; import randomInt from "ext:deno_node/internal/crypto/_randomInt.ts"; import { validateBoolean, validateFunction, validateInt32, validateObject } from "ext:deno_node/internal/validators.mjs"; import { isAnyArrayBuffer, isArrayBufferView } from "ext:deno_node/internal/util/types.ts"; import { ERR_INVALID_ARG_TYPE, ERR_OUT_OF_RANGE } from "ext:deno_node/internal/errors.ts"; export { default as randomBytes } from "ext:deno_node/internal/crypto/_randomBytes.ts"; export { default as randomFill, randomFillSync } from "ext:deno_node/internal/crypto/_randomFill.mjs"; export { default as randomInt } from "ext:deno_node/internal/crypto/_randomInt.ts"; export function checkPrime(candidate, options = {}, callback) { if (typeof options === "function") { callback = options; options = {}; } validateFunction(callback, "callback"); validateObject(options, "options"); const { checks = 0 } = options; validateInt32(checks, "options.checks", 0); let op = op_node_check_prime_bytes_async; if (typeof candidate === "bigint") { op = op_node_check_prime_async; } else if (!isAnyArrayBuffer(candidate) && !isArrayBufferView(candidate)) { throw new ERR_INVALID_ARG_TYPE("candidate", [ "ArrayBuffer", "TypedArray", "Buffer", "DataView", "bigint" ], candidate); } op(candidate, checks).then((result)=>{ callback?.(null, result); }).catch((err)=>{ callback?.(err, false); }); } export function checkPrimeSync(candidate, options = {}) { validateObject(options, "options"); const { checks = 0 } = options; validateInt32(checks, "options.checks", 0); if (typeof candidate === "bigint") { return op_node_check_prime(candidate, checks); } else if (!isAnyArrayBuffer(candidate) && !isArrayBufferView(candidate)) { throw new ERR_INVALID_ARG_TYPE("candidate", [ "ArrayBuffer", "TypedArray", "Buffer", "DataView", "bigint" ], candidate); } return op_node_check_prime_bytes(candidate, checks); } export function generatePrime(size, options = {}, callback) { validateInt32(size, "size", 1); if (typeof options === "function") { callback = options; options = {}; } validateFunction(callback, "callback"); const { bigint } = validateRandomPrimeJob(size, options); op_node_gen_prime_async(size).then((prime)=>bigint ? arrayBufferToUnsignedBigInt(prime.buffer) : prime.buffer).then((prime)=>{ callback?.(null, prime); }); } export function generatePrimeSync(size, options = {}) { const { bigint } = validateRandomPrimeJob(size, options); const prime = op_node_gen_prime(size); if (bigint) return arrayBufferToUnsignedBigInt(prime.buffer); return prime.buffer; } function validateRandomPrimeJob(size, options) { validateInt32(size, "size", 1); validateObject(options, "options"); let { safe = false, bigint = false, add, rem } = options; validateBoolean(safe, "options.safe"); validateBoolean(bigint, "options.bigint"); if (add !== undefined) { if (typeof add === "bigint") { add = unsignedBigIntToBuffer(add, "options.add"); } else if (!isAnyArrayBuffer(add) && !isArrayBufferView(add)) { throw new ERR_INVALID_ARG_TYPE("options.add", [ "ArrayBuffer", "TypedArray", "Buffer", "DataView", "bigint" ], add); } } if (rem !== undefined) { if (typeof rem === "bigint") { rem = unsignedBigIntToBuffer(rem, "options.rem"); } else if (!isAnyArrayBuffer(rem) && !isArrayBufferView(rem)) { throw new ERR_INVALID_ARG_TYPE("options.rem", [ "ArrayBuffer", "TypedArray", "Buffer", "DataView", "bigint" ], rem); } } // TODO(@littledivy): safe, add and rem options are not implemented. if (safe || add || rem) { notImplemented("safe, add and rem options are not implemented."); } return { safe, bigint, add, rem }; } /** * 48 is the ASCII code for '0', 97 is the ASCII code for 'a'. * @param {number} number An integer between 0 and 15. * @returns {number} corresponding to the ASCII code of the hex representation * of the parameter. */ const numberToHexCharCode = (number)=>(number < 10 ? 48 : 87) + number; /** * @param {ArrayBuffer} buf An ArrayBuffer. * @return {bigint} */ function arrayBufferToUnsignedBigInt(buf) { const length = buf.byteLength; const chars = Array(length * 2); const view = new DataView(buf); for(let i = 0; i < length; i++){ const val = view.getUint8(i); chars[2 * i] = numberToHexCharCode(val >> 4); chars[2 * i + 1] = numberToHexCharCode(val & 0xf); } return BigInt(`0x${String.fromCharCode(...chars)}`); } function unsignedBigIntToBuffer(bigint, name) { if (bigint < 0) { throw new ERR_OUT_OF_RANGE(name, ">= 0", bigint); } const hex = StringPrototypeToString(bigint, 16); const padded = StringPrototypePadStart(hex, hex.length + hex.length % 2, 0); return Buffer.from(padded, "hex"); } export const randomUUID = ()=>globalThis.crypto.randomUUID(); export default { checkPrime, checkPrimeSync, generatePrime, generatePrimeSync, randomUUID, randomInt, randomBytes, randomFill, randomFillSync }; Qeb% 'ext:deno_node/internal/crypto/random.tsa b_D`@M` T``La< T  I` yv Sb1_hv bx v w e??????Ib`,L`  bS]`,B]` ]`_r ]`s ]`t ]`5" ]`" ]` ]`qL`   Dc  Dc   D c   Dc]qPL`` L` ` L` b ` L`b  ` L` b ` L`b ` L`]XL` Db b cCW D" " cYi D11c D"3"3c  Db b cIW D  cH[ D  c]v D  cx D  c D  c D  c Dc$ D c D c D  c D c&/ D  cm| D  c~ D"/ "/ c D  c`a? a? a? a? a? a? a?b a? a? a? a? a? a? a?"/ a? a?1a?"3a?b a?" a? a?b a? a?b a?a?a?b@ V T I`"zv ːb$@ W T I`w b@ X@L` T I` b@Ra T I` b b@Sa T I`  b@Ta T I` b b@Uca _h T bx `bx bK Y T `bK ZXb  Cb C Cb CC C C C C b  b       `Dz h %%%%%%ei h  0-%- % % 1~ )03 0303 03 03 03030303 1 b 0bAQ̀D̀DD`RD]DH IQEߜ~ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. /* MIT License Copyright (c) 2018 cryptocoinjs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { Buffer } from "node:buffer"; import { op_node_scrypt_async, op_node_scrypt_sync } from "ext:core/ops"; const fixOpts = (opts)=>{ const out = { N: 16384, p: 1, r: 8, maxmem: 32 << 20 }; if (!opts) return out; if (opts.N) out.N = opts.N; else if (opts.cost) out.N = opts.cost; if (opts.p) out.p = opts.p; else if (opts.parallelization) out.p = opts.parallelization; if (opts.r) out.r = opts.r; else if (opts.blockSize) out.r = opts.blockSize; if (opts.maxmem) out.maxmem = opts.maxmem; return out; }; export function scryptSync(password, salt, keylen, _opts) { const { N, r, p, maxmem } = fixOpts(_opts); const blen = p * 128 * r; if (32 * r * (N + 2) * 4 + blen > maxmem) { throw new Error("exceeds max memory"); } const buf = Buffer.alloc(keylen); op_node_scrypt_sync(password, salt, keylen, Math.log2(N), r, p, maxmem, buf.buffer); return buf; } export function scrypt(password, salt, keylen, _opts, cb) { if (!cb) { cb = _opts; _opts = null; } const { N, r, p, maxmem } = fixOpts(_opts); const blen = p * 128 * r; if (32 * r * (N + 2) * 4 + blen > maxmem) { throw new Error("exceeds max memory"); } try { op_node_scrypt_async(password, salt, keylen, Math.log2(N), r, p, maxmem).then((buf)=>{ cb(null, Buffer.from(buf.buffer)); }); } catch (err) { return cb(err); } } export default { scrypt, scryptSync }; Qeo@ 'ext:deno_node/internal/crypto/scrypt.tsa b`D`M` TP`[(La$$L` T  I`)|B xSb1y `?Ib~ `L` b]`B]`M],L` ` L` ` L` B ` L`B ]L`  D"{ "{ c D  c0 D ! !c2E`"{ a? a? !a?B a? a?a?b@\a T I`R  ͒b@]ba  T y `m y bK^ b CB C B   `Dm h %ei h  %~)0303 1  abA[=5DD`RD]DH uQq.// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { op_node_sign, op_node_verify } from "ext:core/ops"; import { notImplemented } from "ext:deno_node/_utils.ts"; import { validateFunction, validateString } from "ext:deno_node/internal/validators.mjs"; import { Buffer } from "node:buffer"; import Writable from "ext:deno_node/internal/streams/writable.mjs"; import { prepareAsymmetricKey } from "ext:deno_node/internal/crypto/keys.ts"; import { createHash } from "ext:deno_node/internal/crypto/hash.ts"; import { isArrayBufferView } from "ext:deno_node/internal/util/types.ts"; import { ERR_CRYPTO_SIGN_KEY_REQUIRED } from "ext:deno_node/internal/errors.ts"; export class SignImpl extends Writable { hash; #digestType; constructor(algorithm, _options){ validateString(algorithm, "algorithm"); super({ write (chunk, enc, callback) { this.update(chunk, enc); callback(); } }); algorithm = algorithm.toLowerCase(); if (algorithm.startsWith("rsa-")) { // Allows RSA-[digest_algorithm] as a valid algorithm algorithm = algorithm.slice(4); } this.#digestType = algorithm; this.hash = createHash(this.#digestType); } sign(privateKey, encoding) { const { data, format, type } = prepareAsymmetricKey(privateKey); const ret = Buffer.from(op_node_sign(this.hash.digest(), this.#digestType, data, type, format)); return encoding ? ret.toString(encoding) : ret; } update(data, encoding) { this.hash.update(data, encoding); return this; } } export function Sign(algorithm, options) { return new SignImpl(algorithm, options); } Sign.prototype = SignImpl.prototype; export class VerifyImpl extends Writable { hash; #digestType; constructor(algorithm, _options){ validateString(algorithm, "algorithm"); super({ write (chunk, enc, callback) { this.update(chunk, enc); callback(); } }); algorithm = algorithm.toLowerCase(); if (algorithm.startsWith("rsa-")) { // Allows RSA-[digest_algorithm] as a valid algorithm algorithm = algorithm.slice(4); } this.#digestType = algorithm; this.hash = createHash(this.#digestType); } update(data, encoding) { this.hash.update(data, encoding); return this; } verify(publicKey, signature, encoding) { let keyData; let keyType; let keyFormat; if (typeof publicKey === "string" || isArrayBufferView(publicKey)) { // if the key is BinaryLike, interpret it as a PEM encoded RSA key // deno-lint-ignore no-explicit-any keyData = publicKey; keyType = "rsa"; keyFormat = "pem"; } else { // TODO(kt3k): Add support for the case when publicKey is a KeyObject, // CryptoKey, etc notImplemented("crypto.Verify.prototype.verify with non BinaryLike input"); } return op_node_verify(this.hash.digest(), this.#digestType, keyData, keyType, keyFormat, Buffer.from(signature, encoding)); } } export function Verify(algorithm, options) { return new VerifyImpl(algorithm, options); } Verify.prototype = VerifyImpl.prototype; export function signOneShot(algorithm, data, key, callback) { if (algorithm != null) { validateString(algorithm, "algorithm"); } if (callback !== undefined) { validateFunction(callback, "callback"); } if (!key) { throw new ERR_CRYPTO_SIGN_KEY_REQUIRED(); } const result = Sign(algorithm).update(data).sign(key); if (callback) { setTimeout(()=>callback(null, result)); } else { return result; } } export function verifyOneShot(algorithm, data, key, signature, callback) { if (algorithm != null) { validateString(algorithm, "algorithm"); } if (callback !== undefined) { validateFunction(callback, "callback"); } if (!key) { throw new ERR_CRYPTO_SIGN_KEY_REQUIRED(); } const result = Verify(algorithm).update(data).verify(key, signature); if (callback) { setTimeout(()=>callback(null, result)); } else { return result; } } export default { signOneShot, verifyOneShot, Sign, Verify }; Qe$ext:deno_node/internal/crypto/sig.tsa baD`LM` T`lLa!DLa T  I`;" Sb1Ib`,L`  B]`= ]`l" ]`b]`]` ]`pB ]`" ]` ]`T]\L`` L`" ` L`" | ` L`|  ` L` b} ` L`b}  ` L` b ` L`b ]4L`   D"{ "{ c D{ { c0L D c D  c D"3"3c Db b cVd D % %c% D ) )c'5 D"k "k cTh D  c D  c` %a? )a?b a? a? a?"{ a? a?"k a? a?"3a?{ a?| a?" a?b} a? a? a?b a?a?Qb @`b T I`  y͖b@ aa  T I`#  b@ ba  T I`b b@cb a $Sb @| b?  `T ``/ `/ `?  `  aD]0 ` ajaj"6 aj]|   T I`b @| Qb Ճd T  I`be T I`"6 bf T(` L`  E`Kb  c35(Sbqq| `Da a 4bg $Sb @| b?h y  `T ``/ `/ `?  `  ah D]0 ` aj"6 aj¥aj] T I`u b @b} ]Qb Ճh T  I`~ "6 b i T I` ¥b j T(` L`  `Kb < 'c35(Sbqqb} `Da  a 4b k0b Cb C" C C b "   e`DHh ei h  e%0‚  e+ 2  100- 2 e%0‚e+2  100- 2 ~ )03 030303 1 yb  QbA_%D19AqqD}D DD`RD]DH )Q%K@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { notImplemented } from "ext:deno_node/_utils.ts"; import { Buffer } from "node:buffer"; import { ERR_INVALID_ARG_TYPE, hideStackFrames } from "ext:deno_node/internal/errors.ts"; import { isAnyArrayBuffer, isArrayBufferView } from "ext:deno_node/internal/util/types.ts"; import { kHandle, kKeyObject } from "ext:deno_node/internal/crypto/constants.ts"; export const ellipticCurves = [ { name: "secp256k1", privateKeySize: 32, publicKeySize: 65, sharedSecretSize: 32 }, { name: "prime256v1", privateKeySize: 32, publicKeySize: 65, sharedSecretSize: 32 }, { name: "secp256r1", privateKeySize: 32, publicKeySize: 65, sharedSecretSize: 32 }, { name: "secp384r1", privateKeySize: 48, publicKeySize: 97, sharedSecretSize: 48 }, { name: "secp224r1", privateKeySize: 28, publicKeySize: 57, sharedSecretSize: 28 } ]; // deno-fmt-ignore const supportedCiphers = [ "aes-128-ecb", "aes-192-ecb", "aes-256-ecb", "aes-128-cbc", "aes-192-cbc", "aes-256-cbc", "aes128", "aes192", "aes256", "aes-128-cfb", "aes-192-cfb", "aes-256-cfb", "aes-128-cfb8", "aes-192-cfb8", "aes-256-cfb8", "aes-128-cfb1", "aes-192-cfb1", "aes-256-cfb1", "aes-128-ofb", "aes-192-ofb", "aes-256-ofb", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr", "aes-128-gcm", "aes-192-gcm", "aes-256-gcm" ]; export function getCiphers() { return supportedCiphers; } let defaultEncoding = "buffer"; export function setDefaultEncoding(val) { defaultEncoding = val; } export function getDefaultEncoding() { return defaultEncoding; } // This is here because many functions accepted binary strings without // any explicit encoding in older versions of node, and we don't want // to break them unnecessarily. export function toBuf(val, encoding) { if (typeof val === "string") { if (encoding === "buffer") { encoding = "utf8"; } return Buffer.from(val, encoding); } return val; } export const validateByteSource = hideStackFrames((val, name)=>{ val = toBuf(val); if (isAnyArrayBuffer(val) || isArrayBufferView(val)) { return; } throw new ERR_INVALID_ARG_TYPE(name, [ "string", "ArrayBuffer", "TypedArray", "DataView", "Buffer" ], val); }); const curveNames = ellipticCurves.map((x)=>x.name); export function getCurves() { return curveNames; } export function secureHeapUsed() { notImplemented("crypto.secureHeapUsed"); } export function setEngine(_engine, _flags) { notImplemented("crypto.setEngine"); } const kAesKeyLengths = [ 128, 192, 256 ]; export { kAesKeyLengths, kHandle, kKeyObject }; export default { getDefaultEncoding, setDefaultEncoding, getCiphers, getCurves, secureHeapUsed, setEngine, validateByteSource, toBuf, kHandle, kKeyObject, kAesKeyLengths }; QeJ:d%ext:deno_node/internal/crypto/util.tsa bbD`0M`  T`hLa*lLa T  I`" %Sb1b  " b???Ib@ `L`  ]`/b]`a ]`" ]`"e ]`JL`  Dc/6 d Dd c8BL`!` L`b< ` L`b< " ` L`"  ` L` B0 ` L`B0 "[ ` L`"[ " ` L`"  ` L`  `  L` < `  L`< "X `  L`"X ](L` D"{ "{ cSY Db b cy D" " c D11c D"3"3c Dc/6 Dd d c8B Db b c'`b a?"{ a?b a?" a?1a?"3a?a?d a?b< a?" a? a?B0 a?< a ?"X a ? a?" a? a ?"[ a?a?b@ma T I`5 ΐb@na T I`XxB0 b@oa T I`;< b@pb  T I`\ w  b@qa T I` " b@ra T I`   b@ sc a   `L`0bb~ ~ ` b `A ` 0bb ~ ` b `A ` 0b ~ ` b `A ` 0bb ~ `0b `a `00b ~ `b `9 ` `tM` b  b  b  B                    I"  T  I` IbKt< T$` L`  `Db-(SbbpWI`Da5 @  abKu  `Mchb B0 C C" C C" C C"X C< CCd C"[ CB0  "  "  "X < d "[  `D}(h %%%ei h  {1{%%%0Ăb1 0- Ă ^%{ %1~ )03 03 0303030 30 30 3030303 1 c sP 0 0 0 bAl]emu}D`RD]DH QBO// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { op_node_x509_ca, op_node_x509_check_email, op_node_x509_fingerprint, op_node_x509_fingerprint256, op_node_x509_fingerprint512, op_node_x509_get_issuer, op_node_x509_get_serial_number, op_node_x509_get_subject, op_node_x509_get_valid_from, op_node_x509_get_valid_to, op_node_x509_key_usage, op_node_x509_parse } from "ext:core/ops"; import { Buffer } from "node:buffer"; import { ERR_INVALID_ARG_TYPE } from "ext:deno_node/internal/errors.ts"; import { isArrayBufferView } from "ext:deno_node/internal/util/types.ts"; import { validateString } from "ext:deno_node/internal/validators.mjs"; import { notImplemented } from "ext:deno_node/_utils.ts"; export class X509Certificate { #handle; constructor(buffer){ if (typeof buffer === "string") { buffer = Buffer.from(buffer); } if (!isArrayBufferView(buffer)) { throw new ERR_INVALID_ARG_TYPE("buffer", [ "string", "Buffer", "TypedArray", "DataView" ], buffer); } this.#handle = op_node_x509_parse(buffer); } get ca() { return op_node_x509_ca(this.#handle); } checkEmail(email, _options) { validateString(email, "email"); if (op_node_x509_check_email(this.#handle, email)) { return email; } } checkHost(_name, _options) { notImplemented("crypto.X509Certificate.prototype.checkHost"); } checkIP(_ip) { notImplemented("crypto.X509Certificate.prototype.checkIP"); } checkIssued(_otherCert) { notImplemented("crypto.X509Certificate.prototype.checkIssued"); } checkPrivateKey(_privateKey) { notImplemented("crypto.X509Certificate.prototype.checkPrivateKey"); } get fingerprint() { return op_node_x509_fingerprint(this.#handle); } get fingerprint256() { return op_node_x509_fingerprint256(this.#handle); } get fingerprint512() { return op_node_x509_fingerprint512(this.#handle); } get infoAccess() { notImplemented("crypto.X509Certificate.prototype.infoAccess"); return ""; } get issuer() { return op_node_x509_get_issuer(this.#handle); } get issuerCertificate() { return undefined; } get keyUsage() { const flags = op_node_x509_key_usage(this.#handle); if (flags === 0) return undefined; const result = []; if (flags & 0x01) result.push("DigitalSignature"); if (flags >> 1 & 0x01) result.push("NonRepudiation"); if (flags >> 2 & 0x01) result.push("KeyEncipherment"); if (flags >> 3 & 0x01) result.push("DataEncipherment"); if (flags >> 4 & 0x01) result.push("KeyAgreement"); if (flags >> 5 & 0x01) result.push("KeyCertSign"); if (flags >> 6 & 0x01) result.push("CRLSign"); if (flags >> 7 & 0x01) result.push("EncipherOnly"); if (flags >> 8 & 0x01) result.push("DecipherOnly"); return result; } get publicKey() { notImplemented("crypto.X509Certificate.prototype.publicKey"); return {}; } get raw() { notImplemented("crypto.X509Certificate.prototype.raw"); return {}; } get serialNumber() { return op_node_x509_get_serial_number(this.#handle); } get subject() { return op_node_x509_get_subject(this.#handle); } get subjectAltName() { return undefined; } toJSON() { return this.toString(); } toLegacyObject() { notImplemented("crypto.X509Certificate.prototype.toLegacyObject"); } toString() { notImplemented("crypto.X509Certificate.prototype.toString"); } get validFrom() { return op_node_x509_get_valid_from(this.#handle); } get validTo() { return op_node_x509_get_valid_to(this.#handle); } verify(_publicKey) { notImplemented("crypto.X509Certificate.prototype.verify"); } } export default { X509Certificate }; Qe"%ext:deno_node/internal/crypto/x509.tsa bcD`tM` T`La$!Lba $Sb @gb?` Sb1Ib` L` B]`Ub]`| ]`" ]`" ]`= ]`] L`` L` ` L` ]LL`  D"{ "{ cnt Db b c D"3"3c Db b co} D - -c( D 1 1c*B D 5 5cD\ D 9 9c^y D = =c{ D A Ac D E Ec D I Ic D M Mc D Q Qc! D U Uc#9 D Y Yc;M D  c'5` -a? 1a? 5a? 9a? =a? Aa? Ea? Ia? Ma? Qa? Ua? Ya?"{ a?b a?"3a? a?b a? a?a?  `T ``/ `/ `?  `  a`D]9 ` aj"b `+ } `F’ aj$ aj " aj aj aj `+' ` Fb `+ ` F `+  ` Fb `+ ` F `++ ` FB `+ `F `+1 `Fb`+- `FA`+ `FB `+/ `Fš `+  `F" `+ `F- aj aj1 aj" `+! `F `+ `F¥aj(]g T  I` b Ճw T I`(Z Qaget cabx T I`g’ b y T I`Z b z T I`d" b{ T I` b | T I`% b} T I`Qbget fingerprintb~ T I` Qcget fingerprint256b  T I`5sQcget fingerprint512b  T I`Qbget infoAccessb  T I`% Qb get issuerb   T I`= [ Qcget issuerCertificateb  T I`j Qb get keyUsageb  T I` ^ Qb get publicKeyb  T I`h  Qaget rawb T I`  Qbget serialNumberb T I` X Qb get subjectb  T I`m Qcget subjectAltNameb T I` b T I`  b T I`#lb T I`|Qb get validFromb  T I`Qb get validTob  T I` ^¥b T(` ]  ` Ka  \c5(Sbqq `Da` a b b C  `Dh ei h  e%‚          ߂ނ݂܂e+ 2! 1~")03# 1   a LbAv !-9EQ]iuD`RD]DH  Q^A // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { lookup as defaultLookup } from "node:dns"; import { isInt32, validateFunction } from "ext:deno_node/internal/validators.mjs"; import { ERR_SOCKET_BAD_TYPE } from "ext:deno_node/internal/errors.ts"; import { UDP } from "ext:deno_node/internal_binding/udp_wrap.ts"; import { guessHandleType } from "ext:deno_node/internal_binding/util.ts"; import { codeMap } from "ext:deno_node/internal_binding/uv.ts"; export const kStateSymbol = Symbol("kStateSymbol"); function lookup4(lookup, address, callback) { return lookup(address || "127.0.0.1", 4, callback); } function lookup6(lookup, address, callback) { return lookup(address || "::1", 6, callback); } export function newHandle(type, lookup) { if (lookup === undefined) { lookup = defaultLookup; } else { validateFunction(lookup, "lookup"); } if (type === "udp4") { const handle = new UDP(); handle.lookup = lookup4.bind(handle, lookup); return handle; } if (type === "udp6") { const handle = new UDP(); handle.lookup = lookup6.bind(handle, lookup); handle.bind = handle.bind6; handle.connect = handle.connect6; handle.send = handle.send6; return handle; } throw new ERR_SOCKET_BAD_TYPE(); } export function _createSocketHandle(address, port, addressType, fd, flags) { const handle = newHandle(addressType); let err; if (isInt32(fd) && fd > 0) { const type = guessHandleType(fd); if (type !== "UDP") { err = codeMap.get("EINVAL"); } else { err = handle.open(fd); } } else if (port || address) { err = handle.bind(address, port || 0, flags); } if (err) { handle.close(); return err; } return handle; } export default { kStateSymbol, newHandle, _createSocketHandle }; Qd4j'ext:deno_node/internal/dgram.tsa bdD`M` T\`s4La - T  I`[ Sb1 b a??Ib ` L` b]`O" ]` ]` ]`  ]`X ]`]8L` ` L`Ÿ ` L`Ÿ " ` L`"  ` L` ]$L`  D  c D  c D  c D » c06 Db b cAP D  cdk D  cm}`  a? a? a? a? a?b a? a?" a? a?Ÿ a?a?b@ T I`lb җb@(La T I`  b@a T I` Ÿ b@ba  " (b" C CŸ C Ÿ    `Dp h Ƃ%%ei h  !b1~)0303 03 1  a 0bAq}D`RD]DH Q=w%// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { validateBoolean, validateNumber, validateOneOf, validateString } from "ext:deno_node/internal/validators.mjs"; import { isIP } from "ext:deno_node/internal/net.ts"; import { emitInvalidHostnameWarning, getDefaultResolver, getDefaultVerbatim, isFamily, isLookupOptions, Resolver as CallbackResolver, validateHints } from "ext:deno_node/internal/dns/utils.ts"; import { dnsException, ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE } from "ext:deno_node/internal/errors.ts"; import { getaddrinfo, GetAddrInfoReqWrap, QueryReqWrap } from "ext:deno_node/internal_binding/cares_wrap.ts"; import { toASCII } from "node:punycode"; function onlookup(err, addresses) { if (err) { this.reject(dnsException(err, "getaddrinfo", this.hostname)); return; } const family = this.family || isIP(addresses[0]); this.resolve({ address: addresses[0], family }); } function onlookupall(err, addresses) { if (err) { this.reject(dnsException(err, "getaddrinfo", this.hostname)); return; } const family = this.family; const parsedAddresses = []; for(let i = 0; i < addresses.length; i++){ const address = addresses[i]; parsedAddresses[i] = { address, family: family ? family : isIP(address) }; } this.resolve(parsedAddresses); } function createLookupPromise(family, hostname, all, hints, verbatim) { return new Promise((resolve, reject)=>{ if (!hostname) { emitInvalidHostnameWarning(hostname); resolve(all ? [] : { address: null, family: family === 6 ? 6 : 4 }); return; } const matchedFamily = isIP(hostname); if (matchedFamily !== 0) { const result = { address: hostname, family: matchedFamily }; resolve(all ? [ result ] : result); return; } const req = new GetAddrInfoReqWrap(); req.family = family; req.hostname = hostname; req.oncomplete = all ? onlookupall : onlookup; req.resolve = resolve; req.reject = reject; const err = getaddrinfo(req, toASCII(hostname), family, hints, verbatim); if (err) { reject(dnsException(err, "getaddrinfo", hostname)); } }); } const validFamilies = [ 0, 4, 6 ]; export function lookup(hostname, options) { let hints = 0; let family = 0; let all = false; let verbatim = getDefaultVerbatim(); // Parse arguments if (hostname) { validateString(hostname, "hostname"); } if (isFamily(options)) { validateOneOf(options, "family", validFamilies); family = options; } else if (!isLookupOptions(options)) { throw new ERR_INVALID_ARG_TYPE("options", [ "integer", "object" ], options); } else { if (options?.hints != null) { validateNumber(options.hints, "options.hints"); hints = options.hints >>> 0; validateHints(hints); } if (options?.family != null) { validateOneOf(options.family, "options.family", validFamilies); family = options.family; } if (options?.all != null) { validateBoolean(options.all, "options.all"); all = options.all; } if (options?.verbatim != null) { validateBoolean(options.verbatim, "options.verbatim"); verbatim = options.verbatim; } } return createLookupPromise(family, hostname, all, hints, verbatim); } function onresolve(err, records, ttls) { if (err) { this.reject(dnsException(err, this.bindingName, this.hostname)); return; } const parsedRecords = ttls && this.ttl ? records.map((address, index)=>({ address, ttl: ttls[index] })) : records; this.resolve(parsedRecords); } function createResolverPromise(resolver, bindingName, hostname, ttl) { return new Promise((resolve, reject)=>{ const req = new QueryReqWrap(); req.bindingName = bindingName; req.hostname = hostname; req.oncomplete = onresolve; req.resolve = resolve; req.reject = reject; req.ttl = ttl; const err = resolver._handle[bindingName](req, toASCII(hostname)); if (err) { reject(dnsException(err, bindingName, hostname)); } }); } function resolver(bindingName) { function query(name, options) { validateString(name, "name"); const ttl = !!(options && options.ttl); return createResolverPromise(this, bindingName, name, ttl); } Object.defineProperty(query, "name", { value: bindingName }); return query; } const resolveMap = Object.create(null); class Resolver extends CallbackResolver { } Resolver.prototype.resolveAny = resolveMap.ANY = resolver("queryAny"); Resolver.prototype.resolve4 = resolveMap.A = resolver("queryA"); Resolver.prototype.resolve6 = resolveMap.AAAA = resolver("queryAaaa"); Resolver.prototype.resolveCaa = resolveMap.CAA = resolver("queryCaa"); Resolver.prototype.resolveCname = resolveMap.CNAME = resolver("queryCname"); Resolver.prototype.resolveMx = resolveMap.MX = resolver("queryMx"); Resolver.prototype.resolveNs = resolveMap.NS = resolver("queryNs"); Resolver.prototype.resolveTxt = resolveMap.TXT = resolver("queryTxt"); Resolver.prototype.resolveSrv = resolveMap.SRV = resolver("querySrv"); Resolver.prototype.resolvePtr = resolveMap.PTR = resolver("queryPtr"); Resolver.prototype.resolveNaptr = resolveMap.NAPTR = resolver("queryNaptr"); Resolver.prototype.resolveSoa = resolveMap.SOA = resolver("querySoa"); Resolver.prototype.reverse = resolver("getHostByAddr"); Resolver.prototype.resolve = _resolve; function _resolve(hostname, rrtype) { let resolver; if (typeof hostname !== "string") { throw new ERR_INVALID_ARG_TYPE("name", "string", hostname); } if (rrtype !== undefined) { validateString(rrtype, "rrtype"); resolver = resolveMap[rrtype]; if (typeof resolver !== "function") { throw new ERR_INVALID_ARG_VALUE("rrtype", rrtype); } } else { resolver = resolveMap.A; } return Reflect.apply(resolver, this, [ hostname ]); } // The Node implementation uses `bindDefaultResolver` to set the follow methods // on `module.exports` bound to the current `defaultResolver`. We don't have // the same ability in ESM but can simulate this (at some cost) by explicitly // exporting these methods which dynamically bind to the default resolver when // called. export function getServers() { return Resolver.prototype.getServers.bind(getDefaultResolver())(); } export function resolveAny(hostname) { return Resolver.prototype.resolveAny.bind(getDefaultResolver())(hostname); } export function resolve4(hostname, options) { return Resolver.prototype.resolve4.bind(getDefaultResolver())(hostname, options); } export function resolve6(hostname, options) { return Resolver.prototype.resolve6.bind(getDefaultResolver())(hostname, options); } export function resolveCaa(hostname) { return Resolver.prototype.resolveCaa.bind(getDefaultResolver())(hostname); } export function resolveCname(hostname) { return Resolver.prototype.resolveCname.bind(getDefaultResolver())(hostname); } export function resolveMx(hostname) { return Resolver.prototype.resolveMx.bind(getDefaultResolver())(hostname); } export function resolveNs(hostname) { return Resolver.prototype.resolveNs.bind(getDefaultResolver())(hostname); } export function resolveTxt(hostname) { return Resolver.prototype.resolveTxt.bind(getDefaultResolver())(hostname); } export function resolveSrv(hostname) { return Resolver.prototype.resolveSrv.bind(getDefaultResolver())(hostname); } export function resolvePtr(hostname) { return Resolver.prototype.resolvePtr.bind(getDefaultResolver())(hostname); } export function resolveNaptr(hostname) { return Resolver.prototype.resolveNaptr.bind(getDefaultResolver())(hostname); } export function resolveSoa(hostname) { return Resolver.prototype.resolveSoa.bind(getDefaultResolver())(hostname); } export function reverse(ip) { return Resolver.prototype.reverse.bind(getDefaultResolver())(ip); } export function resolve(hostname, rrtype) { return Resolver.prototype.resolve.bind(getDefaultResolver())(hostname, rrtype); } export { Resolver }; export default { lookup, Resolver, getServers, resolveAny, resolve4, resolve6, resolveCaa, resolveCname, resolveMx, resolveNs, resolveTxt, resolveSrv, resolvePtr, resolveNaptr, resolveSoa, resolve, reverse }; Qe.&ext:deno_node/internal/dns/promises.tsa beD`|M` Tu`La=O T  I`B Sb1B "   B   f???????Ibw%` L` " ]`v ]` ]`p ]` ]`C* ]`]L`6` L`B ` L`B B ` L`B » ` L`»  ` L` ` L` b ` L`b b ` L`b  `  L`  `  L` B `  L`B  `  L`  `  L` B ` L`B  ` L`  ` L`  ` L` b8` L`b8]TL`  D B c=E Db b c D  c D  c- Db b c/; DB B c DB B c D  c  D  c  DB B c DB B c"* D" " c D" " c,; D  c| D  c0? Db b c[h D  cAO D" " cQ^ D  c`n`% a? a?" a? a?" a?B a? a? a?B a?" a? a?b a?B a?b a? a?B a? a?b a? a?» a?B a?B a?b a? a?b a? a ? a ?B a ? a ? a? a?B a? a ? a?b8a?a?a?b@ T I`( " Җb@ T  I`E  b@ T I`3QB b@ T I`p) b@ T8`0$L`0SbqAb ` `Da;V T I`[,Ӗb@ bC  `Dg8 %!-~)3\  a 0b@  T  I`o7 ҕb@ L`2 T I` » b@b T I`B b@a  T I`Xb b@a  T I`q b@a  T I``b b@a  T I`{ b@a  T I`P  b@a  T I`j B b@a  T I` 8! b@a  T I`S!! b@a T I`!$" b@a T I`?""B b@a T I`"# b@a  T I`/## b@a T I`##b8b@a T I`$n$ b@ba   `Mc)  `T ``/ `/ `?  `  aD] ` aj]  T  I`B bE B  b   "  b  "   b  "  B b    B     "  B b    b  " b8 b"» CB CB Cb C Cb C C CB C C C CB C C CCb8C» B B   `D]@h Ƃ%%%%%%% ei h   { %%! - ^% 0e+ 10- b 2 2 0- b2 20- b2 20- b2 20- b!2# 2 %0- !b'2") 2#+0- $b-2%/ 2&10- 'b32(5 2)70- *b92+; 2,=0- -b?2.A 2/C0- 0bE21G 22I0- 3bK24M 25O0-6bQ27S0- 28U~9W)03:X03;Z03<\03^03`03b0 3d0 3 f0 3#h0 3&j03)l03,n03/p0 32r035t038v037x 1 4kzӀ````````````` 0 0 0 0 0 bA}DDDe %-5=ED`RD]DH Q!// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Node.js contributors. All rights reserved. MIT License. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials /** NOT IMPLEMENTED * ERR_MANIFEST_ASSERT_INTEGRITY * ERR_QUICSESSION_VERSION_NEGOTIATION * ERR_REQUIRE_ESM * ERR_TLS_CERT_ALTNAME_INVALID * ERR_WORKER_INVALID_EXEC_ARGV * ERR_WORKER_PATH * ERR_QUIC_ERROR * ERR_SYSTEM_ERROR //System error, shouldn't ever happen inside Deno * ERR_TTY_INIT_FAILED //System error, shouldn't ever happen inside Deno * ERR_INVALID_PACKAGE_CONFIG // package.json stuff, probably useless */ import { format, inspect } from "ext:deno_node/internal/util/inspect.mjs"; import { codes } from "ext:deno_node/internal/error_codes.ts"; import { codeMap, errorMap, mapSysErrnoToUvErrno } from "ext:deno_node/internal_binding/uv.ts"; import { assert } from "ext:deno_node/_util/asserts.ts"; import { isWindows } from "ext:deno_node/_util/os.ts"; import { os as osConstants } from "ext:deno_node/internal_binding/constants.ts"; import { hideStackFrames } from "ext:deno_node/internal/hide_stack_frames.ts"; import { getSystemErrorName } from "ext:deno_node/_utils.ts"; export { errorMap }; const kIsNodeError = Symbol("kIsNodeError"); /** * @see https://github.com/nodejs/node/blob/f3eb224/lib/internal/errors.js */ const classRegExp = /^([A-Z][a-z0-9]*)+$/; /** * @see https://github.com/nodejs/node/blob/f3eb224/lib/internal/errors.js * @description Sorted by a rough estimate on most frequently used entries. */ const kTypes = [ "string", "function", "number", "object", // Accept 'Function' and 'Object' as alternative to the lower cased version. "Function", "Object", "boolean", "bigint", "symbol" ]; // Node uses an AbortError that isn't exactly the same as the DOMException // to make usage of the error in userland and readable-stream easier. // It is a regular error with `.code` and `.name`. export class AbortError extends Error { code; constructor(message = "The operation was aborted", options){ if (options !== undefined && typeof options !== "object") { throw new codes.ERR_INVALID_ARG_TYPE("options", "Object", options); } super(message, options); this.code = "ABORT_ERR"; this.name = "AbortError"; } } let maxStackErrorName; let maxStackErrorMessage; /** * Returns true if `err.name` and `err.message` are equal to engine-specific * values indicating max call stack size has been exceeded. * "Maximum call stack size exceeded" in V8. */ export function isStackOverflowError(err) { if (maxStackErrorMessage === undefined) { try { // deno-lint-ignore no-inner-declarations function overflowStack() { overflowStack(); } overflowStack(); // deno-lint-ignore no-explicit-any } catch (err) { maxStackErrorMessage = err.message; maxStackErrorName = err.name; } } return err && err.name === maxStackErrorName && err.message === maxStackErrorMessage; } function addNumericalSeparator(val) { let res = ""; let i = val.length; const start = val[0] === "-" ? 1 : 0; for(; i >= start + 4; i -= 3){ res = `_${val.slice(i - 3, i)}${res}`; } return `${val.slice(0, i)}${res}`; } const captureLargerStackTrace = hideStackFrames(function captureLargerStackTrace(err) { // @ts-ignore this function is not available in lib.dom.d.ts Error.captureStackTrace(err); return err; }); /** * This creates an error compatible with errors produced in the C++ * This function should replace the deprecated * `exceptionWithHostPort()` function. * * @param err A libuv error number * @param syscall * @param address * @param port * @return The error. */ export const uvExceptionWithHostPort = hideStackFrames(function uvExceptionWithHostPort(err, syscall, address, port) { const { 0: code, 1: uvmsg } = uvErrmapGet(err) || uvUnmappedError; const message = `${syscall} ${code}: ${uvmsg}`; let details = ""; if (port && port > 0) { details = ` ${address}:${port}`; } else if (address) { details = ` ${address}`; } // deno-lint-ignore no-explicit-any const ex = new Error(`${message}${details}`); ex.code = code; ex.errno = err; ex.syscall = syscall; ex.address = address; if (port) { ex.port = port; } return captureLargerStackTrace(ex); }); /** * This used to be `util._errnoException()`. * * @param err A libuv error number * @param syscall * @param original * @return A `ErrnoException` */ export const errnoException = hideStackFrames(function errnoException(err, syscall, original) { const code = getSystemErrorName(err); const message = original ? `${syscall} ${code} ${original}` : `${syscall} ${code}`; // deno-lint-ignore no-explicit-any const ex = new Error(message); ex.errno = err; ex.code = code; ex.syscall = syscall; return captureLargerStackTrace(ex); }); function uvErrmapGet(name) { return errorMap.get(name); } const uvUnmappedError = [ "UNKNOWN", "unknown error" ]; /** * This creates an error compatible with errors produced in the C++ * function UVException using a context object with data assembled in C++. * The goal is to migrate them to ERR_* errors later when compatibility is * not a concern. * * @param ctx * @return The error. */ export const uvException = hideStackFrames(function uvException(ctx) { const { 0: code, 1: uvmsg } = uvErrmapGet(ctx.errno) || uvUnmappedError; let message = `${code}: ${ctx.message || uvmsg}, ${ctx.syscall}`; let path; let dest; if (ctx.path) { path = ctx.path.toString(); message += ` '${path}'`; } if (ctx.dest) { dest = ctx.dest.toString(); message += ` -> '${dest}'`; } // deno-lint-ignore no-explicit-any const err = new Error(message); for (const prop of Object.keys(ctx)){ if (prop === "message" || prop === "path" || prop === "dest") { continue; } err[prop] = ctx[prop]; } err.code = code; if (path) { err.path = path; } if (dest) { err.dest = dest; } return captureLargerStackTrace(err); }); /** * Deprecated, new function is `uvExceptionWithHostPort()` * New function added the error description directly * from C++. this method for backwards compatibility * @param err A libuv error number * @param syscall * @param address * @param port * @param additional */ export const exceptionWithHostPort = hideStackFrames(function exceptionWithHostPort(err, syscall, address, port, additional) { const code = getSystemErrorName(err); let details = ""; if (port && port > 0) { details = ` ${address}:${port}`; } else if (address) { details = ` ${address}`; } if (additional) { details += ` - Local (${additional})`; } // deno-lint-ignore no-explicit-any const ex = new Error(`${syscall} ${code}${details}`); ex.errno = err; ex.code = code; ex.syscall = syscall; ex.address = address; if (port) { ex.port = port; } return captureLargerStackTrace(ex); }); /** * @param code A libuv error number or a c-ares error code * @param syscall * @param hostname */ export const dnsException = hideStackFrames(function(code, syscall, hostname) { let errno; // If `code` is of type number, it is a libuv error number, else it is a // c-ares error code. if (typeof code === "number") { errno = code; // ENOTFOUND is not a proper POSIX error, but this error has been in place // long enough that it's not practical to remove it. if (code === codeMap.get("EAI_NODATA") || code === codeMap.get("EAI_NONAME")) { code = "ENOTFOUND"; // Fabricated error name. } else { code = getSystemErrorName(code); } } const message = `${syscall} ${code}${hostname ? ` ${hostname}` : ""}`; // deno-lint-ignore no-explicit-any const ex = new Error(message); ex.errno = errno; ex.code = code; ex.syscall = syscall; if (hostname) { ex.hostname = hostname; } return captureLargerStackTrace(ex); }); /** * All error instances in Node have additional methods and properties * This export class is meant to be extended by these instances abstracting native JS error instances */ export class NodeErrorAbstraction extends Error { code; constructor(name, code, message){ super(message); this.code = code; this.name = name; //This number changes depending on the name of this class //20 characters as of now this.stack = this.stack && `${name} [${this.code}]${this.stack.slice(20)}`; } toString() { return `${this.name} [${this.code}]: ${this.message}`; } } export class NodeError extends NodeErrorAbstraction { constructor(code, message){ super(Error.prototype.name, code, message); } } export class NodeSyntaxError extends NodeErrorAbstraction { constructor(code, message){ super(SyntaxError.prototype.name, code, message); Object.setPrototypeOf(this, SyntaxError.prototype); this.toString = function() { return `${this.name} [${this.code}]: ${this.message}`; }; } } export class NodeRangeError extends NodeErrorAbstraction { constructor(code, message){ super(RangeError.prototype.name, code, message); Object.setPrototypeOf(this, RangeError.prototype); this.toString = function() { return `${this.name} [${this.code}]: ${this.message}`; }; } } export class NodeTypeError extends NodeErrorAbstraction { constructor(code, message){ super(TypeError.prototype.name, code, message); Object.setPrototypeOf(this, TypeError.prototype); this.toString = function() { return `${this.name} [${this.code}]: ${this.message}`; }; } } export class NodeURIError extends NodeErrorAbstraction { constructor(code, message){ super(URIError.prototype.name, code, message); Object.setPrototypeOf(this, URIError.prototype); this.toString = function() { return `${this.name} [${this.code}]: ${this.message}`; }; } } // A specialized Error that includes an additional info property with // additional information about the error condition. // It has the properties present in a UVException but with a custom error // message followed by the uv error code and uv error message. // It also has its own error code with the original uv error context put into // `err.info`. // The context passed into this error must have .code, .syscall and .message, // and may have .path and .dest. class NodeSystemError extends NodeErrorAbstraction { constructor(key, context, msgPrefix){ let message = `${msgPrefix}: ${context.syscall} returned ` + `${context.code} (${context.message})`; if (context.path !== undefined) { message += ` ${context.path}`; } if (context.dest !== undefined) { message += ` => ${context.dest}`; } super("SystemError", key, message); captureLargerStackTrace(this); Object.defineProperties(this, { [kIsNodeError]: { value: true, enumerable: false, writable: false, configurable: true }, info: { value: context, enumerable: true, configurable: true, writable: false }, errno: { get () { return context.errno; }, set: (value)=>{ context.errno = value; }, enumerable: true, configurable: true }, syscall: { get () { return context.syscall; }, set: (value)=>{ context.syscall = value; }, enumerable: true, configurable: true } }); if (context.path !== undefined) { Object.defineProperty(this, "path", { get () { return context.path; }, set: (value)=>{ context.path = value; }, enumerable: true, configurable: true }); } if (context.dest !== undefined) { Object.defineProperty(this, "dest", { get () { return context.dest; }, set: (value)=>{ context.dest = value; }, enumerable: true, configurable: true }); } } toString() { return `${this.name} [${this.code}]: ${this.message}`; } } function makeSystemErrorWithCode(key, msgPrfix) { return class NodeError extends NodeSystemError { constructor(ctx){ super(key, ctx, msgPrfix); } }; } export const ERR_FS_EISDIR = makeSystemErrorWithCode("ERR_FS_EISDIR", "Path is a directory"); function createInvalidArgType(name, expected) { // https://github.com/nodejs/node/blob/f3eb224/lib/internal/errors.js#L1037-L1087 expected = Array.isArray(expected) ? expected : [ expected ]; let msg = "The "; if (name.endsWith(" argument")) { // For cases like 'first argument' msg += `${name} `; } else { const type = name.includes(".") ? "property" : "argument"; msg += `"${name}" ${type} `; } msg += "must be "; const types = []; const instances = []; const other = []; for (const value of expected){ if (kTypes.includes(value)) { types.push(value.toLocaleLowerCase()); } else if (classRegExp.test(value)) { instances.push(value); } else { other.push(value); } } // Special handle `object` in case other instances are allowed to outline // the differences between each other. if (instances.length > 0) { const pos = types.indexOf("object"); if (pos !== -1) { types.splice(pos, 1); instances.push("Object"); } } if (types.length > 0) { if (types.length > 2) { const last = types.pop(); msg += `one of type ${types.join(", ")}, or ${last}`; } else if (types.length === 2) { msg += `one of type ${types[0]} or ${types[1]}`; } else { msg += `of type ${types[0]}`; } if (instances.length > 0 || other.length > 0) { msg += " or "; } } if (instances.length > 0) { if (instances.length > 2) { const last = instances.pop(); msg += `an instance of ${instances.join(", ")}, or ${last}`; } else { msg += `an instance of ${instances[0]}`; if (instances.length === 2) { msg += ` or ${instances[1]}`; } } if (other.length > 0) { msg += " or "; } } if (other.length > 0) { if (other.length > 2) { const last = other.pop(); msg += `one of ${other.join(", ")}, or ${last}`; } else if (other.length === 2) { msg += `one of ${other[0]} or ${other[1]}`; } else { if (other[0].toLowerCase() !== other[0]) { msg += "an "; } msg += `${other[0]}`; } } return msg; } export class ERR_INVALID_ARG_TYPE_RANGE extends NodeRangeError { constructor(name, expected, actual){ const msg = createInvalidArgType(name, expected); super("ERR_INVALID_ARG_TYPE", `${msg}.${invalidArgTypeHelper(actual)}`); } } export class ERR_INVALID_ARG_TYPE extends NodeTypeError { constructor(name, expected, actual){ const msg = createInvalidArgType(name, expected); super("ERR_INVALID_ARG_TYPE", `${msg}.${invalidArgTypeHelper(actual)}`); } static RangeError = ERR_INVALID_ARG_TYPE_RANGE; } export class ERR_INVALID_ARG_VALUE_RANGE extends NodeRangeError { constructor(name, value, reason = "is invalid"){ const type = name.includes(".") ? "property" : "argument"; const inspected = inspect(value); super("ERR_INVALID_ARG_VALUE", `The ${type} '${name}' ${reason}. Received ${inspected}`); } } export class ERR_INVALID_ARG_VALUE extends NodeTypeError { constructor(name, value, reason = "is invalid"){ const type = name.includes(".") ? "property" : "argument"; const inspected = inspect(value); super("ERR_INVALID_ARG_VALUE", `The ${type} '${name}' ${reason}. Received ${inspected}`); } static RangeError = ERR_INVALID_ARG_VALUE_RANGE; } // A helper function to simplify checking for ERR_INVALID_ARG_TYPE output. // deno-lint-ignore no-explicit-any function invalidArgTypeHelper(input) { if (input == null) { return ` Received ${input}`; } if (typeof input === "function" && input.name) { return ` Received function ${input.name}`; } if (typeof input === "object") { if (input.constructor && input.constructor.name) { return ` Received an instance of ${input.constructor.name}`; } return ` Received ${inspect(input, { depth: -1 })}`; } let inspected = inspect(input, { colors: false }); if (inspected.length > 25) { inspected = `${inspected.slice(0, 25)}...`; } return ` Received type ${typeof input} (${inspected})`; } export class ERR_OUT_OF_RANGE extends RangeError { code = "ERR_OUT_OF_RANGE"; constructor(str, range, input, replaceDefaultBoolean = false){ assert(range, 'Missing "range" argument'); let msg = replaceDefaultBoolean ? str : `The value of "${str}" is out of range.`; let received; if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) { received = addNumericalSeparator(String(input)); } else if (typeof input === "bigint") { received = String(input); if (input > 2n ** 32n || input < -(2n ** 32n)) { received = addNumericalSeparator(received); } received += "n"; } else { received = inspect(input); } msg += ` It must be ${range}. Received ${received}`; super(msg); const { name } = this; // Add the error code to the name to include it in the stack trace. this.name = `${name} [${this.code}]`; // Access the stack to generate the error message including the error code from the name. this.stack; // Reset the name to the actual name. this.name = name; } } export class ERR_AMBIGUOUS_ARGUMENT extends NodeTypeError { constructor(x, y){ super("ERR_AMBIGUOUS_ARGUMENT", `The "${x}" argument is ambiguous. ${y}`); } } export class ERR_ARG_NOT_ITERABLE extends NodeTypeError { constructor(x){ super("ERR_ARG_NOT_ITERABLE", `${x} must be iterable`); } } export class ERR_ASSERTION extends NodeError { constructor(x){ super("ERR_ASSERTION", `${x}`); } } export class ERR_ASYNC_CALLBACK extends NodeTypeError { constructor(x){ super("ERR_ASYNC_CALLBACK", `${x} must be a function`); } } export class ERR_ASYNC_TYPE extends NodeTypeError { constructor(x){ super("ERR_ASYNC_TYPE", `Invalid name for async "type": ${x}`); } } export class ERR_BROTLI_INVALID_PARAM extends NodeRangeError { constructor(x){ super("ERR_BROTLI_INVALID_PARAM", `${x} is not a valid Brotli parameter`); } } export class ERR_BUFFER_OUT_OF_BOUNDS extends NodeRangeError { constructor(name){ super("ERR_BUFFER_OUT_OF_BOUNDS", name ? `"${name}" is outside of buffer bounds` : "Attempt to access memory outside buffer bounds"); } } export class ERR_BUFFER_TOO_LARGE extends NodeRangeError { constructor(x){ super("ERR_BUFFER_TOO_LARGE", `Cannot create a Buffer larger than ${x} bytes`); } } export class ERR_CANNOT_WATCH_SIGINT extends NodeError { constructor(){ super("ERR_CANNOT_WATCH_SIGINT", "Cannot watch for SIGINT signals"); } } export class ERR_CHILD_CLOSED_BEFORE_REPLY extends NodeError { constructor(){ super("ERR_CHILD_CLOSED_BEFORE_REPLY", "Child closed before reply received"); } } export class ERR_CHILD_PROCESS_IPC_REQUIRED extends NodeError { constructor(x){ super("ERR_CHILD_PROCESS_IPC_REQUIRED", `Forked processes must have an IPC channel, missing value 'ipc' in ${x}`); } } export class ERR_CHILD_PROCESS_STDIO_MAXBUFFER extends NodeRangeError { constructor(x){ super("ERR_CHILD_PROCESS_STDIO_MAXBUFFER", `${x} maxBuffer length exceeded`); } } export class ERR_CONSOLE_WRITABLE_STREAM extends NodeTypeError { constructor(x){ super("ERR_CONSOLE_WRITABLE_STREAM", `Console expects a writable stream instance for ${x}`); } } export class ERR_CONTEXT_NOT_INITIALIZED extends NodeError { constructor(){ super("ERR_CONTEXT_NOT_INITIALIZED", "context used is not initialized"); } } export class ERR_CPU_USAGE extends NodeError { constructor(x){ super("ERR_CPU_USAGE", `Unable to obtain cpu usage ${x}`); } } export class ERR_CRYPTO_CUSTOM_ENGINE_NOT_SUPPORTED extends NodeError { constructor(){ super("ERR_CRYPTO_CUSTOM_ENGINE_NOT_SUPPORTED", "Custom engines not supported by this OpenSSL"); } } export class ERR_CRYPTO_ECDH_INVALID_FORMAT extends NodeTypeError { constructor(x){ super("ERR_CRYPTO_ECDH_INVALID_FORMAT", `Invalid ECDH format: ${x}`); } } export class ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY extends NodeError { constructor(){ super("ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY", "Public key is not valid for specified curve"); } } export class ERR_CRYPTO_UNKNOWN_DH_GROUP extends NodeError { constructor(){ super("ERR_CRYPTO_UNKNOWN_DH_GROUP", "Unknown DH group"); } } export class ERR_CRYPTO_ENGINE_UNKNOWN extends NodeError { constructor(x){ super("ERR_CRYPTO_ENGINE_UNKNOWN", `Engine "${x}" was not found`); } } export class ERR_CRYPTO_FIPS_FORCED extends NodeError { constructor(){ super("ERR_CRYPTO_FIPS_FORCED", "Cannot set FIPS mode, it was forced with --force-fips at startup."); } } export class ERR_CRYPTO_FIPS_UNAVAILABLE extends NodeError { constructor(){ super("ERR_CRYPTO_FIPS_UNAVAILABLE", "Cannot set FIPS mode in a non-FIPS build."); } } export class ERR_CRYPTO_HASH_FINALIZED extends NodeError { constructor(){ super("ERR_CRYPTO_HASH_FINALIZED", "Digest already called"); } } export class ERR_CRYPTO_HASH_UPDATE_FAILED extends NodeError { constructor(){ super("ERR_CRYPTO_HASH_UPDATE_FAILED", "Hash update failed"); } } export class ERR_CRYPTO_INCOMPATIBLE_KEY extends NodeError { constructor(x, y){ super("ERR_CRYPTO_INCOMPATIBLE_KEY", `Incompatible ${x}: ${y}`); } } export class ERR_CRYPTO_INCOMPATIBLE_KEY_OPTIONS extends NodeError { constructor(x, y){ super("ERR_CRYPTO_INCOMPATIBLE_KEY_OPTIONS", `The selected key encoding ${x} ${y}.`); } } export class ERR_CRYPTO_INVALID_DIGEST extends NodeTypeError { constructor(x){ super("ERR_CRYPTO_INVALID_DIGEST", `Invalid digest: ${x}`); } } export class ERR_CRYPTO_INVALID_KEY_OBJECT_TYPE extends NodeTypeError { constructor(x, y){ super("ERR_CRYPTO_INVALID_KEY_OBJECT_TYPE", `Invalid key object type ${x}, expected ${y}.`); } } export class ERR_CRYPTO_INVALID_STATE extends NodeError { constructor(x){ super("ERR_CRYPTO_INVALID_STATE", `Invalid state for operation ${x}`); } } export class ERR_CRYPTO_PBKDF2_ERROR extends NodeError { constructor(){ super("ERR_CRYPTO_PBKDF2_ERROR", "PBKDF2 error"); } } export class ERR_CRYPTO_SCRYPT_INVALID_PARAMETER extends NodeError { constructor(){ super("ERR_CRYPTO_SCRYPT_INVALID_PARAMETER", "Invalid scrypt parameter"); } } export class ERR_CRYPTO_SCRYPT_NOT_SUPPORTED extends NodeError { constructor(){ super("ERR_CRYPTO_SCRYPT_NOT_SUPPORTED", "Scrypt algorithm not supported"); } } export class ERR_CRYPTO_SIGN_KEY_REQUIRED extends NodeError { constructor(){ super("ERR_CRYPTO_SIGN_KEY_REQUIRED", "No key provided to sign"); } } export class ERR_DIR_CLOSED extends NodeError { constructor(){ super("ERR_DIR_CLOSED", "Directory handle was closed"); } } export class ERR_DIR_CONCURRENT_OPERATION extends NodeError { constructor(){ super("ERR_DIR_CONCURRENT_OPERATION", "Cannot do synchronous work on directory handle with concurrent asynchronous operations"); } } export class ERR_DNS_SET_SERVERS_FAILED extends NodeError { constructor(x, y){ super("ERR_DNS_SET_SERVERS_FAILED", `c-ares failed to set servers: "${x}" [${y}]`); } } export class ERR_DOMAIN_CALLBACK_NOT_AVAILABLE extends NodeError { constructor(){ super("ERR_DOMAIN_CALLBACK_NOT_AVAILABLE", "A callback was registered through " + "process.setUncaughtExceptionCaptureCallback(), which is mutually " + "exclusive with using the `domain` module"); } } export class ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE extends NodeError { constructor(){ super("ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE", "The `domain` module is in use, which is mutually exclusive with calling " + "process.setUncaughtExceptionCaptureCallback()"); } } export class ERR_ENCODING_INVALID_ENCODED_DATA extends NodeErrorAbstraction { errno; constructor(encoding, ret){ super(TypeError.prototype.name, "ERR_ENCODING_INVALID_ENCODED_DATA", `The encoded data was not valid for encoding ${encoding}`); Object.setPrototypeOf(this, TypeError.prototype); this.errno = ret; } } export class ERR_ENCODING_NOT_SUPPORTED extends NodeRangeError { constructor(x){ super("ERR_ENCODING_NOT_SUPPORTED", `The "${x}" encoding is not supported`); } } export class ERR_EVAL_ESM_CANNOT_PRINT extends NodeError { constructor(){ super("ERR_EVAL_ESM_CANNOT_PRINT", `--print cannot be used with ESM input`); } } export class ERR_EVENT_RECURSION extends NodeError { constructor(x){ super("ERR_EVENT_RECURSION", `The event "${x}" is already being dispatched`); } } export class ERR_FEATURE_UNAVAILABLE_ON_PLATFORM extends NodeTypeError { constructor(x){ super("ERR_FEATURE_UNAVAILABLE_ON_PLATFORM", `The feature ${x} is unavailable on the current platform, which is being used to run Node.js`); } } export class ERR_FS_FILE_TOO_LARGE extends NodeRangeError { constructor(x){ super("ERR_FS_FILE_TOO_LARGE", `File size (${x}) is greater than 2 GB`); } } export class ERR_FS_INVALID_SYMLINK_TYPE extends NodeError { constructor(x){ super("ERR_FS_INVALID_SYMLINK_TYPE", `Symlink type must be one of "dir", "file", or "junction". Received "${x}"`); } } export class ERR_HTTP2_ALTSVC_INVALID_ORIGIN extends NodeTypeError { constructor(){ super("ERR_HTTP2_ALTSVC_INVALID_ORIGIN", `HTTP/2 ALTSVC frames require a valid origin`); } } export class ERR_HTTP2_ALTSVC_LENGTH extends NodeTypeError { constructor(){ super("ERR_HTTP2_ALTSVC_LENGTH", `HTTP/2 ALTSVC frames are limited to 16382 bytes`); } } export class ERR_HTTP2_CONNECT_AUTHORITY extends NodeError { constructor(){ super("ERR_HTTP2_CONNECT_AUTHORITY", `:authority header is required for CONNECT requests`); } } export class ERR_HTTP2_CONNECT_PATH extends NodeError { constructor(){ super("ERR_HTTP2_CONNECT_PATH", `The :path header is forbidden for CONNECT requests`); } } export class ERR_HTTP2_CONNECT_SCHEME extends NodeError { constructor(){ super("ERR_HTTP2_CONNECT_SCHEME", `The :scheme header is forbidden for CONNECT requests`); } } export class ERR_HTTP2_GOAWAY_SESSION extends NodeError { constructor(){ super("ERR_HTTP2_GOAWAY_SESSION", `New streams cannot be created after receiving a GOAWAY`); } } export class ERR_HTTP2_HEADERS_AFTER_RESPOND extends NodeError { constructor(){ super("ERR_HTTP2_HEADERS_AFTER_RESPOND", `Cannot specify additional headers after response initiated`); } } export class ERR_HTTP2_HEADERS_SENT extends NodeError { constructor(){ super("ERR_HTTP2_HEADERS_SENT", `Response has already been initiated.`); } } export class ERR_HTTP2_HEADER_SINGLE_VALUE extends NodeTypeError { constructor(x){ super("ERR_HTTP2_HEADER_SINGLE_VALUE", `Header field "${x}" must only have a single value`); } } export class ERR_HTTP2_INFO_STATUS_NOT_ALLOWED extends NodeRangeError { constructor(){ super("ERR_HTTP2_INFO_STATUS_NOT_ALLOWED", `Informational status codes cannot be used`); } } export class ERR_HTTP2_INVALID_CONNECTION_HEADERS extends NodeTypeError { constructor(x){ super("ERR_HTTP2_INVALID_CONNECTION_HEADERS", `HTTP/1 Connection specific headers are forbidden: "${x}"`); } } export class ERR_HTTP2_INVALID_HEADER_VALUE extends NodeTypeError { constructor(x, y){ super("ERR_HTTP2_INVALID_HEADER_VALUE", `Invalid value "${x}" for header "${y}"`); } } export class ERR_HTTP2_INVALID_INFO_STATUS extends NodeRangeError { constructor(x){ super("ERR_HTTP2_INVALID_INFO_STATUS", `Invalid informational status code: ${x}`); } } export class ERR_HTTP2_INVALID_ORIGIN extends NodeTypeError { constructor(){ super("ERR_HTTP2_INVALID_ORIGIN", `HTTP/2 ORIGIN frames require a valid origin`); } } export class ERR_HTTP2_INVALID_PACKED_SETTINGS_LENGTH extends NodeRangeError { constructor(){ super("ERR_HTTP2_INVALID_PACKED_SETTINGS_LENGTH", `Packed settings length must be a multiple of six`); } } export class ERR_HTTP2_INVALID_PSEUDOHEADER extends NodeTypeError { constructor(x){ super("ERR_HTTP2_INVALID_PSEUDOHEADER", `"${x}" is an invalid pseudoheader or is used incorrectly`); } } export class ERR_HTTP2_INVALID_SESSION extends NodeError { constructor(){ super("ERR_HTTP2_INVALID_SESSION", `The session has been destroyed`); } } export class ERR_HTTP2_INVALID_STREAM extends NodeError { constructor(){ super("ERR_HTTP2_INVALID_STREAM", `The stream has been destroyed`); } } export class ERR_HTTP2_MAX_PENDING_SETTINGS_ACK extends NodeError { constructor(){ super("ERR_HTTP2_MAX_PENDING_SETTINGS_ACK", `Maximum number of pending settings acknowledgements`); } } export class ERR_HTTP2_NESTED_PUSH extends NodeError { constructor(){ super("ERR_HTTP2_NESTED_PUSH", `A push stream cannot initiate another push stream.`); } } export class ERR_HTTP2_NO_SOCKET_MANIPULATION extends NodeError { constructor(){ super("ERR_HTTP2_NO_SOCKET_MANIPULATION", `HTTP/2 sockets should not be directly manipulated (e.g. read and written)`); } } export class ERR_HTTP2_ORIGIN_LENGTH extends NodeTypeError { constructor(){ super("ERR_HTTP2_ORIGIN_LENGTH", `HTTP/2 ORIGIN frames are limited to 16382 bytes`); } } export class ERR_HTTP2_OUT_OF_STREAMS extends NodeError { constructor(){ super("ERR_HTTP2_OUT_OF_STREAMS", `No stream ID is available because maximum stream ID has been reached`); } } export class ERR_HTTP2_PAYLOAD_FORBIDDEN extends NodeError { constructor(x){ super("ERR_HTTP2_PAYLOAD_FORBIDDEN", `Responses with ${x} status must not have a payload`); } } export class ERR_HTTP2_PING_CANCEL extends NodeError { constructor(){ super("ERR_HTTP2_PING_CANCEL", `HTTP2 ping cancelled`); } } export class ERR_HTTP2_PING_LENGTH extends NodeRangeError { constructor(){ super("ERR_HTTP2_PING_LENGTH", `HTTP2 ping payload must be 8 bytes`); } } export class ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED extends NodeTypeError { constructor(){ super("ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED", `Cannot set HTTP/2 pseudo-headers`); } } export class ERR_HTTP2_PUSH_DISABLED extends NodeError { constructor(){ super("ERR_HTTP2_PUSH_DISABLED", `HTTP/2 client has disabled push streams`); } } export class ERR_HTTP2_SEND_FILE extends NodeError { constructor(){ super("ERR_HTTP2_SEND_FILE", `Directories cannot be sent`); } } export class ERR_HTTP2_SEND_FILE_NOSEEK extends NodeError { constructor(){ super("ERR_HTTP2_SEND_FILE_NOSEEK", `Offset or length can only be specified for regular files`); } } export class ERR_HTTP2_SESSION_ERROR extends NodeError { constructor(x){ super("ERR_HTTP2_SESSION_ERROR", `Session closed with error code ${x}`); } } export class ERR_HTTP2_SETTINGS_CANCEL extends NodeError { constructor(){ super("ERR_HTTP2_SETTINGS_CANCEL", `HTTP2 session settings canceled`); } } export class ERR_HTTP2_SOCKET_BOUND extends NodeError { constructor(){ super("ERR_HTTP2_SOCKET_BOUND", `The socket is already bound to an Http2Session`); } } export class ERR_HTTP2_SOCKET_UNBOUND extends NodeError { constructor(){ super("ERR_HTTP2_SOCKET_UNBOUND", `The socket has been disconnected from the Http2Session`); } } export class ERR_HTTP2_STATUS_101 extends NodeError { constructor(){ super("ERR_HTTP2_STATUS_101", `HTTP status code 101 (Switching Protocols) is forbidden in HTTP/2`); } } export class ERR_HTTP2_STATUS_INVALID extends NodeRangeError { constructor(x){ super("ERR_HTTP2_STATUS_INVALID", `Invalid status code: ${x}`); } } export class ERR_HTTP2_STREAM_ERROR extends NodeError { constructor(x){ super("ERR_HTTP2_STREAM_ERROR", `Stream closed with error code ${x}`); } } export class ERR_HTTP2_STREAM_SELF_DEPENDENCY extends NodeError { constructor(){ super("ERR_HTTP2_STREAM_SELF_DEPENDENCY", `A stream cannot depend on itself`); } } export class ERR_HTTP2_TRAILERS_ALREADY_SENT extends NodeError { constructor(){ super("ERR_HTTP2_TRAILERS_ALREADY_SENT", `Trailing headers have already been sent`); } } export class ERR_HTTP2_TRAILERS_NOT_READY extends NodeError { constructor(){ super("ERR_HTTP2_TRAILERS_NOT_READY", `Trailing headers cannot be sent until after the wantTrailers event is emitted`); } } export class ERR_HTTP2_UNSUPPORTED_PROTOCOL extends NodeError { constructor(x){ super("ERR_HTTP2_UNSUPPORTED_PROTOCOL", `protocol "${x}" is unsupported.`); } } export class ERR_HTTP_HEADERS_SENT extends NodeError { constructor(x){ super("ERR_HTTP_HEADERS_SENT", `Cannot ${x} headers after they are sent to the client`); } } export class ERR_HTTP_INVALID_HEADER_VALUE extends NodeTypeError { constructor(x, y){ super("ERR_HTTP_INVALID_HEADER_VALUE", `Invalid value "${x}" for header "${y}"`); } } export class ERR_HTTP_INVALID_STATUS_CODE extends NodeRangeError { constructor(x){ super("ERR_HTTP_INVALID_STATUS_CODE", `Invalid status code: ${x}`); } } export class ERR_HTTP_SOCKET_ENCODING extends NodeError { constructor(){ super("ERR_HTTP_SOCKET_ENCODING", `Changing the socket encoding is not allowed per RFC7230 Section 3.`); } } export class ERR_HTTP_TRAILER_INVALID extends NodeError { constructor(){ super("ERR_HTTP_TRAILER_INVALID", `Trailers are invalid with this transfer encoding`); } } export class ERR_INCOMPATIBLE_OPTION_PAIR extends NodeTypeError { constructor(x, y){ super("ERR_INCOMPATIBLE_OPTION_PAIR", `Option "${x}" cannot be used in combination with option "${y}"`); } } export class ERR_INPUT_TYPE_NOT_ALLOWED extends NodeError { constructor(){ super("ERR_INPUT_TYPE_NOT_ALLOWED", `--input-type can only be used with string input via --eval, --print, or STDIN`); } } export class ERR_INSPECTOR_ALREADY_ACTIVATED extends NodeError { constructor(){ super("ERR_INSPECTOR_ALREADY_ACTIVATED", `Inspector is already activated. Close it with inspector.close() before activating it again.`); } } export class ERR_INSPECTOR_ALREADY_CONNECTED extends NodeError { constructor(x){ super("ERR_INSPECTOR_ALREADY_CONNECTED", `${x} is already connected`); } } export class ERR_INSPECTOR_CLOSED extends NodeError { constructor(){ super("ERR_INSPECTOR_CLOSED", `Session was closed`); } } export class ERR_INSPECTOR_COMMAND extends NodeError { constructor(x, y){ super("ERR_INSPECTOR_COMMAND", `Inspector error ${x}: ${y}`); } } export class ERR_INSPECTOR_NOT_ACTIVE extends NodeError { constructor(){ super("ERR_INSPECTOR_NOT_ACTIVE", `Inspector is not active`); } } export class ERR_INSPECTOR_NOT_AVAILABLE extends NodeError { constructor(){ super("ERR_INSPECTOR_NOT_AVAILABLE", `Inspector is not available`); } } export class ERR_INSPECTOR_NOT_CONNECTED extends NodeError { constructor(){ super("ERR_INSPECTOR_NOT_CONNECTED", `Session is not connected`); } } export class ERR_INSPECTOR_NOT_WORKER extends NodeError { constructor(){ super("ERR_INSPECTOR_NOT_WORKER", `Current thread is not a worker`); } } export class ERR_INVALID_ASYNC_ID extends NodeRangeError { constructor(x, y){ super("ERR_INVALID_ASYNC_ID", `Invalid ${x} value: ${y}`); } } export class ERR_INVALID_BUFFER_SIZE extends NodeRangeError { constructor(x){ super("ERR_INVALID_BUFFER_SIZE", `Buffer size must be a multiple of ${x}`); } } export class ERR_INVALID_CURSOR_POS extends NodeTypeError { constructor(){ super("ERR_INVALID_CURSOR_POS", `Cannot set cursor row without setting its column`); } } export class ERR_INVALID_FD extends NodeRangeError { constructor(x){ super("ERR_INVALID_FD", `"fd" must be a positive integer: ${x}`); } } export class ERR_INVALID_FD_TYPE extends NodeTypeError { constructor(x){ super("ERR_INVALID_FD_TYPE", `Unsupported fd type: ${x}`); } } export class ERR_INVALID_FILE_URL_HOST extends NodeTypeError { constructor(x){ super("ERR_INVALID_FILE_URL_HOST", `File URL host must be "localhost" or empty on ${x}`); } } export class ERR_INVALID_FILE_URL_PATH extends NodeTypeError { constructor(x){ super("ERR_INVALID_FILE_URL_PATH", `File URL path ${x}`); } } export class ERR_INVALID_HANDLE_TYPE extends NodeTypeError { constructor(){ super("ERR_INVALID_HANDLE_TYPE", `This handle type cannot be sent`); } } export class ERR_INVALID_HTTP_TOKEN extends NodeTypeError { constructor(x, y){ super("ERR_INVALID_HTTP_TOKEN", `${x} must be a valid HTTP token ["${y}"]`); } } export class ERR_INVALID_IP_ADDRESS extends NodeTypeError { constructor(x){ super("ERR_INVALID_IP_ADDRESS", `Invalid IP address: ${x}`); } } export class ERR_INVALID_OPT_VALUE_ENCODING extends NodeTypeError { constructor(x){ super("ERR_INVALID_OPT_VALUE_ENCODING", `The value "${x}" is invalid for option "encoding"`); } } export class ERR_INVALID_PERFORMANCE_MARK extends NodeError { constructor(x){ super("ERR_INVALID_PERFORMANCE_MARK", `The "${x}" performance mark has not been set`); } } export class ERR_INVALID_PROTOCOL extends NodeTypeError { constructor(x, y){ super("ERR_INVALID_PROTOCOL", `Protocol "${x}" not supported. Expected "${y}"`); } } export class ERR_INVALID_REPL_EVAL_CONFIG extends NodeTypeError { constructor(){ super("ERR_INVALID_REPL_EVAL_CONFIG", `Cannot specify both "breakEvalOnSigint" and "eval" for REPL`); } } export class ERR_INVALID_REPL_INPUT extends NodeTypeError { constructor(x){ super("ERR_INVALID_REPL_INPUT", `${x}`); } } export class ERR_INVALID_SYNC_FORK_INPUT extends NodeTypeError { constructor(x){ super("ERR_INVALID_SYNC_FORK_INPUT", `Asynchronous forks do not support Buffer, TypedArray, DataView or string input: ${x}`); } } export class ERR_INVALID_THIS extends NodeTypeError { constructor(x){ super("ERR_INVALID_THIS", `Value of "this" must be of type ${x}`); } } export class ERR_INVALID_TUPLE extends NodeTypeError { constructor(x, y){ super("ERR_INVALID_TUPLE", `${x} must be an iterable ${y} tuple`); } } export class ERR_INVALID_URI extends NodeURIError { constructor(){ super("ERR_INVALID_URI", `URI malformed`); } } export class ERR_IPC_CHANNEL_CLOSED extends NodeError { constructor(){ super("ERR_IPC_CHANNEL_CLOSED", `Channel closed`); } } export class ERR_IPC_DISCONNECTED extends NodeError { constructor(){ super("ERR_IPC_DISCONNECTED", `IPC channel is already disconnected`); } } export class ERR_IPC_ONE_PIPE extends NodeError { constructor(){ super("ERR_IPC_ONE_PIPE", `Child process can have only one IPC pipe`); } } export class ERR_IPC_SYNC_FORK extends NodeError { constructor(){ super("ERR_IPC_SYNC_FORK", `IPC cannot be used with synchronous forks`); } } export class ERR_MANIFEST_DEPENDENCY_MISSING extends NodeError { constructor(x, y){ super("ERR_MANIFEST_DEPENDENCY_MISSING", `Manifest resource ${x} does not list ${y} as a dependency specifier`); } } export class ERR_MANIFEST_INTEGRITY_MISMATCH extends NodeSyntaxError { constructor(x){ super("ERR_MANIFEST_INTEGRITY_MISMATCH", `Manifest resource ${x} has multiple entries but integrity lists do not match`); } } export class ERR_MANIFEST_INVALID_RESOURCE_FIELD extends NodeTypeError { constructor(x, y){ super("ERR_MANIFEST_INVALID_RESOURCE_FIELD", `Manifest resource ${x} has invalid property value for ${y}`); } } export class ERR_MANIFEST_TDZ extends NodeError { constructor(){ super("ERR_MANIFEST_TDZ", `Manifest initialization has not yet run`); } } export class ERR_MANIFEST_UNKNOWN_ONERROR extends NodeSyntaxError { constructor(x){ super("ERR_MANIFEST_UNKNOWN_ONERROR", `Manifest specified unknown error behavior "${x}".`); } } export class ERR_METHOD_NOT_IMPLEMENTED extends NodeError { constructor(x){ super("ERR_METHOD_NOT_IMPLEMENTED", `The ${x} method is not implemented`); } } export class ERR_MISSING_ARGS extends NodeTypeError { constructor(...args){ let msg = "The "; const len = args.length; const wrap = (a)=>`"${a}"`; args = args.map((a)=>Array.isArray(a) ? a.map(wrap).join(" or ") : wrap(a)); switch(len){ case 1: msg += `${args[0]} argument`; break; case 2: msg += `${args[0]} and ${args[1]} arguments`; break; default: msg += args.slice(0, len - 1).join(", "); msg += `, and ${args[len - 1]} arguments`; break; } super("ERR_MISSING_ARGS", `${msg} must be specified`); } } export class ERR_MISSING_OPTION extends NodeTypeError { constructor(x){ super("ERR_MISSING_OPTION", `${x} is required`); } } export class ERR_MULTIPLE_CALLBACK extends NodeError { constructor(){ super("ERR_MULTIPLE_CALLBACK", `Callback called multiple times`); } } export class ERR_NAPI_CONS_FUNCTION extends NodeTypeError { constructor(){ super("ERR_NAPI_CONS_FUNCTION", `Constructor must be a function`); } } export class ERR_NAPI_INVALID_DATAVIEW_ARGS extends NodeRangeError { constructor(){ super("ERR_NAPI_INVALID_DATAVIEW_ARGS", `byte_offset + byte_length should be less than or equal to the size in bytes of the array passed in`); } } export class ERR_NAPI_INVALID_TYPEDARRAY_ALIGNMENT extends NodeRangeError { constructor(x, y){ super("ERR_NAPI_INVALID_TYPEDARRAY_ALIGNMENT", `start offset of ${x} should be a multiple of ${y}`); } } export class ERR_NAPI_INVALID_TYPEDARRAY_LENGTH extends NodeRangeError { constructor(){ super("ERR_NAPI_INVALID_TYPEDARRAY_LENGTH", `Invalid typed array length`); } } export class ERR_NO_CRYPTO extends NodeError { constructor(){ super("ERR_NO_CRYPTO", `Node.js is not compiled with OpenSSL crypto support`); } } export class ERR_NO_ICU extends NodeTypeError { constructor(x){ super("ERR_NO_ICU", `${x} is not supported on Node.js compiled without ICU`); } } export class ERR_QUICCLIENTSESSION_FAILED extends NodeError { constructor(x){ super("ERR_QUICCLIENTSESSION_FAILED", `Failed to create a new QuicClientSession: ${x}`); } } export class ERR_QUICCLIENTSESSION_FAILED_SETSOCKET extends NodeError { constructor(){ super("ERR_QUICCLIENTSESSION_FAILED_SETSOCKET", `Failed to set the QuicSocket`); } } export class ERR_QUICSESSION_DESTROYED extends NodeError { constructor(x){ super("ERR_QUICSESSION_DESTROYED", `Cannot call ${x} after a QuicSession has been destroyed`); } } export class ERR_QUICSESSION_INVALID_DCID extends NodeError { constructor(x){ super("ERR_QUICSESSION_INVALID_DCID", `Invalid DCID value: ${x}`); } } export class ERR_QUICSESSION_UPDATEKEY extends NodeError { constructor(){ super("ERR_QUICSESSION_UPDATEKEY", `Unable to update QuicSession keys`); } } export class ERR_QUICSOCKET_DESTROYED extends NodeError { constructor(x){ super("ERR_QUICSOCKET_DESTROYED", `Cannot call ${x} after a QuicSocket has been destroyed`); } } export class ERR_QUICSOCKET_INVALID_STATELESS_RESET_SECRET_LENGTH extends NodeError { constructor(){ super("ERR_QUICSOCKET_INVALID_STATELESS_RESET_SECRET_LENGTH", `The stateResetToken must be exactly 16-bytes in length`); } } export class ERR_QUICSOCKET_LISTENING extends NodeError { constructor(){ super("ERR_QUICSOCKET_LISTENING", `This QuicSocket is already listening`); } } export class ERR_QUICSOCKET_UNBOUND extends NodeError { constructor(x){ super("ERR_QUICSOCKET_UNBOUND", `Cannot call ${x} before a QuicSocket has been bound`); } } export class ERR_QUICSTREAM_DESTROYED extends NodeError { constructor(x){ super("ERR_QUICSTREAM_DESTROYED", `Cannot call ${x} after a QuicStream has been destroyed`); } } export class ERR_QUICSTREAM_INVALID_PUSH extends NodeError { constructor(){ super("ERR_QUICSTREAM_INVALID_PUSH", `Push streams are only supported on client-initiated, bidirectional streams`); } } export class ERR_QUICSTREAM_OPEN_FAILED extends NodeError { constructor(){ super("ERR_QUICSTREAM_OPEN_FAILED", `Opening a new QuicStream failed`); } } export class ERR_QUICSTREAM_UNSUPPORTED_PUSH extends NodeError { constructor(){ super("ERR_QUICSTREAM_UNSUPPORTED_PUSH", `Push streams are not supported on this QuicSession`); } } export class ERR_QUIC_TLS13_REQUIRED extends NodeError { constructor(){ super("ERR_QUIC_TLS13_REQUIRED", `QUIC requires TLS version 1.3`); } } export class ERR_SCRIPT_EXECUTION_INTERRUPTED extends NodeError { constructor(){ super("ERR_SCRIPT_EXECUTION_INTERRUPTED", "Script execution was interrupted by `SIGINT`"); } } export class ERR_SERVER_ALREADY_LISTEN extends NodeError { constructor(){ super("ERR_SERVER_ALREADY_LISTEN", `Listen method has been called more than once without closing.`); } } export class ERR_SERVER_NOT_RUNNING extends NodeError { constructor(){ super("ERR_SERVER_NOT_RUNNING", `Server is not running.`); } } export class ERR_SOCKET_ALREADY_BOUND extends NodeError { constructor(){ super("ERR_SOCKET_ALREADY_BOUND", `Socket is already bound`); } } export class ERR_SOCKET_BAD_BUFFER_SIZE extends NodeTypeError { constructor(){ super("ERR_SOCKET_BAD_BUFFER_SIZE", `Buffer size must be a positive integer`); } } export class ERR_SOCKET_BAD_PORT extends NodeRangeError { constructor(name, port, allowZero = true){ assert(typeof allowZero === "boolean", "The 'allowZero' argument must be of type boolean."); const operator = allowZero ? ">=" : ">"; super("ERR_SOCKET_BAD_PORT", `${name} should be ${operator} 0 and < 65536. Received ${port}.`); } } export class ERR_SOCKET_BAD_TYPE extends NodeTypeError { constructor(){ super("ERR_SOCKET_BAD_TYPE", `Bad socket type specified. Valid types are: udp4, udp6`); } } export class ERR_SOCKET_BUFFER_SIZE extends NodeSystemError { constructor(ctx){ super("ERR_SOCKET_BUFFER_SIZE", ctx, "Could not get or set buffer size"); } } export class ERR_SOCKET_CLOSED extends NodeError { constructor(){ super("ERR_SOCKET_CLOSED", `Socket is closed`); } } export class ERR_SOCKET_DGRAM_IS_CONNECTED extends NodeError { constructor(){ super("ERR_SOCKET_DGRAM_IS_CONNECTED", `Already connected`); } } export class ERR_SOCKET_DGRAM_NOT_CONNECTED extends NodeError { constructor(){ super("ERR_SOCKET_DGRAM_NOT_CONNECTED", `Not connected`); } } export class ERR_SOCKET_DGRAM_NOT_RUNNING extends NodeError { constructor(){ super("ERR_SOCKET_DGRAM_NOT_RUNNING", `Not running`); } } export class ERR_SRI_PARSE extends NodeSyntaxError { constructor(name, char, position){ super("ERR_SRI_PARSE", `Subresource Integrity string ${name} had an unexpected ${char} at position ${position}`); } } export class ERR_STREAM_ALREADY_FINISHED extends NodeError { constructor(x){ super("ERR_STREAM_ALREADY_FINISHED", `Cannot call ${x} after a stream was finished`); } } export class ERR_STREAM_CANNOT_PIPE extends NodeError { constructor(){ super("ERR_STREAM_CANNOT_PIPE", `Cannot pipe, not readable`); } } export class ERR_STREAM_DESTROYED extends NodeError { constructor(x){ super("ERR_STREAM_DESTROYED", `Cannot call ${x} after a stream was destroyed`); } } export class ERR_STREAM_NULL_VALUES extends NodeTypeError { constructor(){ super("ERR_STREAM_NULL_VALUES", `May not write null values to stream`); } } export class ERR_STREAM_PREMATURE_CLOSE extends NodeError { constructor(){ super("ERR_STREAM_PREMATURE_CLOSE", `Premature close`); } } export class ERR_STREAM_PUSH_AFTER_EOF extends NodeError { constructor(){ super("ERR_STREAM_PUSH_AFTER_EOF", `stream.push() after EOF`); } } export class ERR_STREAM_UNSHIFT_AFTER_END_EVENT extends NodeError { constructor(){ super("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", `stream.unshift() after end event`); } } export class ERR_STREAM_WRAP extends NodeError { constructor(){ super("ERR_STREAM_WRAP", `Stream has StringDecoder set or is in objectMode`); } } export class ERR_STREAM_WRITE_AFTER_END extends NodeError { constructor(){ super("ERR_STREAM_WRITE_AFTER_END", `write after end`); } } export class ERR_SYNTHETIC extends NodeError { constructor(){ super("ERR_SYNTHETIC", `JavaScript Callstack`); } } export class ERR_TLS_CERT_ALTNAME_INVALID extends NodeError { reason; host; cert; constructor(reason, host, cert){ super("ERR_TLS_CERT_ALTNAME_INVALID", `Hostname/IP does not match certificate's altnames: ${reason}`); this.reason = reason; this.host = host; this.cert = cert; } } export class ERR_TLS_DH_PARAM_SIZE extends NodeError { constructor(x){ super("ERR_TLS_DH_PARAM_SIZE", `DH parameter size ${x} is less than 2048`); } } export class ERR_TLS_HANDSHAKE_TIMEOUT extends NodeError { constructor(){ super("ERR_TLS_HANDSHAKE_TIMEOUT", `TLS handshake timeout`); } } export class ERR_TLS_INVALID_CONTEXT extends NodeTypeError { constructor(x){ super("ERR_TLS_INVALID_CONTEXT", `${x} must be a SecureContext`); } } export class ERR_TLS_INVALID_STATE extends NodeError { constructor(){ super("ERR_TLS_INVALID_STATE", `TLS socket connection must be securely established`); } } export class ERR_TLS_INVALID_PROTOCOL_VERSION extends NodeTypeError { constructor(protocol, x){ super("ERR_TLS_INVALID_PROTOCOL_VERSION", `${protocol} is not a valid ${x} TLS protocol version`); } } export class ERR_TLS_PROTOCOL_VERSION_CONFLICT extends NodeTypeError { constructor(prevProtocol, protocol){ super("ERR_TLS_PROTOCOL_VERSION_CONFLICT", `TLS protocol version ${prevProtocol} conflicts with secureProtocol ${protocol}`); } } export class ERR_TLS_RENEGOTIATION_DISABLED extends NodeError { constructor(){ super("ERR_TLS_RENEGOTIATION_DISABLED", `TLS session renegotiation disabled for this socket`); } } export class ERR_TLS_REQUIRED_SERVER_NAME extends NodeError { constructor(){ super("ERR_TLS_REQUIRED_SERVER_NAME", `"servername" is required parameter for Server.addContext`); } } export class ERR_TLS_SESSION_ATTACK extends NodeError { constructor(){ super("ERR_TLS_SESSION_ATTACK", `TLS session renegotiation attack detected`); } } export class ERR_TLS_SNI_FROM_SERVER extends NodeError { constructor(){ super("ERR_TLS_SNI_FROM_SERVER", `Cannot issue SNI from a TLS server-side socket`); } } export class ERR_TRACE_EVENTS_CATEGORY_REQUIRED extends NodeTypeError { constructor(){ super("ERR_TRACE_EVENTS_CATEGORY_REQUIRED", `At least one category is required`); } } export class ERR_TRACE_EVENTS_UNAVAILABLE extends NodeError { constructor(){ super("ERR_TRACE_EVENTS_UNAVAILABLE", `Trace events are unavailable`); } } export class ERR_UNAVAILABLE_DURING_EXIT extends NodeError { constructor(){ super("ERR_UNAVAILABLE_DURING_EXIT", `Cannot call function in process exit handler`); } } export class ERR_UNCAUGHT_EXCEPTION_CAPTURE_ALREADY_SET extends NodeError { constructor(){ super("ERR_UNCAUGHT_EXCEPTION_CAPTURE_ALREADY_SET", "`process.setupUncaughtExceptionCapture()` was called while a capture callback was already active"); } } export class ERR_UNESCAPED_CHARACTERS extends NodeTypeError { constructor(x){ super("ERR_UNESCAPED_CHARACTERS", `${x} contains unescaped characters`); } } export class ERR_UNHANDLED_ERROR extends NodeError { constructor(x){ super("ERR_UNHANDLED_ERROR", `Unhandled error. (${x})`); } } export class ERR_UNKNOWN_BUILTIN_MODULE extends NodeError { constructor(x){ super("ERR_UNKNOWN_BUILTIN_MODULE", `No such built-in module: ${x}`); } } export class ERR_UNKNOWN_CREDENTIAL extends NodeError { constructor(x, y){ super("ERR_UNKNOWN_CREDENTIAL", `${x} identifier does not exist: ${y}`); } } export class ERR_UNKNOWN_ENCODING extends NodeTypeError { constructor(x){ super("ERR_UNKNOWN_ENCODING", format("Unknown encoding: %s", x)); } } export class ERR_UNKNOWN_FILE_EXTENSION extends NodeTypeError { constructor(x, y){ super("ERR_UNKNOWN_FILE_EXTENSION", `Unknown file extension "${x}" for ${y}`); } } export class ERR_UNKNOWN_MODULE_FORMAT extends NodeRangeError { constructor(x){ super("ERR_UNKNOWN_MODULE_FORMAT", `Unknown module format: ${x}`); } } export class ERR_UNKNOWN_SIGNAL extends NodeTypeError { constructor(x){ super("ERR_UNKNOWN_SIGNAL", `Unknown signal: ${x}`); } } export class ERR_UNSUPPORTED_DIR_IMPORT extends NodeError { constructor(x, y){ super("ERR_UNSUPPORTED_DIR_IMPORT", `Directory import '${x}' is not supported resolving ES modules, imported from ${y}`); } } export class ERR_UNSUPPORTED_ESM_URL_SCHEME extends NodeError { constructor(){ super("ERR_UNSUPPORTED_ESM_URL_SCHEME", `Only file and data URLs are supported by the default ESM loader`); } } export class ERR_USE_AFTER_CLOSE extends NodeError { constructor(x){ super("ERR_USE_AFTER_CLOSE", `${x} was closed`); } } export class ERR_V8BREAKITERATOR extends NodeError { constructor(){ super("ERR_V8BREAKITERATOR", `Full ICU data not installed. See https://github.com/nodejs/node/wiki/Intl`); } } export class ERR_VALID_PERFORMANCE_ENTRY_TYPE extends NodeError { constructor(){ super("ERR_VALID_PERFORMANCE_ENTRY_TYPE", `At least one valid performance entry type is required`); } } export class ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING extends NodeTypeError { constructor(){ super("ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING", `A dynamic import callback was not specified.`); } } export class ERR_VM_MODULE_ALREADY_LINKED extends NodeError { constructor(){ super("ERR_VM_MODULE_ALREADY_LINKED", `Module has already been linked`); } } export class ERR_VM_MODULE_CANNOT_CREATE_CACHED_DATA extends NodeError { constructor(){ super("ERR_VM_MODULE_CANNOT_CREATE_CACHED_DATA", `Cached data cannot be created for a module which has been evaluated`); } } export class ERR_VM_MODULE_DIFFERENT_CONTEXT extends NodeError { constructor(){ super("ERR_VM_MODULE_DIFFERENT_CONTEXT", `Linked modules must use the same context`); } } export class ERR_VM_MODULE_LINKING_ERRORED extends NodeError { constructor(){ super("ERR_VM_MODULE_LINKING_ERRORED", `Linking has already failed for the provided module`); } } export class ERR_VM_MODULE_NOT_MODULE extends NodeError { constructor(){ super("ERR_VM_MODULE_NOT_MODULE", `Provided module is not an instance of Module`); } } export class ERR_VM_MODULE_STATUS extends NodeError { constructor(x){ super("ERR_VM_MODULE_STATUS", `Module status ${x}`); } } export class ERR_WASI_ALREADY_STARTED extends NodeError { constructor(){ super("ERR_WASI_ALREADY_STARTED", `WASI instance has already started`); } } export class ERR_WORKER_INIT_FAILED extends NodeError { constructor(x){ super("ERR_WORKER_INIT_FAILED", `Worker initialization failure: ${x}`); } } export class ERR_WORKER_NOT_RUNNING extends NodeError { constructor(){ super("ERR_WORKER_NOT_RUNNING", `Worker instance not running`); } } export class ERR_WORKER_OUT_OF_MEMORY extends NodeError { constructor(x){ super("ERR_WORKER_OUT_OF_MEMORY", `Worker terminated due to reaching memory limit: ${x}`); } } export class ERR_WORKER_UNSERIALIZABLE_ERROR extends NodeError { constructor(){ super("ERR_WORKER_UNSERIALIZABLE_ERROR", `Serializing an uncaught exception failed`); } } export class ERR_WORKER_UNSUPPORTED_EXTENSION extends NodeTypeError { constructor(x){ super("ERR_WORKER_UNSUPPORTED_EXTENSION", `The worker script extension must be ".js", ".mjs", or ".cjs". Received "${x}"`); } } export class ERR_WORKER_UNSUPPORTED_OPERATION extends NodeTypeError { constructor(x){ super("ERR_WORKER_UNSUPPORTED_OPERATION", `${x} is not supported in workers`); } } export class ERR_ZLIB_INITIALIZATION_FAILED extends NodeError { constructor(){ super("ERR_ZLIB_INITIALIZATION_FAILED", `Initialization failed`); } } export class ERR_FALSY_VALUE_REJECTION extends NodeError { reason; constructor(reason){ super("ERR_FALSY_VALUE_REJECTION", "Promise was rejected with falsy value"); this.reason = reason; } } export class ERR_HTTP2_INVALID_SETTING_VALUE extends NodeRangeError { actual; min; max; constructor(name, actual, min, max){ super("ERR_HTTP2_INVALID_SETTING_VALUE", `Invalid value for setting "${name}": ${actual}`); this.actual = actual; if (min !== undefined) { this.min = min; this.max = max; } } } export class ERR_HTTP2_STREAM_CANCEL extends NodeError { cause; constructor(error){ super("ERR_HTTP2_STREAM_CANCEL", typeof error.message === "string" ? `The pending stream has been canceled (caused by: ${error.message})` : "The pending stream has been canceled"); if (error) { this.cause = error; } } } export class ERR_INVALID_ADDRESS_FAMILY extends NodeRangeError { host; port; constructor(addressType, host, port){ super("ERR_INVALID_ADDRESS_FAMILY", `Invalid address family: ${addressType} ${host}:${port}`); this.host = host; this.port = port; } } export class ERR_INVALID_CHAR extends NodeTypeError { constructor(name, field){ super("ERR_INVALID_CHAR", field ? `Invalid character in ${name}` : `Invalid character in ${name} ["${field}"]`); } } export class ERR_INVALID_OPT_VALUE extends NodeTypeError { constructor(name, value){ super("ERR_INVALID_OPT_VALUE", `The value "${value}" is invalid for option "${name}"`); } } export class ERR_INVALID_RETURN_PROPERTY extends NodeTypeError { constructor(input, name, prop, value){ super("ERR_INVALID_RETURN_PROPERTY", `Expected a valid ${input} to be returned for the "${prop}" from the "${name}" function but got ${value}.`); } } // deno-lint-ignore no-explicit-any function buildReturnPropertyType(value) { if (value && value.constructor && value.constructor.name) { return `instance of ${value.constructor.name}`; } else { return `type ${typeof value}`; } } export class ERR_INVALID_RETURN_PROPERTY_VALUE extends NodeTypeError { constructor(input, name, prop, value){ super("ERR_INVALID_RETURN_PROPERTY_VALUE", `Expected ${input} to be returned for the "${prop}" from the "${name}" function but got ${buildReturnPropertyType(value)}.`); } } export class ERR_INVALID_RETURN_VALUE extends NodeTypeError { constructor(input, name, value){ super("ERR_INVALID_RETURN_VALUE", `Expected ${input} to be returned from the "${name}" function but got ${determineSpecificType(value)}.`); } } export class ERR_INVALID_URL extends NodeTypeError { input; constructor(input){ super("ERR_INVALID_URL", `Invalid URL: ${input}`); this.input = input; } } export class ERR_INVALID_URL_SCHEME extends NodeTypeError { constructor(expected){ expected = Array.isArray(expected) ? expected : [ expected ]; const res = expected.length === 2 ? `one of scheme ${expected[0]} or ${expected[1]}` : `of scheme ${expected[0]}`; super("ERR_INVALID_URL_SCHEME", `The URL must be ${res}`); } } export class ERR_MODULE_NOT_FOUND extends NodeError { constructor(path, base, type = "package"){ super("ERR_MODULE_NOT_FOUND", `Cannot find ${type} '${path}' imported from ${base}`); } } export class ERR_INVALID_PACKAGE_CONFIG extends NodeError { constructor(path, base, message){ const msg = `Invalid package config ${path}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`; super("ERR_INVALID_PACKAGE_CONFIG", msg); } } export class ERR_INVALID_MODULE_SPECIFIER extends NodeTypeError { constructor(request, reason, base){ super("ERR_INVALID_MODULE_SPECIFIER", `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`); } } export class ERR_INVALID_PACKAGE_TARGET extends NodeError { constructor(pkgPath, key, // deno-lint-ignore no-explicit-any target, isImport, base){ let msg; const relError = typeof target === "string" && !isImport && target.length && !target.startsWith("./"); if (key === ".") { assert(isImport === false); msg = `Invalid "exports" main target ${JSON.stringify(target)} defined ` + `in the package config ${displayJoin(pkgPath, "package.json")}${base ? ` imported from ${base}` : ""}${relError ? '; targets must start with "./"' : ""}`; } else { msg = `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify(target)} defined for '${key}' in the package config ${displayJoin(pkgPath, "package.json")}${base ? ` imported from ${base}` : ""}${relError ? '; targets must start with "./"' : ""}`; } super("ERR_INVALID_PACKAGE_TARGET", msg); } } export class ERR_PACKAGE_IMPORT_NOT_DEFINED extends NodeTypeError { constructor(specifier, packagePath, base){ const msg = `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${displayJoin(packagePath, "package.json")}` : ""} imported from ${base}`; super("ERR_PACKAGE_IMPORT_NOT_DEFINED", msg); } } export class ERR_PACKAGE_PATH_NOT_EXPORTED extends NodeError { constructor(subpath, pkgPath, basePath){ let msg; if (subpath === ".") { msg = `No "exports" main defined in ${displayJoin(pkgPath, "package.json")}${basePath ? ` imported from ${basePath}` : ""}`; } else { msg = `Package subpath '${subpath}' is not defined by "exports" in ${displayJoin(pkgPath, "package.json")}${basePath ? ` imported from ${basePath}` : ""}`; } super("ERR_PACKAGE_PATH_NOT_EXPORTED", msg); } } export class ERR_PARSE_ARGS_INVALID_OPTION_VALUE extends NodeTypeError { constructor(x){ super("ERR_PARSE_ARGS_INVALID_OPTION_VALUE", x); } } export class ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL extends NodeTypeError { constructor(x){ super("ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL", `Unexpected argument '${x}'. This ` + `command does not take positional arguments`); } } export class ERR_PARSE_ARGS_UNKNOWN_OPTION extends NodeTypeError { constructor(option, allowPositionals){ const suggestDashDash = allowPositionals ? ". To specify a positional " + "argument starting with a '-', place it at the end of the command after " + `'--', as in '-- ${JSONStringify(option)}` : ""; super("ERR_PARSE_ARGS_UNKNOWN_OPTION", `Unknown option '${option}'${suggestDashDash}`); } } export class ERR_INTERNAL_ASSERTION extends NodeError { constructor(message){ const suffix = "This is caused by either a bug in Node.js " + "or incorrect usage of Node.js internals.\n" + "Please open an issue with this stack trace at " + "https://github.com/nodejs/node/issues\n"; super("ERR_INTERNAL_ASSERTION", message === undefined ? suffix : `${message}\n${suffix}`); } } // Using `fs.rmdir` on a path that is a file results in an ENOENT error on Windows and an ENOTDIR error on POSIX. export class ERR_FS_RMDIR_ENOTDIR extends NodeSystemError { constructor(path){ const code = isWindows ? "ENOENT" : "ENOTDIR"; const ctx = { message: "not a directory", path, syscall: "rmdir", code, errno: isWindows ? osConstants.errno.ENOENT : osConstants.errno.ENOTDIR }; super(code, ctx, "Path is not a directory"); } } export class ERR_OS_NO_HOMEDIR extends NodeSystemError { constructor(){ const code = isWindows ? "ENOENT" : "ENOTDIR"; const ctx = { message: "not a directory", syscall: "home", code, errno: isWindows ? osConstants.errno.ENOENT : osConstants.errno.ENOTDIR }; super(code, ctx, "Path is not a directory"); } } export function denoErrorToNodeError(e, ctx) { const errno = extractOsErrorNumberFromErrorMessage(e); if (typeof errno === "undefined") { return e; } const ex = uvException({ errno: mapSysErrnoToUvErrno(errno), ...ctx }); return ex; } function extractOsErrorNumberFromErrorMessage(e) { const match = e instanceof Error ? e.message.match(/\(os error (\d+)\)/) : false; if (match) { return +match[1]; } return undefined; } export function connResetException(msg) { const ex = new Error(msg); // deno-lint-ignore no-explicit-any ex.code = "ECONNRESET"; return ex; } export function aggregateTwoErrors(innerError, outerError) { if (innerError && outerError && innerError !== outerError) { if (Array.isArray(outerError.errors)) { // If `outerError` is already an `AggregateError`. outerError.errors.push(innerError); return outerError; } // eslint-disable-next-line no-restricted-syntax const err = new AggregateError([ outerError, innerError ], outerError.message); // deno-lint-ignore no-explicit-any err.code = outerError.code; return err; } return innerError || outerError; } codes.ERR_IPC_CHANNEL_CLOSED = ERR_IPC_CHANNEL_CLOSED; codes.ERR_INVALID_ARG_TYPE = ERR_INVALID_ARG_TYPE; codes.ERR_INVALID_ARG_VALUE = ERR_INVALID_ARG_VALUE; codes.ERR_OUT_OF_RANGE = ERR_OUT_OF_RANGE; codes.ERR_SOCKET_BAD_PORT = ERR_SOCKET_BAD_PORT; codes.ERR_BUFFER_OUT_OF_BOUNDS = ERR_BUFFER_OUT_OF_BOUNDS; codes.ERR_UNKNOWN_ENCODING = ERR_UNKNOWN_ENCODING; // TODO(kt3k): assign all error classes here. /** * This creates a generic Node.js error. * * @param message The error message. * @param errorProperties Object with additional properties to be added to the error. * @returns */ const genericNodeError = hideStackFrames(function genericNodeError(message, errorProperties) { // eslint-disable-next-line no-restricted-syntax const err = new Error(message); Object.assign(err, errorProperties); return err; }); /** * Determine the specific type of a value for type-mismatch errors. * @param {*} value * @returns {string} */ // deno-lint-ignore no-explicit-any function determineSpecificType(value) { if (value == null) { return "" + value; } if (typeof value === "function" && value.name) { return `function ${value.name}`; } if (typeof value === "object") { if (value.constructor?.name) { return `an instance of ${value.constructor.name}`; } return `${inspect(value, { depth: -1 })}`; } let inspected = inspect(value, { colors: false }); if (inspected.length > 28) inspected = `${inspected.slice(0, 25)}...`; return `type ${typeof value} (${inspected})`; } // Non-robust path join function displayJoin(dir, fileName) { const sep = dir.includes("\\") ? "\\" : "/"; return dir.endsWith(sep) ? dir + fileName : dir + sep + fileName; } export { codes, genericNodeError, hideStackFrames }; export default { AbortError, ERR_AMBIGUOUS_ARGUMENT, ERR_ARG_NOT_ITERABLE, ERR_ASSERTION, ERR_ASYNC_CALLBACK, ERR_ASYNC_TYPE, ERR_BROTLI_INVALID_PARAM, ERR_BUFFER_OUT_OF_BOUNDS, ERR_BUFFER_TOO_LARGE, ERR_CANNOT_WATCH_SIGINT, ERR_CHILD_CLOSED_BEFORE_REPLY, ERR_CHILD_PROCESS_IPC_REQUIRED, ERR_CHILD_PROCESS_STDIO_MAXBUFFER, ERR_CONSOLE_WRITABLE_STREAM, ERR_CONTEXT_NOT_INITIALIZED, ERR_CPU_USAGE, ERR_CRYPTO_CUSTOM_ENGINE_NOT_SUPPORTED, ERR_CRYPTO_ECDH_INVALID_FORMAT, ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY, ERR_CRYPTO_ENGINE_UNKNOWN, ERR_CRYPTO_FIPS_FORCED, ERR_CRYPTO_FIPS_UNAVAILABLE, ERR_CRYPTO_HASH_FINALIZED, ERR_CRYPTO_HASH_UPDATE_FAILED, ERR_CRYPTO_INCOMPATIBLE_KEY, ERR_CRYPTO_INCOMPATIBLE_KEY_OPTIONS, ERR_CRYPTO_INVALID_DIGEST, ERR_CRYPTO_INVALID_KEY_OBJECT_TYPE, ERR_CRYPTO_INVALID_STATE, ERR_CRYPTO_PBKDF2_ERROR, ERR_CRYPTO_SCRYPT_INVALID_PARAMETER, ERR_CRYPTO_SCRYPT_NOT_SUPPORTED, ERR_CRYPTO_SIGN_KEY_REQUIRED, ERR_DIR_CLOSED, ERR_DIR_CONCURRENT_OPERATION, ERR_DNS_SET_SERVERS_FAILED, ERR_DOMAIN_CALLBACK_NOT_AVAILABLE, ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE, ERR_ENCODING_INVALID_ENCODED_DATA, ERR_ENCODING_NOT_SUPPORTED, ERR_EVAL_ESM_CANNOT_PRINT, ERR_EVENT_RECURSION, ERR_FALSY_VALUE_REJECTION, ERR_FEATURE_UNAVAILABLE_ON_PLATFORM, ERR_FS_EISDIR, ERR_FS_FILE_TOO_LARGE, ERR_FS_INVALID_SYMLINK_TYPE, ERR_FS_RMDIR_ENOTDIR, ERR_HTTP2_ALTSVC_INVALID_ORIGIN, ERR_HTTP2_ALTSVC_LENGTH, ERR_HTTP2_CONNECT_AUTHORITY, ERR_HTTP2_CONNECT_PATH, ERR_HTTP2_CONNECT_SCHEME, ERR_HTTP2_GOAWAY_SESSION, ERR_HTTP2_HEADERS_AFTER_RESPOND, ERR_HTTP2_HEADERS_SENT, ERR_HTTP2_HEADER_SINGLE_VALUE, ERR_HTTP2_INFO_STATUS_NOT_ALLOWED, ERR_HTTP2_INVALID_CONNECTION_HEADERS, ERR_HTTP2_INVALID_HEADER_VALUE, ERR_HTTP2_INVALID_INFO_STATUS, ERR_HTTP2_INVALID_ORIGIN, ERR_HTTP2_INVALID_PACKED_SETTINGS_LENGTH, ERR_HTTP2_INVALID_PSEUDOHEADER, ERR_HTTP2_INVALID_SESSION, ERR_HTTP2_INVALID_SETTING_VALUE, ERR_HTTP2_INVALID_STREAM, ERR_HTTP2_MAX_PENDING_SETTINGS_ACK, ERR_HTTP2_NESTED_PUSH, ERR_HTTP2_NO_SOCKET_MANIPULATION, ERR_HTTP2_ORIGIN_LENGTH, ERR_HTTP2_OUT_OF_STREAMS, ERR_HTTP2_PAYLOAD_FORBIDDEN, ERR_HTTP2_PING_CANCEL, ERR_HTTP2_PING_LENGTH, ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED, ERR_HTTP2_PUSH_DISABLED, ERR_HTTP2_SEND_FILE, ERR_HTTP2_SEND_FILE_NOSEEK, ERR_HTTP2_SESSION_ERROR, ERR_HTTP2_SETTINGS_CANCEL, ERR_HTTP2_SOCKET_BOUND, ERR_HTTP2_SOCKET_UNBOUND, ERR_HTTP2_STATUS_101, ERR_HTTP2_STATUS_INVALID, ERR_HTTP2_STREAM_CANCEL, ERR_HTTP2_STREAM_ERROR, ERR_HTTP2_STREAM_SELF_DEPENDENCY, ERR_HTTP2_TRAILERS_ALREADY_SENT, ERR_HTTP2_TRAILERS_NOT_READY, ERR_HTTP2_UNSUPPORTED_PROTOCOL, ERR_HTTP_HEADERS_SENT, ERR_HTTP_INVALID_HEADER_VALUE, ERR_HTTP_INVALID_STATUS_CODE, ERR_HTTP_SOCKET_ENCODING, ERR_HTTP_TRAILER_INVALID, ERR_INCOMPATIBLE_OPTION_PAIR, ERR_INPUT_TYPE_NOT_ALLOWED, ERR_INSPECTOR_ALREADY_ACTIVATED, ERR_INSPECTOR_ALREADY_CONNECTED, ERR_INSPECTOR_CLOSED, ERR_INSPECTOR_COMMAND, ERR_INSPECTOR_NOT_ACTIVE, ERR_INSPECTOR_NOT_AVAILABLE, ERR_INSPECTOR_NOT_CONNECTED, ERR_INSPECTOR_NOT_WORKER, ERR_INTERNAL_ASSERTION, ERR_INVALID_ADDRESS_FAMILY, ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_TYPE_RANGE, ERR_INVALID_ARG_VALUE, ERR_INVALID_ARG_VALUE_RANGE, ERR_INVALID_ASYNC_ID, ERR_INVALID_BUFFER_SIZE, ERR_INVALID_CHAR, ERR_INVALID_CURSOR_POS, ERR_INVALID_FD, ERR_INVALID_FD_TYPE, ERR_INVALID_FILE_URL_HOST, ERR_INVALID_FILE_URL_PATH, ERR_INVALID_HANDLE_TYPE, ERR_INVALID_HTTP_TOKEN, ERR_INVALID_IP_ADDRESS, ERR_INVALID_MODULE_SPECIFIER, ERR_INVALID_OPT_VALUE, ERR_INVALID_OPT_VALUE_ENCODING, ERR_INVALID_PACKAGE_CONFIG, ERR_INVALID_PACKAGE_TARGET, ERR_INVALID_PERFORMANCE_MARK, ERR_INVALID_PROTOCOL, ERR_INVALID_REPL_EVAL_CONFIG, ERR_INVALID_REPL_INPUT, ERR_INVALID_RETURN_PROPERTY, ERR_INVALID_RETURN_PROPERTY_VALUE, ERR_INVALID_RETURN_VALUE, ERR_INVALID_SYNC_FORK_INPUT, ERR_INVALID_THIS, ERR_INVALID_TUPLE, ERR_INVALID_URI, ERR_INVALID_URL, ERR_INVALID_URL_SCHEME, ERR_IPC_CHANNEL_CLOSED, ERR_IPC_DISCONNECTED, ERR_IPC_ONE_PIPE, ERR_IPC_SYNC_FORK, ERR_MANIFEST_DEPENDENCY_MISSING, ERR_MANIFEST_INTEGRITY_MISMATCH, ERR_MANIFEST_INVALID_RESOURCE_FIELD, ERR_MANIFEST_TDZ, ERR_MANIFEST_UNKNOWN_ONERROR, ERR_METHOD_NOT_IMPLEMENTED, ERR_MISSING_ARGS, ERR_MISSING_OPTION, ERR_MODULE_NOT_FOUND, ERR_MULTIPLE_CALLBACK, ERR_NAPI_CONS_FUNCTION, ERR_NAPI_INVALID_DATAVIEW_ARGS, ERR_NAPI_INVALID_TYPEDARRAY_ALIGNMENT, ERR_NAPI_INVALID_TYPEDARRAY_LENGTH, ERR_NO_CRYPTO, ERR_NO_ICU, ERR_OUT_OF_RANGE, ERR_PACKAGE_IMPORT_NOT_DEFINED, ERR_PACKAGE_PATH_NOT_EXPORTED, ERR_QUICCLIENTSESSION_FAILED, ERR_QUICCLIENTSESSION_FAILED_SETSOCKET, ERR_QUICSESSION_DESTROYED, ERR_QUICSESSION_INVALID_DCID, ERR_QUICSESSION_UPDATEKEY, ERR_QUICSOCKET_DESTROYED, ERR_QUICSOCKET_INVALID_STATELESS_RESET_SECRET_LENGTH, ERR_QUICSOCKET_LISTENING, ERR_QUICSOCKET_UNBOUND, ERR_QUICSTREAM_DESTROYED, ERR_QUICSTREAM_INVALID_PUSH, ERR_QUICSTREAM_OPEN_FAILED, ERR_QUICSTREAM_UNSUPPORTED_PUSH, ERR_QUIC_TLS13_REQUIRED, ERR_SCRIPT_EXECUTION_INTERRUPTED, ERR_SERVER_ALREADY_LISTEN, ERR_SERVER_NOT_RUNNING, ERR_SOCKET_ALREADY_BOUND, ERR_SOCKET_BAD_BUFFER_SIZE, ERR_SOCKET_BAD_PORT, ERR_SOCKET_BAD_TYPE, ERR_SOCKET_BUFFER_SIZE, ERR_SOCKET_CLOSED, ERR_SOCKET_DGRAM_IS_CONNECTED, ERR_SOCKET_DGRAM_NOT_CONNECTED, ERR_SOCKET_DGRAM_NOT_RUNNING, ERR_SRI_PARSE, ERR_STREAM_ALREADY_FINISHED, ERR_STREAM_CANNOT_PIPE, ERR_STREAM_DESTROYED, ERR_STREAM_NULL_VALUES, ERR_STREAM_PREMATURE_CLOSE, ERR_STREAM_PUSH_AFTER_EOF, ERR_STREAM_UNSHIFT_AFTER_END_EVENT, ERR_STREAM_WRAP, ERR_STREAM_WRITE_AFTER_END, ERR_SYNTHETIC, ERR_TLS_CERT_ALTNAME_INVALID, ERR_TLS_DH_PARAM_SIZE, ERR_TLS_HANDSHAKE_TIMEOUT, ERR_TLS_INVALID_CONTEXT, ERR_TLS_INVALID_PROTOCOL_VERSION, ERR_TLS_INVALID_STATE, ERR_TLS_PROTOCOL_VERSION_CONFLICT, ERR_TLS_RENEGOTIATION_DISABLED, ERR_TLS_REQUIRED_SERVER_NAME, ERR_TLS_SESSION_ATTACK, ERR_TLS_SNI_FROM_SERVER, ERR_TRACE_EVENTS_CATEGORY_REQUIRED, ERR_TRACE_EVENTS_UNAVAILABLE, ERR_UNAVAILABLE_DURING_EXIT, ERR_UNCAUGHT_EXCEPTION_CAPTURE_ALREADY_SET, ERR_UNESCAPED_CHARACTERS, ERR_UNHANDLED_ERROR, ERR_UNKNOWN_BUILTIN_MODULE, ERR_UNKNOWN_CREDENTIAL, ERR_UNKNOWN_ENCODING, ERR_UNKNOWN_FILE_EXTENSION, ERR_UNKNOWN_MODULE_FORMAT, ERR_UNKNOWN_SIGNAL, ERR_UNSUPPORTED_DIR_IMPORT, ERR_UNSUPPORTED_ESM_URL_SCHEME, ERR_USE_AFTER_CLOSE, ERR_V8BREAKITERATOR, ERR_VALID_PERFORMANCE_ENTRY_TYPE, ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING, ERR_VM_MODULE_ALREADY_LINKED, ERR_VM_MODULE_CANNOT_CREATE_CACHED_DATA, ERR_VM_MODULE_DIFFERENT_CONTEXT, ERR_VM_MODULE_LINKING_ERRORED, ERR_VM_MODULE_NOT_MODULE, ERR_VM_MODULE_STATUS, ERR_WASI_ALREADY_STARTED, ERR_WORKER_INIT_FAILED, ERR_WORKER_NOT_RUNNING, ERR_WORKER_OUT_OF_MEMORY, ERR_WORKER_UNSERIALIZABLE_ERROR, ERR_WORKER_UNSUPPORTED_EXTENSION, ERR_WORKER_UNSUPPORTED_OPERATION, ERR_ZLIB_INITIALIZATION_FAILED, NodeError, NodeErrorAbstraction, NodeRangeError, NodeSyntaxError, NodeTypeError, NodeURIError, aggregateTwoErrors, codes, connResetException, denoErrorToNodeError, dnsException, errnoException, errorMap, exceptionWithHostPort, genericNodeError, hideStackFrames, isStackOverflowError, uvException, uvExceptionWithHostPort }; Qd&4 ext:deno_node/internal/errors.tsa bfD`M`2 T`S/ La1n T  I`   Sb1 "  "      " b 8Hb:b>o????????????????Ib!`(L` "$ ]` ]`  ]`nb ]`" ]`"} ]`( ]`w ]`L`  " D" c DcHP " D" c`o L`` L`Bi` L`Bib ` L`b  ` L`  ` L`  ` L`  ` L` " ` L`"  `  L` » `  L`» b `  L`b  `  L` b `  L`b " ` L`" ½ ` L`½  ` L` B ` L`B ¿ ` L`¿  ` L` b ` L`b B ` L`B | ` L`|  ` L`  ` L`  ` L` B ` L`B  ` L` bW ` L`bW "f ` L`"f  ` L`  ` L` " `  L`"  `! L` { `" L`{ "; `# L`";  `$ L` B `% L`B  `& L`  `' L`  `( L`  `) L`  `* L` B `+ L`B  `, L` B5`- L`B5 `. L`  `/ L`  `0 L` " `1 L`" "F`2 L`"F `3 L`  `4 L` ¹ `5 L`¹  `6 L` " `7 L`" » `8 L`» B `9 L`B  `: L`  `; L` b `< L`b B `= L`B " `> L`"  `? L`  `@ L` B `A L`B b `B L`b " `C L`" 6`D L`6 `E L` " `F L`"  `G L`  `H L` b `I L`b  `J L`  `K L` b `L L`b  `M L`  `N L`  `O L` " `P L`"  `Q L`  `R L`  `S L` B `T L`B  `U L`  `V L` " `W L`" " `X L`" ¿ `Y L`¿  `Z L` b `[ L`b " `\ L`"  `] L` b `^ L`b  `_ L`  `` L` B `a L`B ­ `b L`­ \ `c L`\  `d L`  `e L` b `f L`b " `g L`"  `h L` b `i L`b  `j L`  `k L`  `l L` "E`m L`"E6`n L`6b `o L`b  `p L`  `q L`  `r L` " `s L`"  `t L`  `u L` b `v L`b  `w L` " `x L`"  `y L` B `z L`B  `{ L`  `| L`  `} L` B[ `~ L`B[ 7` L`7B ` L`B "<` L`"<<` L`< ` L` a ` L`a  ` L`  ` L` "8` L`"89` L`9 ` L` " ` L`"  ` L` b ` L`b  ` L` ;` L`;;` L`; ` L` " ` L`"  ` L` B ` L`B  ` L`  ` L` b ` L`b B ` L`B  ` L` " ` L`" B ` L`B b] ` L`b] \ ` L`\  ` L` "` L`"` L`` L`b` L`bB` L`B` L`F` L`F" ` L`" >` L`>"@` L`"@BA` L`BA"B` L`"BC` L`CB` L`B` L`` L`` L`b` L`b"` L`"` L` ` L`  ` L` " ` L`"  ` L`  ` L` B ` L`B ` L`` L`b` L`bZ ` L`Z ¦ ` L`¦ b ` L`b "` L`" ` L` " ` L`"  ` L` ¨ ` L`¨  ` L` B ` L`B B` L`B` L` ` L` ` L` ` L` "` L`"` L`` L`` L`` L`` L`B` L`B` L`` L`b` L`b` L`` L`b` L`b` L`` L`B` L`B` L`` L`b ` L`b "!` L`"!!` L`!a ` L`a "` L`"#` L`#B$` L`B$$` L`$%` L`%B&` L`B& ` L` '` L`''` L`'(` L`(")` L`"))` L`)*` L`*b+` L`b+",` L`",-` L`--` L`-.` L`."/` L`"//` L`/b0` L`b01` L`11` L`1B2` L`B23` L`33` L`34` L`4; ` L`; b ` L`b  ` L`  ` L`  ` L`  ` L` I` L`Ib` ` L`b` bG` L`bGB ` L`B  ` L`  ` L`  ` L` § ` L`§ b `  L`b " `  L`" ]4L`  D c D  c?F D" " c DcHP D-c Db b c D" " c`o Dc Dttc Db b cRf D9 c`a?a?" a? a?a?b a?a?ta?9 a?" a?b a?Bia?§ a?" a ? a?b a ? a?B a?b a?; a? a? a? a? a? a/? ap?b ao? ar? aq?" a?b a? a? a? a? a?" a? a ?» a ?b a ? a ?b a ?" a?½ a? a?B a?¿ a? a?b a?"; a#?B a?| a? a? a? a?B a? a?bW a?"f a? a? a?" a ? a!?{ a"? a$?B a%? a&? a'? a(? a)? a*?B a+? a,? a.? a0?" a1? a3? a4?¹ a5? a6?" a7?» a8?B a9? a:? a;?b a<?B a=?" a>? a?? a@?B aA?b aB?" aC? aE?" aF? aG? aH?b aI? aJ? aK?b aL? aM? aN? aO?" aP? aQ? aR? aS?B aT? aU? aV?" aW?¿ aY? aZ?b a[?" a\? a]?b a^? a_? a`?B aa?­ ab?\ ac? ad? ae?b af?" ag? ah?b ai? aj? ak? al?" as? at?b av? aw?" ax? ay?B az? a{? a|? a}?B a? a?a a? a? a?" a? a?b a? a? a?" a? a?B a? a? a?b a?B a? a?" a?B a?b] a? a?"a?a?a?ba?Ba?a?Ba?a?a?a?ba?"a?a? a? a?" a? a? a?B a?a?a?ba?Z a?¦ a?b a?"a? a?" a? a?¨ a? a?B a?Ba?a? a?a? a?"a?a?a?a?a?a?Ba?a?a?ba?a?a?ba?a?a?Ba?a?a?b a?"!a?!a?a a?"a?#a?B$a?$a?%a?B&a? a?'a?'a?(a?")a?)a?*a?b+a?",a?-a?-a?.a?"/a?/a?b0a?1a?1a?B2a?3a?3a?4a?B5a-?6aD?" aX?6an? au?7a?"8a?9a? a?;a?;a?\ a?"<a?B[ a~?<a?>a?"@a?BAa?"Ba?Ca?"Eam?"Fa2?Fa?bGa?b` a?Ia? a?a?yb@ T  I`u ԑb@  T4`'L`8SbqA a aR `Da/s0  `T ``/ `/ `?  `  a0p0D] ` aj]  T  I`?0l0; Iyb $  A`Df( % % ‚e+ `b @# T I`069" Ԗb@% T I`x>@b b@, T I`R8b @ T I`Hb-@, T I`b:b@0 T I`Jb>b@1QLa T I`J b @§ b@  /porq # !"$%&'()*+,.013456789:;<=>?@ABCEFGHIJKLMNOPQRSTUVWYZ[\]^_`abcdefghijklstvwxyz{|}-DXnu~m2 T  I`bGyb@+a T I`Mb` b@-a T I`pIb@.c a      `,M` qi=%   `T ``/ `/ `?  `  a6 D] ` aj]  T  I`4 Biyb Ճ T$` L`q  ` Ka@ b3(SbqqBi`Da6  a b "  T  I`:  yb  T I`5" b  T I`^ b  `M`   T I`3b b  T I`k b  T I`,aIb@   `T ``/ `/ `?  `  a !D]$ ` aj1 aj] T  I`_ e!b yb Ճ  T I`p!!b T$` L`q  ]`Kb  b3(Sbqqb `DaH ! a b  `T ``/ `/ `?  `  a!?"D] ` aj] T  I`!="; yb   `T``/ `/ `?  `  aG"r#D] ` aj] T I`"p#b FF@ yb   `T``/ `/ `?  `  az#$D] ` aj] T I`#$b HI@ yb   `T``/ `/ `?  `  a$%D] ` aj] T I`$%b KK@ yb   `T``/ `/ `?  `  a%&D] ` aj] T I`&&b MM@ yb   `T``/ `/ `?  `  a(/D]$ ` aj1 aj] T I` )z/e'WW@YY@[[@]]@ yb  T  I`//b"    `T ``/ `/ `?  `  a>9':D] ` aj] T  I`9%: yb &  `T``/ `/ `?  `  a/:C;D] ` aj] T  I`o:;b yb ' T(` L` 9  U`Kb tc0p3(Sbqsb `Da`:C; a b(  `T ``/ `/ `?  `  aK;<D] ` aj] T  I`;< yb )  `T``/ `/ `?  `  a<=D] ` aj] T  I`<= yb * T(` L` 9  `Kb xc0r3(Sbqs `Da<= a b+  `T ``/ `/ `?  `  a@ ED] ` aj]9 T  I`5AE" yb Ճ- T$`L`" q  `Kb ,b3(Sbqq" `Da A E a b.  `T ``/ `/ `?  `  aEED] ` aj] T  I`TEEb yb /  `T``/ `/ `?  `  aE>FD] ` aj] T  I`E  `T``/ `/ `?  `  aeOPD] ` aj] T  I`OP yb ?  `T``/ `/ `?  `  a PPD] ` aj] T  I`UPPb yb @  `T``/ `/ `?  `  aPPQD] ` aj] T  I` QNQ"; yb A  `T``/ `/ `?  `  aXQQD] ` aj] T  I`QQB yb B  `T``/ `/ `?  `  aQRD] ` aj] T  I`0RR| yb C  `T``/ `/ `?  `  aRNSD] ` aj] T  I`RLS yb D  `T``/ `/ `?  `  aVSSD] ` aj] T  I`SS yb E  `T``/ `/ `?  `  aSyTD] ` aj] T  I`.TwT yb F  `T``/ `/ `?  `  aTUD] ` aj] T  I`TUB yb G  `T``/ `/ `?  `  aUUD] ` aj] T  I`iUU yb H  `T``/ `/ `?  `  aUgVD] ` aj] T  I`VeVbW yb I  `T``/ `/ `?  `  aoV+WD] ` aj] T  I`V)W"f yb J  `T``/ `/ `?  `  a3WWD] ` aj] T  I`sWW yb K  `T``/ `/ `?  `  aWNXD] ` aj] T  I`XLX yb L  `T``/ `/ `?  `  aVXXD] ` aj] T  I`XX" yb M  `T``/ `/ `?  `  aYYD] ` aj] T  I`GYY yb N  `T``/ `/ `?  `  aY;ZD] ` aj] T  I`Y9Z{ yb O  `T``/ `/ `?  `  aCZZD] ` aj] T  I`yZZ yb P  `T``/ `/ `?  `  aZ[D] ` aj] T  I` [[B yb Q  `T``/ `/ `?  `  a[G\D] ` aj] T  I`[E\ yb R  `T``/ `/ `?  `  aO\j]D] ` aj] T  I`\h] yb S  `T``/ `/ `?  `  ar]^D] ` aj] T  I`]^ yb T  `T``/ `/ `?  `  a^_D] ` aj] T  I`^_ yb ՃU T$` L`b:   `Kb  b3(Sbqq `Da^_ a bV  `T ``/ `/ `?  `  a_`D] ` aj] T  I`+`` yb W  `T``/ `/ `?  `  a`)aD] ` aj] T  I``'aB yb X  `T``/ `/ `?  `  a1aaD] ` aj] T  I`laa yb Y  `T``/ `/ `?  `  aabD] ` aj] T  I`bb yb Z  `T``/ `/ `?  `  ab[cD] ` aj] T  I`cYc yb [  `T``/ `/ `?  `  acc'dD] ` aj] T  I`c%d" yb \  `T``/ `/ `?  `  a/ddD] ` aj] T  I`zdd yb ]  `T``/ `/ `?  `  adeD] ` aj] T  I`+ee yb ^  `T``/ `/ `?  `  aeAfD] ` aj] T  I`e?f¹ yb _  `T``/ `/ `?  `  aIffD] ` aj] T  I`ff yb `  `T``/ `/ `?  `  afgD] ` aj] T  I`3gg" yb a   `T``/ `/ `?  `  agMhD] ` aj] T  I`gKh» yb b   `T``/ `/ `?  `  aUhiD] ` aj] T  I`hiB yb c   `T``/ `/ `?  `  aiiD] ` aj] T  I`Wii yb d   `T``/ `/ `?  `  aiijD] ` aj] T  I`igj yb e   `T``/ `/ `?  `  aqj%kD] ` aj] T  I`j#kb yb f  `T``/ `/ `?  `  a-kkD] ` aj] T  I`}kkB yb g  `T``/ `/ `?  `  aklD] ` aj] T  I`Hll" yb h  `T``/ `/ `?  `  al_mD] ` aj] T  I`l]m yb i  `T``/ `/ `?  `  agm nD] ` aj] T  I`mn yb j  `T``/ `/ `?  `  annD] ` aj] T  I`gnnB yb k  `T``/ `/ `?  `  anoD] ` aj] T  I`-oob yb l  `T``/ `/ `?  `  aor yb p  `T``/ `/ `?  `  aHrsD] ` aj] T  I`rs yb q  `T``/ `/ `?  `  assD] ` aj] T  I``ssb yb r  `T``/ `/ `?  `  astD] ` aj] T  I` tt yb s  `T``/ `/ `?  `  at7uD] ` aj] T  I`t5u yb t  `T``/ `/ `?  `  a?uuD] ` aj] T  I`|uub yb u  `T``/ `/ `?  `  au^vD] ` aj] T  I` v\v yb v  `T``/ `/ `?  `  afvwD] ` aj] T  I`vw yb w  `T``/ `/ `?  `  awwD] ` aj] T  I`Yww yb x   `T``/ `/ `?  `  aw?xD] ` aj] T  I`w=x" yb y!  `T``/ `/ `?  `  aGxxD] ` aj] T  I`xx yb z"  `T``/ `/ `?  `  axyD] ` aj] T  I`>yy yb {#  `T``/ `/ `?  `  ay2zD] ` aj] T  I`y0z yb |$  `T``/ `/ `?  `  a:zzD] ` aj] T  I`xzzB yb }%  `T``/ `/ `?  `  az{D] ` aj] T  I` {{ yb ~&  `T``/ `/ `?  `  a{?|D] ` aj] T  I`{=| yb '  `T``/ `/ `?  `  aG||D] ` aj] T  I`||" yb (  `T``/ `/ `?  `  a|u}D] ` aj] T  I` }s}¿ yb )  `T``/ `/ `?  `  a}}!~D] ` aj] T  I`}~ yb *  `T``/ `/ `?  `  a)~~D] ` aj] T  I`p~~b yb +  `T``/ `/ `?  `  a~D] ` aj] T  I`" yb ,  `T``/ `/ `?  `  aKD] ` aj] T  I`I yb -  `T``/ `/ `?  `  aSD] ` aj] T  I`b yb .  `T``/ `/ `?  `  aD] ` aj] T  I`H yb /  `T``/ `/ `?  `  aND] ` aj] T  I`L yb 0  `T``/ `/ `?  `  aV D] ` aj] T  I` B yb 1  `T``/ `/ `?  `  aD] ` aj] T  I`T­ yb 2  `T``/ `/ `?  `  aD] ` aj] T  I`\ yb 3  `T``/ `/ `?  `  aOD] ` aj] T  I`̄M yb 4  `T``/ `/ `?  `  aW4D] ` aj] T  I`2 yb 5  `T``/ `/ `?  `  a<؆D] ` aj] T  I`ֆb yb 6  `T``/ `/ `?  `  a^D] ` aj] T  I`\" yb 7  `T``/ `/ `?  `  afD] ` aj] T  I` yb 8  `T``/ `/ `?  `  aD] ` aj] T  I`:b yb 9  `T``/ `/ `?  `  a!D] ` aj] T  I`Ј yb :  `T``/ `/ `?  `  a)D] ` aj] T  I`l yb ;  `T``/ `/ `?  `  aÉUD] ` aj] T  I`S yb <  `T``/ `/ `?  `  a]D] ` aj] T  I`" yb =  `T``/ `/ `?  `  aD] ` aj] T  I`6 yb >  `T``/ `/ `?  `  a<D] ` aj] T  I`ڋ:b yb ?  `T``/ `/ `?  `  aDόD] ` aj] T  I`͌ yb @  `T``/ `/ `?  `  a׌_D] ` aj] T  I`]" yb A  `T``/ `/ `?  `  agD] ` aj] T  I` yb B  `T``/ `/ `?  `  aD] ` aj] T  I`aB yb C  `T``/ `/ `?  `  aFD] ` aj] T  I`D yb D  `T``/ `/ `?  `  aND] ` aj] T  I` yb E  `T``/ `/ `?  `  aD] ` aj] T  I`8 yb F  `T``/ `/ `?  `  aAD] ` aj] T  I`Ր?B yb G  `T``/ `/ `?  `  aID] ` aj] T  I` yb H  `T``/ `/ `?  `  aD] ` aj] T  I`:a yb I  `T``/ `/ `?  `  a_D] ` aj] T  I`] yb J  `T``/ `/ `?  `  agD] ` aj] T  I`ޓ yb K  `T``/ `/ `?  `  aD] ` aj] T  I`/" yb L  `T``/ `/ `?  `  aÔPD] ` aj] T  I`N yb M  `T``/ `/ `?  `  aXD] ` aj] T  I`b yb N  `T``/ `/ `?  `  acD] ` aj] T  I`+a yb O  `T``/ `/ `?  `  akD] ` aj] T  I` yb P  `T``/ `/ `?  `  aD] ` aj] T  I`-~" yb Q  `T``/ `/ `?  `  aD] ` aj] T  I` yb R  `T``/ `/ `?  `  aD] ` aj] T  I`UB yb S  `T``/ `/ `?  `  a|D] ` aj] T  I`z yb T  `T``/ `/ `?  `  aYD] ` aj] T  I`љW yb U  `T``/ `/ `?  `  aa-D] ` aj] T  I`+b yb V  `T``/ `/ `?  `  a5D] ` aj] T  I`mB yb W  `T``/ `/ `?  `  aț|D] ` aj] T  I`z yb X  `T``/ `/ `?  `  aD] ` aj] T  I`Ɯ" yb Y  `T``/ `/ `?  `  a'D] ` aj] T  I`cB yb Z  `T``/ `/ `?  `  aD] ` aj] T  I`ȟb] yb [  `T``/ `/ `?  `  aD] ` aj] T  I`L yb \  `T``/ `/ `?  `  a5D] ` aj] T  I`3"yb ]  `T``/ `/ `?  `  a=$D] ` aj] T  I`"yb ^  `T``/ `/ `?  `  a,D] ` aj] T  I`~yb _  `T``/ `/ `?  `  aD] ` aj] T  I`Kbyb `  `T``/ `/ `?  `  a<D] ` aj] T  I`:Byb a  `T``/ `/ `?  `  aD֤D] ` aj] T  I`zԤyb b  `T``/ `/ `?  `  aޤD] ` aj] T  I`"Byb c  `T``/ `/ `?  `  a=D] ` aj] T  I`ߥ;yb d  `T``/ `/ `?  `  aED] ` aj] T  I`yb e  `T``/ `/ `?  `  aD] ` aj] T  I`?yb f  `T``/ `/ `?  `  a/D] ` aj] T  I`٧-byb g  `T``/ `/ `?  `  a7D] ` aj] T  I`w"yb h  `T``/ `/ `?  `  a̩D] ` aj] T  I`Fʩyb i  `T``/ `/ `?  `  aԩlD] ` aj] T  I`j yb j  `T``/ `/ `?  `  atD] ` aj] T  I` yb k  `T``/ `/ `?  `  a ˫D] ` aj] T  I``ɫ" yb l  `T``/ `/ `?  `  aӫD] ` aj] T  I` yb m  `T``/ `/ `?  `  a6D] ` aj] T  I`4 yb n  `T``/ `/ `?  `  a>D] ` aj] T  I`B yb o  `T``/ `/ `?  `  aD] ` aj] T  I`9yb p  `T``/ `/ `?  `  aAD] ` aj] T  I`ٮ?yb q  `T``/ `/ `?  `  aID] ` aj] T  I`byb r  `T``/ `/ `?  `  aD] ` aj] T  I`BZ yb s  `T``/ `/ `?  `  aD] ` aj] T  I`Ұ¦ yb t  `T``/ `/ `?  `  a%DZD] ` aj] T  I`kűb yb u  `T``/ `/ `?  `  aϱ&D] ` aj] T  I`$"yb v  `T``/ `/ `?  `  a.ҳD] ` aj] T  I`mг yb w  `T``/ `/ `?  `  aڳxD] ` aj] T  I`v" yb x  `T``/ `/ `?  `  aD] ` aj] T  I` yb y  `T``/ `/ `?  `  aD] ` aj] T  I`C¨ yb z  `T``/ `/ `?  `  a"D] ` aj] T  I`۵  yb {  `T``/ `/ `?  `  a*D] ` aj] T  I`nB yb |  `T``/ `/ `?  `  aD] ` aj] T  I`Byb }  `T``/ `/ `?  `  a6D] ` aj] T  I`ҷ4yb ~  `T``/ `/ `?  `  a>ǸD] ` aj] T  I`|Ÿ yb   `T``/ `/ `?  `  aϸiD] ` aj] T  I` gyb   `T``/ `/ `?  `  aqD] ` aj] T  I` yb   `T``/ `/ `?  `  aD] ` aj] T  I`R"yb   `T``/ `/ `?  `  a,D] ` aj] T  I`*yb   `T``/ `/ `?  `  a4ܻD] ` aj] T  I`~ڻyb   `T``/ `/ `?  `  avD] ` aj] T  I`tyb   `T``/ `/ `?  `  a~D] ` aj] T  I`yb   `T``/ `/ `?  `  a D] ` aj] T  I`B}yb   `T``/ `/ `?  `  aD] ` aj] T  I`Byb Ճ T,`L`B"B  `Kb   ( d333(SbqqB`Da a 0b  `T ``/ `/ `?  `  aPD] ` aj] T  I`Nyb   `T``/ `/ `?  `  aXD] ` aj] T  I`yb   `T``/ `/ `?  `  a~D] ` aj] T  I`.|byb   `T``/ `/ `?  `  a&D] ` aj] T  I`$yb   `T``/ `/ `?  `  a.D] ` aj] T  I`zyb   `T``/ `/ `?  `  aD] ` aj] T  I`Jbyb   `T``/ `/ `?  `  aD] ` aj] T  I`9yb   `T``/ `/ `?  `  aaD] ` aj] T  I`_yb   `T``/ `/ `?  `  aiD] ` aj] T  I`Byb   `T``/ `/ `?  `  a D] ` aj] T  I`Iyb   `T``/ `/ `?  `  a_D] ` aj] T  I`]yb   `T``/ `/ `?  `  agD] ` aj] T  I`b yb   `T``/ `/ `?  `  aD] ` aj] T  I`J"!yb   `T``/ `/ `?  `  aD] ` aj] T  I`!yb   `T``/ `/ `?  `  aPD] ` aj] T  I`Na yb   `T``/ `/ `?  `  aXD] ` aj] T  I`"yb   `T``/ `/ `?  `  axD] ` aj] T  I`$v#yb   `T``/ `/ `?  `  aD] ` aj] T  I`B$yb   `T``/ `/ `?  `  a D] ` aj] T  I``$yb   `T``/ `/ `?  `  a^D] ` aj] T  I`\%yb   `T``/ `/ `?  `  afD] ` aj] T  I`B&yb   `T``/ `/ `?  `  aD] ` aj] T  I`C yb   `T``/ `/ `?  `  a[D] ` aj] T  I`Y'yb   `T``/ `/ `?  `  ac"D] ` aj] T  I` 'yb   `T``/ `/ `?  `  a*D] ` aj] T  I`e(yb   `T``/ `/ `?  `  a_D] ` aj] T  I`]")yb   `T``/ `/ `?  `  ag D] ` aj] T  I`)yb   `T``/ `/ `?  `  a(D] ` aj] T  I`z*yb   `T``/ `/ `?  `  aD] ` aj] T  I`4b+yb   `T``/ `/ `?  `  agD] ` aj] T  I`e",yb   `T``/ `/ `?  `  aoD] ` aj] T  I`-yb   `T``/ `/ `?  `  a!D] ` aj] T  I`f-yb   `T``/ `/ `?  `  ayD] ` aj] T  I`w.yb   `T``/ `/ `?  `  aD] ` aj] T  I`"/yb   `T``/ `/ `?  `  aD] ` aj] T  I`H/yb   `T``/ `/ `?  `  a9D] ` aj] T  I`7b0yb   `T``/ `/ `?  `  aAD] ` aj] T  I`1yb   `T``/ `/ `?  `  a}D] ` aj] T  I`{1yb    `T``/ `/ `?  `  a/D] ` aj] T  I`-B2yb    `T``/ `/ `?  `  a7 D] ` aj] T  I` 3yb    `T``/ `/ `?  `  aD] ` aj] T  I`a3yb    `T``/ `/ `?  `  a[D] ` aj] T  I` Y4yb    `T``/ `/ `?  `  ac(D] ` aj] T  I`&B5yb Ճ T$` L`  `Kb   b3(SbqqB5`Da( a b  `T ``/ `/ `?  `  a0|D] ` aj] T  I`z6yb Ճ T,`L`bN "  `Kb   (  d333(Sbqq6`Dam| a 0b  `T ``/ `/ `?  `  aD] ` aj] T  I`" yb Ճ T$` L`e  1`Kb   b3(Sbqq" `Da a b  `T ``/ `/ `?  `  aD] ` aj] T  I`#6yb Ճ T(` L`B"  e`Kb   c33(Sbqq6`Da a 0b  `T ``/ `/ `?  `  aD] ` aj] T  I` yb   `T``/ `/ `?  `  aXD] ` aj] T  I`V7yb   `T``/ `/ `?  `  a`^D] ` aj] T  I`\"8yb   `T``/ `/ `?  `  aZuD] ` aj] T  I`s9yb   `T``/ `/ `?  `  a}lD] ` aj] T  I`j yb   `T``/ `/ `?  `  atD] ` aj] T  I`;yb Ճ T$` L`  `Kb  b3(Sbqq;`Da a b  `T ``/ `/ `?  `  arD] ` aj] T  I`_p;yb   `T``/ `/ `?  `  az5D] ` aj] T  I`3\ yb   `T``/ `/ `?  `  a=DD] ` aj] T  I`B"<yb    `T``/ `/ `?  `  aL-D] ` aj] T  I`+B[ yb !  `T``/ `/ `?  `  a5D] ` aj] T  I`w<yb "  `T``/ `/ `?  `  a D] ` aj] T  I` >yb #  `T``/ `/ `?  `  a D] ` aj] T  I`X "@yb $  `T``/ `/ `?  `  aD] ` aj] T  I`cBAyb %  `T``/ `/ `?  `  aD] ` aj] T  I`"Byb &  `T``/ `/ `?  `  a$D] ` aj] T  I`"Cyb '  `T``/ `/ `?  `  a,D] ` aj] T  I`j"Eyb (  `T``/ `/ `?  `  a"D] ` aj] T  I`d"Fyb )  `T``/ `/ `?  `  aD] ` aj] T  I`Fyb *"  b  " " $ T I`& b/IbBiCb C C C C C" C C» Cb C Cb C" C½ C CB C¿ C Cb CB C| C C C CB C CbW C"f C C C" C C{ C CB C C C C C CB C CB5C C C C" C"FC C C¹ C C" C» CB C C Cb CB C" C C CB Cb C" C6C C" C C Cb C C Cb C C C C" C C C CB C C C" C" C¿ C Cb C" C Cb C C CB C­ C\ C C Cb C" C Cb C C C C"EC6Cb C C C C" C C Cb C C" C CB C C C CB[ C7CB C"<C<C Ca C C C"8C9C C" C Cb C C;C;C C" C CB C C Cb CB C C" CB Cb] C\ C C"CCCbCBCC" C>C"@CBCCCCbC"CC C C" C C CB CCCbCZ C¦ Cb C"C C" C C¨ C CB CBCC CC C"CCCCCCBCCCbCCCbCCCBCCCb C"!C!Ca C"C#CB$C$C%CB&C C'C'C(C")C)C*Cb+C",C-C-C.C"/C/Cb0C1C1CB2C3C3C4C; Cb C C C C CIC" Cb` CbGCB C CC C C" C§ Cb C" CBib     " » b  b " ½  B ¿  b B |    B  bW "f   "  {  B      B  B5  " "F  ¹  " » B   b B "   B b " 6 "   b   b    "    B   " " ¿  b "  b   B ­ \   b "  b    "E6  "   b  "  B    B[ 7B "<< a   "89 "  b  ;;"  B   b B  " B b] \  "bB>"@Bb"  "   B bZ ¦ b  "  ¨  B B  "BbbBb "!!a "#B$%B& ''("))*b+",--."//b011B2334; b     Ib` bGB    § b "   `D@h %%%%%%% % % % ł% %%%% % ei h   ! b%z%{%%! e+ 2 1%%0 b % 0 b 1 0 b1{%% 0Âb1 0Âb10Âb1!‚ e+!2 10#"e+ 10%$e+ 10'&e+ 10)(e+ 10+*e+ 10-,‚.e+ % /0c1/021e+ 1p043e+5] 1o076e+ 1r098e+: ] 1q!<=!;e+>"2! 10@#?e+ 10B$Ae+ 10D%Ce+ 10F&Ee+ 10H'Ge+ 10J(Ie+ 10L)Ke+ 1 0N*Me+ 1 0P+Oe+ 1 0R,Qe+ 1 0T-Se+ 1 0V.Ue+ 10X/We+ 10Z0Ye+ 10\1[e+ 10^2]e+ 10`3_e+ 10b4ae+ 10d5ce+ 1#0f6ee+ 10h7ge+ 10j8ie+ 10l9ke+ 10n:me+ 10p;oe+ 10r<qe+ 10t=se+ 10v>ue+ 10x?we+ 10z@ye+ 10|A{e+ 1 0~B}e+ 1!0Ce+ 1"0De+ 1$0Ee+ 1%0Fe+ 1&0Ge+ 1'0He+ 1(0Ie+J2# 1)0Ke+ 1*0Le+ 1+0Me+ 1,0Ne+ 1.0Oe+ 100Pe+ 110Qe+ 130Re+ 140Se+ 150Te+ 160Ue+ 170Ve+ 180We+ 190Xe+ 1:0Ye+ 1;0Ze+ 1<0[e+ 1=0\e+ 1>0]e+ 1?0^e+ 1@0_e+ 1A0`e+ 1B0ae+ 1C0be+ 1E0ce+ 1F0de+ 1G0ee+ 1H0fe+ 1I0ge+ 1J0he+ 1K0ie+ 1L0je+ 1M0ke+ 1N0le+ 1O0me+ 1P0ne+ 1Q0oe+ 1R0pe+ 1S0qe+ 1T0re+ 1U0se+ 1V0te+ 1W0ue+ 1Y0ve+ 1Z0we+ 1[0xe+ 1\0ye+ 1]0ze+ 1^0{e+ 1_0|e+ 1`0}e+ 1a0~e+ 1b0e+ 1c0e+ 1d0e+ 1e0e+ 1f0e+ 1g0e+ 1h0e+ 1i0e+ 1j0e+ 1k0 e+ 1l0  e+ 1s0  e+ 1t0e+ 1v0e+ 1w0e+ 1x0e+ 1y0e+ 1z0e+ 1{0e+ 1|0e+ 1}0e+ 10! e+ 10#"e+ 10%$e+ 10'&e+ 10)(e+ 10+*e+ 10-,e+ 10/.e+ 1010e+ 1032e+ 1054e+ 1076e+ 1098e+ 10;:e+ 10=<e+ 10?>e+ 10A@e+ 10CBe+ 10EDe+ 10GFe+ 10IHe+ 10KJe+ 10MLe+ 10ONe+ 10QPe+ 10SRe+ 10UTe+ 10WVe+ 10YXe+ 10[Ze+ 10]\e+ 10_^e+ 10a`e+ 10cbe+ 10ede+ 10gfe+ 10ihe+ 10kje+ 10mle+ 10one+ 10qpe+ 10sre+ 10ute+ 10wve+ 10yxe+ 10{ze+ 10}|e+ 10~e+ 1 e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+2% 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+ 10e+2' 1-0e+2) 1D0e+2+ 1X0e+2- 1n0e+ 1u0 e+ 10 e+ 10   e+ 10   e+ 10  e+2/ 10e+ 10e+ 10e+ 10e+ 1~0e+ 10e+ 10e+ 10e+ 10! e+ 10#"e+ 10%$e+ 1m '&e+ 12 )(e+ 10*02+100o2,300q2-5002.7002/900 20;0021=02b?1~3A)034B035D036F037H038J039L03:N0 30P0 3;R0 3<T0 3=V0 3>X03?Z03@\03A^03B`03Cb03Dd03Ef03Fh03Gj03Hl03In03Jp03Kr03Lt03Mv03Nx03Oz03P|0 3Q~0!3R0"3S0$3T0%3U0&3V0'3W0(3X0)3Y0*3Z0+3[0,3\0-3]0.3^0/3/003_013`023a033b043c053d063e073f083g093h0:3i0;3j0<3k0=3l0>3m0?3n0@3o0A3p0B3q0C3r0D3s0E3t0F3u0G3v0H3w0I3x0J3y0K3z0L3{0M3|0N3}0O3~0P30Q30R30S30T30U30V30W30X30Y30Z30[30\30]30^30_30`30a30b30c30d30e30f30g3 0h3 0i30j30k30l30m30n30o3,0p30q3-0r3 0s3"0t3$0u3&0v3(0w3*0x3,0y3.0z300{320|340}360~3803:03<03>03@03B03D03F03H03J03L03N03P03R03T03V03X03Z03+\03^03`03b03d03f03h03j03l03n03p03r03t03v03x03z03|03~030303.03030303030303030303030303030303030303030303/03030303030303030303030303030303030303030303030303030303030303030303030303103 03 03 03 03 030303 03 03030303030303030303 03"03$03&03(03 *03!,03".03#003$203%403&603*803':03(<03)>03*@0+3+B03,D03-F03H03.J0 3/L0 30N 1 P!0',@0 `````& 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0bAD 5!)1IQYDDDD ۆD=]m1IQ}u-E]u5Me} %=Um-E]u !9Qi)AYq1Iay !9Qi)AYq1Iay !9Qi)AYq1IDay !9Qi)AYq1Iay !9Qi-E]u5Me} %=Um-E]u%-Ya} 9Qi)AYaD`RD]DH 5Q}5j// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Node.js contributors. All rights reserved. MIT License. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { ERR_EVENT_RECURSION, ERR_INVALID_ARG_TYPE, ERR_INVALID_THIS, ERR_MISSING_ARGS, } from "ext:deno_node/internal/errors.ts"; import { validateObject, validateString, } from "ext:deno_node/internal/validators.mjs"; import { emitWarning } from "node:process"; import { nextTick } from "ext:deno_node/_next_tick.ts"; import { Event as WebEvent, EventTarget as WebEventTarget, } from "ext:deno_web/02_event.js"; import { customInspectSymbol, kEmptyObject, kEnumerableProperty, } from "ext:deno_node/internal/util.mjs"; import { inspect } from "node:util"; const kIsEventTarget = Symbol.for("nodejs.event_target"); const kIsNodeEventTarget = Symbol("kIsNodeEventTarget"); import { EventEmitter } from "node:events"; const { kMaxEventTargetListeners, kMaxEventTargetListenersWarned, } = EventEmitter; const kEvents = Symbol("kEvents"); const kIsBeingDispatched = Symbol("kIsBeingDispatched"); const kStop = Symbol("kStop"); const kTarget = Symbol("kTarget"); const kHandlers = Symbol("khandlers"); const kWeakHandler = Symbol("kWeak"); const kHybridDispatch = Symbol.for("nodejs.internal.kHybridDispatch"); const kCreateEvent = Symbol("kCreateEvent"); const kNewListener = Symbol("kNewListener"); const kRemoveListener = Symbol("kRemoveListener"); const kIsNodeStyleListener = Symbol("kIsNodeStyleListener"); const kTrustEvent = Symbol("kTrustEvent"); const kType = Symbol("type"); const kDetail = Symbol("detail"); const kDefaultPrevented = Symbol("defaultPrevented"); const kCancelable = Symbol("cancelable"); const kTimestamp = Symbol("timestamp"); const kBubbles = Symbol("bubbles"); const kComposed = Symbol("composed"); const kPropagationStopped = Symbol("propagationStopped"); function isEvent(value) { return typeof value?.[kType] === "string"; } class Event extends WebEvent { /** * @param {string} type * @param {{ * bubbles?: boolean, * cancelable?: boolean, * composed?: boolean, * }} [options] */ constructor(type, options = null) { super(type, options); if (arguments.length === 0) { throw new ERR_MISSING_ARGS("type"); } validateObject(options, "options", { allowArray: true, allowFunction: true, nullable: true, }); const { cancelable, bubbles, composed } = { ...options }; this[kCancelable] = !!cancelable; this[kBubbles] = !!bubbles; this[kComposed] = !!composed; this[kType] = `${type}`; this[kDefaultPrevented] = false; this[kTimestamp] = performance.now(); this[kPropagationStopped] = false; this[kTarget] = null; this[kIsBeingDispatched] = false; } [customInspectSymbol](depth, options) { if (!isEvent(this)) { throw new ERR_INVALID_THIS("Event"); } const name = this.constructor.name; if (depth < 0) { return name; } const opts = Object.assign({}, options, { depth: NumberIsInteger(options.depth) ? options.depth - 1 : options.depth, }); return `${name} ${ inspect({ type: this[kType], defaultPrevented: this[kDefaultPrevented], cancelable: this[kCancelable], timeStamp: this[kTimestamp], }, opts) }`; } stopImmediatePropagation() { if (!isEvent(this)) { throw new ERR_INVALID_THIS("Event"); } this[kStop] = true; } preventDefault() { if (!isEvent(this)) { throw new ERR_INVALID_THIS("Event"); } this[kDefaultPrevented] = true; } /** * @type {EventTarget} */ get target() { if (!isEvent(this)) { throw new ERR_INVALID_THIS("Event"); } return this[kTarget]; } /** * @type {EventTarget} */ get currentTarget() { if (!isEvent(this)) { throw new ERR_INVALID_THIS("Event"); } return this[kTarget]; } /** * @type {EventTarget} */ get srcElement() { if (!isEvent(this)) { throw new ERR_INVALID_THIS("Event"); } return this[kTarget]; } /** * @type {string} */ get type() { if (!isEvent(this)) { throw new ERR_INVALID_THIS("Event"); } return this[kType]; } /** * @type {boolean} */ get cancelable() { if (!isEvent(this)) { throw new ERR_INVALID_THIS("Event"); } return this[kCancelable]; } /** * @type {boolean} */ get defaultPrevented() { if (!isEvent(this)) { throw new ERR_INVALID_THIS("Event"); } return this[kCancelable] && this[kDefaultPrevented]; } /** * @type {number} */ get timeStamp() { if (!isEvent(this)) { throw new ERR_INVALID_THIS("Event"); } return this[kTimestamp]; } // The following are non-op and unused properties/methods from Web API Event. // These are not supported in Node.js and are provided purely for // API completeness. /** * @returns {EventTarget[]} */ composedPath() { if (!isEvent(this)) { throw new ERR_INVALID_THIS("Event"); } return this[kIsBeingDispatched] ? [this[kTarget]] : []; } /** * @type {boolean} */ get returnValue() { if (!isEvent(this)) { throw new ERR_INVALID_THIS("Event"); } return !this.defaultPrevented; } /** * @type {boolean} */ get bubbles() { if (!isEvent(this)) { throw new ERR_INVALID_THIS("Event"); } return this[kBubbles]; } /** * @type {boolean} */ get composed() { if (!isEvent(this)) { throw new ERR_INVALID_THIS("Event"); } return this[kComposed]; } /** * @type {number} */ get eventPhase() { if (!isEvent(this)) { throw new ERR_INVALID_THIS("Event"); } return this[kIsBeingDispatched] ? Event.AT_TARGET : Event.NONE; } /** * @type {boolean} */ get cancelBubble() { if (!isEvent(this)) { throw new ERR_INVALID_THIS("Event"); } return this[kPropagationStopped]; } /** * @type {boolean} */ set cancelBubble(value) { if (!isEvent(this)) { throw new ERR_INVALID_THIS("Event"); } if (value) { this.stopPropagation(); } } stopPropagation() { if (!isEvent(this)) { throw new ERR_INVALID_THIS("Event"); } this[kPropagationStopped] = true; } static NONE = 0; static CAPTURING_PHASE = 1; static AT_TARGET = 2; static BUBBLING_PHASE = 3; } Object.defineProperties( Event.prototype, { [Symbol.toStringTag]: { writable: true, enumerable: false, configurable: true, value: "Event", }, stopImmediatePropagation: kEnumerableProperty, preventDefault: kEnumerableProperty, target: kEnumerableProperty, currentTarget: kEnumerableProperty, srcElement: kEnumerableProperty, type: kEnumerableProperty, cancelable: kEnumerableProperty, defaultPrevented: kEnumerableProperty, timeStamp: kEnumerableProperty, composedPath: kEnumerableProperty, returnValue: kEnumerableProperty, bubbles: kEnumerableProperty, composed: kEnumerableProperty, eventPhase: kEnumerableProperty, cancelBubble: kEnumerableProperty, stopPropagation: kEnumerableProperty, }, ); function isCustomEvent(value) { return isEvent(value) && (value?.[kDetail] !== undefined); } class CustomEvent extends Event { /** * @constructor * @param {string} type * @param {{ * bubbles?: boolean, * cancelable?: boolean, * composed?: boolean, * detail?: any, * }} [options] */ constructor(type, options = kEmptyObject) { if (arguments.length === 0) { throw new ERR_MISSING_ARGS("type"); } super(type, options); this[kDetail] = options?.detail ?? null; } /** * @type {any} */ get detail() { if (!isCustomEvent(this)) { throw new ERR_INVALID_THIS("CustomEvent"); } return this[kDetail]; } } Object.defineProperties(CustomEvent.prototype, { [Symbol.toStringTag]: { __proto__: null, writable: false, enumerable: false, configurable: true, value: "CustomEvent", }, detail: kEnumerableProperty, }); class NodeCustomEvent extends Event { constructor(type, options) { super(type, options); if (options?.detail) { this.detail = options.detail; } } } // Weak listener cleanup // This has to be lazy for snapshots to work let weakListenersState = null; // The resource needs to retain the callback so that it doesn't // get garbage collected now that it's weak. let objectToWeakListenerMap = null; function weakListeners() { weakListenersState ??= new FinalizationRegistry( (listener) => listener.remove(), ); objectToWeakListenerMap ??= new WeakMap(); return { registry: weakListenersState, map: objectToWeakListenerMap }; } // The listeners for an EventTarget are maintained as a linked list. // Unfortunately, the way EventTarget is defined, listeners are accounted // using the tuple [handler,capture], and even if we don't actually make // use of capture or bubbling, in order to be spec compliant we have to // take on the additional complexity of supporting it. Fortunately, using // the linked list makes dispatching faster, even if adding/removing is // slower. class Listener { constructor( previous, listener, once, capture, passive, isNodeStyleListener, weak, ) { this.next = undefined; if (previous !== undefined) { previous.next = this; } this.previous = previous; this.listener = listener; // TODO(benjamingr) these 4 can be 'flags' to save 3 slots this.once = once; this.capture = capture; this.passive = passive; this.isNodeStyleListener = isNodeStyleListener; this.removed = false; this.weak = Boolean(weak); // Don't retain the object if (this.weak) { this.callback = new WeakRef(listener); weakListeners().registry.register(listener, this, this); // Make the retainer retain the listener in a WeakMap weakListeners().map.set(weak, listener); this.listener = this.callback; } else if (typeof listener === "function") { this.callback = listener; this.listener = listener; } else { this.callback = Function.prototype.bind.call( listener.handleEvent, listener, ); this.listener = listener; } } same(listener, capture) { const myListener = this.weak ? this.listener.deref() : this.listener; return myListener === listener && this.capture === capture; } remove() { if (this.previous !== undefined) { this.previous.next = this.next; } if (this.next !== undefined) { this.next.previous = this.previous; } this.removed = true; if (this.weak) { weakListeners().registry.unregister(this); } } } function initEventTarget(self) { self[kEvents] = new Map(); self[kMaxEventTargetListeners] = EventEmitter.defaultMaxListeners; self[kMaxEventTargetListenersWarned] = false; } class EventTarget extends WebEventTarget { // Used in checking whether an object is an EventTarget. This is a well-known // symbol as EventTarget may be used cross-realm. // Ref: https://github.com/nodejs/node/pull/33661 static [kIsEventTarget] = true; constructor() { super(); initEventTarget(this); } [kNewListener](size, type, _listener, _once, _capture, _passive, _weak) { if ( this[kMaxEventTargetListeners] > 0 && size > this[kMaxEventTargetListeners] && !this[kMaxEventTargetListenersWarned] ) { this[kMaxEventTargetListenersWarned] = true; // No error code for this since it is a Warning // eslint-disable-next-line no-restricted-syntax const w = new Error( "Possible EventTarget memory leak detected. " + `${size} ${type} listeners ` + `added to ${inspect(this, { depth: -1 })}. Use ` + "events.setMaxListeners() to increase limit", ); w.name = "MaxListenersExceededWarning"; w.target = this; w.type = type; w.count = size; emitWarning(w); } } [kRemoveListener](_size, _type, _listener, _capture) {} /** * @callback EventTargetCallback * @param {Event} event */ /** * @typedef {{ handleEvent: EventTargetCallback }} EventListener */ /** * @param {string} type * @param {EventTargetCallback|EventListener} listener * @param {{ * capture?: boolean, * once?: boolean, * passive?: boolean, * signal?: AbortSignal * }} [options] */ addEventListener(type, listener, options = {}) { if (!isEventTarget(this)) { throw new ERR_INVALID_THIS("EventTarget"); } if (arguments.length < 2) { throw new ERR_MISSING_ARGS("type", "listener"); } // We validateOptions before the shouldAddListeners check because the spec // requires us to hit getters. const { once, capture, passive, signal, isNodeStyleListener, weak, } = validateEventListenerOptions(options); if (!shouldAddListener(listener)) { // The DOM silently allows passing undefined as a second argument // No error code for this since it is a Warning // eslint-disable-next-line no-restricted-syntax const w = new Error( `addEventListener called with ${listener}` + " which has no effect.", ); w.name = "AddEventListenerArgumentTypeWarning"; w.target = this; w.type = type; emitWarning(w); return; } type = String(type); if (signal) { if (signal.aborted) { return; } // TODO(benjamingr) make this weak somehow? ideally the signal would // not prevent the event target from GC. signal.addEventListener("abort", () => { this.removeEventListener(type, listener, options); }, { once: true, [kWeakHandler]: this }); } let root = this[kEvents].get(type); if (root === undefined) { root = { size: 1, next: undefined }; // This is the first handler in our linked list. new Listener( root, listener, once, capture, passive, isNodeStyleListener, weak, ); this[kNewListener]( root.size, type, listener, once, capture, passive, weak, ); this[kEvents].set(type, root); return; } let handler = root.next; let previous = root; // We have to walk the linked list to see if we have a match while (handler !== undefined && !handler.same(listener, capture)) { previous = handler; handler = handler.next; } if (handler !== undefined) { // Duplicate! Ignore return; } new Listener( previous, listener, once, capture, passive, isNodeStyleListener, weak, ); root.size++; this[kNewListener](root.size, type, listener, once, capture, passive, weak); } /** * @param {string} type * @param {EventTargetCallback|EventListener} listener * @param {{ * capture?: boolean, * }} [options] */ removeEventListener(type, listener, options = {}) { if (!isEventTarget(this)) { throw new ERR_INVALID_THIS("EventTarget"); } if (!shouldAddListener(listener)) { return; } type = String(type); const capture = options?.capture === true; const root = this[kEvents].get(type); if (root === undefined || root.next === undefined) { return; } let handler = root.next; while (handler !== undefined) { if (handler.same(listener, capture)) { handler.remove(); root.size--; if (root.size === 0) { this[kEvents].delete(type); } this[kRemoveListener](root.size, type, listener, capture); break; } handler = handler.next; } } /** * @param {Event} event */ dispatchEvent(event) { if (!isEventTarget(this)) { throw new ERR_INVALID_THIS("EventTarget"); } if (!(event instanceof globalThis.Event)) { throw new ERR_INVALID_ARG_TYPE("event", "Event", event); } if (event[kIsBeingDispatched]) { throw new ERR_EVENT_RECURSION(event.type); } this[kHybridDispatch](event, event.type, event); return event.defaultPrevented !== true; } [kHybridDispatch](nodeValue, type, event) { const createEvent = () => { if (event === undefined) { event = this[kCreateEvent](nodeValue, type); event[kTarget] = this; event[kIsBeingDispatched] = true; } return event; }; if (event !== undefined) { event[kTarget] = this; event[kIsBeingDispatched] = true; } const root = this[kEvents].get(type); if (root === undefined || root.next === undefined) { if (event !== undefined) { event[kIsBeingDispatched] = false; } return true; } let handler = root.next; let next; while ( handler !== undefined && (handler.passive || event?.[kStop] !== true) ) { // Cache the next item in case this iteration removes the current one next = handler.next; if (handler.removed) { // Deal with the case an event is removed while event handlers are // Being processed (removeEventListener called from a listener) handler = next; continue; } if (handler.once) { handler.remove(); root.size--; const { listener, capture } = handler; this[kRemoveListener](root.size, type, listener, capture); } try { let arg; if (handler.isNodeStyleListener) { arg = nodeValue; } else { arg = createEvent(); } const callback = handler.weak ? handler.callback.deref() : handler.callback; let result; if (callback) { result = callback.call(this, arg); if (!handler.isNodeStyleListener) { arg[kIsBeingDispatched] = false; } } if (result !== undefined && result !== null) { addCatch(result); } } catch (err) { emitUncaughtException(err); } handler = next; } if (event !== undefined) { event[kIsBeingDispatched] = false; } } [kCreateEvent](nodeValue, type) { return new NodeCustomEvent(type, { detail: nodeValue }); } [customInspectSymbol](depth, options) { if (!isEventTarget(this)) { throw new ERR_INVALID_THIS("EventTarget"); } const name = this.constructor.name; if (depth < 0) { return name; } const opts = ObjectAssign({}, options, { depth: Number.isInteger(options.depth) ? options.depth - 1 : options.depth, }); return `${name} ${inspect({}, opts)}`; } } Object.defineProperties(EventTarget.prototype, { addEventListener: kEnumerableProperty, removeEventListener: kEnumerableProperty, dispatchEvent: kEnumerableProperty, [Symbol.toStringTag]: { writable: true, enumerable: false, configurable: true, value: "EventTarget", }, }); function initNodeEventTarget(self) { initEventTarget(self); } class NodeEventTarget extends EventTarget { static [kIsNodeEventTarget] = true; static defaultMaxListeners = 10; constructor() { super(); initNodeEventTarget(this); } /** * @param {number} n */ setMaxListeners(n) { if (!isNodeEventTarget(this)) { throw new ERR_INVALID_THIS("NodeEventTarget"); } EventEmitter.setMaxListeners(n, this); } /** * @returns {number} */ getMaxListeners() { if (!isNodeEventTarget(this)) { throw new ERR_INVALID_THIS("NodeEventTarget"); } return this[kMaxEventTargetListeners]; } /** * @returns {string[]} */ eventNames() { if (!isNodeEventTarget(this)) { throw new ERR_INVALID_THIS("NodeEventTarget"); } return Array.from(this[kEvents].keys()); } /** * @param {string} [type] * @returns {number} */ listenerCount(type) { if (!isNodeEventTarget(this)) { throw new ERR_INVALID_THIS("NodeEventTarget"); } const root = this[kEvents].get(String(type)); return root !== undefined ? root.size : 0; } /** * @param {string} type * @param {EventTargetCallback|EventListener} listener * @param {{ * capture?: boolean, * }} [options] * @returns {NodeEventTarget} */ off(type, listener, options) { if (!isNodeEventTarget(this)) { throw new ERR_INVALID_THIS("NodeEventTarget"); } this.removeEventListener(type, listener, options); return this; } /** * @param {string} type * @param {EventTargetCallback|EventListener} listener * @param {{ * capture?: boolean, * }} [options] * @returns {NodeEventTarget} */ removeListener(type, listener, options) { if (!isNodeEventTarget(this)) { throw new ERR_INVALID_THIS("NodeEventTarget"); } this.removeEventListener(type, listener, options); return this; } /** * @param {string} type * @param {EventTargetCallback|EventListener} listener * @returns {NodeEventTarget} */ on(type, listener) { if (!isNodeEventTarget(this)) { throw new ERR_INVALID_THIS("NodeEventTarget"); } this.addEventListener(type, listener, { [kIsNodeStyleListener]: true }); return this; } /** * @param {string} type * @param {EventTargetCallback|EventListener} listener * @returns {NodeEventTarget} */ addListener(type, listener) { if (!isNodeEventTarget(this)) { throw new ERR_INVALID_THIS("NodeEventTarget"); } this.addEventListener(type, listener, { [kIsNodeStyleListener]: true }); return this; } /** * @param {string} type * @param {any} arg * @returns {boolean} */ emit(type, arg) { if (!isNodeEventTarget(this)) { throw new ERR_INVALID_THIS("NodeEventTarget"); } validateString(type, "type"); const hadListeners = this.listenerCount(type) > 0; this[kHybridDispatch](arg, type); return hadListeners; } /** * @param {string} type * @param {EventTargetCallback|EventListener} listener * @returns {NodeEventTarget} */ once(type, listener) { if (!isNodeEventTarget(this)) { throw new ERR_INVALID_THIS("NodeEventTarget"); } this.addEventListener(type, listener, { once: true, [kIsNodeStyleListener]: true, }); return this; } /** * @param {string} type * @returns {NodeEventTarget} */ removeAllListeners(type) { if (!isNodeEventTarget(this)) { throw new ERR_INVALID_THIS("NodeEventTarget"); } if (type !== undefined) { this[kEvents].delete(String(type)); } else { this[kEvents].clear(); } return this; } } Object.defineProperties(NodeEventTarget.prototype, { setMaxListeners: kEnumerableProperty, getMaxListeners: kEnumerableProperty, eventNames: kEnumerableProperty, listenerCount: kEnumerableProperty, off: kEnumerableProperty, removeListener: kEnumerableProperty, on: kEnumerableProperty, addListener: kEnumerableProperty, once: kEnumerableProperty, emit: kEnumerableProperty, removeAllListeners: kEnumerableProperty, }); // EventTarget API function shouldAddListener(listener) { if ( typeof listener === "function" || typeof listener?.handleEvent === "function" ) { return true; } if (listener == null) { return false; } throw new ERR_INVALID_ARG_TYPE("listener", "EventListener", listener); } function validateEventListenerOptions(options) { if (typeof options === "boolean") { return { capture: options }; } if (options === null) { return {}; } validateObject(options, "options", { allowArray: true, allowFunction: true, }); return { once: Boolean(options.once), capture: Boolean(options.capture), passive: Boolean(options.passive), signal: options.signal, weak: options[kWeakHandler], isNodeStyleListener: Boolean(options[kIsNodeStyleListener]), }; } function isEventTarget(obj) { return obj instanceof globalThis.EventTarget; } function isNodeEventTarget(obj) { return obj?.constructor?.[kIsNodeEventTarget]; } function addCatch(promise) { const then = promise.then; if (typeof then === "function") { then.call(promise, undefined, function (err) { // The callback is called with nextTick to avoid a follow-up // rejection from this promise. emitUncaughtException(err); }); } } function emitUncaughtException(err) { nextTick(() => { throw err; }); } function makeEventHandler(handler) { // Event handlers are dispatched in the order they were first set // See https://github.com/nodejs/node/pull/35949#issuecomment-722496598 function eventHandler(...args) { if (typeof eventHandler.handler !== "function") { return; } return Reflect.apply(eventHandler.handler, this, args); } eventHandler.handler = handler; return eventHandler; } function defineEventHandler(emitter, name) { // 8.1.5.1 Event handlers - basically `on[eventName]` attributes Object.defineProperty(emitter, `on${name}`, { get() { return this[kHandlers]?.get(name)?.handler ?? null; }, set(value) { if (!this[kHandlers]) { this[kHandlers] = new Map(); } let wrappedHandler = this[kHandlers]?.get(name); if (wrappedHandler) { if (typeof wrappedHandler.handler === "function") { this[kEvents].get(name).size--; const size = this[kEvents].get(name).size; this[kRemoveListener](size, name, wrappedHandler.handler, false); } wrappedHandler.handler = value; if (typeof wrappedHandler.handler === "function") { this[kEvents].get(name).size++; const size = this[kEvents].get(name).size; this[kNewListener](size, name, value, false, false, false, false); } } else { wrappedHandler = makeEventHandler(value); this.addEventListener(name, wrappedHandler); } this[kHandlers].set(name, wrappedHandler); }, configurable: true, enumerable: true, }); } const EventEmitterMixin = (Superclass) => { class MixedEventEmitter extends Superclass { constructor(...args) { super(...args); EventEmitter.call(this); } } const protoProps = Object.getOwnPropertyDescriptors(EventEmitter.prototype); delete protoProps.constructor; Object.defineProperties(MixedEventEmitter.prototype, protoProps); return MixedEventEmitter; }; export { CustomEvent, defineEventHandler, Event, EventEmitterMixin, EventTarget, initEventTarget, initNodeEventTarget, isEventTarget, kCreateEvent, kEvents, kNewListener, kRemoveListener, kTrustEvent, kWeakHandler, NodeEventTarget, }; export default { CustomEvent, Event, EventEmitterMixin, EventTarget, NodeEventTarget, defineEventHandler, initEventTarget, initNodeEventTarget, kCreateEvent, kNewListener, kTrustEvent, kRemoveListener, kEvents, kWeakHandler, isEventTarget, }; Qe>'ext:deno_node/internal/event_target.mjsa bgD`-M`I T=`2]La T  I`"]Sb1bOPPQbRR"STbW XXYZ[b[["]]^^"__5BfebjBhhn}??????????????????????????????Ibj`(L`  ]`h" ]`* ]`B ]`.]`" ]`: ]`9"]`]L`0` L`` L`"` L`"o` L`o` L`i` L`i` L`b` L`bBi`  L`Bie`  L`eU`  L`UbQ`  L`bQbV`  L`bVV` L`VX` L`X"T` L`"T]DL`  D  c  Db b c#7 D  c;K DB B cO_ D  c D"L"cX] DLcmx DMMc DKKc Dc*1 D  c DMMc D± ± c& D  c D  c` a?b a? a?B a? a? a?Ka?± a?"La?La?Ma? a?Ma?a? a?bQa ?"Ta?Ua ?bVa ?Va?Xa?"a?a?ba?a?Bia ?ia?ea ?a?oa?a?ub@ T I`]b@ T I` ""_b@ T I`[\Bfb@: T I`]^eb%@; T I``__bjb@= T I`_`b @Bhb@> T  I``ahb@@ TI`1abb @nb@BhLh   T I`*+bb@b; T I`KKBib@,b<  T I` _D_eb@<a=  TI`bFgc@@b@Dc>a  YNbO PPbQQbRRS"UUbVVbWXBZbŸ\$Sb @"b?  `T ``/ `/ `?  `  aD]ff ža  } ` F`  ` F` B a` œa B `F` b `F` B `F`   `F` ›aDaŸ `F` DB ` F`  D ` F` D a `F` D ` F` DHcD La "L T  I`@ "ub M T I`Y q `b T I` œb T I` žb T I`!Qb get targetb  T I`[Qcget currentTargetb T I`lQbget srcElementb T I` Qaget typeb  T I`6Qbget cancelableb  T I`lQcget defaultPreventedb  T I` Qb get timeStampb   T I`b   T I`+Qbget returnValueb T I`[Qb get bubblesb  T I`iQb get composedb  T I`2Qbget eventPhaseb T I`gQbget cancelBubbleb T I`Qbset cancelBubbleb T I`.›b T0`L`b™Bš  `Kb@ x ` te 3 3 3 3(Sbqs"`Da a 0 bB*B]0bGHG"œMž BBB›  `T ``/ `/ `?  `  akD]$ ` aj`+ } `F] T  I`ub  T I`iQb get detailb 0bHHG  `T ``/ `/ `?  `  aT D] ` aj] T  I` ^ub   `T``/ `/ `?  `  a$*D]0 ` ajaajBaj] T  I`$)5ub  T I` ))ab T I`)*Bb$Sb @b?+gJ  `T``/ `/ `?  `  a+gJD]f6 Da Da aa Dxc DLe,4<L T  I`,,]ub   T I`,/`b! T I`/0`b" T I`1/;b# T I`;>b% T I`>@b & T I`@`H`b' T I`rHH`b) T I`HeJ`b* T(` ]  `Kb c5(Sbqs`Da+gJ a b+(bCCC0bGHG$Sb @b?KZ  `T ``/ `/ `?  `  aKZD] `  aj ajkajkajbajlajblaj B aj laj bmaj Baj Bnaj] T  I`ZLLiub - T I`LWM b. T I`MNkb/ T I`RNNkb 0 T I`6OPbb 1 T I`PQlb2 T I`URSblb3  T I`SsTB b4  T I`UUlb 5  T I`0V8Wbmb6  T I`WXBb7  T I` YZBnb8 T,` L`   Y`Kb  md5 3(Sbqsi`DaLZ a 0b9hb  CkCkCbClCblCB ClCBCbmCBnC kkblblB lBbmBn T  o`bghoubKGbC"CoCCiCCbCBiCUCbVCXCVCbQC"TCeC"oibBi"Te `D%h %%%%%%% % % % % %%%%%%%%%%%%%%%%%% %  ei h   ! -^! b%0-%- %! b 1 ! b%! b%! b%! b% ! b1! -^% ! b1 ! b1 ! b1! b % ! b"1!  b$% ! !b&% ! "b(%! #b*%! $b,%! %b.%! &b0%! 'b2%(%0*+ )0,t- . / 0 123456789:;<=>e+ %?]4 1!@6-A80-B:~C<)! -D=t~E?)7@F0G7BH07DI07FJ07HK07J 07L#07N"07PL07RM07TN07V%07X&07ZO07\P07^Q07`_b0SR‚Te+ 1!@6-A80-Bd~Cf)! -D=t~Ug97h!07j_l0WVe+ %%%Y X‚Z!["e+ %\%0^_#] tBmne2 %0 t`$0ta%b&c'd( te)0 tf*0tg+e+h,]o 1!@6-A80-Bq~is)03jt03kv03lx! -D=t~mz)7{_}n%0p-otBmne2 %q.r/s0t1u2v3w4x5y6z7{8e+|9] 1!@6-A80-B~})03~03030303030303030303_Ă:1~)030303030303030 30 30 303030 3030 3 1 Hp?@P@@@@@@@P)H H H H H PsJ D `2 L & 0 0 0 0@bA %1=IUamyI -QDEMUyDD %-5=EMUYaiqD}DDDuDD`RD]DH 2Q2>e// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials "use strict"; import { Buffer } from "node:buffer"; import { ERR_FS_EISDIR, ERR_FS_INVALID_SYMLINK_TYPE, ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, ERR_OUT_OF_RANGE, hideStackFrames, uvException, } from "ext:deno_node/internal/errors.ts"; import { isArrayBufferView, isBigUint64Array, isDate, isUint8Array, } from "ext:deno_node/internal/util/types.ts"; import { once } from "ext:deno_node/internal/util.mjs"; import { deprecate } from "node:util"; import { toPathIfFileURL } from "ext:deno_node/internal/url.ts"; import { validateAbortSignal, validateBoolean, validateFunction, validateInt32, validateInteger, validateObject, validateUint32, } from "ext:deno_node/internal/validators.mjs"; import pathModule from "node:path"; const kType = Symbol("type"); const kStats = Symbol("stats"); import assert from "ext:deno_node/internal/assert.mjs"; import { lstat, lstatSync } from "ext:deno_node/_fs/_fs_lstat.ts"; import { stat, statSync } from "ext:deno_node/_fs/_fs_stat.ts"; import { isWindows } from "ext:deno_node/_util/os.ts"; import process from "node:process"; import { fs as fsConstants, os as osConstants, } from "ext:deno_node/internal_binding/constants.ts"; const { F_OK = 0, W_OK = 0, R_OK = 0, X_OK = 0, COPYFILE_EXCL, COPYFILE_FICLONE, COPYFILE_FICLONE_FORCE, O_APPEND, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY, S_IFBLK, S_IFCHR, S_IFDIR, S_IFIFO, S_IFLNK, S_IFMT, S_IFREG, S_IFSOCK, UV_FS_SYMLINK_DIR, UV_FS_SYMLINK_JUNCTION, UV_DIRENT_UNKNOWN, UV_DIRENT_FILE, UV_DIRENT_DIR, UV_DIRENT_LINK, UV_DIRENT_FIFO, UV_DIRENT_SOCKET, UV_DIRENT_CHAR, UV_DIRENT_BLOCK, } = fsConstants; // The access modes can be any of F_OK, R_OK, W_OK or X_OK. Some might not be // available on specific systems. They can be used in combination as well // (F_OK | R_OK | W_OK | X_OK). const kMinimumAccessMode = Math.min(F_OK, W_OK, R_OK, X_OK); const kMaximumAccessMode = F_OK | W_OK | R_OK | X_OK; const kDefaultCopyMode = 0; // The copy modes can be any of COPYFILE_EXCL, COPYFILE_FICLONE or // COPYFILE_FICLONE_FORCE. They can be used in combination as well // (COPYFILE_EXCL | COPYFILE_FICLONE | COPYFILE_FICLONE_FORCE). const kMinimumCopyMode = Math.min( kDefaultCopyMode, COPYFILE_EXCL, COPYFILE_FICLONE, COPYFILE_FICLONE_FORCE, ); const kMaximumCopyMode = COPYFILE_EXCL | COPYFILE_FICLONE | COPYFILE_FICLONE_FORCE; // Most platforms don't allow reads or writes >= 2 GB. // See https://github.com/libuv/libuv/pull/1501. const kIoMaxLength = 2 ** 31 - 1; // Use 64kb in case the file type is not a regular file and thus do not know the // actual file size. Increasing the value further results in more frequent over // allocation for small files and consumes CPU time and memory that should be // used else wise. // Use up to 512kb per read otherwise to partition reading big files to prevent // blocking other threads in case the available threads are all in use. const kReadFileUnknownBufferLength = 64 * 1024; const kReadFileBufferLength = 512 * 1024; const kWriteFileMaxChunkSize = 512 * 1024; export const kMaxUserId = 2 ** 32 - 1; export function assertEncoding(encoding) { if (encoding && !Buffer.isEncoding(encoding)) { const reason = "is invalid encoding"; throw new ERR_INVALID_ARG_VALUE(encoding, "encoding", reason); } } export class Dirent { constructor(name, type) { this.name = name; this[kType] = type; } isDirectory() { return this[kType] === UV_DIRENT_DIR; } isFile() { return this[kType] === UV_DIRENT_FILE; } isBlockDevice() { return this[kType] === UV_DIRENT_BLOCK; } isCharacterDevice() { return this[kType] === UV_DIRENT_CHAR; } isSymbolicLink() { return this[kType] === UV_DIRENT_LINK; } isFIFO() { return this[kType] === UV_DIRENT_FIFO; } isSocket() { return this[kType] === UV_DIRENT_SOCKET; } } class DirentFromStats extends Dirent { constructor(name, stats) { super(name, null); this[kStats] = stats; } } for (const name of Reflect.ownKeys(Dirent.prototype)) { if (name === "constructor") { continue; } DirentFromStats.prototype[name] = function () { return this[kStats][name](); }; } export function copyObject(source) { const target = {}; for (const key in source) { target[key] = source[key]; } return target; } const bufferSep = Buffer.from(pathModule.sep); function join(path, name) { if ( (typeof path === "string" || isUint8Array(path)) && name === undefined ) { return path; } if (typeof path === "string" && isUint8Array(name)) { const pathBuffer = Buffer.from(pathModule.join(path, pathModule.sep)); return Buffer.concat([pathBuffer, name]); } if (typeof path === "string" && typeof name === "string") { return pathModule.join(path, name); } if (isUint8Array(path) && isUint8Array(name)) { return Buffer.concat([path, bufferSep, name]); } throw new ERR_INVALID_ARG_TYPE( "path", ["string", "Buffer"], path, ); } export function getDirents(path, { 0: names, 1: types }, callback) { let i; if (typeof callback === "function") { const len = names.length; let toFinish = 0; callback = once(callback); for (i = 0; i < len; i++) { const type = types[i]; if (type === UV_DIRENT_UNKNOWN) { const name = names[i]; const idx = i; toFinish++; let filepath; try { filepath = join(path, name); } catch (err) { callback(err); return; } lstat(filepath, (err, stats) => { if (err) { callback(err); return; } names[idx] = new DirentFromStats(name, stats); if (--toFinish === 0) { callback(null, names); } }); } else { names[i] = new Dirent(names[i], types[i]); } } if (toFinish === 0) { callback(null, names); } } else { const len = names.length; for (i = 0; i < len; i++) { names[i] = getDirent(path, names[i], types[i]); } return names; } } export function getDirent(path, name, type, callback) { if (typeof callback === "function") { if (type === UV_DIRENT_UNKNOWN) { let filepath; try { filepath = join(path, name); } catch (err) { callback(err); return; } lstat(filepath, (err, stats) => { if (err) { callback(err); return; } callback(null, new DirentFromStats(name, stats)); }); } else { callback(null, new Dirent(name, type)); } } else if (type === UV_DIRENT_UNKNOWN) { const stats = lstatSync(join(path, name)); return new DirentFromStats(name, stats); } else { return new Dirent(name, type); } } export function getOptions(options, defaultOptions) { if ( options === null || options === undefined || typeof options === "function" ) { return defaultOptions; } if (typeof options === "string") { defaultOptions = { ...defaultOptions }; defaultOptions.encoding = options; options = defaultOptions; } else if (typeof options !== "object") { throw new ERR_INVALID_ARG_TYPE("options", ["string", "Object"], options); } if (options.encoding !== "buffer") { assertEncoding(options.encoding); } if (options.signal !== undefined) { validateAbortSignal(options.signal, "options.signal"); } return options; } /** * @param {InternalFSBinding.FSSyncContext} ctx */ export function handleErrorFromBinding(ctx) { if (ctx.errno !== undefined) { // libuv error numbers const err = uvException(ctx); Error.captureStackTrace(err, handleErrorFromBinding); throw err; } if (ctx.error !== undefined) { // Errors created in C++ land. // TODO(joyeecheung): currently, ctx.error are encoding errors // usually caused by memory problems. We need to figure out proper error // code(s) for this. Error.captureStackTrace(ctx.error, handleErrorFromBinding); throw ctx.error; } } // Check if the path contains null types if it is a string nor Uint8Array, // otherwise return silently. export const nullCheck = hideStackFrames( (path, propName, throwError = true) => { const pathIsString = typeof path === "string"; const pathIsUint8Array = isUint8Array(path); // We can only perform meaningful checks on strings and Uint8Arrays. if ( (!pathIsString && !pathIsUint8Array) || (pathIsString && !path.includes("\u0000")) || (pathIsUint8Array && !path.includes(0)) ) { return; } const err = new ERR_INVALID_ARG_VALUE( propName, path, "must be a string or Uint8Array without null bytes", ); if (throwError) { throw err; } return err; }, ); export function preprocessSymlinkDestination(path, type, linkPath) { if (!isWindows) { // No preprocessing is needed on Unix. return path; } path = "" + path; if (type === "junction") { // Junctions paths need to be absolute and \\?\-prefixed. // A relative target is relative to the link's parent directory. path = pathModule.resolve(linkPath, "..", path); return pathModule.toNamespacedPath(path); } if (pathModule.isAbsolute(path)) { // If the path is absolute, use the \\?\-prefix to enable long filenames return pathModule.toNamespacedPath(path); } // Windows symlinks don't tolerate forward slashes. return path.replace(/\//g, "\\"); } // Constructor for file stats. function StatsBase( dev, mode, nlink, uid, gid, rdev, blksize, ino, size, blocks, ) { this.dev = dev; this.mode = mode; this.nlink = nlink; this.uid = uid; this.gid = gid; this.rdev = rdev; this.blksize = blksize; this.ino = ino; this.size = size; this.blocks = blocks; } StatsBase.prototype.isDirectory = function () { return this._checkModeProperty(S_IFDIR); }; StatsBase.prototype.isFile = function () { return this._checkModeProperty(S_IFREG); }; StatsBase.prototype.isBlockDevice = function () { return this._checkModeProperty(S_IFBLK); }; StatsBase.prototype.isCharacterDevice = function () { return this._checkModeProperty(S_IFCHR); }; StatsBase.prototype.isSymbolicLink = function () { return this._checkModeProperty(S_IFLNK); }; StatsBase.prototype.isFIFO = function () { return this._checkModeProperty(S_IFIFO); }; StatsBase.prototype.isSocket = function () { return this._checkModeProperty(S_IFSOCK); }; const kNsPerMsBigInt = 10n ** 6n; const kNsPerSecBigInt = 10n ** 9n; const kMsPerSec = 10 ** 3; const kNsPerMs = 10 ** 6; function msFromTimeSpec(sec, nsec) { return sec * kMsPerSec + nsec / kNsPerMs; } function nsFromTimeSpecBigInt(sec, nsec) { return sec * kNsPerSecBigInt + nsec; } // The Date constructor performs Math.floor() to the timestamp. // https://www.ecma-international.org/ecma-262/#sec-timeclip // Since there may be a precision loss when the timestamp is // converted to a floating point number, we manually round // the timestamp here before passing it to Date(). // Refs: https://github.com/nodejs/node/pull/12607 function dateFromMs(ms) { return new Date(Number(ms) + 0.5); } export function BigIntStats( dev, mode, nlink, uid, gid, rdev, blksize, ino, size, blocks, atimeNs, mtimeNs, ctimeNs, birthtimeNs, ) { Reflect.apply(StatsBase, this, [ dev, mode, nlink, uid, gid, rdev, blksize, ino, size, blocks, ]); this.atimeMs = atimeNs / kNsPerMsBigInt; this.mtimeMs = mtimeNs / kNsPerMsBigInt; this.ctimeMs = ctimeNs / kNsPerMsBigInt; this.birthtimeMs = birthtimeNs / kNsPerMsBigInt; this.atimeNs = atimeNs; this.mtimeNs = mtimeNs; this.ctimeNs = ctimeNs; this.birthtimeNs = birthtimeNs; this.atime = dateFromMs(this.atimeMs); this.mtime = dateFromMs(this.mtimeMs); this.ctime = dateFromMs(this.ctimeMs); this.birthtime = dateFromMs(this.birthtimeMs); } Object.setPrototypeOf(BigIntStats.prototype, StatsBase.prototype); Object.setPrototypeOf(BigIntStats, StatsBase); BigIntStats.prototype._checkModeProperty = function (property) { if ( isWindows && (property === S_IFIFO || property === S_IFBLK || property === S_IFSOCK) ) { return false; // Some types are not available on Windows } return (this.mode & BigInt(S_IFMT)) === BigInt(property); }; export function Stats( dev, mode, nlink, uid, gid, rdev, blksize, ino, size, blocks, atimeMs, mtimeMs, ctimeMs, birthtimeMs, ) { StatsBase.call( this, dev, mode, nlink, uid, gid, rdev, blksize, ino, size, blocks, ); this.atimeMs = atimeMs; this.mtimeMs = mtimeMs; this.ctimeMs = ctimeMs; this.birthtimeMs = birthtimeMs; this.atime = dateFromMs(atimeMs); this.mtime = dateFromMs(mtimeMs); this.ctime = dateFromMs(ctimeMs); this.birthtime = dateFromMs(birthtimeMs); } Object.setPrototypeOf(Stats.prototype, StatsBase.prototype); Object.setPrototypeOf(Stats, StatsBase); // HACK: Workaround for https://github.com/standard-things/esm/issues/821. // TODO(ronag): Remove this as soon as `esm` publishes a fixed version. Stats.prototype.isFile = StatsBase.prototype.isFile; Stats.prototype._checkModeProperty = function (property) { if ( isWindows && (property === S_IFIFO || property === S_IFBLK || property === S_IFSOCK) ) { return false; // Some types are not available on Windows } return (this.mode & S_IFMT) === property; }; /** * @param {Float64Array | BigUint64Array} stats * @param {number} offset * @returns */ export function getStatsFromBinding(stats, offset = 0) { if (isBigUint64Array(stats)) { return new BigIntStats( stats[0 + offset], stats[1 + offset], stats[2 + offset], stats[3 + offset], stats[4 + offset], stats[5 + offset], stats[6 + offset], stats[7 + offset], stats[8 + offset], stats[9 + offset], nsFromTimeSpecBigInt(stats[10 + offset], stats[11 + offset]), nsFromTimeSpecBigInt(stats[12 + offset], stats[13 + offset]), nsFromTimeSpecBigInt(stats[14 + offset], stats[15 + offset]), nsFromTimeSpecBigInt(stats[16 + offset], stats[17 + offset]), ); } return new Stats( stats[0 + offset], stats[1 + offset], stats[2 + offset], stats[3 + offset], stats[4 + offset], stats[5 + offset], stats[6 + offset], stats[7 + offset], stats[8 + offset], stats[9 + offset], msFromTimeSpec(stats[10 + offset], stats[11 + offset]), msFromTimeSpec(stats[12 + offset], stats[13 + offset]), msFromTimeSpec(stats[14 + offset], stats[15 + offset]), msFromTimeSpec(stats[16 + offset], stats[17 + offset]), ); } export function stringToFlags(flags, name = "flags") { if (typeof flags === "number") { validateInt32(flags, name); return flags; } if (flags == null) { return O_RDONLY; } switch (flags) { case "r": return O_RDONLY; case "rs": // Fall through. case "sr": return O_RDONLY | O_SYNC; case "r+": return O_RDWR; case "rs+": // Fall through. case "sr+": return O_RDWR | O_SYNC; case "w": return O_TRUNC | O_CREAT | O_WRONLY; case "wx": // Fall through. case "xw": return O_TRUNC | O_CREAT | O_WRONLY | O_EXCL; case "w+": return O_TRUNC | O_CREAT | O_RDWR; case "wx+": // Fall through. case "xw+": return O_TRUNC | O_CREAT | O_RDWR | O_EXCL; case "a": return O_APPEND | O_CREAT | O_WRONLY; case "ax": // Fall through. case "xa": return O_APPEND | O_CREAT | O_WRONLY | O_EXCL; case "as": // Fall through. case "sa": return O_APPEND | O_CREAT | O_WRONLY | O_SYNC; case "a+": return O_APPEND | O_CREAT | O_RDWR; case "ax+": // Fall through. case "xa+": return O_APPEND | O_CREAT | O_RDWR | O_EXCL; case "as+": // Fall through. case "sa+": return O_APPEND | O_CREAT | O_RDWR | O_SYNC; } throw new ERR_INVALID_ARG_VALUE("flags", flags); } export const stringToSymlinkType = hideStackFrames((type) => { let flags = 0; if (typeof type === "string") { switch (type) { case "dir": flags |= UV_FS_SYMLINK_DIR; break; case "junction": flags |= UV_FS_SYMLINK_JUNCTION; break; case "file": break; default: throw new ERR_FS_INVALID_SYMLINK_TYPE(type); } } return flags; }); // converts Date or number to a fractional UNIX timestamp export function toUnixTimestamp(time, name = "time") { // eslint-disable-next-line eqeqeq if (typeof time === "string" && +time == time) { return +time; } if (Number.isFinite(time)) { if (time < 0) { return Date.now() / 1000; } return time; } if (isDate(time)) { // Convert to 123.456 UNIX timestamp return Date.getTime(time) / 1000; } throw new ERR_INVALID_ARG_TYPE(name, ["Date", "Time in seconds"], time); } export const validateOffsetLengthRead = hideStackFrames( (offset, length, bufferLength) => { if (offset < 0) { throw new ERR_OUT_OF_RANGE("offset", ">= 0", offset); } if (length < 0) { throw new ERR_OUT_OF_RANGE("length", ">= 0", length); } if (offset + length > bufferLength) { throw new ERR_OUT_OF_RANGE( "length", `<= ${bufferLength - offset}`, length, ); } }, ); export const validateOffsetLengthWrite = hideStackFrames( (offset, length, byteLength) => { if (offset > byteLength) { throw new ERR_OUT_OF_RANGE("offset", `<= ${byteLength}`, offset); } if (length > byteLength - offset) { throw new ERR_OUT_OF_RANGE("length", `<= ${byteLength - offset}`, length); } if (length < 0) { throw new ERR_OUT_OF_RANGE("length", ">= 0", length); } validateInt32(length, "length", 0); }, ); export const validatePath = hideStackFrames((path, propName = "path") => { if (typeof path !== "string" && !isUint8Array(path)) { throw new ERR_INVALID_ARG_TYPE(propName, ["string", "Buffer", "URL"], path); } const err = nullCheck(path, propName, false); if (err !== undefined) { throw err; } }); export const getValidatedPath = hideStackFrames( (fileURLOrPath, propName = "path") => { const path = toPathIfFileURL(fileURLOrPath); validatePath(path, propName); return path; }, ); export const getValidatedFd = hideStackFrames((fd, propName = "fd") => { if (Object.is(fd, -0)) { return 0; } validateInt32(fd, propName, 0); return fd; }); export const validateBufferArray = hideStackFrames( (buffers, propName = "buffers") => { if (!Array.isArray(buffers)) { throw new ERR_INVALID_ARG_TYPE(propName, "ArrayBufferView[]", buffers); } for (let i = 0; i < buffers.length; i++) { if (!isArrayBufferView(buffers[i])) { throw new ERR_INVALID_ARG_TYPE(propName, "ArrayBufferView[]", buffers); } } return buffers; }, ); let nonPortableTemplateWarn = true; export function warnOnNonPortableTemplate(template) { // Template strings passed to the mkdtemp() family of functions should not // end with 'X' because they are handled inconsistently across platforms. if (nonPortableTemplateWarn && template.endsWith("X")) { process.emitWarning( "mkdtemp() templates ending with X are not portable. " + "For details see: https://nodejs.org/api/fs.html", ); nonPortableTemplateWarn = false; } } const defaultCpOptions = { dereference: false, errorOnExist: false, filter: undefined, force: true, preserveTimestamps: false, recursive: false, }; const defaultRmOptions = { recursive: false, force: false, retryDelay: 100, maxRetries: 0, }; const defaultRmdirOptions = { retryDelay: 100, maxRetries: 0, recursive: false, }; export const validateCpOptions = hideStackFrames((options) => { if (options === undefined) { return { ...defaultCpOptions }; } validateObject(options, "options"); options = { ...defaultCpOptions, ...options }; validateBoolean(options.dereference, "options.dereference"); validateBoolean(options.errorOnExist, "options.errorOnExist"); validateBoolean(options.force, "options.force"); validateBoolean(options.preserveTimestamps, "options.preserveTimestamps"); validateBoolean(options.recursive, "options.recursive"); if (options.filter !== undefined) { validateFunction(options.filter, "options.filter"); } return options; }); export const validateRmOptions = hideStackFrames( (path, options, expectDir, cb) => { options = validateRmdirOptions(options, defaultRmOptions); validateBoolean(options.force, "options.force"); stat(path, (err, stats) => { if (err) { if (options.force && err.code === "ENOENT") { return cb(null, options); } return cb(err, options); } if (expectDir && !stats.isDirectory()) { return cb(false); } if (stats.isDirectory() && !options.recursive) { return cb( new ERR_FS_EISDIR({ code: "EISDIR", message: "is a directory", path, syscall: "rm", errno: osConstants.errno.EISDIR, }), ); } return cb(null, options); }); }, ); export const validateRmOptionsSync = hideStackFrames( (path, options, expectDir) => { options = validateRmdirOptions(options, defaultRmOptions); validateBoolean(options.force, "options.force"); if (!options.force || expectDir || !options.recursive) { const isDirectory = statSync(path, { throwIfNoEntry: !options.force }) ?.isDirectory(); if (expectDir && !isDirectory) { return false; } if (isDirectory && !options.recursive) { throw new ERR_FS_EISDIR({ code: "EISDIR", message: "is a directory", path, syscall: "rm", errno: EISDIR, }); } } return options; }, ); let recursiveRmdirWarned = process.noDeprecation; export function emitRecursiveRmdirWarning() { if (!recursiveRmdirWarned) { process.emitWarning( "In future versions of Node.js, fs.rmdir(path, { recursive: true }) " + "will be removed. Use fs.rm(path, { recursive: true }) instead", "DeprecationWarning", "DEP0147", ); recursiveRmdirWarned = true; } } export const validateRmdirOptions = hideStackFrames( (options, defaults = defaultRmdirOptions) => { if (options === undefined) { return defaults; } validateObject(options, "options"); options = { ...defaults, ...options }; validateBoolean(options.recursive, "options.recursive"); validateInt32(options.retryDelay, "options.retryDelay", 0); validateUint32(options.maxRetries, "options.maxRetries"); return options; }, ); export const getValidMode = hideStackFrames((mode, type) => { let min = kMinimumAccessMode; let max = kMaximumAccessMode; let def = F_OK; if (type === "copyFile") { min = kMinimumCopyMode; max = kMaximumCopyMode; def = mode || kDefaultCopyMode; } else { assert(type === "access"); } if (mode == null) { return def; } if (Number.isInteger(mode) && mode >= min && mode <= max) { return mode; } if (typeof mode !== "number") { throw new ERR_INVALID_ARG_TYPE("mode", "integer", mode); } throw new ERR_OUT_OF_RANGE( "mode", `an integer >= ${min} && <= ${max}`, mode, ); }); export const validateStringAfterArrayBufferView = hideStackFrames( (buffer, name) => { if (typeof buffer === "string") { return; } if ( typeof buffer === "object" && buffer !== null && typeof buffer.toString === "function" && Object.prototype.hasOwnProperty.call(buffer, "toString") ) { return; } throw new ERR_INVALID_ARG_TYPE( name, ["string", "Buffer", "TypedArray", "DataView"], buffer, ); }, ); export const validatePosition = hideStackFrames((position) => { if (typeof position === "number") { validateInteger(position, "position"); } else if (typeof position === "bigint") { if (!(position >= -(2n ** 63n) && position <= 2n ** 63n - 1n)) { throw new ERR_OUT_OF_RANGE( "position", `>= ${-(2n ** 63n)} && <= ${2n ** 63n - 1n}`, position, ); } } else { throw new ERR_INVALID_ARG_TYPE("position", ["integer", "bigint"], position); } }); export const realpathCacheKey = Symbol("realpathCacheKey"); export const constants = { kIoMaxLength, kMaxUserId, kReadFileBufferLength, kReadFileUnknownBufferLength, kWriteFileMaxChunkSize, }; export const showStringCoercionDeprecation = deprecate( () => {}, "Implicit coercion of objects with own toString property is deprecated.", "DEP0162", ); export default { constants, assertEncoding, BigIntStats, // for testing copyObject, Dirent, emitRecursiveRmdirWarning, getDirent, getDirents, getOptions, getValidatedFd, getValidatedPath, getValidMode, handleErrorFromBinding, kMaxUserId, nullCheck, preprocessSymlinkDestination, realpathCacheKey, getStatsFromBinding, showStringCoercionDeprecation, stringToFlags, stringToSymlinkType, Stats, toUnixTimestamp, validateBufferArray, validateCpOptions, validateOffsetLengthRead, validateOffsetLengthWrite, validatePath, validatePosition, validateRmOptions, validateRmOptionsSync, validateRmdirOptions, validateStringAfterArrayBufferView, warnOnNonPortableTemplate, }; Qez#ext:deno_node/internal/fs/utils.mjsa bhD`M`: T`rLa T  I`=Sb12 "s"; > A B < b= ? "> = sBttubuu"vvvw"xxByyBzzB{{B||}~~bBB£B??????????????????????????????????????????????????Ibe`@L` b]` ]`" ]`" ]`M: ]`] ]`" ]`n"( ]` ]` 2 ]`RI ]`" ]`* ]`"} ]`J]L`i` L`’` L`’) ` L`) V ` L`V ` L`b` L`b` L`` L`B`  L`B`  L`‡`  L`‡`  L``  L`` L` ` L` ˆ` L`ˆ` L`b` L`b` L`` L`` L`"` L`"` L`` L`B` L`B` L`"` L`"` L`œ` L`œ` L`"` L`"b`  L`bB`! L`B²`" L`²"`# L`"]L`   D"{ "{ c D  c  D" " c ( Db b c,@ D  cDY D" " c]m D c D  cy Db9 c  D" " cq D"3"3c Dqqc DB6B6c D  c Dttc  D""c :? Dc AJ DBBcAE D9 c 02 Drc D* c  Dc } Dbbc  D"r"rc Db b c DB B c D  c  D  c  D"/ "/ c!. D"[ "[ c2A D  cES D^ ^ cWe`C"{ a? a?" a?b a? a?" a?" a?b a?"3a?qa?B6a? a?Ba? a?"ra?B a? a? a?"/ a?"[ a? a?^ a?ra?a?"a?a?a?ba?ta?* a?b9 a?9 a?a?a?) a?a?a ?Ba ?‡a ?ˆa?ba?a?’a?V a?a ?"a?a?a?"a?a?œa? a?a?Ba?"a#?a?"a?ba ?a?Ba!?a ?²a"?a?a?ba?a?a?b @  T@`>0L` bc¶b¤"   `DiX 2 2 2 2 2 2 2 2 2 2 (SbpA `Dao&'b , , , b  @! T  I`**bb@" T I`+O+b@# T0`L`Y`?  1`De!!b8 i(SbqAB`Da,, a @b@ $La? T  I`H b@b( T I`b@ a) T I`b@a*  T I`Bb@a+  T I`D‡b@a,  T I` ˆb@b- T I`#<&b%@a. T I` -/’b@!a/ T\`t,L` 1B´bf" `Dphx(-    \  2 2 2 2 /b 2/b2/b2/b2(SbpAV `Da13c ,,@ ,b@#a0 T I`6:b@%a1  T I`;@"b@&b2 T I`BCb@(g3 T I`KM"b"@/d4#  T I`WYb"@4i5! "a  sb9 "; ; ; B< E BF F > A B < b= ? "> = sBttubuu"vvvw"xxByyBzzB{{Y`A  ` T ``/ `/ `?  `  a.D]l ` aj ajajBajaj "ajajaj ] T  I`^) b % T I`mb & T I`b' T I`!Bb ( T I`6ib) T I`{"b* T I`b+ T I`,b ,  `T``/ `/ `?  `  a0D] ` aj] T  I`db  - Sb&@`?  T  y`Qb .`ClI9b @ .i"{ era"  T I`-!#IbK/ T `Qb .isDirectory`''Ib @0 T ` Qa.isFile`(L(Ib @1 T ``B`|((Ib @2B T  y```()Ib @3 T ``"`C)t)Ib @4" T ` Qa.isFIFO`))Ib @5 T `Qb .isSocket`)+*Ib @6 a  a a  a  T `’``01Ib @"7 T `V ``"5 6Ib @$8 T I`O@AIbK'9 T I`CuEIbK): T I`EKGIbK*; T I`}GHIbK+< T I`HQIIbK,= T I`IIIbK-> T I`9JKIbK.?@b ¡HBH;C¢G"H"^H;0b"^H¢HB`d¤`(bB`d¤`"^H T I`5OQIbK0@ T I`QTIbK1A T I`UWIbK3B* " T I`OYZIbK5C T I`[d]IbK6D T I`]K_IbK7E T I`_BaIbK8F8b CCBCCCB  T I`LbTbIbK9Gµ"!bD"bCC’CC) CCBCC‡CC CCˆCCbCCCCC"CCV CCBCC"CCœCC"CbCBC²C"Cb’) B‡ ˆb"V B"œ"bB²"Kd &p>S  `Dh %%%%%%% % % % % %%%%%%%%%%%%%%%%%%% %!%"%#%$%%%&%'%(%)%*%+%,%-%.%/%0%1%2%3%4ei h  !  b%!  b%0 -  %- -  -  ----%-%-%-% -% -% - % -"% -$%-&%-(%-*%- ,%-!.%-"0%-#2%-$4%-%6%-&8%-':%-(<%-)>%-*@%-+B%-,D%--F%!.H-/J\L%  >N >O >P%! %"!.H-/J"\Q%# >S >T%$    01213456 7 8 9 e+ 10; :e+ %%!Y^[]_-?a]ce-@eF-AgB% %Cmi%->jD4lVn   &-Eo]qe    0F-Gs0H-Iu^w%&0JKby1(->{L2M}(->{N2O(->{P2Q(->{R2S(->{T2U(->{V2W(->{X2YZ[=%)\]=%* %+ @B%,!^-_0->(->{_!^-_0(_0->`2a!^-_0->(->{_!^-_0(_0->(->{-O2O0->b2a0cb10db10eb10fb10gb10hb10ib1%0~j)3k %1~l)%2~m)%30n b10o!b10p"b1 0q-r%40s#b1!0t$b1 0u%b1"0v&b1! wb1~x) 3y03z 3{ 3| 3} 10~'`1~)0303030303030 30 30 303030 30303z030303w0 30303030303030303 03 0303030 30!30"30#3 1 hx6@PPPPPPPPPPP@B Ѐ  X``B ``& IP@0& 0 0 0 0 0 0 0 0 0 0 0 bAM 1=U]DeDmuM}Ueu%- %9ADIQYaiuD`RD]DH QF"// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { setUnrefTimeout } from "node:timers"; import { notImplemented } from "ext:deno_node/_utils.ts"; let utcCache; export function utcDate() { if (!utcCache) cache(); return utcCache; } function cache() { const d = new Date(); utcCache = d.toUTCString(); setUnrefTimeout(resetCache, 1000 - d.getMilliseconds()); } function resetCache() { utcCache = undefined; } export function emitStatistics(_statistics) { notImplemented("internal/http.emitStatistics"); } export const kOutHeaders = Symbol("kOutHeaders"); export const kNeedDrain = Symbol("kNeedDrain"); export default { utcDate, emitStatistics, kOutHeaders, kNeedDrain }; Qd/3ext:deno_node/internal/http.tsa biD`M` Th`8La 0 T  I`N"ySb1"ybb???Ib`L` 5 ]`' ]`U]DL`` L`` L` ` L`  ` L`  ` L` ]L`  Db b c?M Dc`a?b a? a?a? a? a?a?b@K T I`bbb@L,L`  T I` b@Ia T I`b@Jda    0b CC C C   `Ds h %%%ei h  %!b1!b1~ )03 03 03 03 1 b@bAHD`RD]DH EQAs8// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials "use strict"; const kUTF16SurrogateThreshold = 0x10000; // 2 ** 16 const kEscape = "\x1b"; export const kSubstringSearch = Symbol("kSubstringSearch"); export function CSI(strings, ...args) { let ret = `${kEscape}[`; for (let n = 0; n < strings.length; n++) { ret += strings[n]; if (n < args.length) { ret += args[n]; } } return ret; } CSI.kEscape = kEscape; CSI.kClearToLineBeginning = `${kEscape}[1K`; CSI.kClearToLineEnd = `${kEscape}[0K`; CSI.kClearLine = `${kEscape}[2K`; CSI.kClearScreenDown = `${kEscape}[0J`; // TODO(BridgeAR): Treat combined characters as single character, i.e, // 'a\u0301' and '\u0301a' (both have the same visual output). // Check Canonical_Combining_Class in // http://userguide.icu-project.org/strings/properties export function charLengthLeft(str, i) { if (i <= 0) { return 0; } if ( (i > 1 && str.codePointAt(i - 2) >= kUTF16SurrogateThreshold) || str.codePointAt(i - 1) >= kUTF16SurrogateThreshold ) { return 2; } return 1; } export function charLengthAt(str, i) { if (str.length <= i) { // Pretend to move to the right. This is necessary to autocomplete while // moving to the right. return 1; } return str.codePointAt(i) >= kUTF16SurrogateThreshold ? 2 : 1; } /* Some patterns seen in terminal key escape codes, derived from combos seen at http://www.midnight-commander.org/browser/lib/tty/key.c ESC letter ESC [ letter ESC [ modifier letter ESC [ 1 ; modifier letter ESC [ num char ESC [ num ; modifier char ESC O letter ESC O modifier letter ESC O 1 ; modifier letter ESC N letter ESC [ [ num ; modifier char ESC [ [ 1 ; modifier letter ESC ESC [ num char ESC ESC O letter - char is usually ~ but $ and ^ also happen with rxvt - modifier is 1 + (shift * 1) + (left_alt * 2) + (ctrl * 4) + (right_alt * 8) - two leading ESCs apparently mean the same as one leading ESC */ export function* emitKeys(stream) { while (true) { let ch = yield; let s = ch; let escaped = false; const key = { sequence: null, name: undefined, ctrl: false, meta: false, shift: false, }; if (ch === kEscape) { escaped = true; s += ch = yield; if (ch === kEscape) { s += ch = yield; } } if (escaped && (ch === "O" || ch === "[")) { // ANSI escape sequence let code = ch; let modifier = 0; if (ch === "O") { // ESC O letter // ESC O modifier letter s += ch = yield; if (ch >= "0" && ch <= "9") { modifier = (ch >> 0) - 1; s += ch = yield; } code += ch; } else if (ch === "[") { // ESC [ letter // ESC [ modifier letter // ESC [ [ modifier letter // ESC [ [ num char s += ch = yield; if (ch === "[") { // \x1b[[A // ^--- escape codes might have a second bracket code += ch; s += ch = yield; } /* * Here and later we try to buffer just enough data to get * a complete ascii sequence. * * We have basically two classes of ascii characters to process: * * 1. `\x1b[24;5~` should be parsed as { code: '[24~', modifier: 5 } * * This particular example is featuring Ctrl+F12 in xterm. * * - `;5` part is optional, e.g. it could be `\x1b[24~` * - first part can contain one or two digits * * So the generic regexp is like /^\d\d?(;\d)?[~^$]$/ * * 2. `\x1b[1;5H` should be parsed as { code: '[H', modifier: 5 } * * This particular example is featuring Ctrl+Home in xterm. * * - `1;5` part is optional, e.g. it could be `\x1b[H` * - `1;` part is optional, e.g. it could be `\x1b[5H` * * So the generic regexp is like /^((\d;)?\d)?[A-Za-z]$/ */ const cmdStart = s.length - 1; // Skip one or two leading digits if (ch >= "0" && ch <= "9") { s += ch = yield; if (ch >= "0" && ch <= "9") { s += ch = yield; } } // skip modifier if (ch === ";") { s += ch = yield; if (ch >= "0" && ch <= "9") { s += yield; } } /* * We buffered enough data, now trying to extract code * and modifier from it */ const cmd = s.slice(cmdStart); let match; if ((match = cmd.match(/^(\d\d?)(;(\d))?([~^$])$/))) { code += match[1] + match[4]; modifier = (match[3] || 1) - 1; } else if ( (match = cmd.match(/^((\d;)?(\d))?([A-Za-z])$/)) ) { code += match[4]; modifier = (match[3] || 1) - 1; } else { code += cmd; } } // Parse the key modifier key.ctrl = !!(modifier & 4); key.meta = !!(modifier & 10); key.shift = !!(modifier & 1); key.code = code; // Parse the key itself switch (code) { /* xterm/gnome ESC [ letter (with modifier) */ case "[P": key.name = "f1"; break; case "[Q": key.name = "f2"; break; case "[R": key.name = "f3"; break; case "[S": key.name = "f4"; break; /* xterm/gnome ESC O letter (without modifier) */ case "OP": key.name = "f1"; break; case "OQ": key.name = "f2"; break; case "OR": key.name = "f3"; break; case "OS": key.name = "f4"; break; /* xterm/rxvt ESC [ number ~ */ case "[11~": key.name = "f1"; break; case "[12~": key.name = "f2"; break; case "[13~": key.name = "f3"; break; case "[14~": key.name = "f4"; break; /* from Cygwin and used in libuv */ case "[[A": key.name = "f1"; break; case "[[B": key.name = "f2"; break; case "[[C": key.name = "f3"; break; case "[[D": key.name = "f4"; break; case "[[E": key.name = "f5"; break; /* common */ case "[15~": key.name = "f5"; break; case "[17~": key.name = "f6"; break; case "[18~": key.name = "f7"; break; case "[19~": key.name = "f8"; break; case "[20~": key.name = "f9"; break; case "[21~": key.name = "f10"; break; case "[23~": key.name = "f11"; break; case "[24~": key.name = "f12"; break; /* xterm ESC [ letter */ case "[A": key.name = "up"; break; case "[B": key.name = "down"; break; case "[C": key.name = "right"; break; case "[D": key.name = "left"; break; case "[E": key.name = "clear"; break; case "[F": key.name = "end"; break; case "[H": key.name = "home"; break; /* xterm/gnome ESC O letter */ case "OA": key.name = "up"; break; case "OB": key.name = "down"; break; case "OC": key.name = "right"; break; case "OD": key.name = "left"; break; case "OE": key.name = "clear"; break; case "OF": key.name = "end"; break; case "OH": key.name = "home"; break; /* xterm/rxvt ESC [ number ~ */ case "[1~": key.name = "home"; break; case "[2~": key.name = "insert"; break; case "[3~": key.name = "delete"; break; case "[4~": key.name = "end"; break; case "[5~": key.name = "pageup"; break; case "[6~": key.name = "pagedown"; break; /* putty */ case "[[5~": key.name = "pageup"; break; case "[[6~": key.name = "pagedown"; break; /* rxvt */ case "[7~": key.name = "home"; break; case "[8~": key.name = "end"; break; /* rxvt keys with modifiers */ case "[a": key.name = "up"; key.shift = true; break; case "[b": key.name = "down"; key.shift = true; break; case "[c": key.name = "right"; key.shift = true; break; case "[d": key.name = "left"; key.shift = true; break; case "[e": key.name = "clear"; key.shift = true; break; case "[2$": key.name = "insert"; key.shift = true; break; case "[3$": key.name = "delete"; key.shift = true; break; case "[5$": key.name = "pageup"; key.shift = true; break; case "[6$": key.name = "pagedown"; key.shift = true; break; case "[7$": key.name = "home"; key.shift = true; break; case "[8$": key.name = "end"; key.shift = true; break; case "Oa": key.name = "up"; key.ctrl = true; break; case "Ob": key.name = "down"; key.ctrl = true; break; case "Oc": key.name = "right"; key.ctrl = true; break; case "Od": key.name = "left"; key.ctrl = true; break; case "Oe": key.name = "clear"; key.ctrl = true; break; case "[2^": key.name = "insert"; key.ctrl = true; break; case "[3^": key.name = "delete"; key.ctrl = true; break; case "[5^": key.name = "pageup"; key.ctrl = true; break; case "[6^": key.name = "pagedown"; key.ctrl = true; break; case "[7^": key.name = "home"; key.ctrl = true; break; case "[8^": key.name = "end"; key.ctrl = true; break; /* misc. */ case "[Z": key.name = "tab"; key.shift = true; break; default: key.name = "undefined"; break; } } else if (ch === "\r") { // carriage return key.name = "return"; key.meta = escaped; } else if (ch === "\n") { // Enter, should have been called linefeed key.name = "enter"; key.meta = escaped; } else if (ch === "\t") { // tab key.name = "tab"; key.meta = escaped; } else if (ch === "\b" || ch === "\x7f") { // backspace or ctrl+h key.name = "backspace"; key.meta = escaped; } else if (ch === kEscape) { // escape key key.name = "escape"; key.meta = escaped; } else if (ch === " ") { key.name = "space"; key.meta = escaped; } else if (!escaped && ch <= "\x1a") { // ctrl+letter key.name = String.fromCharCode( ch.charCodeAt() + "a".charCodeAt() - 1, ); key.ctrl = true; } else if (/^[0-9A-Za-z]$/.test(ch)) { // Letter, number, shift+letter key.name = ch.toLowerCase(); key.shift = /^[A-Z]$/.test(ch); key.meta = escaped; } else if (escaped) { // Escape sequence timeout key.name = ch.length ? undefined : "escape"; key.meta = true; } key.sequence = s; if (s.length !== 0 && (key.name !== undefined || escaped)) { /* Named character or sequence */ stream.emit("keypress", escaped ? undefined : s, key); } else if (charLengthAt(s, 0) === s.length) { /* Single unnamed character, e.g. "." */ stream.emit("keypress", s, key); } /* Unrecognized or broken escape sequence, don't emit anything */ } } // This runs in O(n log n). export function commonPrefix(strings) { if (strings.length === 1) { return strings[0]; } const sorted = strings.slice().sort(); const min = sorted[0]; const max = sorted[sorted.length - 1]; for (let i = 0; i < min.length; i++) { if (min[i] !== max[i]) { return min.slice(0, i); } } return min; } export default { CSI, charLengthAt, charLengthLeft, emitKeys, commonPrefix, kSubstringSearch, };  Qf6w1)ext:deno_node/internal/readline/utils.mjsa bjD` M` T``La'LLa T  I`LSb1a??Ibs8`]\L`` L`L` L`Lb` L`b` L`` L`` L`` L`]`a?La?a?ba?a?a?a?b @Na T I`L' 9b@Oa T I`E & bb@Pa T I` 6bSQa T I`68b@Rba   b»B¼"M@b LCbCCCCCLb  %`D} h %%ei h   %%!b1020x82 0x 8 2 0x 8 2 0x82~)030303030303 1 cppbAM1aiqyD`RD]DH  Q ~ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file import { AbortError, ERR_INVALID_ARG_TYPE, } from "ext:deno_node/internal/errors.ts"; import eos from "ext:deno_node/internal/streams/end-of-stream.mjs"; // This method is inlined here for readable-stream // It also does not allow for signal to not exist on the stream // https://github.com/nodejs/node/pull/36061#discussion_r533718029 const validateAbortSignal = (signal, name) => { if ( typeof signal !== "object" || !("aborted" in signal) ) { throw new ERR_INVALID_ARG_TYPE(name, "AbortSignal", signal); } }; function isStream(obj) { return !!(obj && typeof obj.pipe === "function"); } function addAbortSignal(signal, stream) { validateAbortSignal(signal, "signal"); if (!isStream(stream)) { throw new ERR_INVALID_ARG_TYPE("stream", "stream.Stream", stream); } return addAbortSignalNoValidate(signal, stream); } function addAbortSignalNoValidate(signal, stream) { if (typeof signal !== "object" || !("aborted" in signal)) { return stream; } const onAbort = () => { stream.destroy(new AbortError()); }; if (signal.aborted) { onAbort(); } else { signal.addEventListener("abort", onAbort); eos(stream, () => signal.removeEventListener("abort", onAbort)); } return stream; } export default { addAbortSignal, addAbortSignalNoValidate }; export { addAbortSignal, addAbortSignalNoValidate }; $Qgұ3ext:deno_node/internal/streams/add-abort-signal.mjsa bkD`$M` TT`a,La * T  I`Sb1B a??Ib`L`  ]`]`],L` ` L`[ ` L`[ B` L`B]L`  DBiBic Db b c Dc`Bia?b a?a?[ a?Ba?a?b@V$L` T I`1[ b@Ta T I`)Bb!@Uba  T B `#B bKW b[ CBC[ B  `Dn h %%ei h  %~)0303 1  abASDD`RD]DH Q8q// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file import { Buffer } from "node:buffer"; import { inspect } from "ext:deno_node/internal/util/inspect.mjs"; class BufferList { constructor() { this.head = null; this.tail = null; this.length = 0; } push(v) { const entry = { data: v, next: null }; if (this.length > 0) { this.tail.next = entry; } else { this.head = entry; } this.tail = entry; ++this.length; } unshift(v) { const entry = { data: v, next: this.head }; if (this.length === 0) { this.tail = entry; } this.head = entry; ++this.length; } shift() { if (this.length === 0) { return; } const ret = this.head.data; if (this.length === 1) { this.head = this.tail = null; } else { this.head = this.head.next; } --this.length; return ret; } clear() { this.head = this.tail = null; this.length = 0; } join(s) { if (this.length === 0) { return ""; } let p = this.head; let ret = "" + p.data; while (p = p.next) { ret += s + p.data; } return ret; } concat(n) { if (this.length === 0) { return Buffer.alloc(0); } const ret = Buffer.allocUnsafe(n >>> 0); let p = this.head; let i = 0; while (p) { ret.set(p.data, i); i += p.data.length; p = p.next; } return ret; } // Consumes a specified amount of bytes or characters from the buffered data. consume(n, hasStrings) { const data = this.head.data; if (n < data.length) { // `slice` is the same for buffers and strings. const slice = data.slice(0, n); this.head.data = data.slice(n); return slice; } if (n === data.length) { // First chunk is a perfect match. return this.shift(); } // Result spans more than one buffer. return hasStrings ? this._getString(n) : this._getBuffer(n); } first() { return this.head.data; } *[Symbol.iterator]() { for (let p = this.head; p; p = p.next) { yield p.data; } } // Consumes a specified amount of characters from the buffered data. _getString(n) { let ret = ""; let p = this.head; let c = 0; do { const str = p.data; if (n > str.length) { ret += str; n -= str.length; } else { if (n === str.length) { ret += str; ++c; if (p.next) { this.head = p.next; } else { this.head = this.tail = null; } } else { ret += str.slice(0, n); this.head = p; p.data = str.slice(n); } break; } ++c; } while (p = p.next); this.length -= c; return ret; } // Consumes a specified amount of bytes from the buffered data. _getBuffer(n) { const ret = Buffer.allocUnsafe(n); const retLen = n; let p = this.head; let c = 0; do { const buf = p.data; if (n > buf.length) { ret.set(buf, retLen - n); n -= buf.length; } else { if (n === buf.length) { ret.set(buf, retLen - n); ++c; if (p.next) { this.head = p.next; } else { this.head = this.tail = null; } } else { ret.set( new Uint8Array(buf.buffer, buf.byteOffset, n), retLen - n, ); this.head = p; p.data = buf.slice(n); } break; } ++c; } while (p = p.next); this.length -= c; return ret; } // Make sure the linked list only shows the minimal necessary information. [inspect.custom](_, options) { return inspect(this, { ...options, // Only inspect one level. depth: 0, // It should not recurse. customInspect: false, }); } } export default BufferList;  QfSuA.ext:deno_node/internal/streams/buffer_list.mjsa blD`@M` Tx``La! Laa   `T ``/ `/ `?  `  aD]ff Da Da DbaD8a D"9a !a a ""a  a"4aD8a DHcDLb,< T  I`<LSb1Ib`L` b]`"$ ]`]L`` L`]L`  D"{ "{ c Dc`"{ a?a?a? b Y T I`P8MbZ T I`["9b[ T I`8b\ T I`=b] T I`Eb^ T I`"4b_ T I`j)""b` T I`2U!b a \ T  I`k`b b T I` j b  c T I` bb  d#  T I``b e  !`Dwh ei h  ‚     !-t   0-t e+ 1  a P bAXEu}D`RD]DH Q.d// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file import { getDefaultEncoding } from "ext:deno_node/internal/crypto/util.ts"; import stream from "node:stream"; function LazyTransform(options) { this._options = options; } Object.setPrototypeOf(LazyTransform.prototype, stream.Transform.prototype); Object.setPrototypeOf(LazyTransform, stream.Transform); function makeGetter(name) { return function () { stream.Transform.call(this, this._options); this._writableState.decodeStrings = false; if (!this._options || !this._options.defaultEncoding) { this._writableState.defaultEncoding = getDefaultEncoding(); } return this[name]; }; } function makeSetter(name) { return function (val) { Object.defineProperty(this, name, { value: val, enumerable: true, configurable: true, writable: true, }); }; } Object.defineProperties(LazyTransform.prototype, { _readableState: { get: makeGetter("_readableState"), set: makeSetter("_readableState"), configurable: true, enumerable: true, }, _writableState: { get: makeGetter("_writableState"), set: makeSetter("_writableState"), configurable: true, enumerable: true, }, }); export default LazyTransform; $Qg(1ext:deno_node/internal/streams/lazy_transform.mjsa bmD` M` T`XLa0 T  I`7_BLSb1Ibd`L` B ]`/ ]`]L`` L`]L`  DB0 B0 c DNc `B0 a?Na?a?b@g T(`L`0SbqA``Da T  I`I5b @  -`Dc %`b@h T(`L`0SbqA`B`Da/ T  I`JIUb @  M`Dc %`b@i Laa N B* bCBC0bCCGG0bCCGGB  `D~`h ƂłĂei h  !-- 0 - - _ !-0- _ !- - ~ ~)b3b3 3~)b3b!3# 3%_' 1 d)P@0'0@ 00 bAf)9IYD`RD]DH QFZ// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file function getDefaultHighWaterMark(objectMode) { return objectMode ? 16 : 16 * 1024; } export default { getDefaultHighWaterMark }; export { getDefaultHighWaterMark }; Qez7(ext:deno_node/internal/streams/state.mjsa bnD`M` TH`K La!L` T(` ]  `Dc   @(SbqAB `Da@Sb1IbZ`] L`` L`B ` L`B ]`B a?a? b @kba bB CB   `Dk h ei h  ~)03 1  abAjD`RD]DH Q>?// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. import { getBinding } from "ext:deno_node/internal_binding/mod.ts"; export function internalBinding(name) { return getBinding(name); } // TODO(kt3k): export actual primordials export const primordials = {}; export default { internalBinding, primordials }; Qe[*&ext:deno_node/internal/test/binding.tsa boD`M` TL`V$La!L` T  I`)XSb1Ib` L` ]`],L` ` L`` L`` L`] L`  DBBc`Ba?a?a?a?b@mca  bCC  `Dl h ei h  1~)0303 1  abAlD`RD]DH Qf>vN// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { primordials } from "ext:core/mod.js"; const { MapPrototypeDelete, MapPrototypeSet, SafeMap, } = primordials; import { inspect } from "ext:deno_node/internal/util/inspect.mjs"; import { validateFunction, validateNumber, } from "ext:deno_node/internal/validators.mjs"; import { ERR_OUT_OF_RANGE } from "ext:deno_node/internal/errors.ts"; import { emitWarning } from "node:process"; import { clearTimeout as clearTimeout_, setInterval as setInterval_, setTimeout as setTimeout_, } from "ext:deno_web/02_timers.js"; // Timeout values > TIMEOUT_MAX are set to 1. export const TIMEOUT_MAX = 2 ** 31 - 1; export const kTimerId = Symbol("timerId"); export const kTimeout = Symbol("timeout"); const kRefed = Symbol("refed"); const createTimer = Symbol("createTimer"); /** * The keys in this map correspond to the key ID's in the spec's map of active * timers. The values are the timeout's status. * * @type {Map} */ export const activeTimers = new SafeMap(); // Timer constructor function. export function Timeout(callback, after, args, isRepeat, isRefed) { if (typeof after === "number" && after > TIMEOUT_MAX) { after = 1; } this._idleTimeout = after; this._onTimeout = callback; this._timerArgs = args; this._isRepeat = isRepeat; this._destroyed = false; this[kRefed] = isRefed; this[kTimerId] = this[createTimer](); } Timeout.prototype[createTimer] = function () { const callback = this._onTimeout; const cb = (...args) => { if (!this._isRepeat) { MapPrototypeDelete(activeTimers, this[kTimerId]); } return callback.bind(this)(...args); }; const id = this._isRepeat ? setInterval_(cb, this._idleTimeout, ...this._timerArgs) : setTimeout_(cb, this._idleTimeout, ...this._timerArgs); if (!this[kRefed]) { Deno.unrefTimer(id); } MapPrototypeSet(activeTimers, id, this); return id; }; // Make sure the linked list only shows the minimal necessary information. Timeout.prototype[inspect.custom] = function (_, options) { return inspect(this, { ...options, // Only inspect one level. depth: 0, // It should not recurse. customInspect: false, }); }; Timeout.prototype.refresh = function () { if (!this._destroyed) { clearTimeout_(this[kTimerId]); this[kTimerId] = this[createTimer](); } return this; }; Timeout.prototype.unref = function () { if (this[kRefed]) { this[kRefed] = false; Deno.unrefTimer(this[kTimerId]); } return this; }; Timeout.prototype.ref = function () { if (!this[kRefed]) { this[kRefed] = true; Deno.refTimer(this[kTimerId]); } return this; }; Timeout.prototype.hasRef = function () { return this[kRefed]; }; Timeout.prototype[Symbol.toPrimitive] = function () { return this[kTimerId]; }; /** * @param {number} msecs * @param {string} name * @returns */ export function getTimerDuration(msecs, name) { validateNumber(msecs, name); if (msecs < 0 || !Number.isFinite(msecs)) { throw new ERR_OUT_OF_RANGE(name, "a non-negative finite number", msecs); } // Ensure that msecs fits into signed int32 if (msecs > TIMEOUT_MAX) { emitWarning( `${msecs} does not fit into a 32-bit signed integer.` + `\nTimer duration was truncated to ${TIMEOUT_MAX}.`, "TimeoutOverflowWarning", ); return TIMEOUT_MAX; } return msecs; } export function setUnrefTimeout(callback, timeout, ...args) { validateFunction(callback, "callback"); return new Timeout(callback, timeout, args, false, false); } export default { getTimerDuration, kTimerId, kTimeout, setUnrefTimeout, Timeout, TIMEOUT_MAX, }; Qe::f!ext:deno_node/internal/timers.mjsa bpD`8M`  T`iLa#-@Ld T  I`)sSb1Bc????IbN` L` bS]`%"$ ]`" ]` ]`I* ]`]`]hL`` L`` L`` L`` L`Bb ` L`Bb " ` L`" "` L`"` L`],L`   D" " c1A D"c DKKcv Dc Dc Dc D""c D  c D  c`a?a? a? a?" a?Ka?"a?a?"a?a?"a?" a?a?a?Bb a?a?a?-b@oa T I`Z 7Bb Ub@ pa T I`Xb@ qb a !$ HB T  y`Qb .`pIb @r#  T `Qb .` Ib @s T ` Qa.refresh` 7 Ib @tˆ  T `  Qa.unref`] Ib @u' T Qb Timeout.ref` [ Ib @vB' T ` Qa.hasRef` Ib @w\ T `Qb .` Ib @ x@b Bb C"C" CCCCBb ""   A`D0h %%%%ei h  0-%-%- 1! b1! b 1! b %! b% i10- ‚40- 0-‚40- Â20- Â20- Â20- Â2 0- !-"‚4$~&)03'03)03+03 -03!/03"1 1 Ue3 P@@8P, ,PL-bAnMD"2D`RD]DH )Q%z8:// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { validateFunction } from "ext:deno_node/internal/validators.mjs"; import { normalizeEncoding, slowCases, } from "ext:deno_node/internal/normalize_encoding.mjs"; export { normalizeEncoding, slowCases }; import { ObjectCreate, StringPrototypeToUpperCase, } from "ext:deno_node/internal/primordials.mjs"; import { ERR_UNKNOWN_SIGNAL } from "ext:deno_node/internal/errors.ts"; import { os } from "ext:deno_node/internal_binding/constants.ts"; export const customInspectSymbol = Symbol.for("nodejs.util.inspect.custom"); export const kEnumerableProperty = Object.create(null); kEnumerableProperty.enumerable = true; export const kEmptyObject = Object.freeze(Object.create(null)); export function once(callback) { let called = false; return function (...args) { if (called) return; called = true; Reflect.apply(callback, this, args); }; } export function createDeferredPromise() { let resolve; let reject; const promise = new Promise((res, rej) => { resolve = res; reject = rej; }); return { promise, resolve, reject }; } // In addition to being accessible through util.promisify.custom, // this symbol is registered globally and can be accessed in any environment as // Symbol.for('nodejs.util.promisify.custom'). const kCustomPromisifiedSymbol = Symbol.for("nodejs.util.promisify.custom"); // This is an internal Node symbol used by functions returning multiple // arguments, e.g. ['bytesRead', 'buffer'] for fs.read(). const kCustomPromisifyArgsSymbol = Symbol.for( "nodejs.util.promisify.customArgs", ); export const customPromisifyArgs = kCustomPromisifyArgsSymbol; export function promisify( original, ) { validateFunction(original, "original"); if (original[kCustomPromisifiedSymbol]) { const fn = original[kCustomPromisifiedSymbol]; validateFunction(fn, "util.promisify.custom"); return Object.defineProperty(fn, kCustomPromisifiedSymbol, { value: fn, enumerable: false, writable: false, configurable: true, }); } // Names to create an object from in case the callback receives multiple // arguments, e.g. ['bytesRead', 'buffer'] for fs.read. const argumentNames = original[kCustomPromisifyArgsSymbol]; function fn(...args) { return new Promise((resolve, reject) => { args.push((err, ...values) => { if (err) { return reject(err); } if (argumentNames !== undefined && values.length > 1) { const obj = {}; for (let i = 0; i < argumentNames.length; i++) { obj[argumentNames[i]] = values[i]; } resolve(obj); } else { resolve(values[0]); } }); Reflect.apply(original, this, args); }); } Object.setPrototypeOf(fn, Object.getPrototypeOf(original)); Object.defineProperty(fn, kCustomPromisifiedSymbol, { value: fn, enumerable: false, writable: false, configurable: true, }); return Object.defineProperties( fn, Object.getOwnPropertyDescriptors(original), ); } let signalsToNamesMapping; function getSignalsToNamesMapping() { if (signalsToNamesMapping !== undefined) { return signalsToNamesMapping; } signalsToNamesMapping = ObjectCreate(null); for (const key in os.signals) { signalsToNamesMapping[os.signals[key]] = key; } return signalsToNamesMapping; } export function convertToValidSignal(signal) { if (typeof signal === "number" && getSignalsToNamesMapping()[signal]) { return signal; } if (typeof signal === "string") { const signalName = os.signals[StringPrototypeToUpperCase(signal)]; if (signalName) return signalName; } throw new ERR_UNKNOWN_SIGNAL(signal); } promisify.custom = kCustomPromisifiedSymbol; export default { convertToValidSignal, createDeferredPromise, customInspectSymbol, customPromisifyArgs, kEmptyObject, kEnumerableProperty, normalizeEncoding, once, promisify, slowCases, }; Qdext:deno_node/internal/util.mjsa bqD`4M`  T`(pLa0 T  I` " Sb1""c????Ib:`L` " ]`b]`8 ]` ]`"} ]`TL`  BDBc" Dc&/tL`` L`" ` L`"  ` L` M` L`M ` L`  ` L` M` L`MB` L`B `  L` ]$L` D  c D  c Dboboc DBBc" DcJL Dc&/ D  c` a?Ba?a? a?boa? a?a?Ma?Ma? a?Ba? a? a? a ?" a?a?Nb!@ ~LLc T I`!b @ Brb @za T  I`H b@{b T`HL`8SbqA!a? `Da0  T I`y u  b @ !"X0bCHHG0bCHHGB*&  `D}H %%0c/;/0c!- ~ ) 3 \ /%!- !- ^_!- ~ ) 3 \!- !-"^$_& d( PPNb@|a  T  I` 9" rb@ }ba  Yb)*B# `b " C CMC C CMCBCBC CC"  M  MBB   b`D8h %%%%ei h  !-^1!- ^ 102 !- !- ^^1!- ^%!- ^%1%0 2~)03030303!03#03%03'03)0 3+03- 1 d/@@ @@ LNbAyDDDj&D`RD]DH "Q":E// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { validateObject, validateString, } from "ext:deno_node/internal/validators.mjs"; import { codes } from "ext:deno_node/internal/error_codes.ts"; import { colors, createStylizeWithColor, formatBigInt, formatNumber, formatValue, styles, } from "ext:deno_console/01_console.js"; // Set Graphics Rendition https://en.wikipedia.org/wiki/ANSI_escape_code#graphics // Each color consists of an array with the color code as first entry and the // reset code as second entry. const defaultFG = 39; const defaultBG = 49; inspect.colors = { reset: [0, 0], bold: [1, 22], dim: [2, 22], // Alias: faint italic: [3, 23], underline: [4, 24], blink: [5, 25], // Swap foreground and background colors inverse: [7, 27], // Alias: swapcolors, swapColors hidden: [8, 28], // Alias: conceal strikethrough: [9, 29], // Alias: strikeThrough, crossedout, crossedOut doubleunderline: [21, 24], // Alias: doubleUnderline black: [30, defaultFG], red: [31, defaultFG], green: [32, defaultFG], yellow: [33, defaultFG], blue: [34, defaultFG], magenta: [35, defaultFG], cyan: [36, defaultFG], white: [37, defaultFG], bgBlack: [40, defaultBG], bgRed: [41, defaultBG], bgGreen: [42, defaultBG], bgYellow: [43, defaultBG], bgBlue: [44, defaultBG], bgMagenta: [45, defaultBG], bgCyan: [46, defaultBG], bgWhite: [47, defaultBG], framed: [51, 54], overlined: [53, 55], gray: [90, defaultFG], // Alias: grey, blackBright redBright: [91, defaultFG], greenBright: [92, defaultFG], yellowBright: [93, defaultFG], blueBright: [94, defaultFG], magentaBright: [95, defaultFG], cyanBright: [96, defaultFG], whiteBright: [97, defaultFG], bgGray: [100, defaultBG], // Alias: bgGrey, bgBlackBright bgRedBright: [101, defaultBG], bgGreenBright: [102, defaultBG], bgYellowBright: [103, defaultBG], bgBlueBright: [104, defaultBG], bgMagentaBright: [105, defaultBG], bgCyanBright: [106, defaultBG], bgWhiteBright: [107, defaultBG], }; function defineColorAlias(target, alias) { Object.defineProperty(inspect.colors, alias, { get() { return this[target]; }, set(value) { this[target] = value; }, configurable: true, enumerable: false, }); } defineColorAlias("gray", "grey"); defineColorAlias("gray", "blackBright"); defineColorAlias("bgGray", "bgGrey"); defineColorAlias("bgGray", "bgBlackBright"); defineColorAlias("dim", "faint"); defineColorAlias("strikethrough", "crossedout"); defineColorAlias("strikethrough", "strikeThrough"); defineColorAlias("strikethrough", "crossedOut"); defineColorAlias("hidden", "conceal"); defineColorAlias("inverse", "swapColors"); defineColorAlias("inverse", "swapcolors"); defineColorAlias("doubleunderline", "doubleUnderline"); // TODO(BridgeAR): Add function style support for more complex styles. // Don't use 'blue' not visible on cmd.exe inspect.styles = Object.assign(Object.create(null), { special: "cyan", number: "yellow", bigint: "yellow", boolean: "yellow", undefined: "grey", null: "bold", string: "green", symbol: "green", date: "magenta", // "name": intentionally not styling // TODO(BridgeAR): Highlight regular expressions properly. regexp: "red", module: "underline", }); const inspectDefaultOptions = { indentationLvl: 0, currentDepth: 0, stylize: stylizeNoColor, showHidden: false, depth: 2, colors: false, showProxy: false, breakLength: 80, escapeSequences: true, compact: 3, sorted: false, getters: false, // node only maxArrayLength: 100, maxStringLength: 10000, // deno: strAbbreviateSize: 100 customInspect: true, // deno only /** You can override the quotes preference in inspectString. * Used by util.inspect() */ // TODO(kt3k): Consider using symbol as a key to hide this from the public // API. quotes: ["'", '"', "`"], iterableLimit: Infinity, // similar to node's maxArrayLength, but doesn't only apply to arrays trailingComma: false, inspect, // TODO(@crowlKats): merge into indentationLvl indentLevel: 0, }; /** * Echos the value of any input. Tries to print the value out * in the best way possible given the different types. */ /* Legacy: value, showHidden, depth, colors */ export function inspect(value, opts) { // Default options const ctx = { budget: {}, seen: [], ...inspectDefaultOptions, }; if (arguments.length > 1) { // Legacy... if (arguments.length > 2) { if (arguments[2] !== undefined) { ctx.depth = arguments[2]; } if (arguments.length > 3 && arguments[3] !== undefined) { ctx.colors = arguments[3]; } } // Set user-specified options if (typeof opts === "boolean") { ctx.showHidden = opts; } else if (opts) { const optKeys = Object.keys(opts); for (let i = 0; i < optKeys.length; ++i) { const key = optKeys[i]; // TODO(BridgeAR): Find a solution what to do about stylize. Either make // this function public or add a new API with a similar or better // functionality. if ( // deno-lint-ignore no-prototype-builtins inspectDefaultOptions.hasOwnProperty(key) || key === "stylize" ) { ctx[key] = opts[key]; } else if (ctx.userOptions === undefined) { // This is required to pass through the actual user input. ctx.userOptions = opts; } } } } if (ctx.colors) { ctx.stylize = createStylizeWithColor(inspect.styles, inspect.colors); } if (ctx.maxArrayLength === null) ctx.maxArrayLength = Infinity; if (ctx.maxStringLength === null) ctx.maxStringLength = Infinity; return formatValue(ctx, value, 0); } const customInspectSymbol = Symbol.for("nodejs.util.inspect.custom"); inspect.custom = customInspectSymbol; Object.defineProperty(inspect, "defaultOptions", { get() { return inspectDefaultOptions; }, set(options) { validateObject(options, "options"); return Object.assign(inspectDefaultOptions, options); }, }); function stylizeNoColor(str) { return str; } const builtInObjects = new Set( Object.getOwnPropertyNames(globalThis).filter((e) => /^[A-Z][a-zA-Z0-9]+$/.test(e) ), ); // Regex used for ansi escape code splitting // Adopted from https://github.com/chalk/ansi-regex/blob/HEAD/index.js // License: MIT, authors: @sindresorhus, Qix-, arjunmehta and LitoMore // Matches all ansi escape code sequences in a string const ansiPattern = "[\\u001B\\u009B][[\\]()#;?]*" + "(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*" + "|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)" + "|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"; const ansi = new RegExp(ansiPattern, "g"); /** * Returns the number of columns required to display the given string. */ export function getStringWidth(str, removeControlChars = true) { let width = 0; if (removeControlChars) { str = stripVTControlCharacters(str); } str = str.normalize("NFC"); for (const char of str[Symbol.iterator]()) { const code = char.codePointAt(0); if (isFullWidthCodePoint(code)) { width += 2; } else if (!isZeroWidthCodePoint(code)) { width++; } } return width; } /** * Returns true if the character represented by a given * Unicode code point is full-width. Otherwise returns false. */ const isFullWidthCodePoint = (code) => { // Code points are partially derived from: // https://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt return code >= 0x1100 && ( code <= 0x115f || // Hangul Jamo code === 0x2329 || // LEFT-POINTING ANGLE BRACKET code === 0x232a || // RIGHT-POINTING ANGLE BRACKET // CJK Radicals Supplement .. Enclosed CJK Letters and Months (code >= 0x2e80 && code <= 0x3247 && code !== 0x303f) || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A (code >= 0x3250 && code <= 0x4dbf) || // CJK Unified Ideographs .. Yi Radicals (code >= 0x4e00 && code <= 0xa4c6) || // Hangul Jamo Extended-A (code >= 0xa960 && code <= 0xa97c) || // Hangul Syllables (code >= 0xac00 && code <= 0xd7a3) || // CJK Compatibility Ideographs (code >= 0xf900 && code <= 0xfaff) || // Vertical Forms (code >= 0xfe10 && code <= 0xfe19) || // CJK Compatibility Forms .. Small Form Variants (code >= 0xfe30 && code <= 0xfe6b) || // Halfwidth and Fullwidth Forms (code >= 0xff01 && code <= 0xff60) || (code >= 0xffe0 && code <= 0xffe6) || // Kana Supplement (code >= 0x1b000 && code <= 0x1b001) || // Enclosed Ideographic Supplement (code >= 0x1f200 && code <= 0x1f251) || // Miscellaneous Symbols and Pictographs 0x1f300 - 0x1f5ff // Emoticons 0x1f600 - 0x1f64f (code >= 0x1f300 && code <= 0x1f64f) || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane (code >= 0x20000 && code <= 0x3fffd) ); }; const isZeroWidthCodePoint = (code) => { return code <= 0x1F || // C0 control codes (code >= 0x7F && code <= 0x9F) || // C1 control codes (code >= 0x300 && code <= 0x36F) || // Combining Diacritical Marks (code >= 0x200B && code <= 0x200F) || // Modifying Invisible Characters // Combining Diacritical Marks for Symbols (code >= 0x20D0 && code <= 0x20FF) || (code >= 0xFE00 && code <= 0xFE0F) || // Variation Selectors (code >= 0xFE20 && code <= 0xFE2F) || // Combining Half Marks (code >= 0xE0100 && code <= 0xE01EF); // Variation Selectors }; function hasBuiltInToString(value) { // TODO(wafuwafu13): Implement // // Prevent triggering proxy traps. // const getFullProxy = false; // const proxyTarget = getProxyDetails(value, getFullProxy); const proxyTarget = undefined; if (proxyTarget !== undefined) { value = proxyTarget; } // Count objects that have no `toString` function as built-in. if (typeof value.toString !== "function") { return true; } // The object has a own `toString` property. Thus it's not not a built-in one. if (Object.prototype.hasOwnProperty.call(value, "toString")) { return false; } // Find the object that has the `toString` property as own property in the // prototype chain. let pointer = value; do { pointer = Object.getPrototypeOf(pointer); } while (!Object.prototype.hasOwnProperty.call(pointer, "toString")); // Check closer if the object is a built-in. const descriptor = Object.getOwnPropertyDescriptor(pointer, "constructor"); return descriptor !== undefined && typeof descriptor.value === "function" && builtInObjects.has(descriptor.value.name); } const firstErrorLine = (error) => error.message.split("\n", 1)[0]; let CIRCULAR_ERROR_MESSAGE; function tryStringify(arg) { try { return JSON.stringify(arg); } catch (err) { // Populate the circular error message lazily if (!CIRCULAR_ERROR_MESSAGE) { try { const a = {}; a.a = a; JSON.stringify(a); } catch (circularError) { CIRCULAR_ERROR_MESSAGE = firstErrorLine(circularError); } } if ( err.name === "TypeError" && firstErrorLine(err) === CIRCULAR_ERROR_MESSAGE ) { return "[Circular]"; } throw err; } } export function format(...args) { return formatWithOptionsInternal(undefined, args); } export function formatWithOptions(inspectOptions, ...args) { if (typeof inspectOptions !== "object" || inspectOptions === null) { throw new codes.ERR_INVALID_ARG_TYPE( "inspectOptions", "object", inspectOptions, ); } return formatWithOptionsInternal(inspectOptions, args); } function formatNumberNoColor(number, options) { return formatNumber( stylizeNoColor, number, options?.numericSeparator ?? inspectDefaultOptions.numericSeparator, ); } function formatBigIntNoColor(bigint, options) { return formatBigInt( stylizeNoColor, bigint, options?.numericSeparator ?? inspectDefaultOptions.numericSeparator, ); } function formatWithOptionsInternal(inspectOptions, args) { const first = args[0]; let a = 0; let str = ""; let join = ""; if (typeof first === "string") { if (args.length === 1) { return first; } let tempStr; let lastPos = 0; for (let i = 0; i < first.length - 1; i++) { if (first.charCodeAt(i) === 37) { // '%' const nextChar = first.charCodeAt(++i); if (a + 1 !== args.length) { switch (nextChar) { // deno-lint-ignore no-case-declarations case 115: // 's' const tempArg = args[++a]; if (typeof tempArg === "number") { tempStr = formatNumberNoColor(tempArg, inspectOptions); } else if (typeof tempArg === "bigint") { tempStr = formatBigIntNoColor(tempArg, inspectOptions); } else if ( typeof tempArg !== "object" || tempArg === null || !hasBuiltInToString(tempArg) ) { tempStr = String(tempArg); } else { tempStr = inspect(tempArg, { ...inspectOptions, compact: 3, colors: false, depth: 0, }); } break; case 106: // 'j' tempStr = tryStringify(args[++a]); break; // deno-lint-ignore no-case-declarations case 100: // 'd' const tempNum = args[++a]; if (typeof tempNum === "bigint") { tempStr = formatBigIntNoColor(tempNum, inspectOptions); } else if (typeof tempNum === "symbol") { tempStr = "NaN"; } else { tempStr = formatNumberNoColor(Number(tempNum), inspectOptions); } break; case 79: // 'O' tempStr = inspect(args[++a], inspectOptions); break; case 111: // 'o' tempStr = inspect(args[++a], { ...inspectOptions, showHidden: true, showProxy: true, depth: 4, }); break; // deno-lint-ignore no-case-declarations case 105: // 'i' const tempInteger = args[++a]; if (typeof tempInteger === "bigint") { tempStr = formatBigIntNoColor(tempInteger, inspectOptions); } else if (typeof tempInteger === "symbol") { tempStr = "NaN"; } else { tempStr = formatNumberNoColor( Number.parseInt(tempInteger), inspectOptions, ); } break; // deno-lint-ignore no-case-declarations case 102: // 'f' const tempFloat = args[++a]; if (typeof tempFloat === "symbol") { tempStr = "NaN"; } else { tempStr = formatNumberNoColor( Number.parseFloat(tempFloat), inspectOptions, ); } break; case 99: // 'c' a += 1; tempStr = ""; break; case 37: // '%' str += first.slice(lastPos, i); lastPos = i + 1; continue; default: // Any other character is not a correct placeholder continue; } if (lastPos !== i - 1) { str += first.slice(lastPos, i - 1); } str += tempStr; lastPos = i + 1; } else if (nextChar === 37) { str += first.slice(lastPos, i); lastPos = i + 1; } } } if (lastPos !== 0) { a++; join = " "; if (lastPos < first.length) { str += first.slice(lastPos); } } } while (a < args.length) { const value = args[a]; str += join; str += typeof value !== "string" ? inspect(value, inspectOptions) : value; join = " "; a++; } return str; } /** * Remove all VT control characters. Use to estimate displayed string width. */ export function stripVTControlCharacters(str) { validateString(str, "str"); return str.replace(ansi, ""); } export default { format, getStringWidth, inspect, stripVTControlCharacters, formatWithOptions, }; Qe¿\'ext:deno_node/internal/util/inspect.mjsa brD`\M` T`!La_ T@`:,L` 0SbqA ``Da ESb1 BB"b57b8Bbl?????????????IbE`L` " ]`] ]`"]`2]PL`` L`-` L`B` L`B"` L`"` L`6` L`6],L`   D" " c Dc D""c Dc Dbbc Dc Dc#) D  c4B D  cFT` a? a?" a?a?"a?a?ba?a?a?a?"a?a?Ba?6a?a?0bCCGH T  I`Z  b:b T I` b  Z`Di0 %!-0-~)33 \ b Pb@ T I`Bfb@ T I`t*.Bb@  T I`%/1b@ T I`2[3b@ T I`y34b@ T I`74YDb"@HL` T I`b@a  T I`u!"b@ a T I`-1o1-b@a T  I`12Bb@a T I`D E6b!@ba qbX,  `MbBI `MbB `Mb `Mb" `Mb `Mb `Mbb `Mb­ `Mb B `Mb®CbCC"C"CC¥CCCBCCCbC±CBCC `Mb36b `Mb57CBC´CBCµCBC¶CBC·C"CC"CC"CC"C `Lb® `Lbb `Lb  `Lb!" `Lb"" `Lb# `Lb$¥ `Lb% `Lb( `Lb)B `Lb* `Lb+ `Lb,b `Lb-± `Lb.B `Lb/ `LbZ `Lb[B `Lb\´ `Lb]B `Lb^µ `Lb_B `Lb`¶ `LbaB `Lbd· `Lbe" `Lbf `Lbg" `Lbh `Lbi" `Lbj `Lbk"bB­B¾Bb¿"B"b&)hb b¥"%"="Q BI Bb¨"b(D`BE`ECHG`H"FHF`P"GG`HGH0`dH`'GH  `M`"b'HCbIHCI`EH Yb# B bCC T  I`,Vf:b T I`]b'; T,`L`b{  `Ddz-^(SbbpWI`DaU} abK1B2"3B4Q* T  7`"(7f:bK  T b8`2(V*b8bK  T b`..bbK 8b -C"CC6CBC"6B  N`Dihh Ƃ%%%%%%% % % % % %%ei h   ' 10~ { %  6 3 {%  6 3 { %  6 3{%  6 3{%  6 3{%  6 3{%  6 3"{$%  6% 3'{)%  6* 3,{.%  6/ 31{ 3%  64 3!6{"8%  69 3#;{$=%  6> 3%@{&B%  6C 3'E{(G%  6H 3)J{*L%  6M 3+O{,Q%  6R 3-T{.V%  6W 3/Y{0[%  6\ 31^{2`%  6a 33c{4e%  6f 35h{6j%  6k 37m{8o%  6p 39r{:t%  6u 3;w{~%  6 3?{@%  6 3A{B%  6 3C{D%  6 3E{F%  6 3G{H%  6 3I{J%  6 3K 2L-Mc-Nc=Oc=PcQRcSTcSUcSVcWXcYZcY[c\]c0!^-_!^-`^~a)_2b~c 3d!e3f03g %!hѾ-iӿj^0 2k!^-lٿ0m~n)o3p܂q3r\!s!^-t!u^-v꾂w ^ i%xy8z8{8!|} i%~ % % % % ~)030303g0303 1 `vs>&00 `>&00 `>&00 `>&00 `>&00 `> I L   `@@B`2 0bAV"*2D`RD]DH yhQuhzC// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { notImplemented } from "ext:deno_node/_utils.ts"; import { EventEmitter } from "node:events"; import { isIP, isIPv4, isIPv6, normalizedArgsSymbol } from "ext:deno_node/internal/net.ts"; import { Duplex } from "node:stream"; import { asyncIdSymbol, defaultTriggerAsyncIdScope, newAsyncId, ownerSymbol } from "ext:deno_node/internal/async_hooks.ts"; import { ERR_INVALID_ADDRESS_FAMILY, ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, ERR_INVALID_FD_TYPE, ERR_INVALID_IP_ADDRESS, ERR_MISSING_ARGS, ERR_SERVER_ALREADY_LISTEN, ERR_SERVER_NOT_RUNNING, ERR_SOCKET_CLOSED, errnoException, exceptionWithHostPort, genericNodeError, uvExceptionWithHostPort } from "ext:deno_node/internal/errors.ts"; import { isUint8Array } from "ext:deno_node/internal/util/types.ts"; import { kAfterAsyncWrite, kBuffer, kBufferCb, kBufferGen, kHandle, kUpdateTimer, onStreamRead, setStreamTimeout, writeGeneric, writevGeneric } from "ext:deno_node/internal/stream_base_commons.ts"; import { kTimeout } from "ext:deno_node/internal/timers.mjs"; import { nextTick } from "ext:deno_node/_next_tick.ts"; import { DTRACE_NET_SERVER_CONNECTION, DTRACE_NET_STREAM_END } from "ext:deno_node/internal/dtrace.ts"; import { Buffer } from "node:buffer"; import { validateAbortSignal, validateFunction, validateInt32, validateNumber, validatePort, validateString } from "ext:deno_node/internal/validators.mjs"; import { constants as TCPConstants, TCP, TCPConnectWrap } from "ext:deno_node/internal_binding/tcp_wrap.ts"; import { constants as PipeConstants, Pipe, PipeConnectWrap } from "ext:deno_node/internal_binding/pipe_wrap.ts"; import { ShutdownWrap } from "ext:deno_node/internal_binding/stream_wrap.ts"; import { assert } from "ext:deno_node/_util/asserts.ts"; import { isWindows } from "ext:deno_node/_util/os.ts"; import { ADDRCONFIG, lookup as dnsLookup } from "node:dns"; import { codeMap } from "ext:deno_node/internal_binding/uv.ts"; import { guessHandleType } from "ext:deno_node/internal_binding/util.ts"; import { debuglog } from "ext:deno_node/internal/util/debuglog.ts"; import { channel } from "node:diagnostics_channel"; let debug = debuglog("net", (fn)=>{ debug = fn; }); const kLastWriteQueueSize = Symbol("lastWriteQueueSize"); const kSetNoDelay = Symbol("kSetNoDelay"); const kBytesRead = Symbol("kBytesRead"); const kBytesWritten = Symbol("kBytesWritten"); const DEFAULT_IPV4_ADDR = "0.0.0.0"; const DEFAULT_IPV6_ADDR = "::"; function _getNewAsyncId(handle) { return !handle || typeof handle.getAsyncId !== "function" ? newAsyncId() : handle.getAsyncId(); } const _noop = (_arrayBuffer, _nread)=>{ return; }; const netClientSocketChannel = channel("net.client.socket"); const netServerSocketChannel = channel("net.server.socket"); function _toNumber(x) { return (x = Number(x)) >= 0 ? x : false; } function _isPipeName(s) { return typeof s === "string" && _toNumber(s) === false; } function _createHandle(fd, isServer) { validateInt32(fd, "fd", 0); const type = guessHandleType(fd); if (type === "PIPE") { return new Pipe(isServer ? PipeConstants.SERVER : PipeConstants.SOCKET); } if (type === "TCP") { return new TCP(isServer ? TCPConstants.SERVER : TCPConstants.SOCKET); } throw new ERR_INVALID_FD_TYPE(type); } // Returns an array [options, cb], where options is an object, // cb is either a function or null. // Used to normalize arguments of `Socket.prototype.connect()` and // `Server.prototype.listen()`. Possible combinations of parameters: // - (options[...][, cb]) // - (path[...][, cb]) // - ([port][, host][...][, cb]) // For `Socket.prototype.connect()`, the [...] part is ignored // For `Server.prototype.listen()`, the [...] part is [, backlog] // but will not be handled here (handled in listen()) export function _normalizeArgs(args) { let arr; if (args.length === 0) { arr = [ {}, null ]; arr[normalizedArgsSymbol] = true; return arr; } const arg0 = args[0]; let options = {}; if (typeof arg0 === "object" && arg0 !== null) { // (options[...][, cb]) options = arg0; } else if (_isPipeName(arg0)) { // (path[...][, cb]) options.path = arg0; } else { // ([port][, host][...][, cb]) options.port = arg0; if (args.length > 1 && typeof args[1] === "string") { options.host = args[1]; } } const cb = args[args.length - 1]; if (!_isConnectionListener(cb)) { arr = [ options, null ]; } else { arr = [ options, cb ]; } arr[normalizedArgsSymbol] = true; return arr; } function _isTCPConnectWrap(req) { return "localAddress" in req && "localPort" in req; } function _afterConnect(status, // deno-lint-ignore no-explicit-any handle, req, readable, writable) { let socket = handle[ownerSymbol]; if (socket.constructor.name === "ReusedHandle") { socket = socket.handle; } // Callback may come after call to destroy if (socket.destroyed) { return; } debug("afterConnect"); assert(socket.connecting); socket.connecting = false; socket._sockname = null; if (status === 0) { if (socket.readable && !readable) { socket.push(null); socket.read(); } if (socket.writable && !writable) { socket.end(); } socket._unrefTimer(); socket.emit("connect"); socket.emit("ready"); // Start the first read, or get an immediate EOF. // this doesn't actually consume any bytes, because len=0. if (readable && !socket.isPaused()) { socket.read(0); } } else { socket.connecting = false; let details; if (_isTCPConnectWrap(req)) { details = req.localAddress + ":" + req.localPort; } const ex = exceptionWithHostPort(status, "connect", req.address, req.port, details); if (_isTCPConnectWrap(req)) { ex.localAddress = req.localAddress; ex.localPort = req.localPort; } socket.destroy(ex); } } function _checkBindError(err, port, handle) { // EADDRINUSE may not be reported until we call `listen()` or `connect()`. // To complicate matters, a failed `bind()` followed by `listen()` or `connect()` // will implicitly bind to a random port. Ergo, check that the socket is // bound to the expected port before calling `listen()` or `connect()`. if (err === 0 && port > 0 && handle.getsockname) { const out = {}; err = handle.getsockname(out); if (err === 0 && port !== out.port) { err = codeMap.get("EADDRINUSE"); } } return err; } function _isPipe(options) { return "path" in options && !!options.path; } function _connectErrorNT(socket, err) { socket.destroy(err); } function _internalConnect(socket, address, port, addressType, localAddress, localPort, flags) { assert(socket.connecting); let err; if (localAddress || localPort) { if (addressType === 4) { localAddress = localAddress || DEFAULT_IPV4_ADDR; err = socket._handle.bind(localAddress, localPort); } else { // addressType === 6 localAddress = localAddress || DEFAULT_IPV6_ADDR; err = socket._handle.bind6(localAddress, localPort, flags); } debug("binding to localAddress: %s and localPort: %d (addressType: %d)", localAddress, localPort, addressType); err = _checkBindError(err, localPort, socket._handle); if (err) { const ex = exceptionWithHostPort(err, "bind", localAddress, localPort); socket.destroy(ex); return; } } if (addressType === 6 || addressType === 4) { const req = new TCPConnectWrap(); req.oncomplete = _afterConnect; req.address = address; req.port = port; req.localAddress = localAddress; req.localPort = localPort; if (addressType === 4) { err = socket._handle.connect(req, address, port); } else { err = socket._handle.connect6(req, address, port); } } else { const req = new PipeConnectWrap(); req.oncomplete = _afterConnect; req.address = address; err = socket._handle.connect(req, address); } if (err) { let details = ""; const sockname = socket._getsockname(); if (sockname) { details = `${sockname.address}:${sockname.port}`; } const ex = exceptionWithHostPort(err, "connect", address, port, details); socket.destroy(ex); } } // Provide a better error message when we call end() as a result // of the other side sending a FIN. The standard "write after end" // is overly vague, and makes it seem like the user's code is to blame. function _writeAfterFIN(// deno-lint-ignore no-explicit-any chunk, encoding, cb) { if (!this.writableEnded) { return Duplex.prototype.write.call(this, chunk, encoding, // @ts-expect-error Using `call` seem to be interfering with the overload for write cb); } if (typeof encoding === "function") { cb = encoding; encoding = null; } const err = genericNodeError("This socket has been ended by the other party", { code: "EPIPE" }); if (typeof cb === "function") { defaultTriggerAsyncIdScope(this[asyncIdSymbol], nextTick, cb, err); } if (this._server) { nextTick(()=>this.destroy(err)); } else { this.destroy(err); } return false; } function _tryReadStart(socket) { // Not already reading, start the flow. debug("Socket._handle.readStart"); socket._handle.reading = true; const err = socket._handle.readStart(); if (err) { socket.destroy(errnoException(err, "read")); } } // Called when the "end" event is emitted. function _onReadableStreamEnd() { if (!this.allowHalfOpen) { this.write = _writeAfterFIN; } } // Called when creating new Socket, or when re-using a closed Socket function _initSocketHandle(socket) { socket._undestroy(); socket._sockname = undefined; // Handle creation may be deferred to bind() or connect() time. if (socket._handle) { // deno-lint-ignore no-explicit-any socket._handle[ownerSymbol] = socket; socket._handle.onread = onStreamRead; socket[asyncIdSymbol] = _getNewAsyncId(socket._handle); let userBuf = socket[kBuffer]; if (userBuf) { const bufGen = socket[kBufferGen]; if (bufGen !== null) { userBuf = bufGen(); if (!isUint8Array(userBuf)) { return; } socket[kBuffer] = userBuf; } socket._handle.useUserBuffer(userBuf); } } } function _lookupAndConnect(self, options) { const { localAddress, localPort } = options; const host = options.host || "localhost"; let { port } = options; if (localAddress && !isIP(localAddress)) { throw new ERR_INVALID_IP_ADDRESS(localAddress); } if (localPort) { validateNumber(localPort, "options.localPort"); } if (typeof port !== "undefined") { if (typeof port !== "number" && typeof port !== "string") { throw new ERR_INVALID_ARG_TYPE("options.port", [ "number", "string" ], port); } validatePort(port); } port |= 0; // If host is an IP, skip performing a lookup const addressType = isIP(host); if (addressType) { defaultTriggerAsyncIdScope(self[asyncIdSymbol], nextTick, ()=>{ if (self.connecting) { defaultTriggerAsyncIdScope(self[asyncIdSymbol], _internalConnect, self, host, port, addressType, localAddress, localPort); } }); return; } if (options.lookup !== undefined) { validateFunction(options.lookup, "options.lookup"); } const dnsOpts = { family: options.family, hints: options.hints || 0 }; if (!isWindows && dnsOpts.family !== 4 && dnsOpts.family !== 6 && dnsOpts.hints === 0) { dnsOpts.hints = ADDRCONFIG; } debug("connect: find host", host); debug("connect: dns options", dnsOpts); self._host = host; const lookup = options.lookup || dnsLookup; defaultTriggerAsyncIdScope(self[asyncIdSymbol], function() { lookup(host, dnsOpts, function emitLookup(err, ip, addressType) { self.emit("lookup", err, ip, addressType, host); // It's possible we were destroyed while looking this up. // XXX it would be great if we could cancel the promise returned by // the look up. if (!self.connecting) { return; } if (err) { // net.createConnection() creates a net.Socket object and immediately // calls net.Socket.connect() on it (that's us). There are no event // listeners registered yet so defer the error event to the next tick. nextTick(_connectErrorNT, self, err); } else if (!isIP(ip)) { err = new ERR_INVALID_IP_ADDRESS(ip); nextTick(_connectErrorNT, self, err); } else if (addressType !== 4 && addressType !== 6) { err = new ERR_INVALID_ADDRESS_FAMILY(`${addressType}`, options.host, options.port); nextTick(_connectErrorNT, self, err); } else { self._unrefTimer(); defaultTriggerAsyncIdScope(self[asyncIdSymbol], _internalConnect, self, ip, port, addressType, localAddress, localPort); } }); }); } function _afterShutdown() { // deno-lint-ignore no-explicit-any const self = this.handle[ownerSymbol]; debug("afterShutdown destroyed=%j", self.destroyed, self._readableState); this.callback(); } function _emitCloseNT(s) { debug("SERVER: emit close"); s.emit("close"); } /** * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also * an `EventEmitter`. * * A `net.Socket` can be created by the user and used directly to interact with * a server. For example, it is returned by `createConnection`, * so the user can use it to talk to the server. * * It can also be created by Node.js and passed to the user when a connection * is received. For example, it is passed to the listeners of a `"connection"` event emitted on a `Server`, so the user can use * it to interact with the client. */ export class Socket extends Duplex { // Problem with this is that users can supply their own handle, that may not // have `handle.getAsyncId()`. In this case an `[asyncIdSymbol]` should // probably be supplied by `async_hooks`. [asyncIdSymbol] = -1; [kHandle] = null; [kSetNoDelay] = false; [kLastWriteQueueSize] = 0; // deno-lint-ignore no-explicit-any [kTimeout] = null; [kBuffer] = null; [kBufferCb] = null; [kBufferGen] = null; // Used after `.destroy()` [kBytesRead] = 0; [kBytesWritten] = 0; // Reserved properties server = null; // deno-lint-ignore no-explicit-any _server = null; _peername; _sockname; _pendingData = null; _pendingEncoding = ""; _host = null; // deno-lint-ignore no-explicit-any _parent = null; constructor(options){ if (typeof options === "number") { // Legacy interface. options = { fd: options }; } else { options = { ...options }; } // Default to *not* allowing half open sockets. options.allowHalfOpen = Boolean(options.allowHalfOpen); // For backwards compat do not emit close on destroy. options.emitClose = false; options.autoDestroy = true; // Handle strings directly. options.decodeStrings = false; super(options); if (options.handle) { this._handle = options.handle; this[asyncIdSymbol] = _getNewAsyncId(this._handle); } else if (options.fd !== undefined) { // REF: https://github.com/denoland/deno/issues/6529 notImplemented("net.Socket.prototype.constructor with fd option"); } const onread = options.onread; if (onread !== null && typeof onread === "object" && (isUint8Array(onread.buffer) || typeof onread.buffer === "function") && typeof onread.callback === "function") { if (typeof onread.buffer === "function") { this[kBuffer] = true; this[kBufferGen] = onread.buffer; } else { this[kBuffer] = onread.buffer; } this[kBufferCb] = onread.callback; } this.on("end", _onReadableStreamEnd); _initSocketHandle(this); // If we have a handle, then start the flow of data into the // buffer. If not, then this will happen when we connect. if (this._handle && options.readable !== false) { if (options.pauseOnCreate) { // Stop the handle from reading and pause the stream this._handle.reading = false; this._handle.readStop(); // @ts-expect-error This property shouldn't be modified this.readableFlowing = false; } else if (!options.manualStart) { this.read(0); } } } connect(...args) { let normalized; // If passed an array, it's treated as an array of arguments that have // already been normalized (so we don't normalize more than once). This has // been solved before in https://github.com/nodejs/node/pull/12342, but was // reverted as it had unintended side effects. if (Array.isArray(args[0]) && args[0][normalizedArgsSymbol]) { normalized = args[0]; } else { normalized = _normalizeArgs(args); } const options = normalized[0]; const cb = normalized[1]; // `options.port === null` will be checked later. if (options.port === undefined && options.path == null) { throw new ERR_MISSING_ARGS([ "options", "port", "path" ]); } if (this.write !== Socket.prototype.write) { this.write = Socket.prototype.write; } if (this.destroyed) { this._handle = null; this._peername = undefined; this._sockname = undefined; } const { path } = options; const pipe = _isPipe(options); debug("pipe", pipe, path); if (!this._handle) { this._handle = pipe ? new Pipe(PipeConstants.SOCKET) : new TCP(TCPConstants.SOCKET); _initSocketHandle(this); } if (cb !== null) { this.once("connect", cb); } this._unrefTimer(); this.connecting = true; if (pipe) { validateString(path, "options.path"); defaultTriggerAsyncIdScope(this[asyncIdSymbol], _internalConnect, this, path); } else { _lookupAndConnect(this, options); } return this; } /** * Pauses the reading of data. That is, `"data"` events will not be emitted. * Useful to throttle back an upload. * * @return The socket itself. */ pause() { if (this[kBuffer] && !this.connecting && this._handle && this._handle.reading) { this._handle.reading = false; if (!this.destroyed) { const err = this._handle.readStop(); if (err) { this.destroy(errnoException(err, "read")); } } } return Duplex.prototype.pause.call(this); } /** * Resumes reading after a call to `socket.pause()`. * * @return The socket itself. */ resume() { if (this[kBuffer] && !this.connecting && this._handle && !this._handle.reading) { _tryReadStart(this); } return Duplex.prototype.resume.call(this); } /** * Sets the socket to timeout after `timeout` milliseconds of inactivity on * the socket. By default `net.Socket` do not have a timeout. * * When an idle timeout is triggered the socket will receive a `"timeout"` event but the connection will not be severed. The user must manually call `socket.end()` or `socket.destroy()` to * end the connection. * * If `timeout` is `0`, then the existing idle timeout is disabled. * * The optional `callback` parameter will be added as a one-time listener for the `"timeout"` event. * @return The socket itself. */ setTimeout = setStreamTimeout; /** * Enable/disable the use of Nagle's algorithm. * * When a TCP connection is created, it will have Nagle's algorithm enabled. * * Nagle's algorithm delays data before it is sent via the network. It attempts * to optimize throughput at the expense of latency. * * Passing `true` for `noDelay` or not passing an argument will disable Nagle's * algorithm for the socket. Passing `false` for `noDelay` will enable Nagle's * algorithm. * * @param noDelay * @return The socket itself. */ setNoDelay(noDelay) { if (!this._handle) { this.once("connect", noDelay ? this.setNoDelay : ()=>this.setNoDelay(noDelay)); return this; } // Backwards compatibility: assume true when `noDelay` is omitted const newValue = noDelay === undefined ? true : !!noDelay; if ("setNoDelay" in this._handle && this._handle.setNoDelay && newValue !== this[kSetNoDelay]) { this[kSetNoDelay] = newValue; this._handle.setNoDelay(newValue); } return this; } /** * Enable/disable keep-alive functionality, and optionally set the initial * delay before the first keepalive probe is sent on an idle socket. * * Set `initialDelay` (in milliseconds) to set the delay between the last * data packet received and the first keepalive probe. Setting `0` for`initialDelay` will leave the value unchanged from the default * (or previous) setting. * * Enabling the keep-alive functionality will set the following socket options: * * - `SO_KEEPALIVE=1` * - `TCP_KEEPIDLE=initialDelay` * - `TCP_KEEPCNT=10` * - `TCP_KEEPINTVL=1` * * @param enable * @param initialDelay * @return The socket itself. */ setKeepAlive(enable, initialDelay) { if (!this._handle) { this.once("connect", ()=>this.setKeepAlive(enable, initialDelay)); return this; } if ("setKeepAlive" in this._handle) { this._handle.setKeepAlive(enable, ~~(initialDelay / 1000)); } return this; } /** * Returns the bound `address`, the address `family` name and `port` of the * socket as reported by the operating system:`{ port: 12346, family: "IPv4", address: "127.0.0.1" }` */ address() { return this._getsockname(); } /** * Calling `unref()` on a socket will allow the program to exit if this is the only * active socket in the event system. If the socket is already `unref`ed calling`unref()` again will have no effect. * * @return The socket itself. */ unref() { if (!this._handle) { this.once("connect", this.unref); return this; } if (typeof this._handle.unref === "function") { this._handle.unref(); } return this; } /** * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will_not_ let the program exit if it's the only socket left (the default behavior). * If the socket is `ref`ed calling `ref` again will have no effect. * * @return The socket itself. */ ref() { if (!this._handle) { this.once("connect", this.ref); return this; } if (typeof this._handle.ref === "function") { this._handle.ref(); } return this; } /** * This property shows the number of characters buffered for writing. The buffer * may contain strings whose length after encoding is not yet known. So this number * is only an approximation of the number of bytes in the buffer. * * `net.Socket` has the property that `socket.write()` always works. This is to * help users get up and running quickly. The computer cannot always keep up * with the amount of data that is written to a socket. The network connection * simply might be too slow. Node.js will internally queue up the data written to a * socket and send it out over the wire when it is possible. * * The consequence of this internal buffering is that memory may grow. * Users who experience large or growing `bufferSize` should attempt to * "throttle" the data flows in their program with `socket.pause()` and `socket.resume()`. * * @deprecated Use `writableLength` instead. */ get bufferSize() { if (this._handle) { return this.writableLength; } return 0; } /** * The amount of received bytes. */ get bytesRead() { return this._handle ? this._handle.bytesRead : this[kBytesRead]; } /** * The amount of bytes sent. */ get bytesWritten() { let bytes = this._bytesDispatched; const data = this._pendingData; const encoding = this._pendingEncoding; const writableBuffer = this.writableBuffer; if (!writableBuffer) { return undefined; } for (const el of writableBuffer){ bytes += el.chunk instanceof Buffer ? el.chunk.length : Buffer.byteLength(el.chunk, el.encoding); } if (Array.isArray(data)) { // Was a writev, iterate over chunks to get total length for(let i = 0; i < data.length; i++){ const chunk = data[i]; // deno-lint-ignore no-explicit-any if (data.allBuffers || chunk instanceof Buffer) { bytes += chunk.length; } else { bytes += Buffer.byteLength(chunk.chunk, chunk.encoding); } } } else if (data) { // Writes are either a string or a Buffer. if (typeof data !== "string") { bytes += data.length; } else { bytes += Buffer.byteLength(data, encoding); } } return bytes; } /** * If `true`,`socket.connect(options[, connectListener])` was * called and has not yet finished. It will stay `true` until the socket becomes * connected, then it is set to `false` and the `"connect"` event is emitted. Note * that the `socket.connect(options[, connectListener])` callback is a listener for the `"connect"` event. */ connecting = false; /** * The string representation of the local IP address the remote client is * connecting on. For example, in a server listening on `"0.0.0.0"`, if a client * connects on `"192.168.1.1"`, the value of `socket.localAddress` would be`"192.168.1.1"`. */ get localAddress() { return this._getsockname().address; } /** * The numeric representation of the local port. For example, `80` or `21`. */ get localPort() { return this._getsockname().port; } /** * The string representation of the local IP family. `"IPv4"` or `"IPv6"`. */ get localFamily() { return this._getsockname().family; } /** * The string representation of the remote IP address. For example,`"74.125.127.100"` or `"2001:4860:a005::68"`. Value may be `undefined` if * the socket is destroyed (for example, if the client disconnected). */ get remoteAddress() { return this._getpeername().address; } /** * The string representation of the remote IP family. `"IPv4"` or `"IPv6"`. */ get remoteFamily() { const { family } = this._getpeername(); return family ? `IPv${family}` : family; } /** * The numeric representation of the remote port. For example, `80` or `21`. */ get remotePort() { return this._getpeername().port; } get pending() { return !this._handle || this.connecting; } get readyState() { if (this.connecting) { return "opening"; } else if (this.readable && this.writable) { return "open"; } else if (this.readable && !this.writable) { return "readOnly"; } else if (!this.readable && this.writable) { return "writeOnly"; } return "closed"; } end(data, encoding, cb) { Duplex.prototype.end.call(this, data, encoding, cb); DTRACE_NET_STREAM_END(this); return this; } /** * @param size Optional argument to specify how much data to read. */ read(size) { if (this[kBuffer] && !this.connecting && this._handle && !this._handle.reading) { _tryReadStart(this); } return Duplex.prototype.read.call(this, size); } destroySoon() { if (this.writable) { this.end(); } if (this.writableFinished) { this.destroy(); } else { this.once("finish", this.destroy); } } _unrefTimer() { // deno-lint-ignore no-this-alias for(let s = this; s !== null; s = s._parent){ if (s[kTimeout]) { s[kTimeout].refresh(); } } } // The user has called .end(), and all the bytes have been // sent out to the other side. // deno-lint-ignore no-explicit-any _final(cb) { // If still connecting - defer handling `_final` until 'connect' will happen if (this.pending) { debug("_final: not yet connected"); return this.once("connect", ()=>this._final(cb)); } if (!this._handle) { return cb(); } debug("_final: not ended, call shutdown()"); const req = new ShutdownWrap(); req.oncomplete = _afterShutdown; req.handle = this._handle; req.callback = cb; const err = this._handle.shutdown(req); if (err === 1 || err === codeMap.get("ENOTCONN")) { // synchronous finish return cb(); } else if (err !== 0) { return cb(errnoException(err, "shutdown")); } } _onTimeout() { const handle = this._handle; const lastWriteQueueSize = this[kLastWriteQueueSize]; if (lastWriteQueueSize > 0 && handle) { // `lastWriteQueueSize !== writeQueueSize` means there is // an active write in progress, so we suppress the timeout. const { writeQueueSize } = handle; if (lastWriteQueueSize !== writeQueueSize) { this[kLastWriteQueueSize] = writeQueueSize; this._unrefTimer(); return; } } debug("_onTimeout"); this.emit("timeout"); } _read(size) { debug("_read"); if (this.connecting || !this._handle) { debug("_read wait for connection"); this.once("connect", ()=>this._read(size)); } else if (!this._handle.reading) { _tryReadStart(this); } } _destroy(exception, cb) { debug("destroy"); this.connecting = false; // deno-lint-ignore no-this-alias for(let s = this; s !== null; s = s._parent){ clearTimeout(s[kTimeout]); } debug("close"); if (this._handle) { debug("close handle"); const isException = exception ? true : false; // `bytesRead` and `kBytesWritten` should be accessible after `.destroy()` this[kBytesRead] = this._handle.bytesRead; this[kBytesWritten] = this._handle.bytesWritten; this._handle.close(()=>{ this._handle.onread = _noop; this._handle = null; this._sockname = undefined; debug("emit close"); this.emit("close", isException); }); cb(exception); } else { cb(exception); nextTick(_emitCloseNT, this); } if (this._server) { debug("has server"); this._server._connections--; if (this._server._emitCloseIfDrained) { this._server._emitCloseIfDrained(); } } } _getpeername() { if (!this._handle || !("getpeername" in this._handle) || this.connecting) { return this._peername || {}; } else if (!this._peername) { this._peername = {}; this._handle.getpeername(this._peername); } return this._peername; } _getsockname() { if (!this._handle || !("getsockname" in this._handle)) { return {}; } else if (!this._sockname) { this._sockname = {}; this._handle.getsockname(this._sockname); } return this._sockname; } _writeGeneric(writev, // deno-lint-ignore no-explicit-any data, encoding, cb) { // If we are still connecting, then buffer this for later. // The Writable logic will buffer up any more writes while // waiting for this one to be done. if (this.connecting) { this._pendingData = data; this._pendingEncoding = encoding; this.once("connect", function connect() { this._writeGeneric(writev, data, encoding, cb); }); return; } this._pendingData = null; this._pendingEncoding = ""; if (!this._handle) { cb(new ERR_SOCKET_CLOSED()); return false; } this._unrefTimer(); let req; if (writev) { req = writevGeneric(this, data, cb); } else { req = writeGeneric(this, data, encoding, cb); } if (req.async) { this[kLastWriteQueueSize] = req.bytes; } } // @ts-ignore Duplex defining as a property when want a method. _writev(// deno-lint-ignore no-explicit-any chunks, cb) { this._writeGeneric(true, chunks, "", cb); } _write(// deno-lint-ignore no-explicit-any data, encoding, cb) { this._writeGeneric(false, data, encoding, cb); } [kAfterAsyncWrite]() { this[kLastWriteQueueSize] = 0; } get [kUpdateTimer]() { return this._unrefTimer; } get _connecting() { return this.connecting; } // Legacy alias. Having this is probably being overly cautious, but it doesn't // really hurt anyone either. This can probably be removed safely if desired. get _bytesDispatched() { return this._handle ? this._handle.bytesWritten : this[kBytesWritten]; } get _handle() { return this[kHandle]; } set _handle(v) { this[kHandle] = v; } } export const Stream = Socket; export function connect(...args) { const normalized = _normalizeArgs(args); const options = normalized[0]; debug("createConnection", normalized); const socket = new Socket(options); if (netClientSocketChannel.hasSubscribers) { netClientSocketChannel.publish({ socket }); } if (options.timeout) { socket.setTimeout(options.timeout); } return socket.connect(normalized); } export const createConnection = connect; function _isServerSocketOptions(options) { return options === null || typeof options === "undefined" || typeof options === "object"; } function _isConnectionListener(connectionListener) { return typeof connectionListener === "function"; } function _getFlags(ipv6Only) { return ipv6Only === true ? TCPConstants.UV_TCP_IPV6ONLY : 0; } function _listenInCluster(server, address, port, addressType, backlog, fd, exclusive, flags) { exclusive = !!exclusive; // TODO(cmorten): here we deviate somewhat from the Node implementation which // makes use of the https://nodejs.org/api/cluster.html module to run servers // across a "cluster" of Node processes to take advantage of multi-core // systems. // // Though Deno has has a Worker capability from which we could simulate this, // for now we assert that we are _always_ on the primary process. const isPrimary = true; if (isPrimary || exclusive) { // Will create a new handle // _listen2 sets up the listened handle, it is still named like this // to avoid breaking code that wraps this method server._listen2(address, port, addressType, backlog, fd, flags); return; } } function _lookupAndListen(server, port, address, backlog, exclusive, flags) { dnsLookup(address, function doListen(err, ip, addressType) { if (err) { server.emit("error", err); } else { addressType = ip ? addressType : 4; _listenInCluster(server, ip, port, addressType, backlog, null, exclusive, flags); } }); } function _addAbortSignalOption(server, options) { if (options?.signal === undefined) { return; } validateAbortSignal(options.signal, "options.signal"); const { signal } = options; const onAborted = ()=>{ server.close(); }; if (signal.aborted) { nextTick(onAborted); } else { signal.addEventListener("abort", onAborted); server.once("close", ()=>signal.removeEventListener("abort", onAborted)); } } // Returns handle if it can be created, or error code if it can't export function _createServerHandle(address, port, addressType, fd, flags) { let err = 0; // Assign handle in listen, and clean up if bind or listen fails let handle; let isTCP = false; if (typeof fd === "number" && fd >= 0) { try { handle = _createHandle(fd, true); } catch (e) { // Not a fd we can listen on. This will trigger an error. debug("listen invalid fd=%d:", fd, e.message); return codeMap.get("EINVAL"); } err = handle.open(fd); if (err) { return err; } assert(!address && !port); } else if (port === -1 && addressType === -1) { handle = new Pipe(PipeConstants.SERVER); if (isWindows) { const instances = Number.parseInt(Deno.env.get("NODE_PENDING_PIPE_INSTANCES") ?? ""); if (!Number.isNaN(instances)) { handle.setPendingInstances(instances); } } } else { handle = new TCP(TCPConstants.SERVER); isTCP = true; } if (address || port || isTCP) { debug("bind to", address || "any"); if (!address) { // TODO(@bartlomieju): differs from Node which tries to bind to IPv6 first when no // address is provided. // // Forcing IPv4 as a workaround for Deno not aligning with Node on // implicit binding on Windows. // // REF: https://github.com/denoland/deno/issues/10762 // Try binding to ipv6 first // err = (handle as TCP).bind6(DEFAULT_IPV6_ADDR, port ?? 0, flags ?? 0); // if (err) { // handle.close(); // Fallback to ipv4 return _createServerHandle(DEFAULT_IPV4_ADDR, port, 4, null, flags); // } } else if (addressType === 6) { err = handle.bind6(address, port ?? 0, flags ?? 0); } else { err = handle.bind(address, port ?? 0); } } if (err) { handle.close(); return err; } return handle; } function _emitErrorNT(server, err) { server.emit("error", err); } function _emitListeningNT(server) { // Ensure handle hasn't closed if (server._handle) { server.emit("listening"); } } // deno-lint-ignore no-explicit-any function _onconnection(err, clientHandle) { // deno-lint-ignore no-this-alias const handle = this; const self = handle[ownerSymbol]; debug("onconnection"); if (err) { self.emit("error", errnoException(err, "accept")); return; } if (self.maxConnections && self._connections >= self.maxConnections) { clientHandle.close(); return; } const socket = self._createSocket(clientHandle); this._connections++; self.emit("connection", socket); if (netServerSocketChannel.hasSubscribers) { netServerSocketChannel.publish({ socket }); } } function _setupListenHandle(address, port, addressType, backlog, fd, flags) { debug("setupListenHandle", address, port, addressType, backlog, fd); // If there is not yet a handle, we need to create one and bind. // In the case of a server sent via IPC, we don't need to do this. if (this._handle) { debug("setupListenHandle: have a handle already"); } else { debug("setupListenHandle: create a handle"); let rval = null; // Try to bind to the unspecified IPv6 address, see if IPv6 is available if (!address && typeof fd !== "number") { // TODO(@bartlomieju): differs from Node which tries to bind to IPv6 first // when no address is provided. // // Forcing IPv4 as a workaround for Deno not aligning with Node on // implicit binding on Windows. // // REF: https://github.com/denoland/deno/issues/10762 // rval = _createServerHandle(DEFAULT_IPV6_ADDR, port, 6, fd, flags); // if (typeof rval === "number") { // rval = null; address = DEFAULT_IPV4_ADDR; addressType = 4; // } else { // address = DEFAULT_IPV6_ADDR; // addressType = 6; // } } if (rval === null) { rval = _createServerHandle(address, port, addressType, fd, flags); } if (typeof rval === "number") { const error = uvExceptionWithHostPort(rval, "listen", address, port); nextTick(_emitErrorNT, this, error); return; } this._handle = rval; } this[asyncIdSymbol] = _getNewAsyncId(this._handle); this._handle.onconnection = _onconnection; this._handle[ownerSymbol] = this; // Use a backlog of 512 entries. We pass 511 to the listen() call because // the kernel does: backlogsize = roundup_pow_of_two(backlogsize + 1); // which will thus give us a backlog of 512 entries. const err = this._handle.listen(backlog || 511); if (err) { const ex = uvExceptionWithHostPort(err, "listen", address, port); this._handle.close(); this._handle = null; defaultTriggerAsyncIdScope(this[asyncIdSymbol], nextTick, _emitErrorNT, this, ex); return; } // Generate connection key, this should be unique to the connection this._connectionKey = addressType + ":" + address + ":" + port; // Unref the handle if the server was unref'ed prior to listening if (this._unref) { this.unref(); } defaultTriggerAsyncIdScope(this[asyncIdSymbol], nextTick, _emitListeningNT, this); } /** This class is used to create a TCP or IPC server. */ export class Server extends EventEmitter { [asyncIdSymbol] = -1; allowHalfOpen = false; pauseOnConnect = false; // deno-lint-ignore no-explicit-any _handle = null; _connections = 0; _usingWorkers = false; // deno-lint-ignore no-explicit-any _workers = []; _unref = false; _pipeName; _connectionKey; constructor(options, connectionListener){ super(); if (_isConnectionListener(options)) { this.on("connection", options); } else if (_isServerSocketOptions(options)) { this.allowHalfOpen = options?.allowHalfOpen || false; this.pauseOnConnect = !!options?.pauseOnConnect; if (_isConnectionListener(connectionListener)) { this.on("connection", connectionListener); } } else { throw new ERR_INVALID_ARG_TYPE("options", "Object", options); } } listen(...args) { const normalized = _normalizeArgs(args); let options = normalized[0]; const cb = normalized[1]; if (this._handle) { throw new ERR_SERVER_ALREADY_LISTEN(); } if (cb !== null) { this.once("listening", cb); } const backlogFromArgs = // (handle, backlog) or (path, backlog) or (port, backlog) _toNumber(args.length > 1 && args[1]) || _toNumber(args.length > 2 && args[2]); // (port, host, backlog) // deno-lint-ignore no-explicit-any options = options._handle || options.handle || options; const flags = _getFlags(options.ipv6Only); // (handle[, backlog][, cb]) where handle is an object with a handle if (options instanceof TCP) { this._handle = options; this[asyncIdSymbol] = this._handle.getAsyncId(); _listenInCluster(this, null, -1, -1, backlogFromArgs); return this; } _addAbortSignalOption(this, options); // (handle[, backlog][, cb]) where handle is an object with a fd if (typeof options.fd === "number" && options.fd >= 0) { _listenInCluster(this, null, null, null, backlogFromArgs, options.fd); return this; } // ([port][, host][, backlog][, cb]) where port is omitted, // that is, listen(), listen(null), listen(cb), or listen(null, cb) // or (options[, cb]) where options.port is explicitly set as undefined or // null, bind to an arbitrary unused port if (args.length === 0 || typeof args[0] === "function" || typeof options.port === "undefined" && "port" in options || options.port === null) { options.port = 0; } // ([port][, host][, backlog][, cb]) where port is specified // or (options[, cb]) where options.port is specified // or if options.port is normalized as 0 before let backlog; if (typeof options.port === "number" || typeof options.port === "string") { validatePort(options.port, "options.port"); backlog = options.backlog || backlogFromArgs; // start TCP server listening on host:port if (options.host) { _lookupAndListen(this, options.port | 0, options.host, backlog, !!options.exclusive, flags); } else { // Undefined host, listens on unspecified address // Default addressType 4 will be used to search for primary server _listenInCluster(this, null, options.port | 0, 4, backlog, undefined, options.exclusive); } return this; } // (path[, backlog][, cb]) or (options[, cb]) // where path or options.path is a UNIX domain socket or Windows pipe if (options.path && _isPipeName(options.path)) { const pipeName = this._pipeName = options.path; backlog = options.backlog || backlogFromArgs; _listenInCluster(this, pipeName, -1, -1, backlog, undefined, options.exclusive); if (!this._handle) { // Failed and an error shall be emitted in the next tick. // Therefore, we directly return. return this; } let mode = 0; if (options.readableAll === true) { mode |= PipeConstants.UV_READABLE; } if (options.writableAll === true) { mode |= PipeConstants.UV_WRITABLE; } if (mode !== 0) { const err = this._handle.fchmod(mode); if (err) { this._handle.close(); this._handle = null; throw errnoException(err, "uv_pipe_chmod"); } } return this; } if (!("port" in options || "path" in options)) { throw new ERR_INVALID_ARG_VALUE("options", options, 'must have the property "port" or "path"'); } throw new ERR_INVALID_ARG_VALUE("options", options); } /** * Stops the server from accepting new connections and keeps existing * connections. This function is asynchronous, the server is finally closed * when all connections are ended and the server emits a `"close"` event. * The optional `callback` will be called once the `"close"` event occurs. Unlike * that event, it will be called with an `Error` as its only argument if the server * was not open when it was closed. * * @param cb Called when the server is closed. */ close(cb) { if (typeof cb === "function") { if (!this._handle) { this.once("close", function close() { cb(new ERR_SERVER_NOT_RUNNING()); }); } else { this.once("close", cb); } } if (this._handle) { this._handle.close(); this._handle = null; } if (this._usingWorkers) { let left = this._workers.length; const onWorkerClose = ()=>{ if (--left !== 0) { return; } this._connections = 0; this._emitCloseIfDrained(); }; // Increment connections to be sure that, even if all sockets will be closed // during polling of workers, `close` event will be emitted only once. this._connections++; // Poll workers for(let n = 0; n < this._workers.length; n++){ this._workers[n].close(onWorkerClose); } } else { this._emitCloseIfDrained(); } return this; } /** * Returns the bound `address`, the address `family` name, and `port` of the server * as reported by the operating system if listening on an IP socket * (useful to find which port was assigned when getting an OS-assigned address):`{ port: 12346, family: "IPv4", address: "127.0.0.1" }`. * * For a server listening on a pipe or Unix domain socket, the name is returned * as a string. * * `server.address()` returns `null` before the `"listening"` event has been * emitted or after calling `server.close()`. */ address() { if (this._handle && this._handle.getsockname) { const out = {}; const err = this._handle.getsockname(out); if (err) { throw errnoException(err, "address"); } return out; } else if (this._pipeName) { return this._pipeName; } return null; } /** * Asynchronously get the number of concurrent connections on the server. Works * when sockets were sent to forks. * * Callback should take two arguments `err` and `count`. */ getConnections(cb) { // deno-lint-ignore no-this-alias const server = this; function end(err, connections) { defaultTriggerAsyncIdScope(server[asyncIdSymbol], nextTick, cb, err, connections); } if (!this._usingWorkers) { end(null, this._connections); return this; } // Poll workers let left = this._workers.length; let total = this._connections; function oncount(err, count) { if (err) { left = -1; return end(err); } total += count; if (--left === 0) { return end(null, total); } } for(let n = 0; n < this._workers.length; n++){ this._workers[n].getConnections(oncount); } return this; } /** * Calling `unref()` on a server will allow the program to exit if this is the only * active server in the event system. If the server is already `unref`ed calling `unref()` again will have no effect. */ unref() { this._unref = true; if (this._handle) { this._handle.unref(); } return this; } /** * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior). * If the server is `ref`ed calling `ref()` again will have no effect. */ ref() { this._unref = false; if (this._handle) { this._handle.ref(); } return this; } /** * Indicates whether or not the server is listening for connections. */ get listening() { return !!this._handle; } _createSocket(clientHandle) { const socket = new Socket({ handle: clientHandle, allowHalfOpen: this.allowHalfOpen, pauseOnCreate: this.pauseOnConnect, readable: true, writable: true }); // TODO(@bartlomieju): implement noDelay and setKeepAlive socket.server = this; socket._server = this; DTRACE_NET_SERVER_CONNECTION(socket); return socket; } _listen2 = _setupListenHandle; _emitCloseIfDrained() { debug("SERVER _emitCloseIfDrained"); if (this._handle || this._connections) { debug(`SERVER handle? ${!!this._handle} connections? ${this._connections}`); return; } // We use setTimeout instead of nextTick here to avoid EADDRINUSE error // when the same port listened immediately after the 'close' event. // ref: https://github.com/denoland/deno_std/issues/2788 defaultTriggerAsyncIdScope(this[asyncIdSymbol], setTimeout, _emitCloseNT, 0, this); } _setupWorker(socketList) { this._usingWorkers = true; this._workers.push(socketList); // deno-lint-ignore no-explicit-any socketList.once("exit", (socketList)=>{ const index = this._workers.indexOf(socketList); this._workers.splice(index, 1); }); } [EventEmitter.captureRejectionSymbol](err, event, sock) { switch(event){ case "connection": { sock.destroy(err); break; } default: { this.emit("error", err); } } } } /** * Creates a new TCP or IPC server. * * Accepts an `options` object with properties `allowHalfOpen` (default `false`) * and `pauseOnConnect` (default `false`). * * If `allowHalfOpen` is set to `false`, then the socket will * automatically end the writable side when the readable side ends. * * If `allowHalfOpen` is set to `true`, when the other end of the socket * signals the end of transmission, the server will only send back the end of * transmission when `socket.end()` is explicitly called. For example, in the * context of TCP, when a FIN packed is received, a FIN packed is sent back * only when `socket.end()` is explicitly called. Until then the connection is * half-closed (non-readable but still writable). See `"end"` event and RFC 1122 * (section 4.2.2.13) for more information. * * `pauseOnConnect` indicates whether the socket should be paused on incoming * connections. * * If `pauseOnConnect` is set to `true`, then the socket associated with each * incoming connection will be paused, and no data will be read from its * handle. This allows connections to be passed between processes without any * data being read by the original process. To begin reading data from a paused * socket, call `socket.resume()`. * * The server can be a TCP server or an IPC server, depending on what it * `listen()` to. * * Here is an example of an TCP echo server which listens for connections on * port 8124: * * @param options Socket options. * @param connectionListener Automatically set as a listener for the `"connection"` event. * @return A `net.Server`. */ export function createServer(options, connectionListener) { return new Server(options, connectionListener); } export { isIP, isIPv4, isIPv6 }; export default { _createServerHandle, _normalizeArgs, isIP, isIPv4, isIPv6, connect, createConnection, createServer, Server, Socket, Stream };  Qaǡenode:neta bsD`M`i T`La~ T  I` Sb1%BBBB""b?????????????????????????????????????Ib`dL`  ]`F"]`~ ]`/ ]`ˆ ]`b ]`" ]`B ]`b! ]` B ]`@ ]` b]` " ]`` ^ ]` ]`8 ¸ ]` b ]` " ]` b]`U  ]`y  ]` b ]` b]`G L`  " D" c Dc bDbctL`` L` ` L` b ` L`b " ` L`" ` L`Z ` L`Z >` L`> ` L` ³ `  L`³ ]L`= DB B c. 8  D"{ "{ c  DBBc h  Dc  DB B c D66c Db b c D  c D" " c D  c DB B c  Dbbc5 DZ Z c7M D  cO` D  cjv Dc   DBBc! 0  Dbbc   Dcp |  Db^ b^ c  Dc  Dbbc  D c  D" " c% Dc8 ?  D  cj q  D  c  D  c'A DB» c: @  D  cbp D  cr D  c Db b c  D" " c Dc Dbbc D  c Dttc  Dc,< Dbbc>E DcGP DBBcR\ Dc^e D" " c DB B cgs DbbcCM D± ± c 0 8  Dc Db b c0> Dcu D  cOZ D¶ ¶ c D" " c DB B c  D  c   D"/ "/ c  *  D  c , :  D  c < H  D  c J X  DBBc Dc`Fb a? a?" a?a?ba?a?B a?" a? a?ba? a?6a?b a? a?" a? a?B a?ba?Z a? a? a? a? a?" a? a?a?ba?a?Ba?a?B a?a?¶ a?Ba?a?" a?± a?Ba?a?"{ a?B a? a?"/ a? a? a? a?ba?b^ a?a?ba?a?Ba?a?a?ta?B a?Ba? a?b a? a?a?Z a?b a?" a?>a? a?a? a?³ a ?a?b@ T I`"b@ T  I`)jBb@ T I`b@ T I`8b@ T I`O"Bb@  T I`;]b@  T I`nBb@  T I`b@  T I`K%"b@  T I`0&(b@ T I`()b@ T I`*V*b@ T I`*G-"b@ T I`b-7b fo@ b fn@b@ T I`7P8b@ T I`f88b@ T I`bˆb@H T I`5b@I T I`Hb@J T I`ϊb @K TI`)b Ė@ *b@L T I`Hݍbb@N T I`qb@R T I` b@S T I`[b@T T I`b@ULL` T I`Z b@cR T I`>b@GbS T I`C[b@QbT T I`³ b@hbU a  %  T I` IbK b"" T `/TbK"tSb @ mBEEBFFP"QQb l???????????;d  `5T ``/ `/ `?  `  a;dD]!f$@;D" } `F` %DB a34` 9Db `F`   `F` D `F` D a"(D aa!' a+1DB  `F` D'aa(.DB'a" a%+D a>a Da)/ `1F` 7D `F` $ a$*D  `F` " a,2"  `F` D `F`  a#) a&,b aD4aB a'-D3a  `F` #DBa &a*0D `2F` 8B  `F` !D aDHcDLbB  T  I`%>\Eb b Ճ" " bB T I`fEK>b T I`2LM b T I`MN b T I`1SU3b  T I`WX4b  T I`YYb b! T I`Z['b" T I`\]B'b# T I`FaaQbget bufferSizeb$ T I`a&bQb get bytesReadb % T I`bbcfQbget bytesWrittenb& T I`h"iQbget localAddressb' T I`iiQb get localPortb ( T I` jOjQbget localFamilyb) T I`DktkQcget remoteAddressb* T I`k@lQbget remoteFamilyb+ T I`llQbget remotePortb, T I`lmQb get pendingb - T I`+m^nQbget readyStateb. T I`dnnBb/ T I`?oob0 T I`pp b 1 T I`pcq b 2 T I`qt b3 T I`tv" b 5 T I`vw b6 T I`w{B b8 T I`{|b : T I`|}b ; T I`}b @b < T I`ǵ b> T I`ցI b? T I`^`b@B  T I`Â`bA T I`ՂQbget _connectingbB T I`Qcget _bytesDispatchedbC T I`4Qb get _handleb D T I`BbQb set _handleb E Tl`8L` [ "I" ¶ "B   `(Kh;H`PX\\   4p l 8  ȗ t 555 555 5  5 5 53333333 3"0 3 $3 &(Sbqqb `Da7;dd( 4 4 4 0 0 0 0bF $Sb @b?Qd"  `T ``/ `/ `?  `  aQdD]ff D  } ` F` Da Db a Db a D a Da ba 'aD;a B'a D aDHcD La8  T  I` b ՃV T I`;bW T I`hc@@bX T I`b b[ TI`Zc @ @@b\ T I`:'b_ T I` B'b` T I`kQb get listeningb a T I`$b b b T I`[Kbbc T I`Zh b d  T I`b`b%f TD`B0L` BB  B `Ke!Г XX h  \ T  < $ 4ԍ!j 5333 33 } 3 333'3 (Sbqq `Dasdb 0 0bghb CZ C" CCbC>C C³ C Cb C" CZ " b> ³  b "  `Dh %%%%%%% % % % % %%%%%%% % % % % % %%%%%%% %!%"%#%$%%%&%'ei h  0 Â!c%!"#b%!"$b%!"%b%!"&b %'%(% )% 0*+b % 0,b% -%%%%%%%% % % % 0/0.01t%02t%t%t%03t%04t%05t%06t% t% t% 789 :!;"<#=$>%?&@'߂A(ނB)݂C*܂D+ۂE,ڂF-قG.؂H/ׂI0ւJ1ՂK2ԂL3ӂM4҂N5тO6ЂP7ςQ8΂R9͂S:̂T;˂U<ʂV=0WtȂX>0YtƂZ?ł[@Ă\AÂ]B‚^Ce+5 % _D2` 10101a%0cdEb0t%eFfGgHhIiJjKkLlMmNnO0-otpPe+qQ2` 1~r)03s03t0u3u0v3v0w3w03x!03y#0 3z%03{'03|)03}+ 1 "d-V@@,0bAD "D2:&.6>DFDNV^fr~ DD"D*2:DFNV^fr~BJRZbDnDv~DD    & . D6 > D`RD]DH  Q B(// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { op_cpus, op_node_os_get_priority, op_node_os_set_priority, op_node_os_username } from "ext:core/ops"; import { validateIntegerRange } from "ext:deno_node/_utils.ts"; import process from "node:process"; import { isWindows, osType } from "ext:deno_node/_util/os.ts"; import { ERR_OS_NO_HOMEDIR } from "ext:deno_node/internal/errors.ts"; import { os } from "ext:deno_node/internal_binding/constants.ts"; import { osUptime } from "ext:runtime/30_os.js"; import { Buffer } from "ext:deno_node/internal/buffer.mjs"; export const constants = os; export function arch() { return process.arch; } // deno-lint-ignore no-explicit-any availableParallelism[Symbol.toPrimitive] = ()=>availableParallelism(); // deno-lint-ignore no-explicit-any arch[Symbol.toPrimitive] = ()=>process.arch; // deno-lint-ignore no-explicit-any endianness[Symbol.toPrimitive] = ()=>endianness(); // deno-lint-ignore no-explicit-any freemem[Symbol.toPrimitive] = ()=>freemem(); // deno-lint-ignore no-explicit-any homedir[Symbol.toPrimitive] = ()=>homedir(); // deno-lint-ignore no-explicit-any hostname[Symbol.toPrimitive] = ()=>hostname(); // deno-lint-ignore no-explicit-any platform[Symbol.toPrimitive] = ()=>platform(); // deno-lint-ignore no-explicit-any release[Symbol.toPrimitive] = ()=>release(); // deno-lint-ignore no-explicit-any version[Symbol.toPrimitive] = ()=>version(); // deno-lint-ignore no-explicit-any totalmem[Symbol.toPrimitive] = ()=>totalmem(); // deno-lint-ignore no-explicit-any type[Symbol.toPrimitive] = ()=>type(); // deno-lint-ignore no-explicit-any uptime[Symbol.toPrimitive] = ()=>uptime(); // deno-lint-ignore no-explicit-any machine[Symbol.toPrimitive] = ()=>machine(); export function cpus() { return op_cpus(); } /** * Returns a string identifying the endianness of the CPU for which the Deno * binary was compiled. Possible values are 'BE' for big endian and 'LE' for * little endian. */ export function endianness() { // Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView#Endianness const buffer = new ArrayBuffer(2); new DataView(buffer).setInt16(0, 256, true); // Int16Array uses the platform's endianness. return new Int16Array(buffer)[0] === 256 ? "LE" : "BE"; } /** Return free memory amount */ export function freemem() { if (Deno.build.os === "linux" || Deno.build.os == "android") { // On linux, use 'available' memory // https://github.com/libuv/libuv/blob/a5c01d4de3695e9d9da34cfd643b5ff0ba582ea7/src/unix/linux.c#L2064 return Deno.systemMemoryInfo().available; } else { // Use 'free' memory on other platforms return Deno.systemMemoryInfo().free; } } /** Not yet implemented */ export function getPriority(pid = 0) { validateIntegerRange(pid, "pid"); return op_node_os_get_priority(pid); } /** Returns the string path of the current user's home directory. */ export function homedir() { // Note: Node/libuv calls getpwuid() / GetUserProfileDirectory() when the // environment variable isn't set but that's the (very uncommon) fallback // path. IMO, it's okay to punt on that for now. switch(osType){ case "windows": return Deno.env.get("USERPROFILE") || null; case "linux": case "android": case "darwin": case "freebsd": case "openbsd": return Deno.env.get("HOME") || null; default: throw Error("unreachable"); } } /** Returns the host name of the operating system as a string. */ export function hostname() { return Deno.hostname(); } /** Returns an array containing the 1, 5, and 15 minute load averages */ export function loadavg() { if (isWindows) { return [ 0, 0, 0 ]; } return Deno.loadavg(); } /** Returns an object containing network interfaces that have been assigned a network address. * Each key on the returned object identifies a network interface. The associated value is an array of objects that each describe an assigned network address. */ export function networkInterfaces() { const interfaces = {}; for (const { name, address, netmask, family, mac, scopeid, cidr } of Deno.networkInterfaces()){ const addresses = interfaces[name] ||= []; const networkAddress = { address, netmask, family, mac, internal: family === "IPv4" && isIPv4LoopbackAddr(address) || family === "IPv6" && isIPv6LoopbackAddr(address), cidr }; if (family === "IPv6") { networkAddress.scopeid = scopeid; } addresses.push(networkAddress); } return interfaces; } function isIPv4LoopbackAddr(addr) { return addr.startsWith("127"); } function isIPv6LoopbackAddr(addr) { return addr === "::1" || addr === "fe80::1"; } /** Returns the a string identifying the operating system platform. The value is set at compile time. Possible values are 'darwin', 'linux', and 'win32'. */ export function platform() { return process.platform; } /** Returns the operating system as a string */ export function release() { return Deno.osRelease(); } /** Returns a string identifying the kernel version */ export function version() { // TODO(kt3k): Temporarily uses Deno.osRelease(). // Revisit this if this implementation is insufficient for any npm module return Deno.osRelease(); } /** Returns the machine type as a string */ export function machine() { if (Deno.build.arch == "aarch64") { return "arm64"; } return Deno.build.arch; } /** Not yet implemented */ export function setPriority(pid, priority) { /* The node API has the 'pid' as the first parameter and as optional. This makes for a problematic implementation in Typescript. */ if (priority === undefined) { priority = pid; pid = 0; } validateIntegerRange(pid, "pid"); validateIntegerRange(priority, "priority", -20, 19); op_node_os_set_priority(pid, priority); } /** Returns the operating system's default directory for temporary files as a string. */ export function tmpdir() { /* This follows the node js implementation, but has a few differences: * On windows, if none of the environment variables are defined, we return null. * On unix we use a plain Deno.env.get, instead of safeGetenv, which special cases setuid binaries. * Node removes a single trailing / or \, we remove all. */ if (isWindows) { const temp = Deno.env.get("TEMP") || Deno.env.get("TMP"); if (temp) { return temp.replace(/(?w, b@ La@ T  I`_|b @a T I` 'b @a T I` $b@a T I`$$b@a  T I`'b@a  T I`|d$b@a  T I`b@a  T I`@b(b@a  T I`(b@a T I`-NB%b@a T I`%b@a T I`&b@a T I`I"'b@a T I`"-b@a T I`Xv-b@a T I`b&b@a T I`I !b @ a T I`!!&b@!a  T I`/"%b/b@"a! T I`A&o&b#b@#d"a  \ T y`b#Qb .`IbK T `Qb .`'7IbK T `$Qb .`~IbK T `$Qb .`IbK T `$Qb .`# 0 IbK T `Qb .`u IbK T `B%Qb .` IbK T `%Qb .` ' IbK  T `&Qb .`k x IbK  T `b&Qb .` IbK  T `Qb .`  IbK  T `&Qb .`Y e IbK  T `"'Qb .` IbK t"b11b.b#CC'C$C$C'C$CCb(C(C"'CB%C%C"-C-Cb&CC&Cb/C&CbC0C1Cb#'$$'$b(("'B%%"--b&&b/&b01  z `D!(h Ƃ%%ei h  010!- 40!- 40!- 40 !- 4 0 !- 4 0 !-Â40!-Â40!- 40!- 40!- 40!- 40!- 40!-Â40101~)0303!03#03%0 3 '0 3!)0 3"+0 3#-0 3$/03%103&303'503(703)903*;03+=03,?03-A03.C03/E030G031I032K 1 $gM#8888f bAZ    * : J Z j z     b j r z      N            D`RD]DH Qz6,// Copyright the Browserify authors. MIT License. // Ported from https://github.com/browserify/path-browserify/ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import path from "ext:deno_node/path/mod.ts"; export const { basename, delimiter, dirname, extname, format, isAbsolute, join, normalize, parse, relative, resolve, sep, toNamespacedPath } = path.posix; export default path.posix; Qbvicanode:path/posixa buD` M` Tx`TLa!@Ln a I"53b3y 3-b "OB`B4 a4   `Dw h ei h  0--1-1-1- 1- 1- 1- 1- 1 -1 -1 -1 -1 -10-1 Sb1Ib` L` B2]`]L`*` L`3` L`3b3` L`b3y ` L`y 3` L`3-` L`b ` L`b ` L`"O`  L`"OB``  L`B`B4`  L`B4 `  L`a`  L`4` L`4] L`  DIc`Ia?3a?b3a?y a?3a?a?b a?a?"Oa ?B`a ?B4a ?a ?a ?4a?a?cPPPP bA D`RD]DH Q-f// Copyright the Browserify authors. MIT License. // Ported from https://github.com/browserify/path-browserify/ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import path from "ext:deno_node/path/mod.ts"; export const { basename, delimiter, dirname, extname, format, isAbsolute, join, normalize, parse, relative, resolve, sep, toNamespacedPath } = path.win32; export default path.win32; Qb^y1node:path/win32a bvD` M` Tx`TLa!@Ln a I53b3y 3-b "OB`B4 a4  f `Dw h ei h  0--1-1-1- 1- 1- 1- 1- 1 -1 -1 -1 -1 -10-1 Sb1Ib` L` B2]`]L`*` L`3` L`3b3` L`b3y ` L`y 3` L`3-` L`b ` L`b ` L`"O`  L`"OB``  L`B`B4`  L`B4 `  L`a`  L`4` L`4] L`  DIc`Ia?3a?b3a?y a?3a?a?b a?a?"Oa ?B`a ?B4a ?a ?a ?4a?a?cPPPPR bAD`RD]DH dQwʕl// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. export * from "ext:deno_node/path/mod.ts"; import m from "ext:deno_node/path/mod.ts"; export default m; Qb&? node:patha bwD` M` TD`BLa! Laa B,   `Dj h ei h  01 @Sb1Ib` L` B2]`Y L`  DcRSL`` L`] L` DB,c}~`B,a?a?  bAD`RD]DH Qn܌// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { notImplemented } from "ext:deno_node/_utils.ts"; import { performance as shimPerformance, PerformanceEntry } from "ext:deno_web/15_performance.js"; // FIXME(bartlomieju) const PerformanceObserver = undefined; const constants = {}; const performance = { clearMarks: (markName)=>shimPerformance.clearMarks(markName), eventLoopUtilization: ()=>notImplemented("eventLoopUtilization from performance"), mark: (markName)=>shimPerformance.mark(markName), measure: (measureName, startMark, endMark)=>{ if (endMark) { return shimPerformance.measure(measureName, startMark, endMark); } else { return shimPerformance.measure(measureName, startMark); } }, nodeTiming: {}, now: ()=>shimPerformance.now(), timerify: ()=>notImplemented("timerify from performance"), get timeOrigin () { // deno-lint-ignore no-explicit-any return shimPerformance.timeOrigin; }, getEntriesByName: (name, type)=>shimPerformance.getEntriesByName(name, type), getEntriesByType: (type)=>shimPerformance.getEntriesByType(type), markResourceTiming: ()=>{}, // @ts-ignore waiting on update in `deno`, but currently this is // a circular dependency toJSON: ()=>shimPerformance.toJSON(), addEventListener: (...args)=>shimPerformance.addEventListener(...args), removeEventListener: (...args)=>shimPerformance.removeEventListener(...args), dispatchEvent: (...args)=>shimPerformance.dispatchEvent(...args) }; const monitorEventLoopDelay = ()=>notImplemented("monitorEventLoopDelay from performance"); export default { performance, PerformanceObserver, PerformanceEntry, monitorEventLoopDelay, constants }; export { constants, monitorEventLoopDelay, performance, PerformanceEntry, PerformanceObserver }; Qbvanode:perf_hooksa bxD`HM` T`La(!Lea bC7CbCC9b_CB:CBCBCCb;C- CCCC T  y`Qb .clearMarks`Sb1Ib`L`  ]`b6]`5 L`  Dc-DL`` L`"7` L`"7b` L`b<` L`<` L`]L` Dc- Db b c D5c`b a?5a?a?"7a?ba?a?<a?a? bK T ` `7`S7R bK7 T  y` Qa.mark`]bbKb T ` Qa.measure`gbK T ` Qa.now`_bK_ T `Qb .timerify`B:bKB: T ``B`XBbKB T ```bK  T ``b;`b;bK b; T ` Qa.toJSON`^z- bK  T ```bK  T ```bK  T ```'XbKB T I`BQbget timeOriginb T <`z<bK8b C"7CC<CbC"7<b  . `D@h ei h  11~Ă33 3  3  3 3 3 33 3 3 3 3‚  e 1!1~")03#03$0%3% 03&"03'$ 1 d& 0  bAB      V  &6FbD`RD]DH qQmn// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { op_node_idna_domain_to_ascii, op_node_idna_domain_to_unicode, op_node_idna_punycode_decode, op_node_idna_punycode_encode } from "ext:core/ops"; import { ucs2 } from "ext:deno_node/internal/idna.ts"; function toASCII(domain) { return op_node_idna_domain_to_ascii(domain); } function toUnicode(domain) { return op_node_idna_domain_to_unicode(domain); } function decode(domain) { return op_node_idna_punycode_decode(domain); } function encode(domain) { return op_node_idna_punycode_encode(domain); } export { decode, encode, toASCII, toUnicode, ucs2 }; export default { decode, encode, toASCII, toUnicode, ucs2 }; Qb:0 node:punycodea byD`M` TX`i0La !` L`>]L` D m mcTp D q qcr D u uc D y yc D==c` ma? qa? ua? ya?=a? a?>a?".a?,a?a?vb@!a T I`y>b@"a T I`".b@#a T I`L,b@$ba 8b ".C,C C>C=C"., >=  `Do h ei h  ~)030303030 3 1  a bA D`RD]DH A-Q=-ijZ// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { core, internals } from "ext:core/mod.js"; import { op_geteuid, op_process_abort, op_set_exit_code } from "ext:core/ops"; import { notImplemented, warnNotImplemented } from "ext:deno_node/_utils.ts"; import { EventEmitter } from "node:events"; import Module from "node:module"; import { report } from "ext:deno_node/internal/process/report.ts"; import { validateString } from "ext:deno_node/internal/validators.mjs"; import { ERR_INVALID_ARG_TYPE, ERR_UNKNOWN_SIGNAL, errnoException } from "ext:deno_node/internal/errors.ts"; import { getOptionValue } from "ext:deno_node/internal/options.ts"; import { assert } from "ext:deno_node/_util/asserts.ts"; import { join } from "node:path"; import { pathFromURL } from "ext:deno_web/00_infra.js"; import { arch as arch_, chdir, cwd, env, nextTick as _nextTick, version, versions } from "ext:deno_node/_process/process.ts"; import { _exiting } from "ext:deno_node/_process/exiting.ts"; export { _nextTick as nextTick, chdir, cwd, env, version, versions }; import { createWritableStdioStream, initStdin } from "ext:deno_node/_process/streams.mjs"; import { enableNextTick, processTicksAndRejections, runNextTicks } from "ext:deno_node/_next_tick.ts"; import { isWindows } from "ext:deno_node/_util/os.ts"; import * as io from "ext:deno_io/12_io.js"; import { Command } from "ext:runtime/40_process.js"; let argv0Getter = ()=>""; export let argv0 = "deno"; // TODO(kt3k): This should be set at start up time export let arch = ""; // TODO(kt3k): This should be set at start up time export let platform = ""; // TODO(kt3k): This should be set at start up time export let pid = 0; let stdin, stdout, stderr; export { stderr, stdin, stdout }; import { getBinding } from "ext:deno_node/internal_binding/mod.ts"; import * as constants from "ext:deno_node/internal_binding/constants.ts"; import * as uv from "ext:deno_node/internal_binding/uv.ts"; import { buildAllowedFlags } from "ext:deno_node/internal/process/per_thread.mjs"; const notImplementedEvents = [ "multipleResolves", "worker" ]; export const argv = []; let globalProcessExitCode = undefined; /** https://nodejs.org/api/process.html#process_process_exit_code */ export const exit = (code)=>{ if (code || code === 0) { if (typeof code === "string") { const parsedCode = parseInt(code); globalProcessExitCode = isNaN(parsedCode) ? undefined : parsedCode; } else { globalProcessExitCode = code; } } if (!process._exiting) { process._exiting = true; // FIXME(bartlomieju): this is wrong, we won't be using syscall to exit // and thus the `unload` event will not be emitted to properly trigger "emit" // event on `process`. process.emit("exit", process.exitCode || 0); } process.reallyExit(process.exitCode || 0); }; /** https://nodejs.org/api/process.html#processumaskmask */ export const umask = ()=>{ // Always return the system default umask value. // We don't use Deno.umask here because it has a race // condition bug. // See https://github.com/denoland/deno_std/issues/1893#issuecomment-1032897779 return 0o22; }; export const abort = ()=>{ op_process_abort(); }; function addReadOnlyProcessAlias(name, option, enumerable = true) { const value = getOptionValue(option); if (value) { Object.defineProperty(process, name, { writable: false, configurable: true, enumerable, value }); } } function createWarningObject(warning, type, code, // deno-lint-ignore ban-types ctor, detail) { assert(typeof warning === "string"); // deno-lint-ignore no-explicit-any const warningErr = new Error(warning); warningErr.name = String(type || "Warning"); if (code !== undefined) { warningErr.code = code; } if (detail !== undefined) { warningErr.detail = detail; } // @ts-ignore this function is not available in lib.dom.d.ts Error.captureStackTrace(warningErr, ctor || process.emitWarning); return warningErr; } function doEmitWarning(warning) { process.emit("warning", warning); } /** https://nodejs.org/api/process.html#process_process_emitwarning_warning_options */ export function emitWarning(warning, type, code, // deno-lint-ignore ban-types ctor) { let detail; if (type !== null && typeof type === "object" && !Array.isArray(type)) { ctor = type.ctor; code = type.code; if (typeof type.detail === "string") { detail = type.detail; } type = type.type || "Warning"; } else if (typeof type === "function") { ctor = type; code = undefined; type = "Warning"; } if (type !== undefined) { validateString(type, "type"); } if (typeof code === "function") { ctor = code; code = undefined; } else if (code !== undefined) { validateString(code, "code"); } if (typeof warning === "string") { warning = createWarningObject(warning, type, code, ctor, detail); } else if (!(warning instanceof Error)) { throw new ERR_INVALID_ARG_TYPE("warning", [ "Error", "string" ], warning); } if (warning.name === "DeprecationWarning") { // deno-lint-ignore no-explicit-any if (process.noDeprecation) { return; } // deno-lint-ignore no-explicit-any if (process.throwDeprecation) { // Delay throwing the error to guarantee that all former warnings were // properly logged. return process.nextTick(()=>{ throw warning; }); } } process.nextTick(doEmitWarning, warning); } export function hrtime(time) { const milli = performance.now(); const sec = Math.floor(milli / 1000); const nano = Math.floor(milli * 1_000_000 - sec * 1_000_000_000); if (!time) { return [ sec, nano ]; } const [prevSec, prevNano] = time; return [ sec - prevSec, nano - prevNano ]; } hrtime.bigint = function() { const [sec, nano] = hrtime(); return BigInt(sec) * 1_000_000_000n + BigInt(nano); }; export function memoryUsage() { return { ...Deno.memoryUsage(), arrayBuffers: 0 }; } memoryUsage.rss = function() { return memoryUsage().rss; }; // Returns a negative error code than can be recognized by errnoException function _kill(pid, sig) { let errCode; if (sig === 0) { let status; if (Deno.build.os === "windows") { status = new Command("powershell.exe", { args: [ "Get-Process", "-pid", pid ] }).outputSync(); } else { status = new Command("kill", { args: [ "-0", pid ] }).outputSync(); } if (!status.success) { errCode = uv.codeMap.get("ESRCH"); } } else { // Reverse search the shortname based on the numeric code const maybeSignal = Object.entries(constants.os.signals).find(([_, numericCode])=>numericCode === sig); if (!maybeSignal) { errCode = uv.codeMap.get("EINVAL"); } else { try { Deno.kill(pid, maybeSignal[0]); } catch (e) { if (e instanceof TypeError) { throw notImplemented(maybeSignal[0]); } throw e; } } } if (!errCode) { return 0; } else { return errCode; } } export function dlopen(module, filename, _flags) { // NOTE(bartlomieju): _flags is currently ignored, but we don't warn for it // as it makes DX bad, even though it might not be needed: // https://github.com/denoland/deno/issues/20075 Module._extensions[".node"](module, filename); return module; } export function kill(pid, sig = "SIGTERM") { if (pid != (pid | 0)) { throw new ERR_INVALID_ARG_TYPE("pid", "number", pid); } let err; if (typeof sig === "number") { err = process._kill(pid, sig); } else { if (sig in constants.os.signals) { // @ts-ignore Index previously checked err = process._kill(pid, constants.os.signals[sig]); } else { throw new ERR_UNKNOWN_SIGNAL(sig); } } if (err) { throw errnoException(err, "kill"); } return true; } // deno-lint-ignore no-explicit-any function uncaughtExceptionHandler(err, origin) { // The origin parameter can be 'unhandledRejection' or 'uncaughtException' // depending on how the uncaught exception was created. In Node.js, // exceptions thrown from the top level of a CommonJS module are reported as // 'uncaughtException', while exceptions thrown from the top level of an ESM // module are reported as 'unhandledRejection'. Deno does not have a true // CommonJS implementation, so all exceptions thrown from the top level are // reported as 'uncaughtException'. process.emit("uncaughtExceptionMonitor", err, origin); process.emit("uncaughtException", err, origin); } let execPath = null; class Process extends EventEmitter { constructor(){ super(); } /** https://nodejs.org/api/process.html#processrelease */ get release() { return { name: "node", sourceUrl: `https://nodejs.org/download/release/${version}/node-${version}.tar.gz`, headersUrl: `https://nodejs.org/download/release/${version}/node-${version}-headers.tar.gz` }; } /** https://nodejs.org/api/process.html#process_process_arch */ get arch() { if (!arch) { arch = arch_(); } return arch; } get report() { return report; } get title() { return "deno"; } set title(_value) { // NOTE(bartlomieju): this is a noop. Node.js doesn't guarantee that the // process name will be properly set and visible from other tools anyway. // Might revisit in the future. } /** * https://nodejs.org/api/process.html#process_process_argv * Read permissions are required in order to get the executable route */ argv = argv; get argv0() { if (!argv0) { argv0 = argv0Getter(); } return argv0; } set argv0(_val) {} /** https://nodejs.org/api/process.html#process_process_chdir_directory */ chdir = chdir; /** https://nodejs.org/api/process.html#processconfig */ config = { target_defaults: {}, variables: {} }; /** https://nodejs.org/api/process.html#process_process_cwd */ cwd = cwd; /** * https://nodejs.org/api/process.html#process_process_env * Requires env permissions */ env = env; /** https://nodejs.org/api/process.html#process_process_execargv */ execArgv = []; /** https://nodejs.org/api/process.html#process_process_exit_code */ exit = exit; /** https://nodejs.org/api/process.html#processabort */ abort = abort; // Undocumented Node API that is used by `signal-exit` which in turn // is used by `node-tap`. It was marked for removal a couple of years // ago. See https://github.com/nodejs/node/blob/6a6b3c54022104cc110ab09044a2a0cecb8988e7/lib/internal/bootstrap/node.js#L172 reallyExit = (code)=>{ return Deno.exit(code || 0); }; _exiting = _exiting; /** https://nodejs.org/api/process.html#processexitcode_1 */ get exitCode() { return globalProcessExitCode; } set exitCode(code) { globalProcessExitCode = code; code = parseInt(code) || 0; if (!isNaN(code)) { op_set_exit_code(code); } } // Typed as any to avoid importing "module" module for types // deno-lint-ignore no-explicit-any mainModule = undefined; /** https://nodejs.org/api/process.html#process_process_nexttick_callback_args */ nextTick = _nextTick; dlopen = dlopen; // deno-lint-ignore no-explicit-any on(event, listener) { if (notImplementedEvents.includes(event)) { warnNotImplemented(`process.on("${event}")`); super.on(event, listener); } else if (event.startsWith("SIG")) { if (event === "SIGBREAK" && Deno.build.os !== "windows") { // Ignores SIGBREAK if the platform is not windows. } else if (event === "SIGTERM" && Deno.build.os === "windows") { // Ignores SIGTERM on windows. } else { Deno.addSignalListener(event, listener); } } else { super.on(event, listener); } return this; } // deno-lint-ignore no-explicit-any off(event, listener) { if (notImplementedEvents.includes(event)) { warnNotImplemented(`process.off("${event}")`); super.off(event, listener); } else if (event.startsWith("SIG")) { if (event === "SIGBREAK" && Deno.build.os !== "windows") { // Ignores SIGBREAK if the platform is not windows. } else if (event === "SIGTERM" && Deno.build.os === "windows") { // Ignores SIGTERM on windows. } else { Deno.removeSignalListener(event, listener); } } else { super.off(event, listener); } return this; } // deno-lint-ignore no-explicit-any emit(event, ...args) { if (event.startsWith("SIG")) { if (event === "SIGBREAK" && Deno.build.os !== "windows") { // Ignores SIGBREAK if the platform is not windows. } else { Deno.kill(Deno.pid, event); } } else { return super.emit(event, ...args); } return true; } prependListener(event, // deno-lint-ignore no-explicit-any listener) { if (notImplementedEvents.includes(event)) { warnNotImplemented(`process.prependListener("${event}")`); super.prependListener(event, listener); } else if (event.startsWith("SIG")) { if (event === "SIGBREAK" && Deno.build.os !== "windows") { // Ignores SIGBREAK if the platform is not windows. } else { Deno.addSignalListener(event, listener); } } else { super.prependListener(event, listener); } return this; } /** https://nodejs.org/api/process.html#process_process_pid */ get pid() { if (!pid) { pid = Deno.pid; } return pid; } /** https://nodejs.org/api/process.html#processppid */ get ppid() { return Deno.ppid; } /** https://nodejs.org/api/process.html#process_process_platform */ get platform() { if (!platform) { platform = isWindows ? "win32" : Deno.build.os; } return platform; } addListener(event, // deno-lint-ignore no-explicit-any listener) { if (notImplementedEvents.includes(event)) { warnNotImplemented(`process.addListener("${event}")`); } return this.on(event, listener); } removeListener(event, // deno-lint-ignore no-explicit-any listener) { if (notImplementedEvents.includes(event)) { warnNotImplemented(`process.removeListener("${event}")`); } return this.off(event, listener); } /** * Returns the current high-resolution real time in a [seconds, nanoseconds] * tuple. * * Note: You need to give --allow-hrtime permission to Deno to actually get * nanoseconds precision values. If you don't give 'hrtime' permission, the returned * values only have milliseconds precision. * * `time` is an optional parameter that must be the result of a previous process.hrtime() call to diff with the current time. * * These times are relative to an arbitrary time in the past, and not related to the time of day and therefore not subject to clock drift. The primary use is for measuring performance between intervals. * https://nodejs.org/api/process.html#process_process_hrtime_time */ hrtime = hrtime; /** * @private * * NodeJS internal, use process.kill instead */ _kill = _kill; /** https://nodejs.org/api/process.html#processkillpid-signal */ kill = kill; memoryUsage = memoryUsage; /** https://nodejs.org/api/process.html#process_process_stderr */ stderr = stderr; /** https://nodejs.org/api/process.html#process_process_stdin */ stdin = stdin; /** https://nodejs.org/api/process.html#process_process_stdout */ stdout = stdout; /** https://nodejs.org/api/process.html#process_process_version */ version = version; /** https://nodejs.org/api/process.html#process_process_versions */ versions = versions; /** https://nodejs.org/api/process.html#process_process_emitwarning_warning_options */ emitWarning = emitWarning; binding(name) { return getBinding(name); } /** https://nodejs.org/api/process.html#processumaskmask */ umask() { // Always return the system default umask value. // We don't use Deno.umask here because it has a race // condition bug. // See https://github.com/denoland/deno_std/issues/1893#issuecomment-1032897779 return 0o22; } /** This method is removed on Windows */ getgid() { return Deno.gid(); } /** This method is removed on Windows */ getuid() { return Deno.uid(); } /** This method is removed on Windows */ geteuid() { return op_geteuid(); } // TODO(kt3k): Implement this when we added -e option to node compat mode _eval = undefined; /** https://nodejs.org/api/process.html#processexecpath */ get execPath() { if (execPath) { return execPath; } execPath = Deno.execPath(); return execPath; } set execPath(path) { execPath = path; } setStartTime(t) { this.#startTime = t; } #startTime = 0; /** https://nodejs.org/api/process.html#processuptime */ uptime() { return (Date.now() - this.#startTime) / 1000; } #allowedFlags = buildAllowedFlags(); /** https://nodejs.org/api/process.html#processallowednodeenvironmentflags */ get allowedNodeEnvironmentFlags() { return this.#allowedFlags; } features = { inspector: false }; // TODO(kt3k): Get the value from --no-deprecation flag. noDeprecation = false; } if (isWindows) { delete Process.prototype.getgid; delete Process.prototype.getuid; delete Process.prototype.geteuid; } /** https://nodejs.org/api/process.html#process_process */ const process = new Process(); Object.defineProperty(process, Symbol.toStringTag, { enumerable: false, writable: true, configurable: false, value: "process" }); addReadOnlyProcessAlias("noDeprecation", "--no-deprecation"); addReadOnlyProcessAlias("throwDeprecation", "--throw-deprecation"); export const removeListener = process.removeListener; export const removeAllListeners = process.removeAllListeners; let unhandledRejectionListenerCount = 0; let rejectionHandledListenerCount = 0; let uncaughtExceptionListenerCount = 0; let beforeExitListenerCount = 0; let exitListenerCount = 0; process.on("newListener", (event)=>{ switch(event){ case "unhandledRejection": unhandledRejectionListenerCount++; break; case "rejectionHandled": rejectionHandledListenerCount++; break; case "uncaughtException": uncaughtExceptionListenerCount++; break; case "beforeExit": beforeExitListenerCount++; break; case "exit": exitListenerCount++; break; default: return; } synchronizeListeners(); }); process.on("removeListener", (event)=>{ switch(event){ case "unhandledRejection": unhandledRejectionListenerCount--; break; case "rejectionHandled": rejectionHandledListenerCount--; break; case "uncaughtException": uncaughtExceptionListenerCount--; break; case "beforeExit": beforeExitListenerCount--; break; case "exit": exitListenerCount--; break; default: return; } synchronizeListeners(); }); function processOnError(event) { if (process.listenerCount("uncaughtException") > 0) { event.preventDefault(); } uncaughtExceptionHandler(event.error, "uncaughtException"); } function processOnBeforeUnload(event) { process.emit("beforeExit", process.exitCode || 0); processTicksAndRejections(); if (core.eventLoopHasMoreWork()) { event.preventDefault(); } } function processOnUnload() { if (!process._exiting) { process._exiting = true; process.emit("exit", process.exitCode || 0); } } function synchronizeListeners() { // Install special "unhandledrejection" handler, that will be called // last. if (unhandledRejectionListenerCount > 0 || uncaughtExceptionListenerCount > 0) { internals.nodeProcessUnhandledRejectionCallback = (event)=>{ if (process.listenerCount("unhandledRejection") === 0) { // The Node.js default behavior is to raise an uncaught exception if // an unhandled rejection occurs and there are no unhandledRejection // listeners. event.preventDefault(); uncaughtExceptionHandler(event.reason, "unhandledRejection"); return; } event.preventDefault(); process.emit("unhandledRejection", event.reason, event.promise); }; } else { internals.nodeProcessUnhandledRejectionCallback = undefined; } // Install special "handledrejection" handler, that will be called // last. if (rejectionHandledListenerCount > 0) { internals.nodeProcessRejectionHandledCallback = (event)=>{ process.emit("rejectionHandled", event.reason, event.promise); }; } else { internals.nodeProcessRejectionHandledCallback = undefined; } if (uncaughtExceptionListenerCount > 0) { globalThis.addEventListener("error", processOnError); } else { globalThis.removeEventListener("error", processOnError); } if (beforeExitListenerCount > 0) { globalThis.addEventListener("beforeunload", processOnBeforeUnload); } else { globalThis.removeEventListener("beforeunload", processOnBeforeUnload); } if (exitListenerCount > 0) { globalThis.addEventListener("unload", processOnUnload); } else { globalThis.removeEventListener("unload", processOnUnload); } } // Should be called only once, in `runtime/js/99_main.js` when the runtime is // bootstrapped. internals.__bootstrapNodeProcess = function(argv0Val, args, denoVersions) { // Overwrites the 1st item with getter. if (typeof argv0Val === "string") { Object.defineProperty(argv, "0", { get: ()=>{ return argv0Val; } }); argv0Getter = ()=>argv0Val; } else { Object.defineProperty(argv, "0", { get: ()=>{ return Deno.execPath(); } }); argv0Getter = ()=>Deno.execPath(); } // Overwrites the 2st item with getter. Object.defineProperty(argv, "1", { get: ()=>{ if (Deno.mainModule?.startsWith("file:")) { return pathFromURL(new URL(Deno.mainModule)); } else { return join(Deno.cwd(), "$deno$node.js"); } } }); for(let i = 0; i < args.length; i++){ argv[i + 2] = args[i]; } for (const [key, value] of Object.entries(denoVersions)){ versions[key] = value; } core.setNextTickCallback(processTicksAndRejections); core.setMacrotaskCallback(runNextTicks); enableNextTick(); stdin = process.stdin = initStdin(); /** https://nodejs.org/api/process.html#process_process_stdout */ stdout = process.stdout = createWritableStdioStream(io.stdout, "stdout"); /** https://nodejs.org/api/process.html#process_process_stderr */ stderr = process.stderr = createWritableStdioStream(io.stderr, "stderr"); process.setStartTime(Date.now()); // @ts-ignore Remove setStartTime and #startTime is not modifiable delete process.setStartTime; delete internals.__bootstrapNodeProcess; }; export default process; Qbs node:processa bzD` M`@ T`ULaS TD`F$L`"~ * 0bHGCC  .`DjH   0bÙ)!-~) 3 3 \ (Sbq@"O`Da| ^YSb1G"IbJLMOPSbUV* _`ba"bbfBgg"ft?????????????????????IbjZ`dL` bS]`0B]` ]`"]`]`?]`E" ]` ]`~ ]`Eb ]`"( ]`n]`A]`VB]`E]`4B ]`" ]`b]` bH]`<]`"} ]` ]`JK]` L`  ± D± c &. Dc  "D"c  Dc !$ &D&c =D BADBAc FNL`9` L`` L`` L`"M` L`"MB` L`B+` L`+K` L`K" ` L`" bQ`  L`bQ* `  L`* ?`  L`?b `  L`b B%`  L`B%Bn` L`Bnbl` L`bl` L`B` L`B` L`"` L`"L` DGDc DbDc DJDcBDL`# DHHc-4 Db b c D  c D  c D}c DBBc  D@± c &. Db@c   D c sy DbJbJc{ Dc  D  c DCCc! D""c  DEEccq Dc !$ D  c DBBc D"~ "~ c/= DDDc#, DBKBKc( Dttc Dc  Db b c D } }cLV D  cXh D  cjz DbJbJc  DbFbFcs D"?"?c7= D"G"Gc D  cz D&&c =D DBABAc FN D_ _ c`6 a?BKa? }a? a? a?b a?_ a? a?a?"?a? a?b a? a? a?"~ a?a?a?bJa?b@a?a?"a?a?@a?&a?BAa?Ba?Ca?Da?Ea?bFa?"Ga?ta?Ha?Ba?a?B%a ?b a ?Ba?a?a?Ba?bJa?"Ma?" a?"a?a?Ka?bQa ??a ?+a?* a ?bla?Bna?a?b Pb @+ TT`h0L`  ™qb* K  `Dn(00  b! i! b2  2  2!-  - _ (SbqAO`Da{{Bb@ ,Pb@, T  I`Pb@- T I`Sb@. T I`i "bUb!@/ T I`rKLfb@40 T I`2LLBgb@51 T I`LbMgb@62 T I`M T"fb@73|Lk  T`-XL`0SbqAB `2K`Da6^b3q™  b B   `M`˜* "^±  T  I`$IbK   `D@( % =  7!-^'--- - -     0c    0c  `%&! r0  { % i- m1---!Ă^#-! _%d'@P@P' b@&a0 T I`ubQBb@ 'a1  T I`8}?b@ (a2  T I`,+b@)a3 T I`A# * b @*d4 a  T "I`kq"IbK4II  `M`L6  T  " ` " bK5 T "`? & "bK6 T `= Z bK7 T y` bQ Qa.bigint`Ib@ 8% T `? Qa.rss`Ib@ 9BS T I`R%&Qb set titleb ? T I`&'Qb get argv0b @ T I`'('Qb set argv0b A T I`Z++Qb get exitCodeb B T I`+,Qb set exitCodeb C T|`DL`L:_ 'B(B BS("L BBbw   f`Dx -^30 x88b.[ s- ^ Om! - -  m/ m! - -  m! -_.[ (SbpmB `DaD-~/c!  h#bD T I`/1lbE TT`g0L` BS("L BB* b bm  `Dn8-^:m!-- m !- !-_. d(Sbplbm`Da2S3b "@b F T  I`e35Xb!G T I`5 6 Qaget pidb"H T I`O6m6 Qaget ppidb#I T I`6.7Qb get platformb $J T I`<78lb %K T I`"88blb&L T I`>?Yb'M T I`K?=@"b(N T I`o@@"Zb)O T I`@@Zb*P T I`A3AZb+Q T I`ALBQb get execPathb ,R T I`[B|BQb set execPathb -S T I`BB[b .T T I`C;C&b/U T I`CCQdget allowedNodeEnvironmentFlagsb0V T`L`"M bWbbXbW" "  T N`**NbK[NBBF @± +bQS* ?B&BAKB[bJbH]"  6`8KlZ   XvX   0303~30303 } 3 0303 3 0 3 3 0 3030 3 30 3 0 3"03$03&03(03*03,03.30 520a456~8)393;(SbqqbV`Da#xD f= 00& 0 0 0 0 0 0 4@ Lb1W t"ZZZ B]0bHGH* "B^^B_blBnB bc TT`d0L` cdee" _`ba"bb  n`Dnm m#m&m)m,4P%,P%"P%P% P%a(SbbpWI`DaGkIB aB!bK2X T  I`IXKIbK3YBK T y` BK`bh`TPZIb@:Zbh  "`Di(h %%%ł% % % % % %%%%%%%%% % ei e% e% e% h   %111 1 111{%%}1% 1 1 10 ‚ 20 ‚2% e%e%0 !"#$%&'()*+,-. /!߂0"ނ1#݂2$܂3%ۂ4&ڂ5'ق6(؂7)ׂ8*ւ9+e+% %:,2;0<-=>W-=?W-=@W i %!A -B!C-D~E)\FGcHIc-J1-K1 % % % % %-LMN-_!-LJO._#0P‚Q/2R%1 Bd'5s. @`L `bA%Vfnv*&6~>DFN&2>JJVbz &2jDDD`RD]DH QB -=// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { Buffer } from "node:buffer"; import { encodeStr, hexTable } from "ext:deno_node/internal/querystring.ts"; /** * Alias of querystring.parse() * @legacy */ export const decode = parse; /** * Alias of querystring.stringify() * @legacy */ export const encode = stringify; /** * replaces encodeURIComponent() * @see https://www.ecma-international.org/ecma-262/5.1/#sec-15.1.3.4 */ function qsEscape(str) { if (typeof str !== "string") { if (typeof str === "object") { str = String(str); } else { str += ""; } } return encodeStr(str, noEscape, hexTable); } /** * Performs URL percent-encoding on the given `str` in a manner that is optimized for the specific requirements of URL query strings. * Used by `querystring.stringify()` and is generally not expected to be used directly. * It is exported primarily to allow application code to provide a replacement percent-encoding implementation if necessary by assigning `querystring.escape` to an alternative function. * @legacy * @see Tested in `test-querystring-escape.js` */ export const escape = qsEscape; // deno-fmt-ignore const isHexTable = new Int8Array([ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]); function charCodes(str) { const ret = new Array(str.length); for(let i = 0; i < str.length; ++i){ ret[i] = str.charCodeAt(i); } return ret; } function addKeyVal(obj, key, value, keyEncoded, valEncoded, decode) { if (key.length > 0 && keyEncoded) { key = decode(key); } if (value.length > 0 && valEncoded) { value = decode(value); } if (obj[key] === undefined) { obj[key] = value; } else { const curValue = obj[key]; // A simple Array-specific property check is enough here to // distinguish from a string value and is faster and still safe // since we are generating all of the values being assigned. if (curValue.pop) { curValue[curValue.length] = value; } else { obj[key] = [ curValue, value ]; } } } /** * Parses a URL query string into a collection of key and value pairs. * @param str The URL query string to parse * @param sep The substring used to delimit key and value pairs in the query string. Default: '&'. * @param eq The substring used to delimit keys and values in the query string. Default: '='. * @param options The parse options * @param options.decodeURIComponent The function to use when decoding percent-encoded characters in the query string. Default: `querystring.unescape()`. * @param options.maxKeys Specifies the maximum number of keys to parse. Specify `0` to remove key counting limitations. Default: `1000`. * @legacy * @see Tested in test-querystring.js */ export function parse(str, sep = "&", eq = "=", { decodeURIComponent: decodeURIComponent1 = unescape, maxKeys = 1000 } = {}) { const obj = Object.create(null); if (typeof str !== "string" || str.length === 0) { return obj; } const sepCodes = !sep ? [ 38 ] : charCodes(String(sep)); const eqCodes = !eq ? [ 61 ] : charCodes(String(eq)); const sepLen = sepCodes.length; const eqLen = eqCodes.length; let pairs = 1000; if (typeof maxKeys === "number") { // -1 is used in place of a value like Infinity for meaning // "unlimited pairs" because of additional checks V8 (at least as of v5.4) // has to do when using variables that contain values like Infinity. Since // `pairs` is always decremented and checked explicitly for 0, -1 works // effectively the same as Infinity, while providing a significant // performance boost. pairs = maxKeys > 0 ? maxKeys : -1; } let decode = unescape; if (decodeURIComponent1) { decode = decodeURIComponent1; } const customDecode = decode !== unescape; let lastPos = 0; let sepIdx = 0; let eqIdx = 0; let key = ""; let value = ""; let keyEncoded = customDecode; let valEncoded = customDecode; const plusChar = customDecode ? "%20" : " "; let encodeCheck = 0; for(let i = 0; i < str.length; ++i){ const code = str.charCodeAt(i); // Try matching key/value pair separator (e.g. '&') if (code === sepCodes[sepIdx]) { if (++sepIdx === sepLen) { // Key/value pair separator match! const end = i - sepIdx + 1; if (eqIdx < eqLen) { // We didn't find the (entire) key/value separator if (lastPos < end) { // Treat the substring as part of the key instead of the value key += str.slice(lastPos, end); } else if (key.length === 0) { // We saw an empty substring between separators if (--pairs === 0) { return obj; } lastPos = i + 1; sepIdx = eqIdx = 0; continue; } } else if (lastPos < end) { value += str.slice(lastPos, end); } addKeyVal(obj, key, value, keyEncoded, valEncoded, decode); if (--pairs === 0) { return obj; } key = value = ""; encodeCheck = 0; lastPos = i + 1; sepIdx = eqIdx = 0; } } else { sepIdx = 0; // Try matching key/value separator (e.g. '=') if we haven't already if (eqIdx < eqLen) { if (code === eqCodes[eqIdx]) { if (++eqIdx === eqLen) { // Key/value separator match! const end = i - eqIdx + 1; if (lastPos < end) { key += str.slice(lastPos, end); } encodeCheck = 0; lastPos = i + 1; } continue; } else { eqIdx = 0; if (!keyEncoded) { // Try to match an (valid) encoded byte once to minimize unnecessary // calls to string decoding functions if (code === 37 /* % */ ) { encodeCheck = 1; continue; } else if (encodeCheck > 0) { if (isHexTable[code] === 1) { if (++encodeCheck === 3) { keyEncoded = true; } continue; } else { encodeCheck = 0; } } } } if (code === 43 /* + */ ) { if (lastPos < i) { key += str.slice(lastPos, i); } key += plusChar; lastPos = i + 1; continue; } } if (code === 43 /* + */ ) { if (lastPos < i) { value += str.slice(lastPos, i); } value += plusChar; lastPos = i + 1; } else if (!valEncoded) { // Try to match an (valid) encoded byte (once) to minimize unnecessary // calls to string decoding functions if (code === 37 /* % */ ) { encodeCheck = 1; } else if (encodeCheck > 0) { if (isHexTable[code] === 1) { if (++encodeCheck === 3) { valEncoded = true; } } else { encodeCheck = 0; } } } } } // Deal with any leftover key or value data if (lastPos < str.length) { if (eqIdx < eqLen) { key += str.slice(lastPos); } else if (sepIdx < sepLen) { value += str.slice(lastPos); } } else if (eqIdx === 0 && key.length === 0) { // We ended on an empty substring return obj; } addKeyVal(obj, key, value, keyEncoded, valEncoded, decode); return obj; } /** * These characters do not need escaping when generating query strings: * ! - . _ ~ * ' ( ) * * digits * alpha (uppercase) * alpha (lowercase) */ // deno-fmt-ignore const noEscape = new Int8Array([ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0 ]); function stringifyPrimitive(v) { if (typeof v === "string") { return v; } if (typeof v === "number" && isFinite(v)) { return "" + v; } if (typeof v === "bigint") { return "" + v; } if (typeof v === "boolean") { return v ? "true" : "false"; } return ""; } function encodeStringifiedCustom(v, encode) { return encode(stringifyPrimitive(v)); } function encodeStringified(v, encode) { if (typeof v === "string") { return v.length ? encode(v) : ""; } if (typeof v === "number" && isFinite(v)) { // Values >= 1e21 automatically switch to scientific notation which requires // escaping due to the inclusion of a '+' in the output return Math.abs(v) < 1e21 ? "" + v : encode("" + v); } if (typeof v === "bigint") { return "" + v; } if (typeof v === "boolean") { return v ? "true" : "false"; } return ""; } /** * Produces a URL query string from a given obj by iterating through the object's "own properties". * @param obj The object to serialize into a URL query string. * @param sep The substring used to delimit key and value pairs in the query string. Default: '&'. * @param eq The substring used to delimit keys and values in the query string. Default: '='. * @param options The stringify options * @param options.encodeURIComponent The function to use when converting URL-unsafe characters to percent-encoding in the query string. Default: `querystring.escape()`. * @legacy * @see Tested in `test-querystring.js` */ export function stringify(obj, sep, eq, options) { sep ||= "&"; eq ||= "="; const encode = options ? options.encodeURIComponent || qsEscape : qsEscape; const convert = options ? encodeStringifiedCustom : encodeStringified; if (obj !== null && typeof obj === "object") { const keys = Object.keys(obj); const len = keys.length; let fields = ""; for(let i = 0; i < len; ++i){ const k = keys[i]; const v = obj[k]; let ks = convert(k, encode); ks += eq; if (Array.isArray(v)) { const vlen = v.length; if (vlen === 0) continue; if (fields) { fields += sep; } for(let j = 0; j < vlen; ++j){ if (j) { fields += sep; } fields += ks; fields += convert(v[j], encode); } } else { if (fields) { fields += sep; } fields += ks; fields += convert(v, encode); } } return fields; } return ""; } // deno-fmt-ignore const unhexTable = new Int8Array([ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, +0, +1, +2, +3, +4, +5, +6, +7, +8, +9, -1, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 ]); /** * A safe fast alternative to decodeURIComponent */ export function unescapeBuffer(s, decodeSpaces = false) { const out = Buffer.alloc(s.length); let index = 0; let outIndex = 0; let currentChar; let nextChar; let hexHigh; let hexLow; const maxLength = s.length - 2; // Flag to know if some hex chars have been decoded let hasHex = false; while(index < s.length){ currentChar = s.charCodeAt(index); if (currentChar === 43 /* '+' */ && decodeSpaces) { out[outIndex++] = 32; // ' ' index++; continue; } if (currentChar === 37 /* '%' */ && index < maxLength) { currentChar = s.charCodeAt(++index); hexHigh = unhexTable[currentChar]; if (!(hexHigh >= 0)) { out[outIndex++] = 37; // '%' continue; } else { nextChar = s.charCodeAt(++index); hexLow = unhexTable[nextChar]; if (!(hexLow >= 0)) { out[outIndex++] = 37; // '%' index--; } else { hasHex = true; currentChar = hexHigh * 16 + hexLow; } } } out[outIndex++] = currentChar; index++; } return hasHex ? out.slice(0, outIndex) : out; } function qsUnescape(s) { try { return decodeURIComponent(s); } catch { return unescapeBuffer(s).toString(); } } /** * Performs decoding of URL percent-encoded characters on the given `str`. * Used by `querystring.parse()` and is generally not expected to be used directly. * It is exported primarily to allow application code to provide a replacement decoding implementation if necessary by assigning `querystring.unescape` to an alternative function. * @legacy * @see Tested in `test-querystring-escape.js` */ export const unescape = qsUnescape; export default { parse, stringify, decode, encode, unescape, escape, unescapeBuffer }; QbZPnode:querystringa b{D`4M`  T`dLaS T  I`UkSb1 kbl"llsbtuvh?????????Ib-=`L` b]`j]`]hL`` L`".` L`".,` L`,` L`B`` L`B`b` L`bb` L`bBw` L`Bw]L`  D"{ "{ c Diic Dbjbjc` "{ a?ia?bja?".a?,a?a?B`a?ba?Bwa?ba?a?b@` T I`V "b@a T I` f lb@b T I`&'sb@c T I`''^'btb @d T I`y'Q)ub@e T I`:;Bzb@ f@Lc T I`1"B`b@]a T I`+/bb@^a T I`C6:Bwb@ _c a   ` M ` M ` M  HbB`CbC".C,CbCCBwCB`b".,bBw  `D(h Ƃ%%%%%%% % % ei h   01011! { % i%! { % i%! {% i % 1~ )03 030303030303 1 c L&L& 0 0 bA\B&.JR6D`RD]DH Q XN // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // @deno-types="./_readline.d.ts" import { clearLine, clearScreenDown, createInterface, cursorTo, emitKeypressEvents, Interface, moveCursor, promises } from "ext:deno_node/_readline.mjs"; export { clearLine, clearScreenDown, createInterface, cursorTo, emitKeypressEvents, Interface, moveCursor, promises }; export default { Interface, clearLine, clearScreenDown, createInterface, cursorTo, emitKeypressEvents, moveCursor, promises }; Qb6^u node:readlinea b|D` M` Th`{ let cb = resolve; if (options?.signal) { validateAbortSignal(options.signal, "options.signal"); if (options.signal.aborted) { return reject(new AbortError(undefined, { cause: options.signal.reason })); } const onAbort = ()=>{ this[kQuestionCancel](); reject(new AbortError(undefined, { cause: options.signal.reason })); }; options.signal.addEventListener("abort", onAbort, { once: true }); cb = (answer)=>{ options.signal.removeEventListener("abort", onAbort); resolve(answer); }; } this[kQuestion](query, cb); }); } } export function createInterface(inputOrOptions, output, completer, terminal) { return new Interface(inputOrOptions, output, completer, terminal); } export { Readline }; export default { Interface, Readline, createInterface }; QeFY"ext:deno_node/readline/promises.tsa b}D`$M` T``{8La !La T  I`o{Sb1Ib:`L` b]` ]` ]`" ]`(" ]`n L`  Dc,L` ` L`B}` L`B}{` L`{]$L` DBiBic Dc DbB}cYb D  cZf Dcr{ Dbbc} DB B c  ` a?ba?a?ba?Bia?B a? a?B}a?{a?a? b@iba   `T ``/ `/ `?  `  aOD]$ ` ajƒaj]b T  I`"B}2 b j T I`-Mƒbk(bB}CC{CB}{  `Dq8h ei h  0Âe+ 1~)03 0 3 03  1  abAhD*D`RD]DH QKC// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. import { notImplemented } from "ext:deno_node/_utils.ts"; export class REPLServer { constructor(){ notImplemented("REPLServer.prototype.constructor"); } } export const builtinModules = [ "assert", "async_hooks", "buffer", "child_process", "cluster", "console", "constants", "crypto", "dgram", "diagnostics_channel", "dns", "domain", "events", "fs", "http", "http2", "https", "inspector", "module", "net", "os", "path", "perf_hooks", "process", "punycode", "querystring", "readline", "repl", "stream", "string_decoder", "sys", "timers", "tls", "trace_events", "tty", "url", "util", "v8", "vm", "wasi", "worker_threads", "zlib" ]; export const _builtinLibs = builtinModules; export function start() { notImplemented("repl.start"); } export default { REPLServer, builtinModules, _builtinLibs, start }; Qb:Vb node:repla b~D`M` Td`8La !$Lc T  I`pSb1Ib` L`  ]`]DL`` L`` L`"` L`"? ` L`? ` L`] L`  Db b c`b a?a?? a?"a?a?a?b@mba   `T ``/ `/ `?  `  a:D] ` aj] T  I`8b n  `M`* IbbB"¨% I"* ) b+ b, . Nb4 B7 "8 ": ; ; = > 0bC? C"CC? "  `Dr0h ei h  e+ 1{%101~)0303 03 03  1  a s2 0bAlD`RD]DH EQAZt// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // compose, destroy and isDisturbed are experimental APIs without // typings. They can be exposed once they are released as stable in Node // @deno-types="./_stream.d.ts" import { _isUint8Array, _uint8ArrayToBuffer, addAbortSignal, // compose, // destroy, Duplex, finished, // isDisturbed, PassThrough, pipeline, Readable, Stream, Transform, Writable } from "ext:deno_node/_stream.mjs"; export { _isUint8Array, _uint8ArrayToBuffer, addAbortSignal, Duplex, finished, PassThrough, pipeline, Readable, Stream, Transform, Writable }; export default Stream; Qb&\V node:streama bD` M` TD`BLa! Laa "   N`Dj h ei h  01 Sb1Ibt` L`  ]`4L`   B DB cKQ " D" cmx  D c " D" c  D c  D c Dc  "D"c! [ D[ c#1 DcS[ ŠDŠczL`` L`]4L`  DB B cKQ D" " cmx D  c D" " c D  c D  c Dc  D""c! D[ [ c#1 DcS[ DŠŠcz` a?"a?[ a?B a?a?" a?Ša? a?" a? a? a?a? :bAoD`RD]DH QxN// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { TextDecoder } from "ext:deno_web/08_text_encoding.js"; import { Buffer } from "node:buffer"; /** * @typedef {import('../_global.d.ts').ReadableStream * } ReadableStream * @typedef {import('../_stream.d.ts')} Readable */ /** * @param {AsyncIterable|ReadableStream|Readable} stream * @returns {Promise} */ async function blob(stream) { const chunks = []; for await (const chunk of stream){ chunks.push(chunk); } return new Blob(chunks); } /** * @param {AsyncIterable|ReadableStream|Readable} stream * @returns {Promise} */ async function arrayBuffer(stream) { const ret = await blob(stream); return ret.arrayBuffer(); } /** * @param {AsyncIterable|ReadableStream|Readable} stream * @returns {Promise} */ async function buffer(stream) { return Buffer.from(await arrayBuffer(stream)); } /** * @param {AsyncIterable|ReadableStream|Readable} stream * @returns {Promise} */ async function text(stream) { const dec = new TextDecoder(); let str = ""; for await (const chunk of stream){ if (typeof chunk === "string") { str += chunk; } else { str += dec.decode(chunk, { stream: true }); } } // Flush the streaming TextDecoder so that any pending // incomplete multibyte characters are handled. str += dec.decode(undefined, { stream: false }); return str; } /** * @param {AsyncIterable|ReadableStream|Readable} stream * @returns {Promise} */ async function json(stream) { const str = await text(stream); return JSON.parse(str); } export default { arrayBuffer, blob, buffer, json, text }; export { arrayBuffer, blob, buffer, json, text }; Qcv;8node:stream/consumersa bD` M` TT`g0La !HL` T  I``b~Sb1Ib`L` ]`#b]`^]PL`` L`` L`b~` L`b~I` L`"'` L`"'"-` L`"-]L`  D"{ "{ cPV Deec`ea?"{ a?b~a?a?a?"-a?"'a?a?bMQqa T I`\bMQra T  I`XbMQsa T I`o"-bMQta T I`'"'bMQuba 8b Cb~CC"'C"-Cb~"'"-  `Dn h ei h  ~)0303030303 1  a bAp:BJRD`RD]DH QMF// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. import { Stream } from "ext:deno_node/_stream.mjs"; const { finished, pipeline } = Stream.promises; export default { finished, pipeline }; export { finished, pipeline }; QcC|node:stream/promisesa bD` M` TX`k,La !Lca "  Š bCŠC  z`Do h ei h  0--1-1~)0303 1 XSb1IbF` L`  ]`],L` ` L`` L`Š` L`Š] L`  D" " c`" a?a?Ša?a? a PfbAvD`RD]DH Q |R// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { ByteLengthQueuingStrategy, CountQueuingStrategy, ReadableByteStreamController, ReadableStream, ReadableStreamBYOBReader, ReadableStreamBYOBRequest, ReadableStreamDefaultController, ReadableStreamDefaultReader, TransformStream, TransformStreamDefaultController, WritableStream, WritableStreamDefaultController, WritableStreamDefaultWriter } from "ext:deno_web/06_streams.js"; import { TextDecoderStream, TextEncoderStream } from "ext:deno_web/08_text_encoding.js"; export { ByteLengthQueuingStrategy, CountQueuingStrategy, ReadableByteStreamController, ReadableStream, ReadableStreamBYOBReader, ReadableStreamBYOBRequest, ReadableStreamDefaultController, ReadableStreamDefaultReader, TextDecoderStream, TextEncoderStream, TransformStream, TransformStreamDefaultController, WritableStream, WritableStreamDefaultController, WritableStreamDefaultWriter }; export default { ReadableStream, ReadableStreamBYOBReader, ReadableStreamBYOBRequest, ReadableStreamDefaultReader, ReadableByteStreamController, ReadableStreamDefaultController, TransformStream, TransformStreamDefaultController, WritableStream, WritableStreamDefaultWriter, WritableStreamDefaultController, ByteLengthQueuingStrategy, CountQueuingStrategy, TextEncoderStream, TextDecoderStream }; Qbnnode:stream/weba bD` M` T`XLa! Laa bXCQCBCOCfCBZCTCb C^C"TC"_C;Cb?CoC"lCXQBOfBZTb ^"T"_;b?o"l  `D{ h ei h  ~)030303030 3 0 3 0 3 0 3 0 3 030303030303 1 Sb1IbR`L` "t]`]`DL`  ;D;cTm b?Db?co fDfc XDXc QDQc BDBc BZDBZc ODOc $ "lD"lc oDoc TDTc&5 b Db c7W ^D^cYg "_D"_ci "TD"TcL`` L`]DL` D;;cTm Db?b?co Dffc DXXc DQQc DBBc DBZBZc DOOc $ D"l"lc Dooc DTTc&5 Db b c7W D^^cYg D"_"_ci D"T"Tc`;a?b?a?fa?Xa?Qa?Ba?BZa?Oa?Ta?b a?^a?"_a?"Ta?"la?oa?a?cbAwD`RD]DH Q&*b%// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { Buffer } from "node:buffer"; import { normalizeEncoding as castEncoding, notImplemented } from "ext:deno_node/_utils.ts"; var NotImplemented; (function(NotImplemented) { NotImplemented[NotImplemented["ascii"] = 0] = "ascii"; NotImplemented[NotImplemented["latin1"] = 1] = "latin1"; NotImplemented[NotImplemented["utf16le"] = 2] = "utf16le"; })(NotImplemented || (NotImplemented = {})); function normalizeEncoding(enc) { const encoding = castEncoding(enc ?? null); if (encoding && encoding in NotImplemented) notImplemented(encoding); if (!encoding && typeof enc === "string" && enc.toLowerCase() !== "raw") { throw new Error(`Unknown encoding: ${enc}`); } return String(encoding); } /** * Check is `ArrayBuffer` and not `TypedArray`. Typescript allowed `TypedArray` to be passed as `ArrayBuffer` and does not do a deep check */ function isBufferType(buf) { return buf instanceof ArrayBuffer && buf.BYTES_PER_ELEMENT; } /* * Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a * continuation byte. If an invalid byte is detected, -2 is returned. */ function utf8CheckByte(byte) { if (byte <= 0x7f) return 0; else if (byte >> 5 === 0x06) return 2; else if (byte >> 4 === 0x0e) return 3; else if (byte >> 3 === 0x1e) return 4; return byte >> 6 === 0x02 ? -1 : -2; } /* * Checks at most 3 bytes at the end of a Buffer in order to detect an * incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) * needed to complete the UTF-8 character (if applicable) are returned. */ function utf8CheckIncomplete(self, buf, i) { let j = buf.length - 1; if (j < i) return 0; let nb = utf8CheckByte(buf[j]); if (nb >= 0) { if (nb > 0) self.lastNeed = nb - 1; return nb; } if (--j < i || nb === -2) return 0; nb = utf8CheckByte(buf[j]); if (nb >= 0) { if (nb > 0) self.lastNeed = nb - 2; return nb; } if (--j < i || nb === -2) return 0; nb = utf8CheckByte(buf[j]); if (nb >= 0) { if (nb > 0) { if (nb === 2) nb = 0; else self.lastNeed = nb - 3; } return nb; } return 0; } /* * Validates as many continuation bytes for a multi-byte UTF-8 character as * needed or are available. If we see a non-continuation byte where we expect * one, we "replace" the validated continuation bytes we've seen so far with * a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding * behavior. The continuation byte check is included three times in the case * where all of the continuation bytes for a character exist in the same buffer. * It is also done this way as a slight performance increase instead of using a * loop. */ function utf8CheckExtraBytes(self, buf) { if ((buf[0] & 0xc0) !== 0x80) { self.lastNeed = 0; return "\ufffd"; } if (self.lastNeed > 1 && buf.length > 1) { if ((buf[1] & 0xc0) !== 0x80) { self.lastNeed = 1; return "\ufffd"; } if (self.lastNeed > 2 && buf.length > 2) { if ((buf[2] & 0xc0) !== 0x80) { self.lastNeed = 2; return "\ufffd"; } } } } /* * Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. */ function utf8FillLastComplete(buf) { const p = this.lastTotal - this.lastNeed; const r = utf8CheckExtraBytes(this, buf); if (r !== undefined) return r; if (this.lastNeed <= buf.length) { buf.copy(this.lastChar, p, 0, this.lastNeed); return this.lastChar.toString(this.encoding, 0, this.lastTotal); } buf.copy(this.lastChar, p, 0, buf.length); this.lastNeed -= buf.length; } /* * Attempts to complete a partial non-UTF-8 character using bytes from a Buffer */ function utf8FillLastIncomplete(buf) { if (this.lastNeed <= buf.length) { buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); return this.lastChar.toString(this.encoding, 0, this.lastTotal); } buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); this.lastNeed -= buf.length; } /* * Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a * partial character, the character's bytes are buffered until the required * number of bytes are available. */ function utf8Text(buf, i) { const total = utf8CheckIncomplete(this, buf, i); if (!this.lastNeed) return buf.toString("utf8", i); this.lastTotal = total; const end = buf.length - (total - this.lastNeed); buf.copy(this.lastChar, 0, end); return buf.toString("utf8", i, end); } /* * For UTF-8, a replacement character is added when ending on a partial * character. */ function utf8End(buf) { const r = buf && buf.length ? this.write(buf) : ""; if (this.lastNeed) return r + "\ufffd"; return r; } function utf8Write(buf) { if (typeof buf === "string") { return buf; } if (buf.length === 0) return ""; let r; let i; // Because `TypedArray` is recognized as `ArrayBuffer` but in the reality, there are some fundamental difference. We would need to cast it properly const normalizedBuffer = isBufferType(buf) ? buf : Buffer.from(buf); if (this.lastNeed) { r = this.fillLast(normalizedBuffer); if (r === undefined) return ""; i = this.lastNeed; this.lastNeed = 0; } else { i = 0; } if (i < buf.length) { return r ? r + this.text(normalizedBuffer, i) : this.text(normalizedBuffer, i); } return r || ""; } function base64Text(buf, i) { const n = (buf.length - i) % 3; if (n === 0) return buf.toString("base64", i); this.lastNeed = 3 - n; this.lastTotal = 3; if (n === 1) { this.lastChar[0] = buf[buf.length - 1]; } else { this.lastChar[0] = buf[buf.length - 2]; this.lastChar[1] = buf[buf.length - 1]; } return buf.toString("base64", i, buf.length - n); } function base64End(buf) { const r = buf && buf.length ? this.write(buf) : ""; if (this.lastNeed) { return r + this.lastChar.toString("base64", 0, 3 - this.lastNeed); } return r; } function simpleWrite(buf) { if (typeof buf === "string") { return buf; } return buf.toString(this.encoding); } function simpleEnd(buf) { return buf && buf.length ? this.write(buf) : ""; } class StringDecoderBase { encoding; lastChar; lastNeed; lastTotal; constructor(encoding, nb){ this.encoding = encoding; this.lastNeed = 0; this.lastTotal = 0; this.lastChar = Buffer.allocUnsafe(nb); } } class Base64Decoder extends StringDecoderBase { end = base64End; fillLast = utf8FillLastIncomplete; text = base64Text; write = utf8Write; constructor(encoding){ super(normalizeEncoding(encoding), 3); } } class GenericDecoder extends StringDecoderBase { end = simpleEnd; fillLast = undefined; text = utf8Text; write = simpleWrite; constructor(encoding){ super(normalizeEncoding(encoding), 4); } } class Utf8Decoder extends StringDecoderBase { end = utf8End; fillLast = utf8FillLastComplete; text = utf8Text; write = utf8Write; constructor(encoding){ super(normalizeEncoding(encoding), 4); } } /* * StringDecoder provides an interface for efficiently splitting a series of * buffers into a series of JS strings without breaking apart multi-byte * characters. */ export class StringDecoder { encoding; end; fillLast; lastChar; lastNeed; lastTotal; text; write; constructor(encoding){ const normalizedEncoding = normalizeEncoding(encoding); let decoder; switch(normalizedEncoding){ case "utf8": decoder = new Utf8Decoder(encoding); break; case "base64": decoder = new Base64Decoder(encoding); break; default: decoder = new GenericDecoder(encoding); } this.encoding = decoder.encoding; this.end = decoder.end; this.fillLast = decoder.fillLast; this.lastChar = decoder.lastChar; this.lastNeed = decoder.lastNeed; this.lastTotal = decoder.lastTotal; this.text = decoder.text; this.write = decoder.write; } } // Allow calling StringDecoder() without new const PStringDecoder = new Proxy(StringDecoder, { apply (_target, thisArg, args) { // @ts-ignore tedious to replicate types ... return Object.assign(thisArg, new StringDecoder(...args)); } }); export default { StringDecoder: PStringDecoder }; Qc5node:string_decodera bD`tM` T`lLa)~ T  I`BSb1~ B"""bb‘’B“Bq??????????????????Ibb%`L` b]`> ]`] L`` L`` L`]L`  D"{ "{ c06 DBcVg Db b cy`"{ a?a?b a?a?a?b@y T I`"b@z T I` Y b@{ T I`] i "b@| T I`?"b@} T I`"b@~ T I`bb@ T I`b@  T I`bb@  T I`‘b@  T I`3’b@  T I`YBb@  T I`n“b@ T I`!Bb@Lba  T4`(L`bŒ  F`Df 24 24 24 (SbqAI`Da a 8,b@  `T ``/ `/ `?  `  a"D] ` aj] T  I`z”b Ճ T,`L`hb•"  v`Kb 0 0 0 d3333(Sbqq”`Da: a 0 b   `T ``/ `/ `?  `  a D] ` aj] T  I`b Ճ T0`L`B""-b  `Kb( `  Xe3 33 3(Sbqq`Da7 a 0 b  `T ``/ `/ `?  `  aD] ` aj] T  I`xb Ճ T0`L`B""-b  `Kb( ` P Pe33 33(Sbqq`Da a 0 b  `T ``/ `/ `?  `  a D] ` aj] T  I`L b Ճ T0`L`B""-b  `Kb( X | Pe 3 3 3 3(Sbqq`Da  a 0 b  `T ``/ `/ `?  `  a{ const newNodeTextContext = new NodeTestContext(denoTestContext); await prepared.fn(newNodeTextContext); }, ignore: prepared.options.todo || prepared.options.skip, sanitizeExit: false, sanitizeOps: false, sanitizeResources: false }).then(()=>undefined); } before(_fn, _options) { notImplemented("test.TestContext.before"); } after(_fn, _options) { notImplemented("test.TestContext.after"); } beforeEach(_fn, _options) { notImplemented("test.TestContext.beforeEach"); } afterEach(_fn, _options) { notImplemented("test.TestContext.afterEach"); } } function prepareOptions(name, options, fn, overrides) { if (typeof name === "function") { fn = name; } else if (name !== null && typeof name === "object") { fn = options; options = name; } else if (typeof options === "function") { fn = options; } if (options === null || typeof options !== "object") { options = {}; } const finalOptions = { ...options, ...overrides }; // TODO(bartlomieju): these options are currently not handled // const { concurrency, timeout, signal } = finalOptions; if (typeof fn !== "function") { fn = noop; } if (typeof name !== "string" || name === "") { name = fn.name || ""; } return { fn, options: finalOptions, name }; } function wrapTestFn(fn, resolve) { return async function(t) { const nodeTestContext = new NodeTestContext(t); try { await fn(nodeTestContext); } finally{ resolve(); } }; } function prepareDenoTest(name, options, fn, overrides) { const prepared = prepareOptions(name, options, fn, overrides); const { promise, resolve } = Promise.withResolvers(); const denoTestOptions = { name: prepared.name, fn: wrapTestFn(prepared.fn, resolve), only: prepared.options.only, ignore: prepared.options.todo || prepared.options.skip, sanitizeExit: false, sanitizeOps: false, sanitizeResources: false }; Deno.test(denoTestOptions); return promise; } export function test(name, options, fn) { return prepareDenoTest(name, options, fn, {}); } test.skip = function skip(name, options, fn) { return prepareDenoTest(name, options, fn, { skip: true }); }; test.todo = function todo(name, options, fn) { return prepareDenoTest(name, options, fn, { todo: true }); }; test.only = function only(name, options, fn) { return prepareDenoTest(name, options, fn, { only: true }); }; export function describe() { notImplemented("test.describe"); } export function it() { notImplemented("test.it"); } export function before() { notImplemented("test.before"); } export function after() { notImplemented("test.after"); } export function beforeEach() { notImplemented("test.beforeEach"); } export function afterEach() { notImplemented("test.afterEach"); } export const mock = { fn: ()=>{ notImplemented("test.mock.fn"); }, getter: ()=>{ notImplemented("test.mock.getter"); }, method: ()=>{ notImplemented("test.mock.method"); }, reset: ()=>{ notImplemented("test.mock.reset"); }, restoreAll: ()=>{ notImplemented("test.mock.restoreAll"); }, setter: ()=>{ notImplemented("test.mock.setter"); }, timers: { enable: ()=>{ notImplemented("test.mock.timers.enable"); }, reset: ()=>{ notImplemented("test.mock.timers.reset"); }, tick: ()=>{ notImplemented("test.mock.timers.tick"); }, runAll: ()=>{ notImplemented("test.mock.timers.runAll"); } } }; export default test; Qb& node:testa bD`M`+ T`\La6< T  I`MRHSb1H"d?????Ib` L`  ]`]L`` L` ` L` ` L`b ` L`b ` L`` L`B` L`B` L` `  L` b{`  L`b{]L`  Db b c D_ _ c` b a?_ a? a ?b{a ?a?Ba?b a? a?a?a?a?a?b @ T I`% b@ T I` b @ b@ T  I` b@pL` T I`? b @a  T I`  b{b @a  T I`b@a! T I`Bb @a" T I`$b b@a# T I`:` b@a$ T I`{b@a% T I`b@ c&a ,Sb @"c??S   `T ``/ `/ `?  `  aS D] `  aj`+ } `F`+ `F"aj`+  `Fajbajœaj b{aj b aj  aj aj aj] T  I`"~b Ճ T I`Qb get signalb  T I` Q Qaget nameb T I`^"b  T I` Qaget mockb T I`:b T I`Abb  T I`œb  T I`b{b  T I`b b T I` c b T I`pb  T I` b  T(` ]  ` Ka  -c5(Sbqq"`Dai  a b  T  I`) bb b T I` œb œ T I`mb HbC!C3CCCCC T  Qamock.fn`4bK! T Qb mock.getter`@q!bK"! T Qb mock.method`}3bK#3 T Qb mock.reset`bK$ T y`Qb .restoreAll`.bK% T Qb mock.setter`:kbK&0bb CCCC T ```  Qa.enable`b bK'b  T `` Qb timers.reset` bK( T `Qb .timers.tick`ObK) T ```  Qa.runAll`]bK*  `Dh Ƃ%%%%%ei h  %  e%  ‚       e+ %2 %0 Ă20 Ă20 Ă2~ Ă!3" #3$ %3& '3()3*+3,~-)Â.3/03(132334 35 10 1 c ' , L 0 bA>D &D2F*2:NV^fnvFR^jvD`RD]DH Qұ4f // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { primordials } from "ext:core/mod.js"; const { MapPrototypeGet, MapPrototypeDelete } = primordials; import { activeTimers, setUnrefTimeout, Timeout } from "ext:deno_node/internal/timers.mjs"; import { validateFunction } from "ext:deno_node/internal/validators.mjs"; import { promisify } from "ext:deno_node/internal/util.mjs"; export { setUnrefTimeout } from "ext:deno_node/internal/timers.mjs"; import * as timers from "ext:deno_web/02_timers.js"; const clearTimeout_ = timers.clearTimeout; const clearInterval_ = timers.clearInterval; const setTimeoutUnclamped = timers.setTimeoutUnclamped; export function setTimeout(callback, timeout, ...args) { validateFunction(callback, "callback"); return new Timeout(callback, timeout, args, false, true); } Object.defineProperty(setTimeout, promisify.custom, { value: (timeout, ...args)=>{ return new Promise((cb)=>setTimeout(cb, timeout, ...args)); }, enumerable: true }); export function clearTimeout(timeout) { if (timeout == null) { return; } const id = +timeout; const timer = MapPrototypeGet(activeTimers, id); if (timer) { timeout._destroyed = true; MapPrototypeDelete(activeTimers, id); } clearTimeout_(id); } export function setInterval(callback, timeout, ...args) { validateFunction(callback, "callback"); return new Timeout(callback, timeout, args, true, true); } export function clearInterval(timeout) { if (timeout == null) { return; } const id = +timeout; const timer = MapPrototypeGet(activeTimers, id); if (timer) { timeout._destroyed = true; MapPrototypeDelete(activeTimers, id); } clearInterval_(id); } // TODO(bartlomieju): implement the 'NodeJS.Immediate' versions of the timers. // https://github.com/DefinitelyTyped/DefinitelyTyped/blob/1163ead296d84e7a3c80d71e7c81ecbd1a130e9a/types/node/v12/globals.d.ts#L1120-L1131 export function setImmediate(cb, ...args) { return setTimeoutUnclamped(cb, 0, ...args); } export const clearImmediate = clearTimeout; export default { setTimeout, clearTimeout, setInterval, clearInterval, setImmediate, setUnrefTimeout, clearImmediate }; Qb= node:timersa bD`(M` T`dLa9LL` T  I`-"Sb1""d?????Ib `L` bS]`b! ]`]" ]`" ]`]`f L`  Dc!\L`` L`{ ` L`{ B` L`B` L`| ` L`| ` L`"` L`" L` DDcZ` L` DcNU Dc/; Dc D  c Dc=L D  c` a?a?a?a? a? a?"a?a?a?Ba?| a?{ a?a?b@a T I`rb@a T I`b@a T I`1#Bb@a T I`Z| b@ca B" #  bCG T  y``` Qa.value`LbKHb"CCCBC| CC{ C"| {   `D~@h %%%%%ei e h  0-%-%-%-%- %! - 00 - ~)3\01~)030303030303 03" 1 c$P`0 0 0bADD`RD]DH Q^ڋh// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { promisify } from "node:util"; import timers from "node:timers"; export const setTimeout = promisify(timers.setTimeout), setImmediate = promisify(timers.setImmediate), setInterval = promisify(timers.setInterval); export default { setTimeout, setImmediate, setInterval }; QcjLnode:timers/promisesa bD` M` Tp`0La !Lda  "| (b"C| CC  `Du h ei h  00-b100-b100-b 1~ )03 0303 1 pSb1Ibh`L` : ]`e5 ]`]8L` ` L`| ` L`| ` L`"` L`"]L`  D  cT] Dcy` a?a?"a?| a?a?a?bP@bAD`RD]DH Qfs // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { notImplemented } from "ext:deno_node/_utils.ts"; import tlsCommon from "ext:deno_node/_tls_common.ts"; import tlsWrap from "ext:deno_node/_tls_wrap.ts"; // openssl -> rustls const cipherMap = { "__proto__": null, "AES128-GCM-SHA256": "TLS13_AES_128_GCM_SHA256", "AES256-GCM-SHA384": "TLS13_AES_256_GCM_SHA384", "ECDHE-ECDSA-AES128-GCM-SHA256": "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", "ECDHE-ECDSA-AES256-GCM-SHA384": "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "ECDHE-ECDSA-CHACHA20-POLY1305": "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", "ECDHE-RSA-AES128-GCM-SHA256": "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "ECDHE-RSA-AES256-GCM-SHA384": "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "ECDHE-RSA-CHACHA20-POLY1305": "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256", "TLS_AES_128_GCM_SHA256": "TLS13_AES_128_GCM_SHA256", "TLS_AES_256_GCM_SHA384": "TLS13_AES_256_GCM_SHA384", "TLS_CHACHA20_POLY1305_SHA256": "TLS13_CHACHA20_POLY1305_SHA256" }; export function getCiphers() { // TODO(bnoordhuis) Use locale-insensitive toLowerCase() return Object.keys(cipherMap).map((name)=>name.toLowerCase()); } export const rootCertificates = undefined; export const DEFAULT_ECDH_CURVE = "auto"; export const DEFAULT_MAX_VERSION = "TLSv1.3"; export const DEFAULT_MIN_VERSION = "TLSv1.2"; export class CryptoStream { } export class SecurePair { } export const Server = tlsWrap.Server; export function createSecurePair() { notImplemented("tls.createSecurePair"); } export default { CryptoStream, SecurePair, Server, TLSSocket: tlsWrap.TLSSocket, checkServerIdentity: tlsWrap.checkServerIdentity, connect: tlsWrap.connect, createSecureContext: tlsCommon.createSecureContext, createSecurePair, createServer: tlsWrap.createServer, getCiphers, rootCertificates, DEFAULT_CIPHERS: tlsWrap.DEFAULT_CIPHERS, DEFAULT_ECDH_CURVE, DEFAULT_MAX_VERSION, DEFAULT_MIN_VERSION }; export const checkServerIdentity = tlsWrap.checkServerIdentity; export const connect = tlsWrap.connect; export const createSecureContext = tlsCommon.createSecureContext; export const createServer = tlsWrap.createServer; export const DEFAULT_CIPHERS = tlsWrap.DEFAULT_CIPHERS; export const TLSSocket = tlsWrap.TLSSocket;  Qa node:tlsa bD` M` T`fLa$XL` T  I`s" Sb1®`?Ib `L`  ]`&]`W]`]L`0` L`` L`` L`` L`` L`` L`"` L`" ` L` "`  L`"`  L`>`  L`>B`  L`B`  L`³ ` L`³ " ` L`" ` L`]L`  Db b c DbcHQ Dc~`b a?ba?a?" a?a?a?a?a?a?"a? a?a ?a?a ?>a ?Ba ?³ a?a?"a ?.b@h T I`Vb@h   a hb B"±b"µ¶b"º»b"½BB  `T ``/ `/ `?  `  a,BD] ` aj] T  I`,,V.bD  `T``/ `/ `?  `  aJ^D] ` aj] T  I`JJ"V.bD bC"C C"CC>CBCC³ C" CCCCCC"">bB³ "   B`D0h %ei h  ~9%1111 e+ 1  e+ 10 - 1~)030303 0- 3 0-30-30-30 30-303 03"0-$3&03(03*03, 10-1 0-1 0-1 0-10-$10- 1 d. 0P 0P 0P 00 0bANDD`RD]DH Q;// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { primordials } from "ext:core/mod.js"; const { Error } = primordials; import { op_is_terminal } from "ext:core/ops"; import { ERR_INVALID_FD } from "ext:deno_node/internal/errors.ts"; import { LibuvStreamWrap } from "ext:deno_node/internal_binding/stream_wrap.ts"; import { providerType } from "ext:deno_node/internal_binding/async_wrap.ts"; import { Socket } from "node:net"; import { setReadStream } from "ext:deno_node/_process/streams.mjs"; // Returns true when the given numeric fd is associated with a TTY and false otherwise. function isatty(fd) { if (typeof fd !== "number") { return false; } try { /** * TODO: Treat `fd` as real file descriptors. Currently, `rid` 0, 1, 2 * correspond to `fd` 0, 1, 2 (stdin, stdout, stderr). This may change in * the future. */ return op_is_terminal(fd); } catch (_) { return false; } } class TTY extends LibuvStreamWrap { constructor(handle){ super(providerType.TTYWRAP, handle); } } export class ReadStream extends Socket { constructor(fd, options){ if (fd >> 0 !== fd || fd < 0) { throw new ERR_INVALID_FD(fd); } // We only support `stdin`. if (fd != 0) throw new Error("Only fd 0 is supported."); const tty = new TTY(Deno.stdin); super({ readableHighWaterMark: 0, handle: tty, manualStart: true, ...options }); this.isRaw = false; this.isTTY = true; } setRawMode(flag) { flag = !!flag; this._handle.setRaw(flag); this.isRaw = flag; return this; } } setReadStream(ReadStream); export class WriteStream extends Socket { constructor(fd){ if (fd >> 0 !== fd || fd < 0) { throw new ERR_INVALID_FD(fd); } // We only support `stdin`, `stdout` and `stderr`. if (fd > 2) throw new Error("Only fd 0, 1 and 2 are supported."); const tty = new TTY(fd === 0 ? Deno.stdin : fd === 1 ? Deno.stdout : Deno.stderr); super({ readableHighWaterMark: 0, handle: tty, manualStart: true }); const { columns, rows } = Deno.consoleSize(); this.columns = columns; this.rows = rows; this.isTTY = true; } } export { isatty }; export default { isatty, WriteStream, ReadStream };  Qa)node:ttya bD` M` T`XLa' L` T  I`wSb1 Ba??Ib`$L` bS]`gB]` ]`¸ ]`+b]`yb% ]`E]`]8L` ` L`"X ` L`"X X ` L`X ` L`]$L`  D  c Dbbc# Db b c D  c DcT_ Dceq Dbbc` a? a? a?ba?a?b a?ba?a?"X a?X a?a? b@da   `T ``/ `/ `?  `  a$D] ` aj]b T  I`"B2 b   `T``/ `/ `?  `  a,RD]$ ` ajaj]b  T  I`["X 2 b  T I`Pb b  `T``/ `/ `?  `  auD] ` aj] T  I`X 2 b (bCX C"X CX "X   `D{8h %%ei h  0-%0e+ %0   e+ 10 0b0e+ 1~)030303 1  a 0bA*D`RD]DH RQR// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, ERR_INVALID_FILE_URL_HOST, ERR_INVALID_FILE_URL_PATH, ERR_INVALID_URL, ERR_INVALID_URL_SCHEME } from "ext:deno_node/internal/errors.ts"; import { validateString } from "ext:deno_node/internal/validators.mjs"; import { CHAR_0, CHAR_9, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_CARRIAGE_RETURN, CHAR_CIRCUMFLEX_ACCENT, CHAR_DOT, CHAR_DOUBLE_QUOTE, CHAR_FORM_FEED, CHAR_FORWARD_SLASH, CHAR_GRAVE_ACCENT, CHAR_HASH, CHAR_HYPHEN_MINUS, CHAR_LEFT_ANGLE_BRACKET, CHAR_LEFT_CURLY_BRACKET, CHAR_LEFT_SQUARE_BRACKET, CHAR_LINE_FEED, CHAR_LOWERCASE_A, CHAR_LOWERCASE_Z, CHAR_NO_BREAK_SPACE, CHAR_PERCENT, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_ANGLE_BRACKET, CHAR_RIGHT_CURLY_BRACKET, CHAR_RIGHT_SQUARE_BRACKET, CHAR_SEMICOLON, CHAR_SINGLE_QUOTE, CHAR_SPACE, CHAR_TAB, CHAR_UNDERSCORE, CHAR_UPPERCASE_A, CHAR_UPPERCASE_Z, CHAR_VERTICAL_LINE, CHAR_ZERO_WIDTH_NOBREAK_SPACE } from "ext:deno_node/path/_constants.ts"; import * as path from "node:path"; import { toASCII, toUnicode } from "node:punycode"; import { isWindows, osType } from "ext:deno_node/_util/os.ts"; import { encodeStr, hexTable } from "ext:deno_node/internal/querystring.ts"; import querystring from "node:querystring"; import { URL, URLSearchParams } from "ext:deno_url/00_url.js"; const forwardSlashRegEx = /\//g; const percentRegEx = /%/g; const backslashRegEx = /\\/g; const newlineRegEx = /\n/g; const carriageReturnRegEx = /\r/g; const tabRegEx = /\t/g; // Reference: RFC 3986, RFC 1808, RFC 2396 // define these here so at least they only have to be // compiled once on the first module load. const protocolPattern = /^[a-z0-9.+-]+:/i; const portPattern = /:[0-9]*$/; const hostPattern = /^\/\/[^@/]+@[^@/]+/; // Special case for a simple path URL const simplePathPattern = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/; // Protocols that can allow "unsafe" and "unwise" chars. const unsafeProtocol = new Set([ "javascript", "javascript:" ]); // Protocols that never have a hostname. const hostlessProtocol = new Set([ "javascript", "javascript:" ]); // Protocols that always contain a // bit. const slashedProtocol = new Set([ "http", "http:", "https", "https:", "ftp", "ftp:", "gopher", "gopher:", "file", "file:", "ws", "ws:", "wss", "wss:" ]); const hostnameMaxLen = 255; // These characters do not need escaping: // ! - . _ ~ // ' ( ) * : // digits // alpha (uppercase) // alpha (lowercase) // deno-fmt-ignore const noEscapeAuth = new Int8Array([ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0 ]); // This prevents some common spoofing bugs due to our use of IDNA toASCII. For // compatibility, the set of characters we use here is the *intersection* of // "forbidden host code point" in the WHATWG URL Standard [1] and the // characters in the host parsing loop in Url.prototype.parse, with the // following additions: // // - ':' since this could cause a "protocol spoofing" bug // - '@' since this could cause parts of the hostname to be confused with auth // - '[' and ']' since this could cause a non-IPv6 hostname to be interpreted // as IPv6 by isIpv6Hostname above // // [1]: https://url.spec.whatwg.org/#forbidden-host-code-point const forbiddenHostChars = /[\0\t\n\r #%/:<>?@[\\\]^|]/; // For IPv6, permit '[', ']', and ':'. const forbiddenHostCharsIpv6 = /[\0\t\n\r #%/<>?@\\^|]/; const _url = URL; export { _url as URL }; // Legacy URL API export class Url { protocol; slashes; auth; host; port; hostname; hash; search; query; pathname; path; href; constructor(){ this.protocol = null; this.slashes = null; this.auth = null; this.host = null; this.port = null; this.hostname = null; this.hash = null; this.search = null; this.query = null; this.pathname = null; this.path = null; this.href = null; } #parseHost() { let host = this.host || ""; let port = portPattern.exec(host); if (port) { port = port[0]; if (port !== ":") { this.port = port.slice(1); } host = host.slice(0, host.length - port.length); } if (host) this.hostname = host; } resolve(relative) { return this.resolveObject(parse(relative, false, true)).format(); } resolveObject(relative) { if (typeof relative === "string") { const rel = new Url(); rel.urlParse(relative, false, true); relative = rel; } const result = new Url(); const tkeys = Object.keys(this); for(let tk = 0; tk < tkeys.length; tk++){ const tkey = tkeys[tk]; result[tkey] = this[tkey]; } // Hash is always overridden, no matter what. // even href="" will remove it. result.hash = relative.hash; // If the relative url is empty, then there's nothing left to do here. if (relative.href === "") { result.href = result.format(); return result; } // Hrefs like //foo/bar always cut to the protocol. if (relative.slashes && !relative.protocol) { // Take everything except the protocol from relative const rkeys = Object.keys(relative); for(let rk = 0; rk < rkeys.length; rk++){ const rkey = rkeys[rk]; if (rkey !== "protocol") result[rkey] = relative[rkey]; } // urlParse appends trailing / to urls like http://www.example.com if (result.protocol && slashedProtocol.has(result.protocol) && result.hostname && !result.pathname) { result.path = result.pathname = "/"; } result.href = result.format(); return result; } if (relative.protocol && relative.protocol !== result.protocol) { // If it's a known url protocol, then changing // the protocol does weird things // first, if it's not file:, then we MUST have a host, // and if there was a path // to begin with, then we MUST have a path. // if it is file:, then the host is dropped, // because that's known to be hostless. // anything else is assumed to be absolute. if (!slashedProtocol.has(relative.protocol)) { const keys = Object.keys(relative); for(let v = 0; v < keys.length; v++){ const k = keys[v]; result[k] = relative[k]; } result.href = result.format(); return result; } result.protocol = relative.protocol; if (!relative.host && !/^file:?$/.test(relative.protocol) && !hostlessProtocol.has(relative.protocol)) { const relPath = (relative.pathname || "").split("/"); while(relPath.length && !(relative.host = relPath.shift() || null)); if (!relative.host) relative.host = ""; if (!relative.hostname) relative.hostname = ""; if (relPath[0] !== "") relPath.unshift(""); if (relPath.length < 2) relPath.unshift(""); result.pathname = relPath.join("/"); } else { result.pathname = relative.pathname; } result.search = relative.search; result.query = relative.query; result.host = relative.host || ""; result.auth = relative.auth; result.hostname = relative.hostname || relative.host; result.port = relative.port; // To support http.request if (result.pathname || result.search) { const p = result.pathname || ""; const s = result.search || ""; result.path = p + s; } result.slashes = result.slashes || relative.slashes; result.href = result.format(); return result; } const isSourceAbs = result.pathname && result.pathname.charAt(0) === "/"; const isRelAbs = relative.host || relative.pathname && relative.pathname.charAt(0) === "/"; let mustEndAbs = isRelAbs || isSourceAbs || result.host && relative.pathname; const removeAllDots = mustEndAbs; let srcPath = result.pathname && result.pathname.split("/") || []; const relPath = relative.pathname && relative.pathname.split("/") || []; const noLeadingSlashes = result.protocol && !slashedProtocol.has(result.protocol); // If the url is a non-slashed url, then relative // links like ../.. should be able // to crawl up to the hostname, as well. This is strange. // result.protocol has already been set by now. // Later on, put the first path part into the host field. if (noLeadingSlashes) { result.hostname = ""; result.port = null; if (result.host) { if (srcPath[0] === "") srcPath[0] = result.host; else srcPath.unshift(result.host); } result.host = ""; if (relative.protocol) { relative.hostname = null; relative.port = null; result.auth = null; if (relative.host) { if (relPath[0] === "") relPath[0] = relative.host; else relPath.unshift(relative.host); } relative.host = null; } mustEndAbs = mustEndAbs && (relPath[0] === "" || srcPath[0] === ""); } if (isRelAbs) { // it's absolute. if (relative.host || relative.host === "") { if (result.host !== relative.host) result.auth = null; result.host = relative.host; result.port = relative.port; } if (relative.hostname || relative.hostname === "") { if (result.hostname !== relative.hostname) result.auth = null; result.hostname = relative.hostname; } result.search = relative.search; result.query = relative.query; srcPath = relPath; // Fall through to the dot-handling below. } else if (relPath.length) { // it's relative // throw away the existing file, and take the new path instead. if (!srcPath) srcPath = []; srcPath.pop(); srcPath = srcPath.concat(relPath); result.search = relative.search; result.query = relative.query; } else if (relative.search !== null && relative.search !== undefined) { // Just pull out the search. // like href='?foo'. // Put this after the other two cases because it simplifies the booleans if (noLeadingSlashes) { result.hostname = result.host = srcPath.shift() || null; // Occasionally the auth can get stuck only in host. // This especially happens in cases like // url.resolveObject('mailto:local1@domain1', 'local2@domain2') const authInHost = result.host && result.host.indexOf("@") > 0 && result.host.split("@"); if (authInHost) { result.auth = authInHost.shift() || null; result.host = result.hostname = authInHost.shift() || null; } } result.search = relative.search; result.query = relative.query; // To support http.request if (result.pathname !== null || result.search !== null) { result.path = (result.pathname ? result.pathname : "") + (result.search ? result.search : ""); } result.href = result.format(); return result; } if (!srcPath.length) { // No path at all. All other things were already handled above. result.pathname = null; // To support http.request if (result.search) { result.path = "/" + result.search; } else { result.path = null; } result.href = result.format(); return result; } // If a url ENDs in . or .., then it must get a trailing slash. // however, if it ends in anything else non-slashy, // then it must NOT get a trailing slash. let last = srcPath.slice(-1)[0]; const hasTrailingSlash = (result.host || relative.host || srcPath.length > 1) && (last === "." || last === "..") || last === ""; // Strip single dots, resolve double dots to parent dir // if the path tries to go above the root, `up` ends up > 0 let up = 0; for(let i = srcPath.length - 1; i >= 0; i--){ last = srcPath[i]; if (last === ".") { srcPath.splice(i, 1); } else if (last === "..") { srcPath.splice(i, 1); up++; } else if (up) { srcPath.splice(i, 1); up--; } } // If the path is allowed to go above the root, restore leading ..s if (!mustEndAbs && !removeAllDots) { while(up--){ srcPath.unshift(".."); } } if (mustEndAbs && srcPath[0] !== "" && (!srcPath[0] || srcPath[0].charAt(0) !== "/")) { srcPath.unshift(""); } if (hasTrailingSlash && srcPath.join("/").slice(-1) !== "/") { srcPath.push(""); } const isAbsolute = srcPath[0] === "" || srcPath[0] && srcPath[0].charAt(0) === "/"; // put the host back if (noLeadingSlashes) { result.hostname = result.host = isAbsolute ? "" : srcPath.length ? srcPath.shift() || null : ""; // Occasionally the auth can get stuck only in host. // This especially happens in cases like // url.resolveObject('mailto:local1@domain1', 'local2@domain2') const authInHost = result.host && result.host.indexOf("@") > 0 ? result.host.split("@") : false; if (authInHost) { result.auth = authInHost.shift() || null; result.host = result.hostname = authInHost.shift() || null; } } mustEndAbs = mustEndAbs || result.host && srcPath.length; if (mustEndAbs && !isAbsolute) { srcPath.unshift(""); } if (!srcPath.length) { result.pathname = null; result.path = null; } else { result.pathname = srcPath.join("/"); } // To support request.http if (result.pathname !== null || result.search !== null) { result.path = (result.pathname ? result.pathname : "") + (result.search ? result.search : ""); } result.auth = relative.auth || result.auth; result.slashes = result.slashes || relative.slashes; result.href = result.format(); return result; } format() { let auth = this.auth || ""; if (auth) { auth = encodeStr(auth, noEscapeAuth, hexTable); auth += "@"; } let protocol = this.protocol || ""; let pathname = this.pathname || ""; let hash = this.hash || ""; let host = ""; let query = ""; if (this.host) { host = auth + this.host; } else if (this.hostname) { host = auth + (this.hostname.includes(":") && !isIpv6Hostname(this.hostname) ? "[" + this.hostname + "]" : this.hostname); if (this.port) { host += ":" + this.port; } } if (this.query !== null && typeof this.query === "object") { query = querystring.stringify(this.query); } let search = this.search || query && "?" + query || ""; if (protocol && protocol.charCodeAt(protocol.length - 1) !== 58 /* : */ ) { protocol += ":"; } let newPathname = ""; let lastPos = 0; for(let i = 0; i < pathname.length; ++i){ switch(pathname.charCodeAt(i)){ case CHAR_HASH: if (i - lastPos > 0) { newPathname += pathname.slice(lastPos, i); } newPathname += "%23"; lastPos = i + 1; break; case CHAR_QUESTION_MARK: if (i - lastPos > 0) { newPathname += pathname.slice(lastPos, i); } newPathname += "%3F"; lastPos = i + 1; break; } } if (lastPos > 0) { if (lastPos !== pathname.length) { pathname = newPathname + pathname.slice(lastPos); } else pathname = newPathname; } // Only the slashedProtocols get the //. Not mailto:, xmpp:, etc. // unless they had them to begin with. if (this.slashes || slashedProtocol.has(protocol)) { if (this.slashes || host) { if (pathname && pathname.charCodeAt(0) !== CHAR_FORWARD_SLASH) { pathname = "/" + pathname; } host = "//" + host; } else if (protocol.length >= 4 && protocol.charCodeAt(0) === 102 /* f */ && protocol.charCodeAt(1) === 105 /* i */ && protocol.charCodeAt(2) === 108 /* l */ && protocol.charCodeAt(3) === 101 /* e */ ) { host = "//"; } } search = search.replace(/#/g, "%23"); if (hash && hash.charCodeAt(0) !== CHAR_HASH) { hash = "#" + hash; } if (search && search.charCodeAt(0) !== CHAR_QUESTION_MARK) { search = "?" + search; } return protocol + host + pathname + search + hash; } urlParse(url, parseQueryString, slashesDenoteHost) { validateString(url, "url"); // Copy chrome, IE, opera backslash-handling behavior. // Back slashes before the query string get converted to forward slashes // See: https://code.google.com/p/chromium/issues/detail?id=25916 let hasHash = false; let start = -1; let end = -1; let rest = ""; let lastPos = 0; for(let i = 0, inWs = false, split = false; i < url.length; ++i){ const code = url.charCodeAt(i); // Find first and last non-whitespace characters for trimming const isWs = code === CHAR_SPACE || code === CHAR_TAB || code === CHAR_CARRIAGE_RETURN || code === CHAR_LINE_FEED || code === CHAR_FORM_FEED || code === CHAR_NO_BREAK_SPACE || code === CHAR_ZERO_WIDTH_NOBREAK_SPACE; if (start === -1) { if (isWs) continue; lastPos = start = i; } else if (inWs) { if (!isWs) { end = -1; inWs = false; } } else if (isWs) { end = i; inWs = true; } // Only convert backslashes while we haven't seen a split character if (!split) { switch(code){ case CHAR_HASH: hasHash = true; // Fall through case CHAR_QUESTION_MARK: split = true; break; case CHAR_BACKWARD_SLASH: if (i - lastPos > 0) rest += url.slice(lastPos, i); rest += "/"; lastPos = i + 1; break; } } else if (!hasHash && code === CHAR_HASH) { hasHash = true; } } // Check if string was non-empty (including strings with only whitespace) if (start !== -1) { if (lastPos === start) { // We didn't convert any backslashes if (end === -1) { if (start === 0) rest = url; else rest = url.slice(start); } else { rest = url.slice(start, end); } } else if (end === -1 && lastPos < url.length) { // We converted some backslashes and have only part of the entire string rest += url.slice(lastPos); } else if (end !== -1 && lastPos < end) { // We converted some backslashes and have only part of the entire string rest += url.slice(lastPos, end); } } if (!slashesDenoteHost && !hasHash) { // Try fast path regexp const simplePath = simplePathPattern.exec(rest); if (simplePath) { this.path = rest; this.href = rest; this.pathname = simplePath[1]; if (simplePath[2]) { this.search = simplePath[2]; if (parseQueryString) { this.query = querystring.parse(this.search.slice(1)); } else { this.query = this.search.slice(1); } } else if (parseQueryString) { this.search = null; this.query = Object.create(null); } return this; } } let proto = protocolPattern.exec(rest); let lowerProto = ""; if (proto) { proto = proto[0]; lowerProto = proto.toLowerCase(); this.protocol = lowerProto; rest = rest.slice(proto.length); } // Figure out if it's got a host // user@server is *always* interpreted as a hostname, and url // resolution will treat //foo/bar as host=foo,path=bar because that's // how the browser resolves relative URLs. let slashes; if (slashesDenoteHost || proto || hostPattern.test(rest)) { slashes = rest.charCodeAt(0) === CHAR_FORWARD_SLASH && rest.charCodeAt(1) === CHAR_FORWARD_SLASH; if (slashes && !(proto && hostlessProtocol.has(lowerProto))) { rest = rest.slice(2); this.slashes = true; } } if (!hostlessProtocol.has(lowerProto) && (slashes || proto && !slashedProtocol.has(proto))) { // there's a hostname. // the first instance of /, ?, ;, or # ends the host. // // If there is an @ in the hostname, then non-host chars *are* allowed // to the left of the last @ sign, unless some host-ending character // comes *before* the @-sign. // URLs are obnoxious. // // ex: // http://a@b@c/ => user:a@b host:c // http://a@b?@c => user:a host:b path:/?@c let hostEnd = -1; let atSign = -1; let nonHost = -1; for(let i = 0; i < rest.length; ++i){ switch(rest.charCodeAt(i)){ case CHAR_TAB: case CHAR_LINE_FEED: case CHAR_CARRIAGE_RETURN: case CHAR_SPACE: case CHAR_DOUBLE_QUOTE: case CHAR_PERCENT: case CHAR_SINGLE_QUOTE: case CHAR_SEMICOLON: case CHAR_LEFT_ANGLE_BRACKET: case CHAR_RIGHT_ANGLE_BRACKET: case CHAR_BACKWARD_SLASH: case CHAR_CIRCUMFLEX_ACCENT: case CHAR_GRAVE_ACCENT: case CHAR_LEFT_CURLY_BRACKET: case CHAR_VERTICAL_LINE: case CHAR_RIGHT_CURLY_BRACKET: // Characters that are never ever allowed in a hostname from RFC 2396 if (nonHost === -1) nonHost = i; break; case CHAR_HASH: case CHAR_FORWARD_SLASH: case CHAR_QUESTION_MARK: // Find the first instance of any host-ending characters if (nonHost === -1) nonHost = i; hostEnd = i; break; case CHAR_AT: // At this point, either we have an explicit point where the // auth portion cannot go past, or the last @ char is the decider. atSign = i; nonHost = -1; break; } if (hostEnd !== -1) break; } start = 0; if (atSign !== -1) { this.auth = decodeURIComponent(rest.slice(0, atSign)); start = atSign + 1; } if (nonHost === -1) { this.host = rest.slice(start); rest = ""; } else { this.host = rest.slice(start, nonHost); rest = rest.slice(nonHost); } // pull out port. this.#parseHost(); // We've indicated that there is a hostname, // so even if it's empty, it has to be present. if (typeof this.hostname !== "string") this.hostname = ""; const hostname = this.hostname; // If hostname begins with [ and ends with ] // assume that it's an IPv6 address. const ipv6Hostname = isIpv6Hostname(hostname); // validate a little. if (!ipv6Hostname) { rest = getHostname(this, rest, hostname); } if (this.hostname.length > hostnameMaxLen) { this.hostname = ""; } else { // Hostnames are always lower case. this.hostname = this.hostname.toLowerCase(); } if (this.hostname !== "") { if (ipv6Hostname) { if (forbiddenHostCharsIpv6.test(this.hostname)) { throw new ERR_INVALID_URL(url); } } else { // IDNA Support: Returns a punycoded representation of "domain". // It only converts parts of the domain name that // have non-ASCII characters, i.e. it doesn't matter if // you call it with a domain that already is ASCII-only. // Use lenient mode (`true`) to try to support even non-compliant // URLs. this.hostname = toASCII(this.hostname); // Prevent two potential routes of hostname spoofing. // 1. If this.hostname is empty, it must have become empty due to toASCII // since we checked this.hostname above. // 2. If any of forbiddenHostChars appears in this.hostname, it must have // also gotten in due to toASCII. This is since getHostname would have // filtered them out otherwise. // Rather than trying to correct this by moving the non-host part into // the pathname as we've done in getHostname, throw an exception to // convey the severity of this issue. if (this.hostname === "" || forbiddenHostChars.test(this.hostname)) { throw new ERR_INVALID_URL(url); } } } const p = this.port ? ":" + this.port : ""; const h = this.hostname || ""; this.host = h + p; // strip [ and ] from the hostname // the host field still retains them, though if (ipv6Hostname) { this.hostname = this.hostname.slice(1, -1); if (rest[0] !== "/") { rest = "/" + rest; } } } // Now rest is set to the post-host stuff. // Chop off any delim chars. if (!unsafeProtocol.has(lowerProto)) { // First, make 100% sure that any "autoEscape" chars get // escaped, even if encodeURIComponent doesn't think they // need to be. rest = autoEscapeStr(rest); } let questionIdx = -1; let hashIdx = -1; for(let i = 0; i < rest.length; ++i){ const code = rest.charCodeAt(i); if (code === CHAR_HASH) { this.hash = rest.slice(i); hashIdx = i; break; } else if (code === CHAR_QUESTION_MARK && questionIdx === -1) { questionIdx = i; } } if (questionIdx !== -1) { if (hashIdx === -1) { this.search = rest.slice(questionIdx); this.query = rest.slice(questionIdx + 1); } else { this.search = rest.slice(questionIdx, hashIdx); this.query = rest.slice(questionIdx + 1, hashIdx); } if (parseQueryString) { this.query = querystring.parse(this.query); } } else if (parseQueryString) { // No query string, but parseQueryString still requested this.search = null; this.query = Object.create(null); } const useQuestionIdx = questionIdx !== -1 && (hashIdx === -1 || questionIdx < hashIdx); const firstIdx = useQuestionIdx ? questionIdx : hashIdx; if (firstIdx === -1) { if (rest.length > 0) this.pathname = rest; } else if (firstIdx > 0) { this.pathname = rest.slice(0, firstIdx); } if (slashedProtocol.has(lowerProto) && this.hostname && !this.pathname) { this.pathname = "/"; } // To support http.request if (this.pathname || this.search) { const p = this.pathname || ""; const s = this.search || ""; this.path = p + s; } // Finally, reconstruct the href based on what has been validated. this.href = this.format(); return this; } } export function format(urlObject, options) { if (typeof urlObject === "string") { urlObject = parse(urlObject, true, false); } else if (typeof urlObject !== "object" || urlObject === null) { throw new ERR_INVALID_ARG_TYPE("urlObject", [ "Object", "string" ], urlObject); } else if (urlObject instanceof URL) { return formatWhatwg(urlObject, options); } return Url.prototype.format.call(urlObject); } /** * The URL object has both a `toString()` method and `href` property that return string serializations of the URL. * These are not, however, customizable in any way. * This method allows for basic customization of the output. * @see Tested in `parallel/test-url-format-whatwg.js`. * @param urlObject * @param options * @param options.auth `true` if the serialized URL string should include the username and password, `false` otherwise. **Default**: `true`. * @param options.fragment `true` if the serialized URL string should include the fragment, `false` otherwise. **Default**: `true`. * @param options.search `true` if the serialized URL string should include the search query, **Default**: `true`. * @param options.unicode `true` if Unicode characters appearing in the host component of the URL string should be encoded directly as opposed to being Punycode encoded. **Default**: `false`. * @returns a customizable serialization of a URL `String` representation of a `WHATWG URL` object. */ function formatWhatwg(urlObject, options) { if (typeof urlObject === "string") { urlObject = new URL(urlObject); } if (options) { if (typeof options !== "object") { throw new ERR_INVALID_ARG_TYPE("options", "object", options); } } options = { auth: true, fragment: true, search: true, unicode: false, ...options }; let ret = urlObject.protocol; if (urlObject.host !== null) { ret += "//"; const hasUsername = !!urlObject.username; const hasPassword = !!urlObject.password; if (options.auth && (hasUsername || hasPassword)) { if (hasUsername) { ret += urlObject.username; } if (hasPassword) { ret += `:${urlObject.password}`; } ret += "@"; } ret += options.unicode ? domainToUnicode(urlObject.hostname) : urlObject.hostname; if (urlObject.port) { ret += `:${urlObject.port}`; } } ret += urlObject.pathname; if (options.search && urlObject.search) { ret += urlObject.search; } if (options.fragment && urlObject.hash) { ret += urlObject.hash; } return ret; } function isIpv6Hostname(hostname) { return hostname.charCodeAt(0) === CHAR_LEFT_SQUARE_BRACKET && hostname.charCodeAt(hostname.length - 1) === CHAR_RIGHT_SQUARE_BRACKET; } function getHostname(self, rest, hostname) { for(let i = 0; i < hostname.length; ++i){ const code = hostname.charCodeAt(i); const isValid = code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z || code === CHAR_DOT || code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z || code >= CHAR_0 && code <= CHAR_9 || code === CHAR_HYPHEN_MINUS || code === CHAR_PLUS || code === CHAR_UNDERSCORE || code > 127; // Invalid host character if (!isValid) { self.hostname = hostname.slice(0, i); return `/${hostname.slice(i)}${rest}`; } } return rest; } // Escaped characters. Use empty strings to fill up unused entries. // Using Array is faster than Object/Map // deno-fmt-ignore const escapedCodes = [ /* 0 - 9 */ "", "", "", "", "", "", "", "", "", "%09", /* 10 - 19 */ "%0A", "", "", "%0D", "", "", "", "", "", "", /* 20 - 29 */ "", "", "", "", "", "", "", "", "", "", /* 30 - 39 */ "", "", "%20", "", "%22", "", "", "", "", "%27", /* 40 - 49 */ "", "", "", "", "", "", "", "", "", "", /* 50 - 59 */ "", "", "", "", "", "", "", "", "", "", /* 60 - 69 */ "%3C", "", "%3E", "", "", "", "", "", "", "", /* 70 - 79 */ "", "", "", "", "", "", "", "", "", "", /* 80 - 89 */ "", "", "", "", "", "", "", "", "", "", /* 90 - 99 */ "", "", "%5C", "", "%5E", "", "%60", "", "", "", /* 100 - 109 */ "", "", "", "", "", "", "", "", "", "", /* 110 - 119 */ "", "", "", "", "", "", "", "", "", "", /* 120 - 125 */ "", "", "", "%7B", "%7C", "%7D" ]; // Automatically escape all delimiters and unwise characters from RFC 2396. // Also escape single quotes in case of an XSS attack. // Return the escaped string. function autoEscapeStr(rest) { let escaped = ""; let lastEscapedPos = 0; for(let i = 0; i < rest.length; ++i){ // `escaped` contains substring up to the last escaped character. const escapedChar = escapedCodes[rest.charCodeAt(i)]; if (escapedChar) { // Concat if there are ordinary characters in the middle. if (i > lastEscapedPos) { escaped += rest.slice(lastEscapedPos, i); } escaped += escapedChar; lastEscapedPos = i + 1; } } if (lastEscapedPos === 0) { // Nothing has been escaped. return rest; } // There are ordinary characters at the end. if (lastEscapedPos < rest.length) { escaped += rest.slice(lastEscapedPos); } return escaped; } /** * The url.urlParse() method takes a URL string, parses it, and returns a URL object. * * @see Tested in `parallel/test-url-parse-format.js`. * @param url The URL string to parse. * @param parseQueryString If `true`, the query property will always be set to an object returned by the querystring module's parse() method. If false, * the query property on the returned URL object will be an unparsed, undecoded string. Default: false. * @param slashesDenoteHost If `true`, the first token after the literal string // and preceding the next / will be interpreted as the host */ export function parse(url, parseQueryString, slashesDenoteHost) { if (url instanceof Url) return url; const urlObject = new Url(); urlObject.urlParse(url, parseQueryString, slashesDenoteHost); return urlObject; } /** The url.resolve() method resolves a target URL relative to a base URL in a manner similar to that of a Web browser resolving an anchor tag HREF. * @see https://nodejs.org/api/url.html#urlresolvefrom-to * @legacy */ export function resolve(from, to) { return parse(from, false, true).resolve(to); } export function resolveObject(source, relative) { if (!source) return relative; return parse(source, false, true).resolveObject(relative); } /** * The url.domainToASCII() takes an arbitrary domain and attempts to convert it into an IDN * * @param domain The domain to convert to an IDN * @see https://www.rfc-editor.org/rfc/rfc3490#section-4 */ export function domainToASCII(domain) { return toASCII(domain); } /** * The url.domainToUnicode() takes an IDN and attempts to convert it into unicode * * @param domain The IDN to convert to Unicode * @see https://www.rfc-editor.org/rfc/rfc3490#section-4 */ export function domainToUnicode(domain) { return toUnicode(domain); } /** * This function ensures the correct decodings of percent-encoded characters as well as ensuring a cross-platform valid absolute path string. * @see Tested in `parallel/test-fileurltopath.js`. * @param path The file URL string or URL object to convert to a path. * @returns The fully-resolved platform-specific Node.js file path. */ export function fileURLToPath(path) { if (typeof path === "string") path = new URL(path); else if (!(path instanceof URL)) { throw new ERR_INVALID_ARG_TYPE("path", [ "string", "URL" ], path); } if (path.protocol !== "file:") { throw new ERR_INVALID_URL_SCHEME("file"); } return isWindows ? getPathFromURLWin(path) : getPathFromURLPosix(path); } function getPathFromURLWin(url) { const hostname = url.hostname; let pathname = url.pathname; for(let n = 0; n < pathname.length; n++){ if (pathname[n] === "%") { const third = pathname.codePointAt(n + 2) | 0x20; if (pathname[n + 1] === "2" && third === 102 || // 2f 2F / pathname[n + 1] === "5" && third === 99 // 5c 5C \ ) { throw new ERR_INVALID_FILE_URL_PATH("must not include encoded \\ or / characters"); } } } pathname = pathname.replace(forwardSlashRegEx, "\\"); pathname = decodeURIComponent(pathname); if (hostname !== "") { // TODO(bartlomieju): add support for punycode encodings return `\\\\${hostname}${pathname}`; } else { // Otherwise, it's a local path that requires a drive letter const letter = pathname.codePointAt(1) | 0x20; const sep = pathname[2]; if (letter < CHAR_LOWERCASE_A || letter > CHAR_LOWERCASE_Z || // a..z A..Z sep !== ":") { throw new ERR_INVALID_FILE_URL_PATH("must be absolute"); } return pathname.slice(1); } } function getPathFromURLPosix(url) { if (url.hostname !== "") { throw new ERR_INVALID_FILE_URL_HOST(osType); } const pathname = url.pathname; for(let n = 0; n < pathname.length; n++){ if (pathname[n] === "%") { const third = pathname.codePointAt(n + 2) | 0x20; if (pathname[n + 1] === "2" && third === 102) { throw new ERR_INVALID_FILE_URL_PATH("must not include encoded / characters"); } } } return decodeURIComponent(pathname); } /** * The following characters are percent-encoded when converting from file path * to URL: * - %: The percent character is the only character not encoded by the * `pathname` setter. * - \: Backslash is encoded on non-windows platforms since it's a valid * character but the `pathname` setters replaces it by a forward slash. * - LF: The newline character is stripped out by the `pathname` setter. * (See whatwg/url#419) * - CR: The carriage return character is also stripped out by the `pathname` * setter. * - TAB: The tab character is also stripped out by the `pathname` setter. */ function encodePathChars(filepath) { if (filepath.includes("%")) { filepath = filepath.replace(percentRegEx, "%25"); } // In posix, backslash is a valid character in paths: if (!isWindows && filepath.includes("\\")) { filepath = filepath.replace(backslashRegEx, "%5C"); } if (filepath.includes("\n")) { filepath = filepath.replace(newlineRegEx, "%0A"); } if (filepath.includes("\r")) { filepath = filepath.replace(carriageReturnRegEx, "%0D"); } if (filepath.includes("\t")) { filepath = filepath.replace(tabRegEx, "%09"); } return filepath; } /** * This function ensures that `filepath` is resolved absolutely, and that the URL control characters are correctly encoded when converting into a File URL. * @see Tested in `parallel/test-url-pathtofileurl.js`. * @param filepath The file path string to convert to a file URL. * @returns The file URL object. */ export function pathToFileURL(filepath) { const outURL = new URL("file://"); if (isWindows && filepath.startsWith("\\\\")) { // UNC path format: \\server\share\resource const paths = filepath.split("\\"); if (paths.length <= 3) { throw new ERR_INVALID_ARG_VALUE("filepath", filepath, "Missing UNC resource path"); } const hostname = paths[2]; if (hostname.length === 0) { throw new ERR_INVALID_ARG_VALUE("filepath", filepath, "Empty UNC servername"); } outURL.hostname = domainToASCII(hostname); outURL.pathname = encodePathChars(paths.slice(3).join("/")); } else { let resolved = path.resolve(filepath); // path.resolve strips trailing slashes so we must add them back const filePathLast = filepath.charCodeAt(filepath.length - 1); if ((filePathLast === CHAR_FORWARD_SLASH || isWindows && filePathLast === CHAR_BACKWARD_SLASH) && resolved[resolved.length - 1] !== path.sep) { resolved += "/"; } outURL.pathname = encodePathChars(resolved); } return outURL; } /** * This utility function converts a URL object into an ordinary options object as expected by the `http.request()` and `https.request()` APIs. * @see Tested in `parallel/test-url-urltooptions.js`. * @param url The `WHATWG URL` object to convert to an options object. * @returns HttpOptions * @returns HttpOptions.protocol Protocol to use. * @returns HttpOptions.hostname A domain name or IP address of the server to issue the request to. * @returns HttpOptions.hash The fragment portion of the URL. * @returns HttpOptions.search The serialized query portion of the URL. * @returns HttpOptions.pathname The path portion of the URL. * @returns HttpOptions.path Request path. Should include query string if any. E.G. `'/index.html?page=12'`. An exception is thrown when the request path contains illegal characters. Currently, only spaces are rejected but that may change in the future. * @returns HttpOptions.href The serialized URL. * @returns HttpOptions.port Port of remote server. * @returns HttpOptions.auth Basic authentication i.e. `'user:password'` to compute an Authorization header. */ export function urlToHttpOptions(url) { const options = { protocol: url.protocol, hostname: typeof url.hostname === "string" && url.hostname.startsWith("[") ? url.hostname.slice(1, -1) : url.hostname, hash: url.hash, search: url.search, pathname: url.pathname, path: `${url.pathname || ""}${url.search || ""}`, href: url.href }; if (url.port !== "") { options.port = Number(url.port); } if (url.username || url.password) { options.auth = `${decodeURIComponent(url.username)}:${decodeURIComponent(url.password)}`; } return options; } const URLSearchParams_ = URLSearchParams; export { URLSearchParams_ as URLSearchParams }; export default { parse, format, resolve, resolveObject, domainToASCII, domainToUnicode, fileURLToPath, pathToFileURL, urlToHttpOptions, Url, URL, URLSearchParams };  Qa:node:urla bD`hM` T)` La5 T  I`t"ySb1IBBbBBB"B   y??????????????????????????Ib`,L`   ]`" ]`]`"( ]`* ]`' " ]`Z j]` + ]` &]` ]L`'` L`a` L`Bb` L`b2` L`B  ` L` ` L`a ` L`a -` L`B``  L`B` `  L`  `  L``  L`"] `  L`"]  L`  DIDcL`3 D""c7= Dc?E DcGN DBBcPc Dcey Dc{ D""c Dc D""c DV V c Dc DBBc Dc Dbbc Dc5 Dc7O DBBcQ_ Dcaq DBBcs Dc Dbbc Dc Dbbc Dc Dc DBBc Dc$ Dc&7 D""c9C DcEM DcO^ Dc`p Dcr Dc D""c Db b c0D D  cF[ D  c]v DB B cx D;;c D;;c DB B c  DBBc  Diic  Dbjbjc  DttcA J  D""cL R  Db+ c  D  c   D>>c   D  c`@b a? a? a?B a?;a?;a? a?"a?a?a?Ba?a?a?"a?a?"a?V a?a?Ba?a?ba?a?a?Ba?a?Ba?a?ba?a?ba?a?a?Ba?a?a?"a?a?a?a?a?a?"a? a?>a?ta?"a?ia?bja?b+ a?B a?Ba?2a?ba?a?B`a ?a ?a ? a?a?a a? a ?"] a ?aa?a?b@  T  I`:yyB b@  T I`y|b@  T I`:b@  T I` b@ T I`ܓ b@ T I`k b@Lb T I`5opb@a T I`\#B`b@ a  T I`Vb@a  T I`tb@a  T I`։ b@a T I` b@a T I`|ۍa b@a T I` b@a  T I`l"] b@c a GBbBB"b  `M`B `M`B `@M`b“ " "Bub ` MbB 4Sb @"bd???o  `T ``/ `/ `?  `  aoD]H ` aj ajaj-ajBaj]b T  I`|"!b  T I`Nobb Ճ T I`b T I`<b  T I`<Fb T I`FoBb T@`>8L`  B"Q,"Ib  2"`Kd  0 , 0 ( $ 0 i333333 3 333 3 3 (Sbqqb`Daob 0 0 0 0b   `M`~Ia Ib  II I! II ,IAII Ia!Bpb B`C-C CC CCa C C"] CbCB CBCB` a  "]   `DXh %%%%%% % % % % %%%%%%%%%%%%%%%ei e% h   z %z %z %z%z%z% z% z% z% z % ! { % i %! {% i%! {% i% %!{% i%z%z%01% e%!%"‚# $ % & e+ %' 2( 1{)%%0*1~+)0 3, 03-"0 3.$0 3/&030(031*032,0 33.0 34003 203403*6 1  e8s9'siI&̹s2 0 0 0 bA"!"""&"."! N!V!^!!!!!!!f!n!v!!!D`RD]DH xQ|X// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import * as types from "ext:deno_node/internal/util/types.ts"; export * from "ext:deno_node/internal/util/types.ts"; export default { ...types }; QbQMnode:util/typesa bD` M` TH`ILa) Laa   r"`Dk(h ei e h  )1 4Sb1Ib` L` " ]`b L`  DcL`` L` L` DDcW\]`a? a^"bAD`RD]DH IQE>'~// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { primordials } from "ext:core/mod.js"; const { ArrayIsArray, ArrayPrototypeJoin, Date, DatePrototypeGetDate, DatePrototypeGetHours, DatePrototypeGetMinutes, DatePrototypeGetMonth, DatePrototypeGetSeconds, ErrorPrototype, NumberPrototypeToString, ObjectDefineProperty, ObjectKeys, ObjectPrototypeIsPrototypeOf, ObjectPrototypeToString, ObjectSetPrototypeOf, ReflectApply, ReflectConstruct, SafeSet, SetPrototypeAdd, SetPrototypeHas, StringPrototypeIsWellFormed, StringPrototypePadStart, StringPrototypeToWellFormed } = primordials; import { promisify } from "ext:deno_node/internal/util.mjs"; import { callbackify } from "ext:deno_node/_util/_util_callbackify.js"; import { debuglog } from "ext:deno_node/internal/util/debuglog.ts"; import { format, formatWithOptions, inspect, stripVTControlCharacters } from "ext:deno_node/internal/util/inspect.mjs"; import { codes } from "ext:deno_node/internal/error_codes.ts"; import types from "node:util/types"; import { Buffer } from "node:buffer"; import { isDeepStrictEqual } from "ext:deno_node/internal/util/comparisons.ts"; import process from "node:process"; import { validateString } from "ext:deno_node/internal/validators.mjs"; import { parseArgs } from "ext:deno_node/internal/util/parse_args/parse_args.js"; export { callbackify, debuglog, format, formatWithOptions, inspect, parseArgs, promisify, stripVTControlCharacters, types }; /** @deprecated - use `Array.isArray()` instead. */ export const isArray = ArrayIsArray; /** @deprecated - use `typeof value === "boolean" instead. */ export function isBoolean(value) { return typeof value === "boolean"; } /** @deprecated - use `value === null` instead. */ export function isNull(value) { return value === null; } /** @deprecated - use `value === null || value === undefined` instead. */ export function isNullOrUndefined(value) { return value === null || value === undefined; } /** @deprecated - use `typeof value === "number" instead. */ export function isNumber(value) { return typeof value === "number"; } /** @deprecated - use `typeof value === "string" instead. */ export function isString(value) { return typeof value === "string"; } /** @deprecated - use `typeof value === "symbol"` instead. */ export function isSymbol(value) { return typeof value === "symbol"; } /** @deprecated - use `value === undefined` instead. */ export function isUndefined(value) { return value === undefined; } /** @deprecated - use `value !== null && typeof value === "object"` instead. */ export function isObject(value) { return value !== null && typeof value === "object"; } /** @deprecated - use `e instanceof Error` instead. */ export function isError(e) { return ObjectPrototypeToString(e) === "[object Error]" || ObjectPrototypeIsPrototypeOf(ErrorPrototype, e); } /** @deprecated - use `typeof value === "function"` instead. */ export function isFunction(value) { return typeof value === "function"; } /** @deprecated Use util.types.isRegExp() instead. */ export const isRegExp = types.isRegExp; /** @deprecated Use util.types.isDate() instead. */ export const isDate = types.isDate; /** @deprecated - use `value === null || (typeof value !== "object" && typeof value !== "function")` instead. */ export function isPrimitive(value) { return value === null || typeof value !== "object" && typeof value !== "function"; } /** @deprecated Use Buffer.isBuffer() instead. */ export const isBuffer = Buffer.isBuffer; /** @deprecated Use Object.assign() instead. */ export function _extend(target, source) { // Don't do anything if source isn't an object if (source === null || typeof source !== "object") return target; const keys = ObjectKeys(source); let i = keys.length; while(i--){ target[keys[i]] = source[keys[i]]; } return target; } /** * https://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor * @param ctor Constructor function which needs to inherit the prototype. * @param superCtor Constructor function to inherit prototype from. */ export function inherits(ctor, superCtor) { if (ctor === undefined || ctor === null) { throw new codes.ERR_INVALID_ARG_TYPE("ctor", "Function", ctor); } if (superCtor === undefined || superCtor === null) { throw new codes.ERR_INVALID_ARG_TYPE("superCtor", "Function", superCtor); } if (superCtor.prototype === undefined) { throw new codes.ERR_INVALID_ARG_TYPE("superCtor.prototype", "Object", superCtor.prototype); } ObjectDefineProperty(ctor, "super_", { value: superCtor, writable: true, configurable: true }); ObjectSetPrototypeOf(ctor.prototype, superCtor.prototype); } import { _TextDecoder, _TextEncoder, getSystemErrorName } from "ext:deno_node/_utils.ts"; export const TextDecoder = _TextDecoder; export const TextEncoder = _TextEncoder; export function toUSVString(str) { if (StringPrototypeIsWellFormed(str)) { return str; } return StringPrototypeToWellFormed(str); } function pad(n) { return StringPrototypePadStart(NumberPrototypeToString(n), 2, "0"); } const months = [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ]; /** * @returns 26 Feb 16:19:34 */ function timestamp() { const d = new Date(); const t = ArrayPrototypeJoin([ pad(DatePrototypeGetHours(d)), pad(DatePrototypeGetMinutes(d)), pad(DatePrototypeGetSeconds(d)) ], ":"); return `${DatePrototypeGetDate(d)} ${months[DatePrototypeGetMonth(d)]} ${t}`; } /** * Log is just a thin wrapper to console.log that prepends a timestamp * @deprecated */ // deno-lint-ignore no-explicit-any export function log(...args) { console.log("%s - %s", timestamp(), ReflectApply(format, undefined, args)); } // Keep a list of deprecation codes that have been warned on so we only warn on // each one once. const codesWarned = new SafeSet(); // Mark that a method should not be used. // Returns a modified function which warns once by default. // If --no-deprecation is set, then it is a no-op. // deno-lint-ignore no-explicit-any export function deprecate(fn, msg, code) { if (process.noDeprecation === true) { return fn; } if (code !== undefined) { validateString(code, "code"); } let warned = false; // deno-lint-ignore no-explicit-any function deprecated(...args) { if (!warned) { warned = true; if (code !== undefined) { if (!SetPrototypeHas(codesWarned, code)) { process.emitWarning(msg, "DeprecationWarning", code, deprecated); SetPrototypeAdd(codesWarned, code); } } else { // deno-lint-ignore no-explicit-any process.emitWarning(msg, "DeprecationWarning", deprecated); } } if (new.target) { return ReflectConstruct(fn, args, new.target); } return ReflectApply(fn, this, args); } // The wrapper will keep the same prototype as fn to maintain prototype chain ObjectSetPrototypeOf(deprecated, fn); if (fn.prototype) { // Setting this (rather than using Object.setPrototype, as above) ensures // that calling the unwrapped constructor gives an instanceof the wrapped // constructor. deprecated.prototype = fn.prototype; } return deprecated; } export { getSystemErrorName, isDeepStrictEqual }; export default { format, formatWithOptions, inspect, isArray, isBoolean, isNull, isNullOrUndefined, isNumber, isString, isSymbol, isUndefined, isObject, isError, isFunction, isRegExp, isDate, isPrimitive, isBuffer, _extend, getSystemErrorName, deprecate, callbackify, parseArgs, promisify, inherits, types, stripVTControlCharacters, TextDecoder, TextEncoder, toUSVString, log, debuglog, isDeepStrictEqual }; Qbng> node:utila bD`XM` TU`gLaDr T  I`!Sb1!aAb !IJEBEY_Bi!Zx?????????????????????????Ib~` BDBc@Q b Db c  DcSZ ADAc:K Dc   D cox 6D6c\t DcL`E` L`e` L`eB` L`Ba` L`a ` L` ` L`b3` L`b3` L``  L`B6`  L`B6`  L``  L``  L`a` L`a` L`` L`` L`B;` L`B;a` L`a` L`!` L`!` L`` L`]PL` D"{ "{ c Dc gs D!!c u Dc D" " c D  c Dc8> DBBc@Q Db b c  DcSZ DAAc:K Dc  DcT_ D* c  D  cox D66c\t Dc D  c `)a? a?a? a?a?Ba?a?6a?" a?a?"{ a?Aa?* a? a?a?b3a?a?a ?aa?a?aa?a?!a?a?a ?a ?B;a?B6a ?a?a ?aa?a?a?!a?b a?ea?Ba?a?a? a?a?"b @ T  I`Z"b@La7 T I`lb@a T I` b@a  T I`vab@a T I`6b@a T I`ab@a T I` A b@a T I` !b@a T I`' h b@a  T I` + b@ a  T I` b@ c   T I` Z b@ b   T I` ab@ a  Tp`03+@0 3,B03-D03.F03/H030J031L032N0 33P0 34R03T0 3 V035X0 3"Z036\0737^038`0939b0:3:d0;3;f03n03?p03@r03At0B3Bv0C3Cx 1 "4kzPPPPPPPP0 `2 0 0 0 0 0 0 0 0 0 0 "bA#$ $$$"$*$2$:$B$J$R$Z$v$"#~$$$D`RD]DH Q^ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { op_v8_cached_data_version_tag, op_v8_get_heap_statistics } from "ext:core/ops"; import { notImplemented } from "ext:deno_node/_utils.ts"; export function cachedDataVersionTag() { return op_v8_cached_data_version_tag(); } export function getHeapCodeStatistics() { notImplemented("v8.getHeapCodeStatistics"); } export function getHeapSnapshot() { notImplemented("v8.getHeapSnapshot"); } export function getHeapSpaceStatistics() { notImplemented("v8.getHeapSpaceStatistics"); } const buffer = new Float64Array(14); export function getHeapStatistics() { op_v8_get_heap_statistics(buffer); return { total_heap_size: buffer[0], total_heap_size_executable: buffer[1], total_physical_size: buffer[2], total_available_size: buffer[3], used_heap_size: buffer[4], heap_size_limit: buffer[5], malloced_memory: buffer[6], peak_malloced_memory: buffer[7], does_zap_garbage: buffer[8], number_of_native_contexts: buffer[9], number_of_detached_contexts: buffer[10], total_global_handles_size: buffer[11], used_global_handles_size: buffer[12], external_memory: buffer[13] }; } export function setFlagsFromString() { // NOTE(bartlomieju): From Node.js docs: // The v8.setFlagsFromString() method can be used to programmatically set V8 // command-line flags. This method should be used with care. Changing settings // after the VM has started may result in unpredictable behavior, including // crashes and data loss; or it may simply do nothing. // // Notice: "or it may simply do nothing". This is what we're gonna do, // this function will just be a no-op. } export function stopCoverage() { notImplemented("v8.stopCoverage"); } export function takeCoverage() { notImplemented("v8.takeCoverage"); } export function writeHeapSnapshot() { notImplemented("v8.writeHeapSnapshot"); } export function serialize() { notImplemented("v8.serialize"); } export function deserialize() { notImplemented("v8.deserialize"); } export class Serializer { constructor(){ notImplemented("v8.Serializer.prototype.constructor"); } } export class Deserializer { constructor(){ notImplemented("v8.Deserializer.prototype.constructor"); } } export class DefaultSerializer { constructor(){ notImplemented("v8.DefaultSerializer.prototype.constructor"); } } export class DefaultDeserializer { constructor(){ notImplemented("v8.DefaultDeserializer.prototype.constructor"); } } export const promiseHooks = { onInit () { notImplemented("v8.promiseHooks.onInit"); }, onSettled () { notImplemented("v8.promiseHooks.onSetttled"); }, onBefore () { notImplemented("v8.promiseHooks.onBefore"); }, createHook () { notImplemented("v8.promiseHooks.createHook"); } }; export default { cachedDataVersionTag, getHeapCodeStatistics, getHeapSnapshot, getHeapSpaceStatistics, getHeapStatistics, setFlagsFromString, stopCoverage, takeCoverage, writeHeapSnapshot, serialize, deserialize, Serializer, Deserializer, DefaultSerializer, DefaultDeserializer, promiseHooks };  Qab+Ynode:v8a bD`XM` T`MLa'$L`' T  I`a !Sb1I`?Ib `L` B]`P ]`]L`3` L`A'` L`A'&` L`&!&` L`!&%` L`%a ` L`a /` L`/!` L`!!`  L`!!"`  L`!""`  L`" `  L` .`  L`.a#` L`a#$` L`$$` L`$%` L`%]L`  Db b ciw D  c- D  c/H` a? a?b a?a a?!a?!a ?!"a ?"a ?a#a?$a?$a?%a?.a ?/a?%a?!&a?&a?A'a? a ?a?$b@a T I`H!$b@a  T  I`h!b@a  T I`!"b@a  T I`9y"b@a  T I`[a#b@a  T I`x$b@a T I`$b@a T I` =%b@ a T I`W.b@ a  T I`/b@ g a ]  `T ``/ `/ `?  `  a1 D] ` aj] T  I`/ %$$b    `T``/ `/ `?  `  a9 D] ` aj] T  I`[ !&$$b    `T``/ `/ `?  `  a  D] ` aj] T  I`  &$$b    `T``/ `/ `?  `  a# D] ` aj] T  I`L A'$$b  0b'CA(C(C" C T I` 'b ' T I` ? A(b  A( T I`L (b  ( T I` " b " b a C!C!C!"C"Ca#C$C$C%C.C/C%C!&C&CA'C Ca !!!""a#$$%./%!&&A'   $`D0h %ei h  !  i%e+ 1e+ 1  e+ 1  e+ 1~ )Ă333 3 1 ~ )03030 30 30 3030303030 3 03!"03"$03#&03$(03%*0 3&, 1 d.0`2 0 0 0 0 0bA$N%V%^%f%n%v%~%%%%%%%%& &&&D`RD]DH 9Q5+s\// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file no-explicit-any prefer-primordials import { core } from "ext:core/mod.js"; import { notImplemented } from "ext:deno_node/_utils.ts"; import { op_vm_run_in_new_context } from "ext:core/ops"; export class Script { code; constructor(code, _options = {}){ this.code = `${code}`; } runInThisContext(_options) { const [result, error] = core.evalContext(this.code, "data:"); if (error) { throw error.thrown; } return result; } runInContext(_contextifiedObject, _options) { notImplemented("Script.prototype.runInContext"); } runInNewContext(contextObject, options) { if (options) { console.warn("Script.runInNewContext options are currently not supported"); } return op_vm_run_in_new_context(this.code, contextObject); } createCachedData() { notImplemented("Script.prototyp.createCachedData"); } } export function createContext(_contextObject, _options) { notImplemented("createContext"); } export function createScript(code, options) { return new Script(code, options); } export function runInContext(_code, _contextifiedObject, _options) { notImplemented("runInContext"); } export function runInNewContext(code, contextObject, options) { if (options) { console.warn("vm.runInNewContext options are currently not supported"); } return op_vm_run_in_new_context(code, contextObject); } export function runInThisContext(code, options) { return createScript(code, options).runInThisContext(options); } export function isContext(_maybeContext) { // TODO(@littledivy): Currently we do not expose contexts so this is always false. return false; } export function compileFunction(_code, _params, _options) { notImplemented("compileFunction"); } export function measureMemory(_options) { notImplemented("measureMemory"); } export default { Script, createContext, createScript, runInContext, runInNewContext, runInThisContext, isContext, compileFunction, measureMemory };  Qa Inode:vma bD`DM` T|``La!pLa T  I`$eA,Sb1Ib\`L` bS]` ]`B]`U]L`` L`}` L`.` L`.A,` L`A,A-` L`A--` L`-A/` L`A/)` L`)*`  L`*!)`  L`!)]L`  D  c Db b c  D  c5M` a?b a? a?a?A,a?A-a?)a?*a ?!)a ?-a?.a?A/a?a?.&b@a T I`A-V&b@a T  I`")b@ a T I`B*b@ a  T I`q!)b@ a  T I`-b@ a  T I`#f.b@ a  T I`A/b@b a   `T ``/ `/ `?  `  alD]H ` aj!)aj)aj*aj+aj] T  I`}V&.&b Ճ T I`n!)b T I`})b  T I`*b T I`+b T$` L`q  '` Ka  b3(Sbqq`Day a b Xb }CA,CA-C)C*C!)C-C.CA/CA,A-)*!)-.A/ B&`DxPh ei h   e+ 2 1~ )03 030303 0 3 0 3 030303 1 V&b L.&bA&&' '''N&&&&&&&&D`RD]DH EQA ]v// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { core, internals } from "ext:core/mod.js"; import { op_require_read_closest_package_json } from "ext:core/ops"; import { isAbsolute, resolve } from "node:path"; import { notImplemented } from "ext:deno_node/_utils.ts"; import { EventEmitter, once } from "node:events"; import { BroadcastChannel } from "ext:deno_broadcast_channel/01_broadcast_channel.js"; import { MessageChannel, MessagePort } from "ext:deno_web/13_message_port.js"; let environmentData = new Map(); let threads = 0; const WHITESPACE_ENCODINGS = { "\u0009": "%09", "\u000A": "%0A", "\u000B": "%0B", "\u000C": "%0C", "\u000D": "%0D", "\u0020": "%20" }; function encodeWhitespace(string) { return string.replaceAll(/[\s]/g, (c)=>{ return WHITESPACE_ENCODINGS[c] ?? c; }); } function toFileUrlPosix(path) { if (!isAbsolute(path)) { throw new TypeError("Must be an absolute path."); } const url = new URL("file:///"); url.pathname = encodeWhitespace(path.replace(/%/g, "%25").replace(/\\/g, "%5C")); return url; } function toFileUrlWin32(path) { if (!isAbsolute(path)) { throw new TypeError("Must be an absolute path."); } const [, hostname, pathname] = path.match(/^(?:[/\\]{2}([^/\\]+)(?=[/\\](?:[^/\\]|$)))?(.*)/); const url = new URL("file:///"); url.pathname = encodeWhitespace(pathname.replace(/%/g, "%25")); if (hostname != null && hostname != "localhost") { url.hostname = hostname; if (!url.hostname) { throw new TypeError("Invalid hostname."); } } return url; } /** * Converts a path string to a file URL. * * ```ts * toFileUrl("/home/foo"); // new URL("file:///home/foo") * toFileUrl("\\home\\foo"); // new URL("file:///home/foo") * toFileUrl("C:\\Users\\foo"); // new URL("file:///C:/Users/foo") * toFileUrl("\\\\127.0.0.1\\home\\foo"); // new URL("file://127.0.0.1/home/foo") * ``` * @param path to convert to file URL */ function toFileUrl(path) { return core.build.os == "windows" ? toFileUrlWin32(path) : toFileUrlPosix(path); } const kHandle = Symbol("kHandle"); const PRIVATE_WORKER_THREAD_NAME = "$DENO_STD_NODE_WORKER_THREAD"; class _Worker extends EventEmitter { threadId; resourceLimits = { maxYoungGenerationSizeMb: -1, maxOldGenerationSizeMb: -1, codeRangeSizeMb: -1, stackSizeMb: 4 }; [kHandle]; postMessage; constructor(specifier, options){ super(); if (options?.eval === true) { specifier = `data:text/javascript,${specifier}`; } else if (typeof specifier === "string") { specifier = resolve(specifier); let pkg; try { pkg = op_require_read_closest_package_json(specifier); } catch (_) { // empty catch block when package json might not be present } if (!(specifier.toString().endsWith(".mjs") || pkg && pkg.exists && pkg.typ == "module")) { const cwdFileUrl = toFileUrl(Deno.cwd()); specifier = `data:text/javascript,(async function() {const { createRequire } = await import("node:module");const require = createRequire("${cwdFileUrl}");require("${specifier}");})();`; } else { specifier = toFileUrl(specifier); } } const handle = this[kHandle] = new Worker(specifier, { name: PRIVATE_WORKER_THREAD_NAME, type: "module" }); handle.addEventListener("error", (event)=>this.emit("error", event.error || event.message)); handle.addEventListener("messageerror", (event)=>this.emit("messageerror", event.data)); handle.addEventListener("message", (event)=>this.emit("message", event.data)); handle.postMessage({ environmentData, threadId: this.threadId = ++threads, workerData: options?.workerData }, options?.transferList || []); this.postMessage = handle.postMessage.bind(handle); this.emit("online"); } terminate() { this[kHandle].terminate(); this.emit("exit", 0); } getHeapSnapshot = ()=>notImplemented("Worker.prototype.getHeapSnapshot"); // fake performance performance = globalThis.performance; } export let isMainThread; export let resourceLimits; let threadId = 0; let workerData = null; // deno-lint-ignore no-explicit-any let parentPort = null; internals.__initWorkerThreads = ()=>{ isMainThread = // deno-lint-ignore no-explicit-any globalThis.name !== PRIVATE_WORKER_THREAD_NAME; defaultExport.isMainThread = isMainThread; // fake resourceLimits resourceLimits = isMainThread ? {} : { maxYoungGenerationSizeMb: 48, maxOldGenerationSizeMb: 2048, codeRangeSizeMb: 0, stackSizeMb: 4 }; defaultExport.resourceLimits = resourceLimits; if (!isMainThread) { // deno-lint-ignore no-explicit-any delete globalThis.name; // deno-lint-ignore no-explicit-any const listeners = new WeakMap(); parentPort = self; const initPromise = once(parentPort, "message").then((result)=>{ // TODO(kt3k): The below values are set asynchronously // using the first message from the parent. // This should be done synchronously. threadId = result[0].data.threadId; workerData = result[0].data.workerData; environmentData = result[0].data.environmentData; defaultExport.threadId = threadId; defaultExport.workerData = workerData; }); parentPort.off = parentPort.removeListener = function(name, listener) { this.removeEventListener(name, listeners.get(listener)); listeners.delete(listener); return this; }; parentPort.on = parentPort.addListener = function(name, listener) { initPromise.then(()=>{ // deno-lint-ignore no-explicit-any const _listener = (ev)=>listener(ev.data); listeners.set(listener, _listener); this.addEventListener(name, _listener); }); return this; }; parentPort.once = function(name, listener) { initPromise.then(()=>{ // deno-lint-ignore no-explicit-any const _listener = (ev)=>listener(ev.data); listeners.set(listener, _listener); this.addEventListener(name, _listener); }); return this; }; // mocks parentPort.setMaxListeners = ()=>{}; parentPort.getMaxListeners = ()=>Infinity; parentPort.eventNames = ()=>[ "" ]; parentPort.listenerCount = ()=>0; parentPort.emit = ()=>notImplemented("parentPort.emit"); parentPort.removeAllListeners = ()=>notImplemented("parentPort.removeAllListeners"); parentPort.addEventListener("offline", ()=>{ parentPort.emit("close"); }); } }; export function getEnvironmentData(key) { return environmentData.get(key); } export function setEnvironmentData(key, value) { if (value === undefined) { environmentData.delete(key); } else { environmentData.set(key, value); } } export const SHARE_ENV = Symbol.for("nodejs.worker_threads.SHARE_ENV"); export function markAsUntransferable() { notImplemented("markAsUntransferable"); } export function moveMessagePortToContext() { notImplemented("moveMessagePortToContext"); } export function receiveMessageOnPort() { notImplemented("receiveMessageOnPort"); } export { _Worker as Worker, BroadcastChannel, MessageChannel, MessagePort, parentPort, threadId, workerData }; const defaultExport = { markAsUntransferable, moveMessagePortToContext, receiveMessageOnPort, MessagePort, MessageChannel, BroadcastChannel, Worker: _Worker, getEnvironmentData, setEnvironmentData, SHARE_ENV, threadId, workerData, resourceLimits, parentPort, isMainThread }; export default defaultExport; Qc+]node:worker_threadsa bD`M`" T`vLa)K T  I`3Sb1 1!2234A56A7?i??????????Ibv`$L` bS]`'B]`o"( ]` ]`"]` /]`=0]`L`  Dc%5 Dc| bDbcL`'` L`C` L`C8` L`b2 AB` L`AB=` L`=D` L`DaE` L`aE>` L`>F`  L`F9`  L`9B`  L`B!9`  L`!9>`  L`>]4L`  Dc%5 D  c Dc| Dbbc D  c DBKBKc Db b c Db b c DBBc D  cCg D c` a?BKa? a?b a?a?b a? a?Ba?a?a?ba?8a?=a?9a ?!9a ?>a ?>a?ABa?Ba ?Ca?Da?aEa?Fa ?a?B'b@$ T I`4f'b@% T  I`A5b@& T I`6b@'dLf  T I`ABb@a T I`hBb@ b  T I`Db@!a  T I`.baEb!@ "a  T I`Fb@!#b a E@b a" !33Bb b 8$Sb @b?R   `T ``/ `/ `?  `  aR D]$ ` ajbVaj]  T  I`4 8N(B'b Ճ( T I`3bVb  ) T<`1(L`!90b:`:`A;`;`9 T !`H~!bK ,!  v(`KcKt 01 8h3~)3533 ! - 3(Sbqq8`Dau b L b * BK T  y`BK`?`xsIf'B'bK +?YDbDCaECFCbCCCb2 CABCBCCC!9C>C9C>C=CDaEFbb2 ABBC!9>9>=  V'`DHh %%%%%%% % % % ei h  !i% %~ )%!  b%  % %0 t%e+2  111 1 1 10Ă2 ! - ^1~)03030 303030303 03! 0 3""03#$0 3$&0 3%(0 3&*03',03(. %  1 d0 0 & 0 0 0 0 0bA^'D(((b(Dj((r((D"(*(2(:(B(D`RD]DH QB1T// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials class Context { constructor(){ throw new Error("Context is currently not supported"); } } export const WASI = Context; export default { WASI }; Qcvb^ext:deno_node/wasi.tsa bD`M` TT`e(La!Lba   `T ``/ `/ `?  `  aD] ` aj] T  I`F@Sb1IbT`] L`` L`G` L`G]`Ga?a?(b .bGCG  (`Dn8h ei h  e+ 1~)03 1 ( abA-(D`RD]DH QJSf // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { notImplemented } from "ext:deno_node/_utils.ts"; import { zlib as constants } from "ext:deno_node/internal_binding/constants.ts"; import { codes, createDeflate, createDeflateRaw, createGunzip, createGzip, createInflate, createInflateRaw, createUnzip, Deflate, deflate, DeflateRaw, deflateRaw, deflateRawSync, deflateSync, Gunzip, gunzip, gunzipSync, Gzip, gzip, gzipSync, Inflate, inflate, InflateRaw, inflateRaw, inflateRawSync, inflateSync, Unzip, unzip, unzipSync } from "ext:deno_node/_zlib.mjs"; import { brotliCompress, brotliCompressSync, brotliDecompress, brotliDecompressSync, createBrotliCompress, createBrotliDecompress } from "ext:deno_node/_brotli.js"; export class Options { constructor(){ notImplemented("Options.prototype.constructor"); } } export class BrotliOptions { constructor(){ notImplemented("BrotliOptions.prototype.constructor"); } } export class BrotliCompress { constructor(){ notImplemented("BrotliCompress.prototype.constructor"); } } export class BrotliDecompress { constructor(){ notImplemented("BrotliDecompress.prototype.constructor"); } } export class ZlibBase { constructor(){ notImplemented("ZlibBase.prototype.constructor"); } } export { constants }; export default { Options, BrotliOptions, BrotliCompress, BrotliDecompress, Deflate, DeflateRaw, Gunzip, Gzip, Inflate, InflateRaw, Unzip, ZlibBase, constants, codes, createBrotliCompress, createBrotliDecompress, createDeflate, createDeflateRaw, createGunzip, createGzip, createInflate, createInflateRaw, createUnzip, brotliCompress, brotliCompressSync, brotliDecompress, brotliDecompressSync, deflate, deflateSync, deflateRaw, deflateRawSync, gunzip, gunzipSync, gzip, gzipSync, inflate, inflateSync, inflateRaw, inflateRawSync, unzip, unzipSync }; export { brotliCompress, brotliCompressSync, brotliDecompress, brotliDecompressSync, codes, createBrotliCompress, createBrotliDecompress, createDeflate, createDeflateRaw, createGunzip, createGzip, createInflate, createInflateRaw, createUnzip, Deflate, deflate, DeflateRaw, deflateRaw, deflateRawSync, deflateSync, Gunzip, gunzip, gunzipSync, Gzip, gzip, gzipSync, Inflate, inflate, InflateRaw, inflateRaw, inflateRawSync, inflateSync, Unzip, unzip, unzipSync }; Qbz& node:zliba bD` M` T1`La8! Lfa   `T ``/ `/ `?  `  aPD] ` aj] T  I`NX-Sb1Ibf `L`  ]`j"} ]`AS]`.aW]`L`$  JDJcOV AKDAKcak AMDAMc NDNc AODAOc PDPc RDRc SDScR` aTDaTcbt UDUcv UDUc " D" c bD> c !VD!Vc VDVc aGDaGc GDGc aHDaHc HDHc aIDaIc!. IDIc0@ aJDaJcBM "D"cX_ KDKcmw ALDALcy LDLc MDMc NDNc Dc NDNc ODOc PDPc QDQc QDQc  aRDaRc RDRc&PL`` L`X` L`XaY` L`aYaX` L`aXX` L`XY` L`Y]L`% DJJcOV DAKAKcak DAMAMc DNNc DAOAOc DPPc DRRc DSScR` DaTaTcbt DUUcv DUUc D" " c Db> c D!V!Vc DVVc DaGaGc DGGc DaHaHc DHHc DaIaIc!. DIIc0@ DaJaJcBM D""cX_ DKKcmw DALALcy DLLc DMMc DNNc Dc DNNc DOOc DPPc DQQc DQQc  Db b cTb DaRaRc DRRc&`+b a?ba?" a?aGa?Ga?aHa?Ha?aIa?Ia?aJa?Ja?"a?AKa?Ka?ALa?La?AMa?Ma?Na?Na?a?Na?AOa?Oa?Pa?Pa?Qa?Qa?Ra?aRa?Ra?Sa?aTa?Ua?Ua?!Va?Va?Xa?aXa?Xa?aYa?Ya?a?)b 0  `T ``/ `/ `?  `  aXD] ` aj] T  I`{aXF))b 1  `T``/ `/ `?  `  a0D] ` aj] T  I`.XF))b 2  `T``/ `/ `?  `  a8D] ` aj] T  I`^aYF))b 3  `T``/ `/ `?  `  a D] ` aj] T  I`YF))b 4YbR)XCaXCXCaYCJCAKCAMCNCAOCPCRCYCbC" C!VCVCaGCGCaHCHCaICICaJCSCaTCUCUC"CLCKCALCMCNCCNCOCQCPCQCaRCRCXaXXaYJAKAMNAOPRYb" !VVaGGaHHaIIaJSaTUU"LKALMNNOQPQaRR  ")`D0h ei h  e+ 1e+ 1 e+ 1  e+ 1  e+ 1~)0303030303 03 03 03030303030303030303!0 3 #0!3!%0"3"'0#3#)0$3$+0%3%-0&3&/0'3'10(3(30)3)50*3*70+3+90,3,;0-3-=0.3.?0/3/A0030C0131E0232G0333I0434K0535M0636O0737Q 1 $gSbA/>)***+D`RD]DH Qq5 // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { inspect } from "ext:deno_node/internal/util/inspect.mjs"; // `debugImpls` and `testEnabled` are deliberately not initialized so any call // to `debuglog()` before `initializeDebugEnv()` is called will throw. let debugImpls; let testEnabled; // `debugEnv` is initial value of process.env.NODE_DEBUG function initializeDebugEnv(debugEnv) { debugImpls = Object.create(null); if (debugEnv) { // This is run before any user code, it's OK not to use primordials. debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replaceAll("*", ".*").replaceAll(",", "$|^"); const debugEnvRegex = new RegExp(`^${debugEnv}$`, "i"); testEnabled = (str)=>debugEnvRegex.exec(str) !== null; } else { testEnabled = ()=>false; } } // Emits warning when user sets // NODE_DEBUG=http or NODE_DEBUG=http2. function emitWarningIfNeeded(set) { if ("HTTP" === set || "HTTP2" === set) { console.warn("Setting the NODE_DEBUG environment variable " + "to '" + set.toLowerCase() + "' can expose sensitive " + "data (such as passwords, tokens and authentication headers) " + "in the resulting log."); } } const noop = ()=>{}; function debuglogImpl(enabled, set) { if (debugImpls[set] === undefined) { if (enabled) { emitWarningIfNeeded(set); debugImpls[set] = function debug(...args) { const msg = args.map((arg)=>inspect(arg)).join(" "); console.error("%s %s: %s", set, String(Deno.pid), msg); }; } else { debugImpls[set] = noop; } } return debugImpls[set]; } // debuglogImpl depends on process.pid and process.env.NODE_DEBUG, // so it needs to be called lazily in top scopes of internal modules // that may be loaded before these run time states are allowed to // be accessed. export function debuglog(set, cb) { function init() { set = set.toUpperCase(); enabled = testEnabled(set); } let debug = (...args)=>{ init(); // Only invokes debuglogImpl() when the debug function is // called for the first time. debug = debuglogImpl(enabled, set); if (typeof cb === "function") { cb(debug); } return debug(...args); }; let enabled; let test = ()=>{ init(); test = ()=>enabled; return enabled; }; const logger = (...args)=>debug(...args); Object.defineProperty(logger, "enabled", { get () { return test(); }, configurable: true, enumerable: true }); return logger; } let debugEnv; /* TODO(kt3k): enable initializing debugEnv. It's not possible to access env var when snapshotting. try { debugEnv = Deno.env.get("NODE_DEBUG") ?? ""; } catch (error) { if (error instanceof Deno.errors.PermissionDenied) { debugEnv = ""; } else { throw error; } } */ initializeDebugEnv(debugEnv); export default { debuglog }; Qe*{'ext:deno_node/internal/util/debuglog.tsa bD`HM` T\`u0La ; Tt`TL`)AZSb&@\`?tSb1AZZa]H^d?????Ib ` L` "$ ]`] L`` L` ` L` ] L`  Dc`a? a?a?PA\""Q"Q&* T  Z`Z>++bKZ T Z`ZB+bK  6+`Dv8!-^ % x%-z_ -  _ -  _!  x88 i% $ %(SbqAA[`DaUb@L Hb@7 T I`Vda]b@8 T I`b @^b@9L` TL`T4L` XSbqA "b{eR2???? `Da B+ T  I`U ++b @  T `d^ bK  T b{`| b{bK  T ^` ^bK"(bCGG T  I` ? ++b  +`Dl8 % %%%%%%%%!-~) 3 \  a 0b@ 6ba  T H`rxHB+bK:b C  *+`Dp0h %%ł%%%ei h  %%%b~)03  1  aLbA52+f+n++++D++++D++D`RD]DH Q`H/// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials // deno-lint-ignore camelcase import * as async_wrap from "ext:deno_node/internal_binding/async_wrap.ts"; import { ERR_ASYNC_CALLBACK } from "ext:deno_node/internal/errors.ts"; export { asyncIdSymbol, ownerSymbol } from "ext:deno_node/internal_binding/symbols.ts"; // Properties in active_hooks are used to keep track of the set of hooks being // executed in case another hook is enabled/disabled. The new set of hooks is // then restored once the active set of hooks is finished executing. // deno-lint-ignore camelcase const active_hooks = { // Array of all AsyncHooks that will be iterated whenever an async event // fires. Using var instead of (preferably const) in order to assign // active_hooks.tmp_array if a hook is enabled/disabled during hook // execution. array: [], // Use a counter to track nested calls of async hook callbacks and make sure // the active_hooks.array isn't altered mid execution. // deno-lint-ignore camelcase call_depth: 0, // Use to temporarily store and updated active_hooks.array if the user // enables or disables a hook while hooks are being processed. If a hook is // enabled() or disabled() during hook execution then the current set of // active hooks is duplicated and set equal to active_hooks.tmp_array. Any // subsequent changes are on the duplicated array. When all hooks have // completed executing active_hooks.tmp_array is assigned to // active_hooks.array. // deno-lint-ignore camelcase tmp_array: null, // Keep track of the field counts held in active_hooks.tmp_array. Because the // async_hook_fields can't be reassigned, store each uint32 in an array that // is written back to async_hook_fields when active_hooks.array is restored. // deno-lint-ignore camelcase tmp_fields: null }; export const registerDestroyHook = async_wrap.registerDestroyHook; const { async_hook_fields, // deno-lint-ignore camelcase asyncIdFields: async_id_fields, newAsyncId, constants } = async_wrap; export { newAsyncId }; const { kInit, kBefore, kAfter, kDestroy, kPromiseResolve, kTotals, kCheck, kDefaultTriggerAsyncId, kStackLength } = constants; // deno-lint-ignore camelcase const resource_symbol = Symbol("resource"); // deno-lint-ignore camelcase export const async_id_symbol = Symbol("trigger_async_id"); // deno-lint-ignore camelcase export const trigger_async_id_symbol = Symbol("trigger_async_id"); // deno-lint-ignore camelcase export const init_symbol = Symbol("init"); // deno-lint-ignore camelcase export const before_symbol = Symbol("before"); // deno-lint-ignore camelcase export const after_symbol = Symbol("after"); // deno-lint-ignore camelcase export const destroy_symbol = Symbol("destroy"); // deno-lint-ignore camelcase export const promise_resolve_symbol = Symbol("promiseResolve"); export const symbols = { // deno-lint-ignore camelcase async_id_symbol, // deno-lint-ignore camelcase trigger_async_id_symbol, // deno-lint-ignore camelcase init_symbol, // deno-lint-ignore camelcase before_symbol, // deno-lint-ignore camelcase after_symbol, // deno-lint-ignore camelcase destroy_symbol, // deno-lint-ignore camelcase promise_resolve_symbol }; // deno-lint-ignore no-explicit-any function lookupPublicResource(resource) { if (typeof resource !== "object" || resource === null) return resource; // TODO(addaleax): Merge this with owner_symbol and use it across all // AsyncWrap instances. const publicResource = resource[resource_symbol]; if (publicResource !== undefined) { return publicResource; } return resource; } // Used by C++ to call all init() callbacks. Because some state can be setup // from C++ there's no need to perform all the same operations as in // emitInitScript. function emitInitNative(asyncId, // deno-lint-ignore no-explicit-any type, triggerAsyncId, // deno-lint-ignore no-explicit-any resource) { active_hooks.call_depth += 1; resource = lookupPublicResource(resource); // Use a single try/catch for all hooks to avoid setting up one per iteration. try { for(let i = 0; i < active_hooks.array.length; i++){ if (typeof active_hooks.array[i][init_symbol] === "function") { active_hooks.array[i][init_symbol](asyncId, type, triggerAsyncId, resource); } } } catch (e) { throw e; } finally{ active_hooks.call_depth -= 1; } // Hooks can only be restored if there have been no recursive hook calls. // Also the active hooks do not need to be restored if enable()/disable() // weren't called during hook execution, in which case active_hooks.tmp_array // will be null. if (active_hooks.call_depth === 0 && active_hooks.tmp_array !== null) { restoreActiveHooks(); } } function getHookArrays() { if (active_hooks.call_depth === 0) { return [ active_hooks.array, async_hook_fields ]; } // If this hook is being enabled while in the middle of processing the array // of currently active hooks then duplicate the current set of active hooks // and store this there. This shouldn't fire until the next time hooks are // processed. if (active_hooks.tmp_array === null) { storeActiveHooks(); } return [ active_hooks.tmp_array, active_hooks.tmp_fields ]; } function storeActiveHooks() { active_hooks.tmp_array = active_hooks.array.slice(); // Don't want to make the assumption that kInit to kDestroy are indexes 0 to // 4. So do this the long way. active_hooks.tmp_fields = []; copyHooks(active_hooks.tmp_fields, async_hook_fields); } function copyHooks(destination, source) { destination[kInit] = source[kInit]; destination[kBefore] = source[kBefore]; destination[kAfter] = source[kAfter]; destination[kDestroy] = source[kDestroy]; destination[kPromiseResolve] = source[kPromiseResolve]; } // Then restore the correct hooks array in case any hooks were added/removed // during hook callback execution. function restoreActiveHooks() { active_hooks.array = active_hooks.tmp_array; copyHooks(async_hook_fields, active_hooks.tmp_fields); active_hooks.tmp_array = null; active_hooks.tmp_fields = null; } // deno-lint-ignore no-unused-vars let wantPromiseHook = false; function enableHooks() { async_hook_fields[kCheck] += 1; // TODO(kt3k): Uncomment this // setCallbackTrampoline(callbackTrampoline); } function disableHooks() { async_hook_fields[kCheck] -= 1; wantPromiseHook = false; // TODO(kt3k): Uncomment the below // setCallbackTrampoline(); // Delay the call to `disablePromiseHook()` because we might currently be // between the `before` and `after` calls of a Promise. // TODO(kt3k): Uncomment the below // enqueueMicrotask(disablePromiseHookIfNecessary); } // Return the triggerAsyncId meant for the constructor calling it. It's up to // the user to safeguard this call and make sure it's zero'd out when the // constructor is complete. export function getDefaultTriggerAsyncId() { const defaultTriggerAsyncId = async_id_fields[async_wrap.UidFields.kDefaultTriggerAsyncId]; // If defaultTriggerAsyncId isn't set, use the executionAsyncId if (defaultTriggerAsyncId < 0) { return async_id_fields[async_wrap.UidFields.kExecutionAsyncId]; } return defaultTriggerAsyncId; } export function defaultTriggerAsyncIdScope(triggerAsyncId, // deno-lint-ignore no-explicit-any block, ...args) { if (triggerAsyncId === undefined) { return block.apply(null, args); } // CHECK(NumberIsSafeInteger(triggerAsyncId)) // CHECK(triggerAsyncId > 0) const oldDefaultTriggerAsyncId = async_id_fields[kDefaultTriggerAsyncId]; async_id_fields[kDefaultTriggerAsyncId] = triggerAsyncId; try { return block.apply(null, args); } finally{ async_id_fields[kDefaultTriggerAsyncId] = oldDefaultTriggerAsyncId; } } function hasHooks(key) { return async_hook_fields[key] > 0; } export function enabledHooksExist() { return hasHooks(kCheck); } export function initHooksExist() { return hasHooks(kInit); } export function afterHooksExist() { return hasHooks(kAfter); } export function destroyHooksExist() { return hasHooks(kDestroy); } export function promiseResolveHooksExist() { return hasHooks(kPromiseResolve); } function emitInitScript(asyncId, // deno-lint-ignore no-explicit-any type, triggerAsyncId, // deno-lint-ignore no-explicit-any resource) { // Short circuit all checks for the common case. Which is that no hooks have // been set. Do this to remove performance impact for embedders (and core). if (!hasHooks(kInit)) { return; } if (triggerAsyncId === null) { triggerAsyncId = getDefaultTriggerAsyncId(); } emitInitNative(asyncId, type, triggerAsyncId, resource); } export { emitInitScript as emitInit }; export function hasAsyncIdStack() { return hasHooks(kStackLength); } export { constants }; export class AsyncHook { [init_symbol]; [before_symbol]; [after_symbol]; [destroy_symbol]; [promise_resolve_symbol]; constructor({ init, before, after, destroy, promiseResolve }){ if (init !== undefined && typeof init !== "function") { throw new ERR_ASYNC_CALLBACK("hook.init"); } if (before !== undefined && typeof before !== "function") { throw new ERR_ASYNC_CALLBACK("hook.before"); } if (after !== undefined && typeof after !== "function") { throw new ERR_ASYNC_CALLBACK("hook.after"); } if (destroy !== undefined && typeof destroy !== "function") { throw new ERR_ASYNC_CALLBACK("hook.destroy"); } if (promiseResolve !== undefined && typeof promiseResolve !== "function") { throw new ERR_ASYNC_CALLBACK("hook.promiseResolve"); } this[init_symbol] = init; this[before_symbol] = before; this[after_symbol] = after; this[destroy_symbol] = destroy; this[promise_resolve_symbol] = promiseResolve; } enable() { // The set of callbacks for a hook should be the same regardless of whether // enable()/disable() are run during their execution. The following // references are reassigned to the tmp arrays if a hook is currently being // processed. // deno-lint-ignore camelcase const { 0: hooks_array, 1: hook_fields } = getHookArrays(); // Each hook is only allowed to be added once. if (hooks_array.includes(this)) { return this; } // deno-lint-ignore camelcase const prev_kTotals = hook_fields[kTotals]; // createHook() has already enforced that the callbacks are all functions, // so here simply increment the count of whether each callbacks exists or // not. hook_fields[kTotals] = hook_fields[kInit] += +!!this[init_symbol]; hook_fields[kTotals] += hook_fields[kBefore] += +!!this[before_symbol]; hook_fields[kTotals] += hook_fields[kAfter] += +!!this[after_symbol]; hook_fields[kTotals] += hook_fields[kDestroy] += +!!this[destroy_symbol]; hook_fields[kTotals] += hook_fields[kPromiseResolve] += +!!this[promise_resolve_symbol]; hooks_array.push(this); if (prev_kTotals === 0 && hook_fields[kTotals] > 0) { enableHooks(); } // TODO(kt3k): Uncomment the below // updatePromiseHookMode(); return this; } disable() { // deno-lint-ignore camelcase const { 0: hooks_array, 1: hook_fields } = getHookArrays(); const index = hooks_array.indexOf(this); if (index === -1) { return this; } // deno-lint-ignore camelcase const prev_kTotals = hook_fields[kTotals]; hook_fields[kTotals] = hook_fields[kInit] -= +!!this[init_symbol]; hook_fields[kTotals] += hook_fields[kBefore] -= +!!this[before_symbol]; hook_fields[kTotals] += hook_fields[kAfter] -= +!!this[after_symbol]; hook_fields[kTotals] += hook_fields[kDestroy] -= +!!this[destroy_symbol]; hook_fields[kTotals] += hook_fields[kPromiseResolve] -= +!!this[promise_resolve_symbol]; hooks_array.splice(index, 1); if (prev_kTotals > 0 && hook_fields[kTotals] === 0) { disableHooks(); } return this; } } QehM%ext:deno_node/internal/async_hooks.tsa bD`dM` T-`La3 T  I` AmSb1^a`c!db deaeeAffgg!hAmanoappAoaqqar!uw????????????????????????Ib/`L` b]`A ]`a_]`L`  " D" c  D cL`? ` L` v` L`v!k` L`!k ` L` j` L`jb` L`b ` L` !w` L`!wk`  L`kax`  L`xu`  L`ur`  L`rAy`  L`Ay!v` L`!v!j` L`!jb` L`bw` L`w!l` L`!lab` L`ab"` L`"i` L`i L` D^Dc1; L` D  cz` a?aba?ba?ba? a?ia?!ja?ja?!ka?ka ?!la?"a?ra ? a?ua ?!va?va?!wa?wa?axa ?Aya ? a?+b@E T I`_an,b@F T I`vtob@G T I`apb@H T I`pb@I T I`*Aob@J T I`0qb@K T I`arb@L T I`R!ub@ MLk'  T I`#rb!@ <a  T I`N@ b#@ =a T I`ub@ >a  T I` !vb@ ?a T I`" C vb@@a T I`e !wb@Aa T I` wb!@Ba T I` "axb@Ca  T I`#.#Ayb@Db a 0b-  `]``aaFaFabccbbb deaeeAffgg hi b   lHb CiC!jCjC!kCkC!lC i!jj!kk!lDSb @mBEEf?????L#/  ` T ``/ `/ `?  `  aL#/D]0 ` ajb aj aj ] T  I`#.' :-+b ՃN T I`7'X,b bO T I`b,/ bP T8`/]  j-`Kc DLHP _g55555(Sbqq `Da\#/ a 4 4bQ  ,`Dph %%%%%% % % % % %%%%%%%%%%%% % ei e% h   ~ %-1-%-%-1- 10- %- %-% -% -% -% -% -%-%!b%!b!1!b#1!b%1! b'1!!b)1!"b+1 !#b-1~$/)03%003&203'403(603)80 3*:03+< 1%,%%%%%. -0t%0t%0t%0 t%0t%/ 0 e+ 1 22> 1 , f@     & 0 0 ,+bA;,,,,,,,,,,,,,----&-N-V-^-f-D`RD]DH QK!// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { primordials } from "ext:core/mod.js"; const { ArrayPrototypeIncludes, ArrayPrototypeJoin, } = primordials; import { codes } from "ext:deno_node/internal/error_codes.ts"; import { hideStackFrames } from "ext:deno_node/internal/hide_stack_frames.ts"; import { isArrayBufferView } from "ext:deno_node/internal/util/types.ts"; import { normalizeEncoding } from "ext:deno_node/internal/normalize_encoding.mjs"; /** * @param {number} value * @returns {boolean} */ function isInt32(value) { return value === (value | 0); } /** * @param {unknown} value * @returns {boolean} */ function isUint32(value) { return value === (value >>> 0); } const octalReg = /^[0-7]+$/; const modeDesc = "must be a 32-bit unsigned integer or an octal string"; /** * Parse and validate values that will be converted into mode_t (the S_* * constants). Only valid numbers and octal strings are allowed. They could be * converted to 32-bit unsigned integers or non-negative signed integers in the * C++ land, but any value higher than 0o777 will result in platform-specific * behaviors. * * @param {*} value Values to be validated * @param {string} name Name of the argument * @param {number} [def] If specified, will be returned for invalid values * @returns {number} */ function parseFileMode(value, name, def) { value ??= def; if (typeof value === "string") { if (!octalReg.test(value)) { throw new codes.ERR_INVALID_ARG_VALUE(name, value, modeDesc); } value = Number.parseInt(value, 8); } validateInt32(value, name, 0, 2 ** 32 - 1); return value; } const validateBuffer = hideStackFrames((buffer, name = "buffer") => { if (!isArrayBufferView(buffer)) { throw new codes.ERR_INVALID_ARG_TYPE( name, ["Buffer", "TypedArray", "DataView"], buffer, ); } }); const validateInteger = hideStackFrames( ( value, name, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER, ) => { if (typeof value !== "number") { throw new codes.ERR_INVALID_ARG_TYPE(name, "number", value); } if (!Number.isInteger(value)) { throw new codes.ERR_OUT_OF_RANGE(name, "an integer", value); } if (value < min || value > max) { throw new codes.ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value); } }, ); /** * @param {unknown} value * @param {string} name * @param {{ * allowArray?: boolean, * allowFunction?: boolean, * nullable?: boolean * }} [options] */ const validateObject = hideStackFrames((value, name, options) => { const useDefaultOptions = options == null; const allowArray = useDefaultOptions ? false : options.allowArray; const allowFunction = useDefaultOptions ? false : options.allowFunction; const nullable = useDefaultOptions ? false : options.nullable; if ( (!nullable && value === null) || (!allowArray && Array.isArray(value)) || (typeof value !== "object" && ( !allowFunction || typeof value !== "function" )) ) { throw new codes.ERR_INVALID_ARG_TYPE(name, "Object", value); } }); const validateInt32 = hideStackFrames( (value, name, min = -2147483648, max = 2147483647) => { // The defaults for min and max correspond to the limits of 32-bit integers. if (!isInt32(value)) { if (typeof value !== "number") { throw new codes.ERR_INVALID_ARG_TYPE(name, "number", value); } if (!Number.isInteger(value)) { throw new codes.ERR_OUT_OF_RANGE(name, "an integer", value); } throw new codes.ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value); } if (value < min || value > max) { throw new codes.ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value); } }, ); const validateUint32 = hideStackFrames( (value, name, positive) => { if (!isUint32(value)) { if (typeof value !== "number") { throw new codes.ERR_INVALID_ARG_TYPE(name, "number", value); } if (!Number.isInteger(value)) { throw new codes.ERR_OUT_OF_RANGE(name, "an integer", value); } const min = positive ? 1 : 0; // 2 ** 32 === 4294967296 throw new codes.ERR_OUT_OF_RANGE( name, `>= ${min} && < 4294967296`, value, ); } if (positive && value === 0) { throw new codes.ERR_OUT_OF_RANGE(name, ">= 1 && < 4294967296", value); } }, ); /** * @param {unknown} value * @param {string} name */ function validateString(value, name) { if (typeof value !== "string") { throw new codes.ERR_INVALID_ARG_TYPE(name, "string", value); } } /** * @param {unknown} value * @param {string} name */ function validateNumber(value, name) { if (typeof value !== "number") { throw new codes.ERR_INVALID_ARG_TYPE(name, "number", value); } } /** * @param {unknown} value * @param {string} name */ function validateBoolean(value, name) { if (typeof value !== "boolean") { throw new codes.ERR_INVALID_ARG_TYPE(name, "boolean", value); } } /** * @param {unknown} value * @param {string} name * @param {unknown[]} oneOf */ const validateOneOf = hideStackFrames( (value, name, oneOf) => { if (!Array.prototype.includes.call(oneOf, value)) { const allowed = Array.prototype.join.call( Array.prototype.map.call( oneOf, (v) => (typeof v === "string" ? `'${v}'` : String(v)), ), ", ", ); const reason = "must be one of: " + allowed; throw new codes.ERR_INVALID_ARG_VALUE(name, value, reason); } }, ); export function validateEncoding(data, encoding) { const normalizedEncoding = normalizeEncoding(encoding); const length = data.length; if (normalizedEncoding === "hex" && length % 2 !== 0) { throw new codes.ERR_INVALID_ARG_VALUE( "encoding", encoding, `is invalid for data of length ${length}`, ); } } // Check that the port number is not NaN when coerced to a number, // is an integer and that it falls within the legal range of port numbers. /** * @param {string} name * @returns {number} */ function validatePort(port, name = "Port", allowZero = true) { if ( (typeof port !== "number" && typeof port !== "string") || (typeof port === "string" && String.prototype.trim.call(port).length === 0) || +port !== (+port >>> 0) || port > 0xFFFF || (port === 0 && !allowZero) ) { throw new codes.ERR_SOCKET_BAD_PORT(name, port, allowZero); } return port; } /** * @param {unknown} signal * @param {string} name */ const validateAbortSignal = hideStackFrames( (signal, name) => { if ( signal !== undefined && (signal === null || typeof signal !== "object" || !("aborted" in signal)) ) { throw new codes.ERR_INVALID_ARG_TYPE(name, "AbortSignal", signal); } }, ); /** * @param {unknown} value * @param {string} name */ const validateFunction = hideStackFrames( (value, name) => { if (typeof value !== "function") { throw new codes.ERR_INVALID_ARG_TYPE(name, "Function", value); } }, ); /** * @param {unknown} value * @param {string} name */ const validateArray = hideStackFrames( (value, name, minLength = 0) => { if (!Array.isArray(value)) { throw new codes.ERR_INVALID_ARG_TYPE(name, "Array", value); } if (value.length < minLength) { const reason = `must be longer than ${minLength}`; throw new codes.ERR_INVALID_ARG_VALUE(name, value, reason); } }, ); function validateUnion(value, name, union) { if (!ArrayPrototypeIncludes(union, value)) { throw new ERR_INVALID_ARG_TYPE( name, `('${ArrayPrototypeJoin(union, "|")}')`, value, ); } } export default { isInt32, isUint32, parseFileMode, validateAbortSignal, validateArray, validateBoolean, validateBuffer, validateFunction, validateInt32, validateInteger, validateNumber, validateObject, validateOneOf, validatePort, validateString, validateUint32, validateUnion, }; export { isInt32, isUint32, parseFileMode, validateAbortSignal, validateArray, validateBoolean, validateBuffer, validateFunction, validateInt32, validateInteger, validateNumber, validateObject, validateOneOf, validatePort, validateString, validateUint32, validateUnion, }; QeJ%ext:deno_node/internal/validators.mjsa bD`XM` T`vLa%-L`% T(` ]  -`Dc Jm(SbqA `Da iSb1c!{a|c????Ib!`L` bS]`% ]` ]`" ]`2b]`|]L`9` L` ` L` A{` L`A{}` L`}B ` L`B !` L`! ` L` ^ ` L`^ `  L` `  L` "/ `  L`"/ "[ `  L`"[  `  L`  ` L` " ` L`"  ` L`  ` L` ^ ` L`^ ` L`]L`  D" " c D" " c D"3"3c* DBBcct Dc`a?" a?" a?"3a?Ba? a?A{a?}a?^ a?"[ a ? a?"/ a ?^ a? a? a ? a?" a?a ? a?B a? a ?!a?a?a? a0-b@Sa  T  I`kA{-b@Ta  T I`=}b@Uf    T4`$L`" b   V.`Df   0- i(SbqA `Daq a-b@ Va  T  I`= -b@ Wa  T I`  b@ Xb T I`b@Ya  T I`D b@Zd  T I`Qb@[ba c!||"  T I`f%IbK\ T I`T IbK] T I`  IbK^ T`,L` " b B" a~"b  .`D@(        0b 0- i!-^ 0-  i0-  x88 x8 i n o20-  x88 x8 i(SbbpVI`Da3 b@@ FH-bK_ T  I`I-bK` T``~4L` :1< T I`IbK !"    .`Dq@ !---_c!-- - !---‚__ 80 -  i(SbbpWI`DacPPP -bK a T  I`I-bKb T4`$L`" b i  .`Df   0- i(SbbpWI`Da a-bKc T  I`5I-bKdb" CA{C}CB C!C C^ C C"/ C"[ C C C" C C C^ CC A{}B ! ^  "/ "[   "   ^  -`D h %%%%ei h  0-%-%z%%0 Ă b10Ă b1 0Ă b 10Ă b 1 0Ăb 10Ăb10Ăb10Ăb1 0Ăb1~)0303030303 03"03$0 3&0 3(0 3*0 3,03.03 003!203"403#603$8 1 e:0 & 0 0 0 0 0 0bAR-B.J......R.j.r...z.... /.D`RD]DH QY=t// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. import { ERR_INTERNAL_ASSERTION } from "ext:deno_node/internal/errors.ts"; function assert(value, message) { if (!value) { throw new ERR_INTERNAL_ASSERTION(message); } } function fail(message) { throw new ERR_INTERNAL_ASSERTION(message); } assert.fail = fail; export default assert; QeSi !ext:deno_node/internal/assert.mjsa bD`M` TH`O$La+ T  I` @Sb1Ibt` L`  ]`r]L`` L`] L`  D"E"EcTj`"Ea?a?/b@f T I` F B/b @g Laa    2/`Dk0h Ƃłei h  2 1  a bAe:/b/D`RD]DH  Q c// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { TextDecoder, TextEncoder } from "ext:deno_web/08_text_encoding.js"; import { errorMap } from "ext:deno_node/internal_binding/uv.ts"; import { codes } from "ext:deno_node/internal/error_codes.ts"; export function notImplemented(msg) { const message = msg ? `Not implemented: ${msg}` : "Not implemented"; throw new Error(message); } export function warnNotImplemented(msg) { const message = msg ? `Warning: Not implemented: ${msg}` : "Warning: Not implemented"; console.warn(message); } export const _TextDecoder = TextDecoder; export const _TextEncoder = TextEncoder; export function intoCallbackAPI(// deno-lint-ignore no-explicit-any func, cb, // deno-lint-ignore no-explicit-any ...args) { func(...args).then((value)=>cb && cb(null, value), (err)=>cb && cb(err)); } export function intoCallbackAPIWithIntercept(// deno-lint-ignore no-explicit-any func, interceptor, cb, // deno-lint-ignore no-explicit-any ...args) { func(...args).then((value)=>cb && cb(null, interceptor(value)), (err)=>cb && cb(err)); } export function spliceOne(list, index) { for(; index + 1 < list.length; index++)list[index] = list[index + 1]; list.pop(); } // Taken from: https://github.com/nodejs/node/blob/ba684805b6c0eded76e5cd89ee00328ac7a59365/lib/internal/util.js#L125 // Return undefined if there is no match. // Move the "slow cases" to a separate function to make sure this function gets // inlined properly. That prioritizes the common case. export function normalizeEncoding(enc) { if (enc == null || enc === "utf8" || enc === "utf-8") return "utf8"; return slowCases(enc); } // https://github.com/nodejs/node/blob/ba684805b6c0eded76e5cd89ee00328ac7a59365/lib/internal/util.js#L130 function slowCases(enc) { switch(enc.length){ case 4: if (enc === "UTF8") return "utf8"; if (enc === "ucs2" || enc === "UCS2") return "utf16le"; enc = `${enc}`.toLowerCase(); if (enc === "utf8") return "utf8"; if (enc === "ucs2") return "utf16le"; break; case 3: if (enc === "hex" || enc === "HEX" || `${enc}`.toLowerCase() === "hex") { return "hex"; } break; case 5: if (enc === "ascii") return "ascii"; if (enc === "ucs-2") return "utf16le"; if (enc === "UTF-8") return "utf8"; if (enc === "ASCII") return "ascii"; if (enc === "UCS-2") return "utf16le"; enc = `${enc}`.toLowerCase(); if (enc === "utf-8") return "utf8"; if (enc === "ascii") return "ascii"; if (enc === "ucs-2") return "utf16le"; break; case 6: if (enc === "base64") return "base64"; if (enc === "latin1" || enc === "binary") return "latin1"; if (enc === "BASE64") return "base64"; if (enc === "LATIN1" || enc === "BINARY") return "latin1"; enc = `${enc}`.toLowerCase(); if (enc === "base64") return "base64"; if (enc === "latin1" || enc === "binary") return "latin1"; break; case 7: if (enc === "utf16le" || enc === "UTF16LE" || `${enc}`.toLowerCase() === "utf16le") { return "utf16le"; } break; case 8: if (enc === "utf-16le" || enc === "UTF-16LE" || `${enc}`.toLowerCase() === "utf-16le") { return "utf16le"; } break; default: if (enc === "") return "utf8"; } } export function validateIntegerRange(value, name, min = -2147483648, max = 2147483647) { // The defaults for min and max correspond to the limits of 32-bit integers. if (!Number.isInteger(value)) { throw new Error(`${name} must be 'an integer' but was ${value}`); } if (value < min || value > max) { throw new Error(`${name} must be >= ${min} && <= ${max}. Value was ${value}`); } } export function once(callback) { let called = false; return function(...args) { if (called) return; called = true; callback.apply(this, args); }; } export function makeMethodsEnumerable(klass) { const proto = klass.prototype; for (const key of Object.getOwnPropertyNames(proto)){ const value = proto[key]; if (typeof value === "function") { const desc = Reflect.getOwnPropertyDescriptor(proto, key); if (desc) { desc.enumerable = true; Object.defineProperty(proto, key, desc); } } } } const NumberIsSafeInteger = Number.isSafeInteger; /** * Returns a system error name from an error code number. * @param code error code number */ export function getSystemErrorName(code) { if (typeof code !== "number") { throw new codes.ERR_INVALID_ARG_TYPE("err", "number", code); } if (code >= 0 || !NumberIsSafeInteger(code)) { throw new codes.ERR_OUT_OF_RANGE("err", "a negative integer", code); } return errorMap.get(code)?.[0]; } Qcext:deno_node/_utils.tsa bD`LM` TP`],La * T  I`n Sb1a??Ib`L` ]` ]`  ]`^]L`$` L`!` L`!b ` L`b ` L`!` L`!` L`B` L`Bb ` L`b B`  L`Ba`  L`ab!`  L`b!_ `  L`_ ]L`  Deec DBBc D" " cQV Dc`ea?Ba?a?" a?b a?_ a ?a?!a?a?!a?aa ?Ba?b!a ?Ba ?a?b a?v/b@ sL`  T I`b /b@ia T I`4_ b@jc  T I`!b@ka T I`!b%@la T I`?ab@ ma  T I`Bb@ na T I` %b!b@ oa  T I`:b @ Bb @ pa  T I`Pሔb@qa  T I`b b@ra a eBB  /`Dm h Ƃ%%ei h  0101!-%  a v/bAh/00D0D0&0/.060DB0J0D`RD]DH Q V% // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials const tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/; /** * Verifies that the given val is a valid HTTP token * per the rules defined in RFC 7230 * See https://tools.ietf.org/html/rfc7230#section-3.2.6 */ function checkIsHttpToken(val) { return tokenRegExp.test(val); } const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; /** * True if val contains an invalid field-vchar * field-value = *( field-content / obs-fold ) * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] * field-vchar = VCHAR / obs-text */ function checkInvalidHeaderChar(val) { return headerCharRegex.test(val); } export const chunkExpression = /(?:^|\W)chunked(?:$|\W)/i; export { checkInvalidHeaderChar as _checkInvalidHeaderChar, checkIsHttpToken as _checkIsHttpToken }; Qd;Qext:deno_node/_http_common.tsa bD`M` TL`V$La'$L` T  I`b \Sb1!a??Ib `],L` " ` L` b ` L`¨  ` L` ]`b a?" a? a?Z0b@ua T I`?l" 0b@vba aA  n0`Dl h %%ei h  z%z%z1  asNbAtz00D`RD]DH Q\ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // // Adapted from Node.js. Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. import { primordials } from "ext:core/mod.js"; import * as bindingTypes from "ext:deno_node/internal_binding/types.ts"; export { isCryptoKey, isKeyObject } from "ext:deno_node/internal/crypto/_keys.ts"; const { ArrayBufferIsView, TypedArrayPrototypeGetSymbolToStringTag } = primordials; export function isArrayBufferView(value) { return ArrayBufferIsView(value); } export function isBigInt64Array(value) { return TypedArrayPrototypeGetSymbolToStringTag(value) === "BigInt64Array"; } export function isBigUint64Array(value) { return TypedArrayPrototypeGetSymbolToStringTag(value) === "BigUint64Array"; } export function isFloat32Array(value) { return TypedArrayPrototypeGetSymbolToStringTag(value) === "Float32Array"; } export function isFloat64Array(value) { return TypedArrayPrototypeGetSymbolToStringTag(value) === "Float64Array"; } export function isInt8Array(value) { return TypedArrayPrototypeGetSymbolToStringTag(value) === "Int8Array"; } export function isInt16Array(value) { return TypedArrayPrototypeGetSymbolToStringTag(value) === "Int16Array"; } export function isInt32Array(value) { return TypedArrayPrototypeGetSymbolToStringTag(value) === "Int32Array"; } export function isUint8Array(value) { return TypedArrayPrototypeGetSymbolToStringTag(value) === "Uint8Array"; } export function isUint8ClampedArray(value) { return TypedArrayPrototypeGetSymbolToStringTag(value) === "Uint8ClampedArray"; } export function isUint16Array(value) { return TypedArrayPrototypeGetSymbolToStringTag(value) === "Uint16Array"; } export function isUint32Array(value) { return TypedArrayPrototypeGetSymbolToStringTag(value) === "Uint32Array"; } export const { // isExternal, isAnyArrayBuffer, isArgumentsObject, isArrayBuffer, isAsyncFunction, isBigIntObject, isBooleanObject, isBoxedPrimitive, isDataView, isDate, isGeneratorFunction, isGeneratorObject, isMap, isMapIterator, isModuleNamespaceObject, isNativeError, isNumberObject, isPromise, isProxy, isRegExp, isSet, isSetIterator, isSharedArrayBuffer, isStringObject, isSymbolObject, isTypedArray, isWeakMap, isWeakSet } = bindingTypes; Qe6w%$ext:deno_node/internal/util/types.tsa bD`<M`  T`La"0L`? T  I`?"3Sb1qa??Ib `L` bS]`a]`h ]`rL`  g Dg cR] X DX c_jL`u1` L`12` L`22` L`2"3` L`"33` L`3A` L`AB4` L`B4q` L`q4`  L`4B5`  L`B55`  L`5B6`  L`B6`  L`A` L`A6` L`6B7` L`B7A` L`A` L`` L`7` L`7B8` L`B88` L`8b9` L`b99` L`9b:` L`b::` L`:B;` L`B;;` L`;<` L`<<` L`<"=` L`"==`  L`=">`! L`">`" L`a`# L`a `$ L` A`% L`A>`& L`>"?`' L`"? L` DDc  L` Dc`(a?"3a?Aa?qa?a ?Aa?a?Aa?a? a$?Aa%?a"?aa#?1a?2a?2a?3a?B4a?4a ?B5a ?5a ?B6a ?6a?B7a?7a?B8a?8a?b9a?9a?b:a?:a?B;a?;a?<a?<a?"=a?=a ?">a!?>a&?"?a'?0b@xa T I`_A0b@ya T I`1qb@za T I`Pb@{a  T I`Ab@|a T I`9b@}a T I`Ab@~a T I` q b@a T I`  b@ a$ T I` c Ab@ a % T I` ᑗb@ a " T I` K ab@ | #  !&'a q1223B44B55B66B77B88b99b::B;;<<"==">>"?  0`D(h %%ei e h  0-%-%-1-1- 1- 1- 1- 1 - 1 -1 -1 -1-1-1-1-1- 1-"1-$1-&1-(1-*1-,1-.1-01-21 -41!- 61&-!81' e: PPPPPPPPPbAw011111111111D`RD]DH tQtj // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-fmt-ignore-file // deno-lint-ignore-file import { nextTick } from "ext:deno_node/_next_tick.ts"; import { AbortController } from "ext:deno_web/03_abort_signal.js"; import { Blob } from "ext:deno_web/09_file.js"; import { StringDecoder } from "node:string_decoder"; import { createDeferredPromise, kEmptyObject, normalizeEncoding, once, promisify, } from "ext:deno_node/internal/util.mjs"; import { isArrayBufferView, isAsyncFunction, } from "ext:deno_node/internal/util/types.ts"; import { debuglog } from "ext:deno_node/internal/util/debuglog.ts"; import { inspect } from "ext:deno_node/internal/util/inspect.mjs"; import { AbortError, aggregateTwoErrors, ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, ERR_INVALID_RETURN_VALUE, ERR_METHOD_NOT_IMPLEMENTED, ERR_MISSING_ARGS, ERR_MULTIPLE_CALLBACK, ERR_OUT_OF_RANGE, ERR_SOCKET_BAD_PORT, ERR_STREAM_ALREADY_FINISHED, ERR_STREAM_CANNOT_PIPE, ERR_STREAM_DESTROYED, ERR_STREAM_NULL_VALUES, ERR_STREAM_PREMATURE_CLOSE, ERR_STREAM_PUSH_AFTER_EOF, ERR_STREAM_UNSHIFT_AFTER_END_EVENT, ERR_STREAM_WRITE_AFTER_END, ERR_UNKNOWN_ENCODING, ERR_UNKNOWN_SIGNAL, hideStackFrames, } from "ext:deno_node/internal/errors.ts"; /* esm.sh - esbuild bundle(readable-stream@4.2.0) es2022 production */ // generated with // $ esbuild --bundle --legal-comments=none --target=es2022 --tree-shaking=true --format=esm . // ... then making sure the file uses the existing ext:deno_node stuff instead of bundling it import __process$ from "node:process"; import __buffer$ from "node:buffer"; import __string_decoder$ from "node:string_decoder"; import __events$ from "node:events"; var __getOwnPropNames = Object.getOwnPropertyNames; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; // node_modules/buffer/index.js var require_buffer = () => { return __buffer$; }; // lib/ours/errors.js var require_primordials = __commonJS({ "lib/ours/primordials.js"(exports2, module2) { "use strict"; module2.exports = { ArrayIsArray(self2) { return Array.isArray(self2); }, ArrayPrototypeIncludes(self2, el) { return self2.includes(el); }, ArrayPrototypeIndexOf(self2, el) { return self2.indexOf(el); }, ArrayPrototypeJoin(self2, sep) { return self2.join(sep); }, ArrayPrototypeMap(self2, fn) { return self2.map(fn); }, ArrayPrototypePop(self2, el) { return self2.pop(el); }, ArrayPrototypePush(self2, el) { return self2.push(el); }, ArrayPrototypeSlice(self2, start, end) { return self2.slice(start, end); }, Error, FunctionPrototypeCall(fn, thisArgs, ...args) { return fn.call(thisArgs, ...args); }, FunctionPrototypeSymbolHasInstance(self2, instance) { return Function.prototype[Symbol.hasInstance].call(self2, instance); }, MathFloor: Math.floor, Number, NumberIsInteger: Number.isInteger, NumberIsNaN: Number.isNaN, NumberMAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER, NumberMIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER, NumberParseInt: Number.parseInt, ObjectDefineProperties(self2, props) { return Object.defineProperties(self2, props); }, ObjectDefineProperty(self2, name, prop) { return Object.defineProperty(self2, name, prop); }, ObjectGetOwnPropertyDescriptor(self2, name) { return Object.getOwnPropertyDescriptor(self2, name); }, ObjectKeys(obj) { return Object.keys(obj); }, ObjectSetPrototypeOf(target, proto) { return Object.setPrototypeOf(target, proto); }, Promise, PromisePrototypeCatch(self2, fn) { return self2.catch(fn); }, PromisePrototypeThen(self2, thenFn, catchFn) { return self2.then(thenFn, catchFn); }, PromiseReject(err) { return Promise.reject(err); }, ReflectApply: Reflect.apply, RegExpPrototypeTest(self2, value) { return self2.test(value); }, SafeSet: Set, String, StringPrototypeSlice(self2, start, end) { return self2.slice(start, end); }, StringPrototypeToLowerCase(self2) { return self2.toLowerCase(); }, StringPrototypeToUpperCase(self2) { return self2.toUpperCase(); }, StringPrototypeTrim(self2) { return self2.trim(); }, Symbol, SymbolAsyncIterator: Symbol.asyncIterator, SymbolHasInstance: Symbol.hasInstance, SymbolIterator: Symbol.iterator, TypedArrayPrototypeSet(self2, buf, len) { return self2.set(buf, len); }, Uint8Array, }; }, }); // lib/internal/validators.js var require_validators = __commonJS({ "lib/internal/validators.js"(exports, module) { "use strict"; var { ArrayIsArray, ArrayPrototypeIncludes, ArrayPrototypeJoin, ArrayPrototypeMap, NumberIsInteger, NumberIsNaN, NumberMAX_SAFE_INTEGER, NumberMIN_SAFE_INTEGER, NumberParseInt, ObjectPrototypeHasOwnProperty, RegExpPrototypeExec, String: String2, StringPrototypeToUpperCase, StringPrototypeTrim, } = require_primordials(); var signals = {}; function isInt32(value) { return value === (value | 0); } function isUint32(value) { return value === value >>> 0; } var octalReg = /^[0-7]+$/; var modeDesc = "must be a 32-bit unsigned integer or an octal string"; function parseFileMode(value, name, def) { if (typeof value === "undefined") { value = def; } if (typeof value === "string") { if (RegExpPrototypeExec(octalReg, value) === null) { throw new ERR_INVALID_ARG_VALUE(name, value, modeDesc); } value = NumberParseInt(value, 8); } validateUint32(value, name); return value; } var validateInteger = hideStackFrames( ( value, name, min = NumberMIN_SAFE_INTEGER, max = NumberMAX_SAFE_INTEGER, ) => { if (typeof value !== "number") { throw new ERR_INVALID_ARG_TYPE(name, "number", value); } if (!NumberIsInteger(value)) { throw new ERR_OUT_OF_RANGE(name, "an integer", value); } if (value < min || value > max) { throw new ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value); } }, ); var validateInt32 = hideStackFrames( (value, name, min = -2147483648, max = 2147483647) => { if (typeof value !== "number") { throw new ERR_INVALID_ARG_TYPE(name, "number", value); } if (!NumberIsInteger(value)) { throw new ERR_OUT_OF_RANGE(name, "an integer", value); } if (value < min || value > max) { throw new ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value); } }, ); var validateUint32 = hideStackFrames((value, name, positive = false) => { if (typeof value !== "number") { throw new ERR_INVALID_ARG_TYPE(name, "number", value); } if (!NumberIsInteger(value)) { throw new ERR_OUT_OF_RANGE(name, "an integer", value); } const min = positive ? 1 : 0; const max = 4294967295; if (value < min || value > max) { throw new ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value); } }); function validateString(value, name) { if (typeof value !== "string") { throw new ERR_INVALID_ARG_TYPE(name, "string", value); } } function validateNumber(value, name, min = void 0, max) { if (typeof value !== "number") { throw new ERR_INVALID_ARG_TYPE(name, "number", value); } if ( min != null && value < min || max != null && value > max || (min != null || max != null) && NumberIsNaN(value) ) { throw new ERR_OUT_OF_RANGE( name, `${min != null ? `>= ${min}` : ""}${ min != null && max != null ? " && " : "" }${max != null ? `<= ${max}` : ""}`, value, ); } } var validateOneOf = hideStackFrames((value, name, oneOf) => { if (!ArrayPrototypeIncludes(oneOf, value)) { const allowed = ArrayPrototypeJoin( ArrayPrototypeMap( oneOf, (v) => typeof v === "string" ? `'${v}'` : String2(v), ), ", ", ); const reason = "must be one of: " + allowed; throw new ERR_INVALID_ARG_VALUE(name, value, reason); } }); function validateBoolean(value, name) { if (typeof value !== "boolean") { throw new ERR_INVALID_ARG_TYPE(name, "boolean", value); } } function getOwnPropertyValueOrDefault(options, key, defaultValue) { return options == null || !ObjectPrototypeHasOwnProperty(options, key) ? defaultValue : options[key]; } var validateObject = hideStackFrames((value, name, options = null) => { const allowArray = getOwnPropertyValueOrDefault( options, "allowArray", false, ); const allowFunction = getOwnPropertyValueOrDefault( options, "allowFunction", false, ); const nullable = getOwnPropertyValueOrDefault(options, "nullable", false); if ( !nullable && value === null || !allowArray && ArrayIsArray(value) || typeof value !== "object" && (!allowFunction || typeof value !== "function") ) { throw new ERR_INVALID_ARG_TYPE(name, "Object", value); } }); var validateArray = hideStackFrames((value, name, minLength = 0) => { if (!ArrayIsArray(value)) { throw new ERR_INVALID_ARG_TYPE(name, "Array", value); } if (value.length < minLength) { const reason = `must be longer than ${minLength}`; throw new ERR_INVALID_ARG_VALUE(name, value, reason); } }); function validateSignalName(signal, name = "signal") { validateString(signal, name); if (signals[signal] === void 0) { if (signals[StringPrototypeToUpperCase(signal)] !== void 0) { throw new ERR_UNKNOWN_SIGNAL( signal + " (signals must use all capital letters)", ); } throw new ERR_UNKNOWN_SIGNAL(signal); } } var validateBuffer = hideStackFrames((buffer, name = "buffer") => { if (!isArrayBufferView(buffer)) { throw new ERR_INVALID_ARG_TYPE(name, [ "Buffer", "TypedArray", "DataView", ], buffer); } }); function validateEncoding(data, encoding) { const normalizedEncoding = normalizeEncoding(encoding); const length = data.length; if (normalizedEncoding === "hex" && length % 2 !== 0) { throw new ERR_INVALID_ARG_VALUE( "encoding", encoding, `is invalid for data of length ${length}`, ); } } function validatePort(port, name = "Port", allowZero = true) { if ( typeof port !== "number" && typeof port !== "string" || typeof port === "string" && StringPrototypeTrim(port).length === 0 || +port !== +port >>> 0 || port > 65535 || port === 0 && !allowZero ) { throw new ERR_SOCKET_BAD_PORT(name, port, allowZero); } return port | 0; } var validateAbortSignal = hideStackFrames((signal, name) => { if ( signal !== void 0 && (signal === null || typeof signal !== "object" || !("aborted" in signal)) ) { throw new ERR_INVALID_ARG_TYPE(name, "AbortSignal", signal); } }); var validateFunction = hideStackFrames((value, name) => { if (typeof value !== "function") { throw new ERR_INVALID_ARG_TYPE(name, "Function", value); } }); var validatePlainFunction = hideStackFrames((value, name) => { if (typeof value !== "function" || isAsyncFunction(value)) { throw new ERR_INVALID_ARG_TYPE(name, "Function", value); } }); var validateUndefined = hideStackFrames((value, name) => { if (value !== void 0) { throw new ERR_INVALID_ARG_TYPE(name, "undefined", value); } }); function validateUnion(value, name, union) { if (!ArrayPrototypeIncludes(union, value)) { throw new ERR_INVALID_ARG_TYPE( name, `('${ArrayPrototypeJoin(union, "|")}')`, value, ); } } module.exports = { isInt32, isUint32, parseFileMode, validateArray, validateBoolean, validateBuffer, validateEncoding, validateFunction, validateInt32, validateInteger, validateNumber, validateObject, validateOneOf, validatePlainFunction, validatePort, validateSignalName, validateString, validateUint32, validateUndefined, validateUnion, validateAbortSignal, }; }, }); // node_modules/process/browser.js var require_browser2 = () => { return __process$; }; // lib/internal/streams/utils.js var require_utils = __commonJS({ "lib/internal/streams/utils.js"(exports, module) { "use strict"; var { Symbol: Symbol2, SymbolAsyncIterator, SymbolIterator } = require_primordials(); var kDestroyed = Symbol2("kDestroyed"); var kIsErrored = Symbol2("kIsErrored"); var kIsReadable = Symbol2("kIsReadable"); var kIsDisturbed = Symbol2("kIsDisturbed"); function isReadableNodeStream(obj, strict = false) { var _obj$_readableState; return !!(obj && typeof obj.pipe === "function" && typeof obj.on === "function" && (!strict || typeof obj.pause === "function" && typeof obj.resume === "function") && (!obj._writableState || ((_obj$_readableState = obj._readableState) === null || _obj$_readableState === void 0 ? void 0 : _obj$_readableState.readable) !== false) && // Duplex (!obj._writableState || obj._readableState)); } function isWritableNodeStream(obj) { var _obj$_writableState; return !!(obj && typeof obj.write === "function" && typeof obj.on === "function" && (!obj._readableState || ((_obj$_writableState = obj._writableState) === null || _obj$_writableState === void 0 ? void 0 : _obj$_writableState.writable) !== false)); } function isDuplexNodeStream(obj) { return !!(obj && typeof obj.pipe === "function" && obj._readableState && typeof obj.on === "function" && typeof obj.write === "function"); } function isNodeStream(obj) { return obj && (obj._readableState || obj._writableState || typeof obj.write === "function" && typeof obj.on === "function" || typeof obj.pipe === "function" && typeof obj.on === "function"); } function isIterable(obj, isAsync) { if (obj == null) { return false; } if (isAsync === true) { return typeof obj[SymbolAsyncIterator] === "function"; } if (isAsync === false) { return typeof obj[SymbolIterator] === "function"; } return typeof obj[SymbolAsyncIterator] === "function" || typeof obj[SymbolIterator] === "function"; } function isDestroyed(stream) { if (!isNodeStream(stream)) { return null; } const wState = stream._writableState; const rState = stream._readableState; const state = wState || rState; return !!(stream.destroyed || stream[kDestroyed] || state !== null && state !== void 0 && state.destroyed); } function isWritableEnded(stream) { if (!isWritableNodeStream(stream)) { return null; } if (stream.writableEnded === true) { return true; } const wState = stream._writableState; if (wState !== null && wState !== void 0 && wState.errored) { return false; } if ( typeof (wState === null || wState === void 0 ? void 0 : wState.ended) !== "boolean" ) { return null; } return wState.ended; } function isWritableFinished(stream, strict) { if (!isWritableNodeStream(stream)) { return null; } if (stream.writableFinished === true) { return true; } const wState = stream._writableState; if (wState !== null && wState !== void 0 && wState.errored) { return false; } if ( typeof (wState === null || wState === void 0 ? void 0 : wState.finished) !== "boolean" ) { return null; } return !!(wState.finished || strict === false && wState.ended === true && wState.length === 0); } function isReadableEnded(stream) { if (!isReadableNodeStream(stream)) { return null; } if (stream.readableEnded === true) { return true; } const rState = stream._readableState; if (!rState || rState.errored) { return false; } if ( typeof (rState === null || rState === void 0 ? void 0 : rState.ended) !== "boolean" ) { return null; } return rState.ended; } function isReadableFinished(stream, strict) { if (!isReadableNodeStream(stream)) { return null; } const rState = stream._readableState; if (rState !== null && rState !== void 0 && rState.errored) { return false; } if ( typeof (rState === null || rState === void 0 ? void 0 : rState.endEmitted) !== "boolean" ) { return null; } return !!(rState.endEmitted || strict === false && rState.ended === true && rState.length === 0); } function isReadable(stream) { if (stream && stream[kIsReadable] != null) { return stream[kIsReadable]; } if ( typeof (stream === null || stream === void 0 ? void 0 : stream.readable) !== "boolean" ) { return null; } if (isDestroyed(stream)) { return false; } return isReadableNodeStream(stream) && stream.readable && !isReadableFinished(stream); } function isWritable(stream) { if ( typeof (stream === null || stream === void 0 ? void 0 : stream.writable) !== "boolean" ) { return null; } if (isDestroyed(stream)) { return false; } return isWritableNodeStream(stream) && stream.writable && !isWritableEnded(stream); } function isFinished(stream, opts) { if (!isNodeStream(stream)) { return null; } if (isDestroyed(stream)) { return true; } if ( (opts === null || opts === void 0 ? void 0 : opts.readable) !== false && isReadable(stream) ) { return false; } if ( (opts === null || opts === void 0 ? void 0 : opts.writable) !== false && isWritable(stream) ) { return false; } return true; } function isWritableErrored(stream) { var _stream$_writableStat, _stream$_writableStat2; if (!isNodeStream(stream)) { return null; } if (stream.writableErrored) { return stream.writableErrored; } return (_stream$_writableStat = (_stream$_writableStat2 = stream._writableState) === null || _stream$_writableStat2 === void 0 ? void 0 : _stream$_writableStat2.errored) !== null && _stream$_writableStat !== void 0 ? _stream$_writableStat : null; } function isReadableErrored(stream) { var _stream$_readableStat, _stream$_readableStat2; if (!isNodeStream(stream)) { return null; } if (stream.readableErrored) { return stream.readableErrored; } return (_stream$_readableStat = (_stream$_readableStat2 = stream._readableState) === null || _stream$_readableStat2 === void 0 ? void 0 : _stream$_readableStat2.errored) !== null && _stream$_readableStat !== void 0 ? _stream$_readableStat : null; } function isClosed(stream) { if (!isNodeStream(stream)) { return null; } if (typeof stream.closed === "boolean") { return stream.closed; } const wState = stream._writableState; const rState = stream._readableState; if ( typeof (wState === null || wState === void 0 ? void 0 : wState.closed) === "boolean" || typeof (rState === null || rState === void 0 ? void 0 : rState.closed) === "boolean" ) { return (wState === null || wState === void 0 ? void 0 : wState.closed) || (rState === null || rState === void 0 ? void 0 : rState.closed); } if (typeof stream._closed === "boolean" && isOutgoingMessage(stream)) { return stream._closed; } return null; } function isOutgoingMessage(stream) { return typeof stream._closed === "boolean" && typeof stream._defaultKeepAlive === "boolean" && typeof stream._removedConnection === "boolean" && typeof stream._removedContLen === "boolean"; } function isServerResponse(stream) { return typeof stream._sent100 === "boolean" && isOutgoingMessage(stream); } function isServerRequest(stream) { var _stream$req; return typeof stream._consuming === "boolean" && typeof stream._dumped === "boolean" && ((_stream$req = stream.req) === null || _stream$req === void 0 ? void 0 : _stream$req.upgradeOrConnect) === void 0; } function willEmitClose(stream) { if (!isNodeStream(stream)) { return null; } const wState = stream._writableState; const rState = stream._readableState; const state = wState || rState; return !state && isServerResponse(stream) || !!(state && state.autoDestroy && state.emitClose && state.closed === false); } function isDisturbed(stream) { var _stream$kIsDisturbed; return !!(stream && ((_stream$kIsDisturbed = stream[kIsDisturbed]) !== null && _stream$kIsDisturbed !== void 0 ? _stream$kIsDisturbed : stream.readableDidRead || stream.readableAborted)); } function isErrored(stream) { var _ref, _ref2, _ref3, _ref4, _ref5, _stream$kIsErrored, _stream$_readableStat3, _stream$_writableStat3, _stream$_readableStat4, _stream$_writableStat4; return !!(stream && ((_ref = (_ref2 = (_ref3 = (_ref4 = (_ref5 = (_stream$kIsErrored = stream[kIsErrored]) !== null && _stream$kIsErrored !== void 0 ? _stream$kIsErrored : stream.readableErrored) !== null && _ref5 !== void 0 ? _ref5 : stream.writableErrored) !== null && _ref4 !== void 0 ? _ref4 : (_stream$_readableStat3 = stream._readableState) === null || _stream$_readableStat3 === void 0 ? void 0 : _stream$_readableStat3.errorEmitted) !== null && _ref3 !== void 0 ? _ref3 : (_stream$_writableStat3 = stream._writableState) === null || _stream$_writableStat3 === void 0 ? void 0 : _stream$_writableStat3.errorEmitted) !== null && _ref2 !== void 0 ? _ref2 : (_stream$_readableStat4 = stream._readableState) === null || _stream$_readableStat4 === void 0 ? void 0 : _stream$_readableStat4.errored) !== null && _ref !== void 0 ? _ref : (_stream$_writableStat4 = stream._writableState) === null || _stream$_writableStat4 === void 0 ? void 0 : _stream$_writableStat4.errored)); } module.exports = { kDestroyed, isDisturbed, kIsDisturbed, isErrored, kIsErrored, isReadable, kIsReadable, isClosed, isDestroyed, isDuplexNodeStream, isFinished, isIterable, isReadableNodeStream, isReadableEnded, isReadableFinished, isReadableErrored, isNodeStream, isWritable, isWritableNodeStream, isWritableEnded, isWritableFinished, isWritableErrored, isServerRequest, isServerResponse, willEmitClose, }; }, }); // lib/internal/streams/end-of-stream.js var require_end_of_stream = __commonJS({ "lib/internal/streams/end-of-stream.js"(exports, module) { var process = require_browser2(); var { validateAbortSignal, validateFunction, validateObject } = require_validators(); var { Promise: Promise2 } = require_primordials(); var { isClosed, isReadable, isReadableNodeStream, isReadableFinished, isReadableErrored, isWritable, isWritableNodeStream, isWritableFinished, isWritableErrored, isNodeStream, willEmitClose: _willEmitClose, } = require_utils(); function isRequest(stream) { return stream.setHeader && typeof stream.abort === "function"; } var nop = () => { }; function eos(stream, options, callback) { var _options$readable, _options$writable; if (arguments.length === 2) { callback = options; options = kEmptyObject; } else if (options == null) { options = kEmptyObject; } else { validateObject(options, "options"); } validateFunction(callback, "callback"); validateAbortSignal(options.signal, "options.signal"); callback = once(callback); const readable = (_options$readable = options.readable) !== null && _options$readable !== void 0 ? _options$readable : isReadableNodeStream(stream); const writable = (_options$writable = options.writable) !== null && _options$writable !== void 0 ? _options$writable : isWritableNodeStream(stream); if (!isNodeStream(stream)) { throw new ERR_INVALID_ARG_TYPE("stream", "Stream", stream); } const wState = stream._writableState; const rState = stream._readableState; const onlegacyfinish = () => { if (!stream.writable) { onfinish(); } }; let willEmitClose = _willEmitClose(stream) && isReadableNodeStream(stream) === readable && isWritableNodeStream(stream) === writable; let writableFinished = isWritableFinished(stream, false); const onfinish = () => { writableFinished = true; if (stream.destroyed) { willEmitClose = false; } if (willEmitClose && (!stream.readable || readable)) { return; } if (!readable || readableFinished) { callback.call(stream); } }; let readableFinished = isReadableFinished(stream, false); const onend = () => { readableFinished = true; if (stream.destroyed) { willEmitClose = false; } if (willEmitClose && (!stream.writable || writable)) { return; } if (!writable || writableFinished) { callback.call(stream); } }; const onerror = (err) => { callback.call(stream, err); }; let closed = isClosed(stream); const onclose = () => { closed = true; const errored = isWritableErrored(stream) || isReadableErrored(stream); if (errored && typeof errored !== "boolean") { return callback.call(stream, errored); } if ( readable && !readableFinished && isReadableNodeStream(stream, true) ) { if (!isReadableFinished(stream, false)) { return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE()); } } if (writable && !writableFinished) { if (!isWritableFinished(stream, false)) { return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE()); } } callback.call(stream); }; const onrequest = () => { stream.req.on("finish", onfinish); }; if (isRequest(stream)) { stream.on("complete", onfinish); if (!willEmitClose) { stream.on("abort", onclose); } if (stream.req) { onrequest(); } else { stream.on("request", onrequest); } } else if (writable && !wState) { stream.on("end", onlegacyfinish); stream.on("close", onlegacyfinish); } if (!willEmitClose && typeof stream.aborted === "boolean") { stream.on("aborted", onclose); } stream.on("end", onend); stream.on("finish", onfinish); if (options.error !== false) { stream.on("error", onerror); } stream.on("close", onclose); if (closed) { process.nextTick(onclose); } else if ( wState !== null && wState !== void 0 && wState.errorEmitted || rState !== null && rState !== void 0 && rState.errorEmitted ) { if (!willEmitClose) { process.nextTick(onclose); } } else if ( !readable && (!willEmitClose || isReadable(stream)) && (writableFinished || isWritable(stream) === false) ) { process.nextTick(onclose); } else if ( !writable && (!willEmitClose || isWritable(stream)) && (readableFinished || isReadable(stream) === false) ) { process.nextTick(onclose); } else if (rState && stream.req && stream.aborted) { process.nextTick(onclose); } const cleanup = () => { callback = nop; stream.removeListener("aborted", onclose); stream.removeListener("complete", onfinish); stream.removeListener("abort", onclose); stream.removeListener("request", onrequest); if (stream.req) { stream.req.removeListener("finish", onfinish); } stream.removeListener("end", onlegacyfinish); stream.removeListener("close", onlegacyfinish); stream.removeListener("finish", onfinish); stream.removeListener("end", onend); stream.removeListener("error", onerror); stream.removeListener("close", onclose); }; if (options.signal && !closed) { const abort = () => { const endCallback = callback; cleanup(); endCallback.call( stream, new AbortError(void 0, { cause: options.signal.reason, }), ); }; if (options.signal.aborted) { process.nextTick(abort); } else { const originalCallback = callback; callback = once((...args) => { options.signal.removeEventListener("abort", abort); originalCallback.apply(stream, args); }); options.signal.addEventListener("abort", abort); } } return cleanup; } function finished(stream, opts) { return new Promise2((resolve, reject) => { eos(stream, opts, (err) => { if (err) { reject(err); } else { resolve(); } }); }); } module.exports = eos; module.exports.finished = finished; }, }); // lib/internal/streams/operators.js var require_operators = __commonJS({ "lib/internal/streams/operators.js"(exports, module) { "use strict"; var { validateAbortSignal, validateInteger, validateObject } = require_validators(); var kWeakHandler = require_primordials().Symbol("kWeak"); var { finished } = require_end_of_stream(); var { ArrayPrototypePush, MathFloor, Number: Number2, NumberIsNaN, Promise: Promise2, PromiseReject, PromisePrototypeThen, Symbol: Symbol2, } = require_primordials(); var kEmpty = Symbol2("kEmpty"); var kEof = Symbol2("kEof"); function map(fn, options) { if (typeof fn !== "function") { throw new ERR_INVALID_ARG_TYPE("fn", ["Function", "AsyncFunction"], fn); } if (options != null) { validateObject(options, "options"); } if ( (options === null || options === void 0 ? void 0 : options.signal) != null ) { validateAbortSignal(options.signal, "options.signal"); } let concurrency = 1; if ( (options === null || options === void 0 ? void 0 : options.concurrency) != null ) { concurrency = MathFloor(options.concurrency); } validateInteger(concurrency, "concurrency", 1); return async function* map2() { var _options$signal, _options$signal2; const ac = new AbortController(); const stream = this; const queue = []; const signal = ac.signal; const signalOpt = { signal, }; const abort = () => ac.abort(); if ( options !== null && options !== void 0 && (_options$signal = options.signal) !== null && _options$signal !== void 0 && _options$signal.aborted ) { abort(); } options === null || options === void 0 ? void 0 : (_options$signal2 = options.signal) === null || _options$signal2 === void 0 ? void 0 : _options$signal2.addEventListener("abort", abort); let next; let resume; let done = false; function onDone() { done = true; } async function pump() { try { for await (let val of stream) { var _val; if (done) { return; } if (signal.aborted) { throw new AbortError(); } try { val = fn(val, signalOpt); } catch (err) { val = PromiseReject(err); } if (val === kEmpty) { continue; } if ( typeof ((_val = val) === null || _val === void 0 ? void 0 : _val.catch) === "function" ) { val.catch(onDone); } queue.push(val); if (next) { next(); next = null; } if (!done && queue.length && queue.length >= concurrency) { await new Promise2((resolve) => { resume = resolve; }); } } queue.push(kEof); } catch (err) { const val = PromiseReject(err); PromisePrototypeThen(val, void 0, onDone); queue.push(val); } finally { var _options$signal3; done = true; if (next) { next(); next = null; } options === null || options === void 0 ? void 0 : (_options$signal3 = options.signal) === null || _options$signal3 === void 0 ? void 0 : _options$signal3.removeEventListener("abort", abort); } } pump(); try { while (true) { while (queue.length > 0) { const val = await queue[0]; if (val === kEof) { return; } if (signal.aborted) { throw new AbortError(); } if (val !== kEmpty) { yield val; } queue.shift(); if (resume) { resume(); resume = null; } } await new Promise2((resolve) => { next = resolve; }); } } finally { ac.abort(); done = true; if (resume) { resume(); resume = null; } } }.call(this); } function asIndexedPairs(options = void 0) { if (options != null) { validateObject(options, "options"); } if ( (options === null || options === void 0 ? void 0 : options.signal) != null ) { validateAbortSignal(options.signal, "options.signal"); } return async function* asIndexedPairs2() { let index = 0; for await (const val of this) { var _options$signal4; if ( options !== null && options !== void 0 && (_options$signal4 = options.signal) !== null && _options$signal4 !== void 0 && _options$signal4.aborted ) { throw new AbortError({ cause: options.signal.reason, }); } yield [index++, val]; } }.call(this); } async function some(fn, options = void 0) { for await (const unused of filter.call(this, fn, options)) { return true; } return false; } async function every(fn, options = void 0) { if (typeof fn !== "function") { throw new ERR_INVALID_ARG_TYPE("fn", ["Function", "AsyncFunction"], fn); } return !await some.call( this, async (...args) => { return !await fn(...args); }, options, ); } async function find(fn, options) { for await (const result of filter.call(this, fn, options)) { return result; } return void 0; } async function forEach(fn, options) { if (typeof fn !== "function") { throw new ERR_INVALID_ARG_TYPE("fn", ["Function", "AsyncFunction"], fn); } async function forEachFn(value, options2) { await fn(value, options2); return kEmpty; } for await (const unused of map.call(this, forEachFn, options)); } function filter(fn, options) { if (typeof fn !== "function") { throw new ERR_INVALID_ARG_TYPE("fn", ["Function", "AsyncFunction"], fn); } async function filterFn(value, options2) { if (await fn(value, options2)) { return value; } return kEmpty; } return map.call(this, filterFn, options); } var ReduceAwareErrMissingArgs = class extends ERR_MISSING_ARGS { constructor() { super("reduce"); this.message = "Reduce of an empty stream requires an initial value"; } }; async function reduce(reducer, initialValue, options) { var _options$signal5; if (typeof reducer !== "function") { throw new ERR_INVALID_ARG_TYPE( "reducer", ["Function", "AsyncFunction"], reducer, ); } if (options != null) { validateObject(options, "options"); } if ( (options === null || options === void 0 ? void 0 : options.signal) != null ) { validateAbortSignal(options.signal, "options.signal"); } let hasInitialValue = arguments.length > 1; if ( options !== null && options !== void 0 && (_options$signal5 = options.signal) !== null && _options$signal5 !== void 0 && _options$signal5.aborted ) { const err = new AbortError(void 0, { cause: options.signal.reason, }); this.once("error", () => { }); await finished(this.destroy(err)); throw err; } const ac = new AbortController(); const signal = ac.signal; if (options !== null && options !== void 0 && options.signal) { const opts = { once: true, [kWeakHandler]: this, }; options.signal.addEventListener("abort", () => ac.abort(), opts); } let gotAnyItemFromStream = false; try { for await (const value of this) { var _options$signal6; gotAnyItemFromStream = true; if ( options !== null && options !== void 0 && (_options$signal6 = options.signal) !== null && _options$signal6 !== void 0 && _options$signal6.aborted ) { throw new AbortError(); } if (!hasInitialValue) { initialValue = value; hasInitialValue = true; } else { initialValue = await reducer(initialValue, value, { signal, }); } } if (!gotAnyItemFromStream && !hasInitialValue) { throw new ReduceAwareErrMissingArgs(); } } finally { ac.abort(); } return initialValue; } async function toArray(options) { if (options != null) { validateObject(options, "options"); } if ( (options === null || options === void 0 ? void 0 : options.signal) != null ) { validateAbortSignal(options.signal, "options.signal"); } const result = []; for await (const val of this) { var _options$signal7; if ( options !== null && options !== void 0 && (_options$signal7 = options.signal) !== null && _options$signal7 !== void 0 && _options$signal7.aborted ) { throw new AbortError(void 0, { cause: options.signal.reason, }); } ArrayPrototypePush(result, val); } return result; } function flatMap(fn, options) { const values = map.call(this, fn, options); return async function* flatMap2() { for await (const val of values) { yield* val; } }.call(this); } function toIntegerOrInfinity(number) { number = Number2(number); if (NumberIsNaN(number)) { return 0; } if (number < 0) { throw new ERR_OUT_OF_RANGE("number", ">= 0", number); } return number; } function drop(number, options = void 0) { if (options != null) { validateObject(options, "options"); } if ( (options === null || options === void 0 ? void 0 : options.signal) != null ) { validateAbortSignal(options.signal, "options.signal"); } number = toIntegerOrInfinity(number); return async function* drop2() { var _options$signal8; if ( options !== null && options !== void 0 && (_options$signal8 = options.signal) !== null && _options$signal8 !== void 0 && _options$signal8.aborted ) { throw new AbortError(); } for await (const val of this) { var _options$signal9; if ( options !== null && options !== void 0 && (_options$signal9 = options.signal) !== null && _options$signal9 !== void 0 && _options$signal9.aborted ) { throw new AbortError(); } if (number-- <= 0) { yield val; } } }.call(this); } function take(number, options = void 0) { if (options != null) { validateObject(options, "options"); } if ( (options === null || options === void 0 ? void 0 : options.signal) != null ) { validateAbortSignal(options.signal, "options.signal"); } number = toIntegerOrInfinity(number); return async function* take2() { var _options$signal10; if ( options !== null && options !== void 0 && (_options$signal10 = options.signal) !== null && _options$signal10 !== void 0 && _options$signal10.aborted ) { throw new AbortError(); } for await (const val of this) { var _options$signal11; if ( options !== null && options !== void 0 && (_options$signal11 = options.signal) !== null && _options$signal11 !== void 0 && _options$signal11.aborted ) { throw new AbortError(); } if (number-- > 0) { yield val; } else { return; } } }.call(this); } module.exports.streamReturningOperators = { asIndexedPairs, drop, filter, flatMap, map, take, }; module.exports.promiseReturningOperators = { every, forEach, reduce, toArray, some, find, }; }, }); // lib/internal/streams/destroy.js var require_destroy = __commonJS({ "lib/internal/streams/destroy.js"(exports, module) { "use strict"; var process = require_browser2(); var { Symbol: Symbol2 } = require_primordials(); var { kDestroyed, isDestroyed, isFinished, isServerRequest } = require_utils(); var kDestroy = Symbol2("kDestroy"); var kConstruct = Symbol2("kConstruct"); function checkError(err, w, r) { if (err) { err.stack; if (w && !w.errored) { w.errored = err; } if (r && !r.errored) { r.errored = err; } } } function destroy(err, cb) { const r = this._readableState; const w = this._writableState; const s = w || r; if (w && w.destroyed || r && r.destroyed) { if (typeof cb === "function") { cb(); } return this; } checkError(err, w, r); if (w) { w.destroyed = true; } if (r) { r.destroyed = true; } if (!s.constructed) { this.once(kDestroy, function (er) { _destroy(this, aggregateTwoErrors(er, err), cb); }); } else { _destroy(this, err, cb); } return this; } function _destroy(self2, err, cb) { let called = false; function onDestroy(err2) { if (called) { return; } called = true; const r = self2._readableState; const w = self2._writableState; checkError(err2, w, r); if (w) { w.closed = true; } if (r) { r.closed = true; } if (typeof cb === "function") { cb(err2); } if (err2) { process.nextTick(emitErrorCloseNT, self2, err2); } else { process.nextTick(emitCloseNT, self2); } } try { self2._destroy(err || null, onDestroy); } catch (err2) { onDestroy(err2); } } function emitErrorCloseNT(self2, err) { emitErrorNT(self2, err); emitCloseNT(self2); } function emitCloseNT(self2) { const r = self2._readableState; const w = self2._writableState; if (w) { w.closeEmitted = true; } if (r) { r.closeEmitted = true; } if (w && w.emitClose || r && r.emitClose) { self2.emit("close"); } } function emitErrorNT(self2, err) { const r = self2._readableState; const w = self2._writableState; if (w && w.errorEmitted || r && r.errorEmitted) { return; } if (w) { w.errorEmitted = true; } if (r) { r.errorEmitted = true; } self2.emit("error", err); } function undestroy() { const r = this._readableState; const w = this._writableState; if (r) { r.constructed = true; r.closed = false; r.closeEmitted = false; r.destroyed = false; r.errored = null; r.errorEmitted = false; r.reading = false; r.ended = r.readable === false; r.endEmitted = r.readable === false; } if (w) { w.constructed = true; w.destroyed = false; w.closed = false; w.closeEmitted = false; w.errored = null; w.errorEmitted = false; w.finalCalled = false; w.prefinished = false; w.ended = w.writable === false; w.ending = w.writable === false; w.finished = w.writable === false; } } function errorOrDestroy(stream, err, sync) { const r = stream._readableState; const w = stream._writableState; if (w && w.destroyed || r && r.destroyed) { return this; } if (r && r.autoDestroy || w && w.autoDestroy) { stream.destroy(err); } else if (err) { err.stack; if (w && !w.errored) { w.errored = err; } if (r && !r.errored) { r.errored = err; } if (sync) { process.nextTick(emitErrorNT, stream, err); } else { emitErrorNT(stream, err); } } } function construct(stream, cb) { if (typeof stream._construct !== "function") { return; } const r = stream._readableState; const w = stream._writableState; if (r) { r.constructed = false; } if (w) { w.constructed = false; } stream.once(kConstruct, cb); if (stream.listenerCount(kConstruct) > 1) { return; } process.nextTick(constructNT, stream); } function constructNT(stream) { let called = false; function onConstruct(err) { if (called) { errorOrDestroy( stream, err !== null && err !== void 0 ? err : new ERR_MULTIPLE_CALLBACK(), ); return; } called = true; const r = stream._readableState; const w = stream._writableState; const s = w || r; if (r) { r.constructed = true; } if (w) { w.constructed = true; } if (s.destroyed) { stream.emit(kDestroy, err); } else if (err) { errorOrDestroy(stream, err, true); } else { process.nextTick(emitConstructNT, stream); } } try { stream._construct((err) => { nextTick(onConstruct, err); }); } catch (err) { nextTick(onConstruct, err); } } function emitConstructNT(stream) { stream.emit(kConstruct); } function isRequest(stream) { return stream && stream.setHeader && typeof stream.abort === "function"; } function emitCloseLegacy(stream) { stream.emit("close"); } function emitErrorCloseLegacy(stream, err) { stream.emit("error", err); process.nextTick(emitCloseLegacy, stream); } function destroyer(stream, err) { if (!stream || isDestroyed(stream)) { return; } if (!err && !isFinished(stream)) { err = new AbortError(); } if (isServerRequest(stream)) { stream.socket = null; stream.destroy(err); } else if (isRequest(stream)) { stream.abort(); } else if (isRequest(stream.req)) { stream.req.abort(); } else if (typeof stream.destroy === "function") { stream.destroy(err); } else if (typeof stream.close === "function") { stream.close(); } else if (err) { process.nextTick(emitErrorCloseLegacy, stream, err); } else { process.nextTick(emitCloseLegacy, stream); } if (!stream.destroyed) { stream[kDestroyed] = true; } } module.exports = { construct, destroyer, destroy, undestroy, errorOrDestroy, }; }, }); // node_modules/events/events.js var require_events = __commonJS({ "node_modules/events/events.js"(exports, module) { "use strict"; var R = typeof Reflect === "object" ? Reflect : null; var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) { return Function.prototype.apply.call(target, receiver, args); }; var ReflectOwnKeys; if (R && typeof R.ownKeys === "function") { ReflectOwnKeys = R.ownKeys; } else if (Object.getOwnPropertySymbols) { ReflectOwnKeys = function ReflectOwnKeys2(target) { return Object.getOwnPropertyNames(target).concat( Object.getOwnPropertySymbols(target), ); }; } else { ReflectOwnKeys = function ReflectOwnKeys2(target) { return Object.getOwnPropertyNames(target); }; } function ProcessEmitWarning(warning) { if (console && console.warn) { console.warn(warning); } } var NumberIsNaN = Number.isNaN || function NumberIsNaN2(value) { return value !== value; }; function EventEmitter() { EventEmitter.init.call(this); } module.exports = EventEmitter; module.exports.once = once; EventEmitter.EventEmitter = EventEmitter; EventEmitter.prototype._events = void 0; EventEmitter.prototype._eventsCount = 0; EventEmitter.prototype._maxListeners = void 0; var defaultMaxListeners = 10; function checkListener(listener) { if (typeof listener !== "function") { throw new TypeError( 'The "listener" argument must be of type Function. Received type ' + typeof listener, ); } } Object.defineProperty(EventEmitter, "defaultMaxListeners", { enumerable: true, get: function () { return defaultMaxListeners; }, set: function (arg) { if (typeof arg !== "number" || arg < 0 || NumberIsNaN(arg)) { throw new RangeError( 'The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + ".", ); } defaultMaxListeners = arg; }, }); EventEmitter.init = function () { if ( this._events === void 0 || this._events === Object.getPrototypeOf(this)._events ) { this._events = /* @__PURE__ */ Object.create(null); this._eventsCount = 0; } this._maxListeners = this._maxListeners || void 0; }; EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { if (typeof n !== "number" || n < 0 || NumberIsNaN(n)) { throw new RangeError( 'The value of "n" is out of range. It must be a non-negative number. Received ' + n + ".", ); } this._maxListeners = n; return this; }; function _getMaxListeners(that) { if (that._maxListeners === void 0) { return EventEmitter.defaultMaxListeners; } return that._maxListeners; } EventEmitter.prototype.getMaxListeners = function getMaxListeners() { return _getMaxListeners(this); }; EventEmitter.prototype.emit = function emit(type) { var args = []; for (var i = 1; i < arguments.length; i++) { args.push(arguments[i]); } var doError = type === "error"; var events = this._events; if (events !== void 0) { doError = doError && events.error === void 0; } else if (!doError) { return false; } if (doError) { var er; if (args.length > 0) { er = args[0]; } if (er instanceof Error) { throw er; } var err = new Error( "Unhandled error." + (er ? " (" + er.message + ")" : ""), ); err.context = er; throw err; } var handler = events[type]; if (handler === void 0) { return false; } if (typeof handler === "function") { ReflectApply(handler, this, args); } else { var len = handler.length; var listeners = arrayClone(handler, len); for (var i = 0; i < len; ++i) { ReflectApply(listeners[i], this, args); } } return true; }; function _addListener(target, type, listener, prepend) { var m; var events; var existing; checkListener(listener); events = target._events; if (events === void 0) { events = target._events = /* @__PURE__ */ Object.create(null); target._eventsCount = 0; } else { if (events.newListener !== void 0) { target.emit( "newListener", type, listener.listener ? listener.listener : listener, ); events = target._events; } existing = events[type]; } if (existing === void 0) { existing = events[type] = listener; ++target._eventsCount; } else { if (typeof existing === "function") { existing = events[type] = prepend ? [listener, existing] : [existing, listener]; } else if (prepend) { existing.unshift(listener); } else { existing.push(listener); } m = _getMaxListeners(target); if (m > 0 && existing.length > m && !existing.warned) { existing.warned = true; var w = new Error( "Possible EventEmitter memory leak detected. " + existing.length + " " + String(type) + " listeners added. Use emitter.setMaxListeners() to increase limit", ); w.name = "MaxListenersExceededWarning"; w.emitter = target; w.type = type; w.count = existing.length; ProcessEmitWarning(w); } } return target; } EventEmitter.prototype.addListener = function addListener(type, listener) { return _addListener(this, type, listener, false); }; EventEmitter.prototype.on = EventEmitter.prototype.addListener; EventEmitter.prototype.prependListener = function prependListener( type, listener, ) { return _addListener(this, type, listener, true); }; function onceWrapper() { if (!this.fired) { this.target.removeListener(this.type, this.wrapFn); this.fired = true; if (arguments.length === 0) { return this.listener.call(this.target); } return this.listener.apply(this.target, arguments); } } function _onceWrap(target, type, listener) { var state = { fired: false, wrapFn: void 0, target, type, listener }; var wrapped = onceWrapper.bind(state); wrapped.listener = listener; state.wrapFn = wrapped; return wrapped; } EventEmitter.prototype.once = function once2(type, listener) { checkListener(listener); this.on(type, _onceWrap(this, type, listener)); return this; }; EventEmitter.prototype.prependOnceListener = function prependOnceListener( type, listener, ) { checkListener(listener); this.prependListener(type, _onceWrap(this, type, listener)); return this; }; EventEmitter.prototype.removeListener = function removeListener( type, listener, ) { var list, events, position, i, originalListener; checkListener(listener); events = this._events; if (events === void 0) { return this; } list = events[type]; if (list === void 0) { return this; } if (list === listener || list.listener === listener) { if (--this._eventsCount === 0) { this._events = /* @__PURE__ */ Object.create(null); } else { delete events[type]; if (events.removeListener) { this.emit("removeListener", type, list.listener || listener); } } } else if (typeof list !== "function") { position = -1; for (i = list.length - 1; i >= 0; i--) { if (list[i] === listener || list[i].listener === listener) { originalListener = list[i].listener; position = i; break; } } if (position < 0) { return this; } if (position === 0) { list.shift(); } else { spliceOne(list, position); } if (list.length === 1) { events[type] = list[0]; } if (events.removeListener !== void 0) { this.emit("removeListener", type, originalListener || listener); } } return this; }; EventEmitter.prototype.off = EventEmitter.prototype.removeListener; EventEmitter.prototype.removeAllListeners = function removeAllListeners( type, ) { var listeners, events, i; events = this._events; if (events === void 0) { return this; } if (events.removeListener === void 0) { if (arguments.length === 0) { this._events = /* @__PURE__ */ Object.create(null); this._eventsCount = 0; } else if (events[type] !== void 0) { if (--this._eventsCount === 0) { this._events = /* @__PURE__ */ Object.create(null); } else { delete events[type]; } } return this; } if (arguments.length === 0) { var keys = Object.keys(events); var key; for (i = 0; i < keys.length; ++i) { key = keys[i]; if (key === "removeListener") { continue; } this.removeAllListeners(key); } this.removeAllListeners("removeListener"); this._events = /* @__PURE__ */ Object.create(null); this._eventsCount = 0; return this; } listeners = events[type]; if (typeof listeners === "function") { this.removeListener(type, listeners); } else if (listeners !== void 0) { for (i = listeners.length - 1; i >= 0; i--) { this.removeListener(type, listeners[i]); } } return this; }; function _listeners(target, type, unwrap) { var events = target._events; if (events === void 0) { return []; } var evlistener = events[type]; if (evlistener === void 0) { return []; } if (typeof evlistener === "function") { return unwrap ? [evlistener.listener || evlistener] : [evlistener]; } return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length); } EventEmitter.prototype.listeners = function listeners(type) { return _listeners(this, type, true); }; EventEmitter.prototype.rawListeners = function rawListeners(type) { return _listeners(this, type, false); }; EventEmitter.listenerCount = function (emitter, type) { if (typeof emitter.listenerCount === "function") { return emitter.listenerCount(type); } else { return listenerCount.call(emitter, type); } }; EventEmitter.prototype.listenerCount = listenerCount; function listenerCount(type) { var events = this._events; if (events !== void 0) { var evlistener = events[type]; if (typeof evlistener === "function") { return 1; } else if (evlistener !== void 0) { return evlistener.length; } } return 0; } EventEmitter.prototype.eventNames = function eventNames() { return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; }; function arrayClone(arr, n) { var copy = new Array(n); for (var i = 0; i < n; ++i) { copy[i] = arr[i]; } return copy; } function spliceOne(list, index) { for (; index + 1 < list.length; index++) { list[index] = list[index + 1]; } list.pop(); } function unwrapListeners(arr) { var ret = new Array(arr.length); for (var i = 0; i < ret.length; ++i) { ret[i] = arr[i].listener || arr[i]; } return ret; } function once(emitter, name) { return new Promise(function (resolve, reject) { function errorListener(err) { emitter.removeListener(name, resolver); reject(err); } function resolver() { if (typeof emitter.removeListener === "function") { emitter.removeListener("error", errorListener); } resolve([].slice.call(arguments)); } eventTargetAgnosticAddListener(emitter, name, resolver, { once: true }); if (name !== "error") { addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true }); } }); } function addErrorHandlerIfEventEmitter(emitter, handler, flags) { if (typeof emitter.on === "function") { eventTargetAgnosticAddListener(emitter, "error", handler, flags); } } function eventTargetAgnosticAddListener(emitter, name, listener, flags) { if (typeof emitter.on === "function") { if (flags.once) { emitter.once(name, listener); } else { emitter.on(name, listener); } } else if (typeof emitter.addEventListener === "function") { emitter.addEventListener(name, function wrapListener(arg) { if (flags.once) { emitter.removeEventListener(name, wrapListener); } listener(arg); }); } else { throw new TypeError( 'The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter, ); } } }, }); // lib/internal/streams/legacy.js var require_legacy = __commonJS({ "lib/internal/streams/legacy.js"(exports, module) { "use strict"; var { ArrayIsArray, ObjectSetPrototypeOf } = require_primordials(); var { EventEmitter: EE } = require_events(); function Stream(opts) { EE.call(this, opts); } ObjectSetPrototypeOf(Stream.prototype, EE.prototype); ObjectSetPrototypeOf(Stream, EE); Stream.prototype.pipe = function (dest, options) { const source = this; function ondata(chunk) { if (dest.writable && dest.write(chunk) === false && source.pause) { source.pause(); } } source.on("data", ondata); function ondrain() { if (source.readable && source.resume) { source.resume(); } } dest.on("drain", ondrain); if (!dest._isStdio && (!options || options.end !== false)) { source.on("end", onend); source.on("close", onclose); } let didOnEnd = false; function onend() { if (didOnEnd) { return; } didOnEnd = true; dest.end(); } function onclose() { if (didOnEnd) { return; } didOnEnd = true; if (typeof dest.destroy === "function") { dest.destroy(); } } function onerror(er) { cleanup(); if (EE.listenerCount(this, "error") === 0) { this.emit("error", er); } } prependListener(source, "error", onerror); prependListener(dest, "error", onerror); function cleanup() { source.removeListener("data", ondata); dest.removeListener("drain", ondrain); source.removeListener("end", onend); source.removeListener("close", onclose); source.removeListener("error", onerror); dest.removeListener("error", onerror); source.removeListener("end", cleanup); source.removeListener("close", cleanup); dest.removeListener("close", cleanup); } source.on("end", cleanup); source.on("close", cleanup); dest.on("close", cleanup); dest.emit("pipe", source); return dest; }; function prependListener(emitter, event, fn) { if (typeof emitter.prependListener === "function") { return emitter.prependListener(event, fn); } if (!emitter._events || !emitter._events[event]) { emitter.on(event, fn); } else if (ArrayIsArray(emitter._events[event])) { emitter._events[event].unshift(fn); } else { emitter._events[event] = [fn, emitter._events[event]]; } } module.exports = { Stream, prependListener, }; }, }); // lib/internal/streams/add-abort-signal.js var require_add_abort_signal = __commonJS({ "lib/internal/streams/add-abort-signal.js"(exports, module) { "use strict"; var eos = require_end_of_stream(); var validateAbortSignal = (signal, name) => { if (typeof signal !== "object" || !("aborted" in signal)) { throw new ERR_INVALID_ARG_TYPE(name, "AbortSignal", signal); } }; function isNodeStream(obj) { return !!(obj && typeof obj.pipe === "function"); } module.exports.addAbortSignal = function addAbortSignal(signal, stream) { validateAbortSignal(signal, "signal"); if (!isNodeStream(stream)) { throw new ERR_INVALID_ARG_TYPE("stream", "stream.Stream", stream); } return module.exports.addAbortSignalNoValidate(signal, stream); }; module.exports.addAbortSignalNoValidate = function (signal, stream) { if (typeof signal !== "object" || !("aborted" in signal)) { return stream; } const onAbort = () => { stream.destroy( new AbortError(void 0, { cause: signal.reason, }), ); }; if (signal.aborted) { onAbort(); } else { signal.addEventListener("abort", onAbort); eos(stream, () => signal.removeEventListener("abort", onAbort)); } return stream; }; }, }); // lib/internal/streams/buffer_list.js var require_buffer_list = __commonJS({ "lib/internal/streams/buffer_list.js"(exports, module) { "use strict"; var { StringPrototypeSlice, SymbolIterator, TypedArrayPrototypeSet, Uint8Array: Uint8Array2, } = require_primordials(); var { Buffer: Buffer2 } = require_buffer(); module.exports = class BufferList { constructor() { this.head = null; this.tail = null; this.length = 0; } push(v) { const entry = { data: v, next: null, }; if (this.length > 0) { this.tail.next = entry; } else { this.head = entry; } this.tail = entry; ++this.length; } unshift(v) { const entry = { data: v, next: this.head, }; if (this.length === 0) { this.tail = entry; } this.head = entry; ++this.length; } shift() { if (this.length === 0) { return; } const ret = this.head.data; if (this.length === 1) { this.head = this.tail = null; } else { this.head = this.head.next; } --this.length; return ret; } clear() { this.head = this.tail = null; this.length = 0; } join(s) { if (this.length === 0) { return ""; } let p = this.head; let ret = "" + p.data; while ((p = p.next) !== null) { ret += s + p.data; } return ret; } concat(n) { if (this.length === 0) { return Buffer2.alloc(0); } const ret = Buffer2.allocUnsafe(n >>> 0); let p = this.head; let i = 0; while (p) { TypedArrayPrototypeSet(ret, p.data, i); i += p.data.length; p = p.next; } return ret; } // Consumes a specified amount of bytes or characters from the buffered data. consume(n, hasStrings) { const data = this.head.data; if (n < data.length) { const slice = data.slice(0, n); this.head.data = data.slice(n); return slice; } if (n === data.length) { return this.shift(); } return hasStrings ? this._getString(n) : this._getBuffer(n); } first() { return this.head.data; } *[SymbolIterator]() { for (let p = this.head; p; p = p.next) { yield p.data; } } // Consumes a specified amount of characters from the buffered data. _getString(n) { let ret = ""; let p = this.head; let c = 0; do { const str = p.data; if (n > str.length) { ret += str; n -= str.length; } else { if (n === str.length) { ret += str; ++c; if (p.next) { this.head = p.next; } else { this.head = this.tail = null; } } else { ret += StringPrototypeSlice(str, 0, n); this.head = p; p.data = StringPrototypeSlice(str, n); } break; } ++c; } while ((p = p.next) !== null); this.length -= c; return ret; } // Consumes a specified amount of bytes from the buffered data. _getBuffer(n) { const ret = Buffer2.allocUnsafe(n); const retLen = n; let p = this.head; let c = 0; do { const buf = p.data; if (n > buf.length) { TypedArrayPrototypeSet(ret, buf, retLen - n); n -= buf.length; } else { if (n === buf.length) { TypedArrayPrototypeSet(ret, buf, retLen - n); ++c; if (p.next) { this.head = p.next; } else { this.head = this.tail = null; } } else { TypedArrayPrototypeSet( ret, new Uint8Array2(buf.buffer, buf.byteOffset, n), retLen - n, ); this.head = p; p.data = buf.slice(n); } break; } ++c; } while ((p = p.next) !== null); this.length -= c; return ret; } // Make sure the linked list only shows the minimal necessary information. [Symbol.for("nodejs.util.inspect.custom")](_, options) { return inspect(this, { ...options, // Only inspect one level. depth: 0, // It should not recurse. customInspect: false, }); } }; }, }); // lib/internal/streams/state.js var require_state = __commonJS({ "lib/internal/streams/state.js"(exports, module) { "use strict"; var { MathFloor, NumberIsInteger } = require_primordials(); function highWaterMarkFrom(options, isDuplex, duplexKey) { return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; } function getDefaultHighWaterMark(objectMode) { return objectMode ? 16 : 16 * 1024; } function getHighWaterMark(state, options, duplexKey, isDuplex) { const hwm = highWaterMarkFrom(options, isDuplex, duplexKey); if (hwm != null) { if (!NumberIsInteger(hwm) || hwm < 0) { const name = isDuplex ? `options.${duplexKey}` : "options.highWaterMark"; throw new ERR_INVALID_ARG_VALUE(name, hwm); } return MathFloor(hwm); } return getDefaultHighWaterMark(state.objectMode); } module.exports = { getHighWaterMark, getDefaultHighWaterMark, }; }, }); // node_modules/safe-buffer/index.js var require_safe_buffer = __commonJS({ "node_modules/safe-buffer/index.js"(exports, module) { var buffer = require_buffer(); var Buffer2 = buffer.Buffer; function copyProps(src, dst) { for (var key in src) { dst[key] = src[key]; } } if ( Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow ) { module.exports = buffer; } else { copyProps(buffer, exports); exports.Buffer = SafeBuffer; } function SafeBuffer(arg, encodingOrOffset, length) { return Buffer2(arg, encodingOrOffset, length); } SafeBuffer.prototype = Object.create(Buffer2.prototype); copyProps(Buffer2, SafeBuffer); SafeBuffer.from = function (arg, encodingOrOffset, length) { if (typeof arg === "number") { throw new TypeError("Argument must not be a number"); } return Buffer2(arg, encodingOrOffset, length); }; SafeBuffer.alloc = function (size, fill, encoding) { if (typeof size !== "number") { throw new TypeError("Argument must be a number"); } var buf = Buffer2(size); if (fill !== void 0) { if (typeof encoding === "string") { buf.fill(fill, encoding); } else { buf.fill(fill); } } else { buf.fill(0); } return buf; }; SafeBuffer.allocUnsafe = function (size) { if (typeof size !== "number") { throw new TypeError("Argument must be a number"); } return Buffer2(size); }; SafeBuffer.allocUnsafeSlow = function (size) { if (typeof size !== "number") { throw new TypeError("Argument must be a number"); } return buffer.SlowBuffer(size); }; }, }); // lib/internal/streams/from.js var require_from = __commonJS({ "lib/internal/streams/from.js"(exports, module) { "use strict"; var process = require_browser2(); var { PromisePrototypeThen, SymbolAsyncIterator, SymbolIterator } = require_primordials(); var { Buffer: Buffer2 } = require_buffer(); function from(Readable, iterable, opts) { let iterator; if (typeof iterable === "string" || iterable instanceof Buffer2) { return new Readable({ objectMode: true, ...opts, read() { this.push(iterable); this.push(null); }, }); } let isAsync; if (iterable && iterable[SymbolAsyncIterator]) { isAsync = true; iterator = iterable[SymbolAsyncIterator](); } else if (iterable && iterable[SymbolIterator]) { isAsync = false; iterator = iterable[SymbolIterator](); } else { throw new ERR_INVALID_ARG_TYPE("iterable", ["Iterable"], iterable); } const readable = new Readable({ objectMode: true, highWaterMark: 1, // TODO(ronag): What options should be allowed? ...opts, }); let reading = false; readable._read = function () { if (!reading) { reading = true; next(); } }; readable._destroy = function (error, cb) { PromisePrototypeThen( close(error), () => process.nextTick(cb, error), // nextTick is here in case cb throws (e) => process.nextTick(cb, e || error), ); }; async function close(error) { const hadError = error !== void 0 && error !== null; const hasThrow = typeof iterator.throw === "function"; if (hadError && hasThrow) { const { value, done } = await iterator.throw(error); await value; if (done) { return; } } if (typeof iterator.return === "function") { const { value } = await iterator.return(); await value; } } async function next() { for (;;) { try { const { value, done } = isAsync ? await iterator.next() : iterator.next(); if (done) { readable.push(null); } else { const res = value && typeof value.then === "function" ? await value : value; if (res === null) { reading = false; throw new ERR_STREAM_NULL_VALUES(); } else if (readable.push(res)) { continue; } else { reading = false; } } } catch (err) { readable.destroy(err); } break; } } return readable; } module.exports = from; }, }); // lib/internal/streams/readable.js var require_readable = __commonJS({ "lib/internal/streams/readable.js"(exports, module) { var process = require_browser2(); var { ArrayPrototypeIndexOf, NumberIsInteger, NumberIsNaN, NumberParseInt, ObjectDefineProperties, ObjectKeys, ObjectSetPrototypeOf, Promise: Promise2, SafeSet, SymbolAsyncIterator, Symbol: Symbol2, } = require_primordials(); module.exports = Readable; Readable.ReadableState = ReadableState; var { EventEmitter: EE } = require_events(); var { Stream, prependListener } = require_legacy(); var { Buffer: Buffer2 } = require_buffer(); var { addAbortSignal } = require_add_abort_signal(); var eos = require_end_of_stream(); var debug = debuglog("stream", (fn) => { debug = fn; }); var BufferList = require_buffer_list(); var destroyImpl = require_destroy(); var { getHighWaterMark, getDefaultHighWaterMark } = require_state(); var { validateObject } = require_validators(); var kPaused = Symbol2("kPaused"); var from = require_from(); ObjectSetPrototypeOf(Readable.prototype, Stream.prototype); ObjectSetPrototypeOf(Readable, Stream); var nop = () => { }; var { errorOrDestroy } = destroyImpl; function ReadableState(options, stream, isDuplex) { if (typeof isDuplex !== "boolean") { isDuplex = stream instanceof require_duplex(); } this.objectMode = !!(options && options.objectMode); if (isDuplex) { this.objectMode = this.objectMode || !!(options && options.readableObjectMode); } this.highWaterMark = options ? getHighWaterMark(this, options, "readableHighWaterMark", isDuplex) : getDefaultHighWaterMark(false); this.buffer = new BufferList(); this.length = 0; this.pipes = []; this.flowing = null; this.ended = false; this.endEmitted = false; this.reading = false; this.constructed = true; this.sync = true; this.needReadable = false; this.emittedReadable = false; this.readableListening = false; this.resumeScheduled = false; this[kPaused] = null; this.errorEmitted = false; this.emitClose = !options || options.emitClose !== false; this.autoDestroy = !options || options.autoDestroy !== false; this.destroyed = false; this.errored = null; this.closed = false; this.closeEmitted = false; this.defaultEncoding = options && options.defaultEncoding || "utf8"; this.awaitDrainWriters = null; this.multiAwaitDrain = false; this.readingMore = false; this.dataEmitted = false; this.decoder = null; this.encoding = null; if (options && options.encoding) { this.decoder = new StringDecoder(options.encoding); this.encoding = options.encoding; } } function Readable(options) { if (!(this instanceof Readable)) { return new Readable(options); } const isDuplex = this instanceof require_duplex(); this._readableState = new ReadableState(options, this, isDuplex); if (options) { if (typeof options.read === "function") { this._read = options.read; } if (typeof options.destroy === "function") { this._destroy = options.destroy; } if (typeof options.construct === "function") { this._construct = options.construct; } if (options.signal && !isDuplex) { addAbortSignal(options.signal, this); } } Stream.call(this, options); destroyImpl.construct(this, () => { if (this._readableState.needReadable) { maybeReadMore(this, this._readableState); } }); } Readable.prototype.destroy = destroyImpl.destroy; Readable.prototype._undestroy = destroyImpl.undestroy; Readable.prototype._destroy = function (err, cb) { cb(err); }; Readable.prototype[EE.captureRejectionSymbol] = function (err) { this.destroy(err); }; Readable.prototype.push = function (chunk, encoding) { return readableAddChunk(this, chunk, encoding, false); }; Readable.prototype.unshift = function (chunk, encoding) { return readableAddChunk(this, chunk, encoding, true); }; function readableAddChunk(stream, chunk, encoding, addToFront) { debug("readableAddChunk", chunk); const state = stream._readableState; let err; if (!state.objectMode) { if (typeof chunk === "string") { encoding = encoding || state.defaultEncoding; if (state.encoding !== encoding) { if (addToFront && state.encoding) { chunk = Buffer2.from(chunk, encoding).toString(state.encoding); } else { chunk = Buffer2.from(chunk, encoding); encoding = ""; } } } else if (chunk instanceof Buffer2) { encoding = ""; } else if (Stream._isUint8Array(chunk)) { chunk = Stream._uint8ArrayToBuffer(chunk); encoding = ""; } else if (chunk != null) { err = new ERR_INVALID_ARG_TYPE("chunk", [ "string", "Buffer", "Uint8Array", ], chunk); } } if (err) { errorOrDestroy(stream, err); } else if (chunk === null) { state.reading = false; onEofChunk(stream, state); } else if (state.objectMode || chunk && chunk.length > 0) { if (addToFront) { if (state.endEmitted) { errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT()); } else if (state.destroyed || state.errored) { return false; } else { addChunk(stream, state, chunk, true); } } else if (state.ended) { errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); } else if (state.destroyed || state.errored) { return false; } else { state.reading = false; if (state.decoder && !encoding) { chunk = state.decoder.write(chunk); if (state.objectMode || chunk.length !== 0) { addChunk(stream, state, chunk, false); } else { maybeReadMore(stream, state); } } else { addChunk(stream, state, chunk, false); } } } else if (!addToFront) { state.reading = false; maybeReadMore(stream, state); } return !state.ended && (state.length < state.highWaterMark || state.length === 0); } function addChunk(stream, state, chunk, addToFront) { if ( state.flowing && state.length === 0 && !state.sync && stream.listenerCount("data") > 0 ) { if (state.multiAwaitDrain) { state.awaitDrainWriters.clear(); } else { state.awaitDrainWriters = null; } state.dataEmitted = true; stream.emit("data", chunk); } else { state.length += state.objectMode ? 1 : chunk.length; if (addToFront) { state.buffer.unshift(chunk); } else { state.buffer.push(chunk); } if (state.needReadable) { emitReadable(stream); } } maybeReadMore(stream, state); } Readable.prototype.isPaused = function () { const state = this._readableState; return state[kPaused] === true || state.flowing === false; }; Readable.prototype.setEncoding = function (enc) { const decoder = new StringDecoder(enc); this._readableState.decoder = decoder; this._readableState.encoding = this._readableState.decoder.encoding; const buffer = this._readableState.buffer; let content = ""; for (const data of buffer) { content += decoder.write(data); } buffer.clear(); if (content !== "") { buffer.push(content); } this._readableState.length = content.length; return this; }; var MAX_HWM = 1073741824; function computeNewHighWaterMark(n) { if (n > MAX_HWM) { throw new ERR_OUT_OF_RANGE("size", "<= 1GiB", n); } else { n--; n |= n >>> 1; n |= n >>> 2; n |= n >>> 4; n |= n >>> 8; n |= n >>> 16; n++; } return n; } function howMuchToRead(n, state) { if (n <= 0 || state.length === 0 && state.ended) { return 0; } if (state.objectMode) { return 1; } if (NumberIsNaN(n)) { if (state.flowing && state.length) { return state.buffer.first().length; } return state.length; } if (n <= state.length) { return n; } return state.ended ? state.length : 0; } Readable.prototype.read = function (n) { debug("read", n); if (n === void 0) { n = NaN; } else if (!NumberIsInteger(n)) { n = NumberParseInt(n, 10); } const state = this._readableState; const nOrig = n; if (n > state.highWaterMark) { state.highWaterMark = computeNewHighWaterMark(n); } if (n !== 0) { state.emittedReadable = false; } if ( n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended) ) { debug("read: emitReadable", state.length, state.ended); if (state.length === 0 && state.ended) { endReadable(this); } else { emitReadable(this); } return null; } n = howMuchToRead(n, state); if (n === 0 && state.ended) { if (state.length === 0) { endReadable(this); } return null; } let doRead = state.needReadable; debug("need readable", doRead); if (state.length === 0 || state.length - n < state.highWaterMark) { doRead = true; debug("length less than watermark", doRead); } if ( state.ended || state.reading || state.destroyed || state.errored || !state.constructed ) { doRead = false; debug("reading, ended or constructing", doRead); } else if (doRead) { debug("do read"); state.reading = true; state.sync = true; if (state.length === 0) { state.needReadable = true; } try { this._read(state.highWaterMark); } catch (err) { errorOrDestroy(this, err); } state.sync = false; if (!state.reading) { n = howMuchToRead(nOrig, state); } } let ret; if (n > 0) { ret = fromList(n, state); } else { ret = null; } if (ret === null) { state.needReadable = state.length <= state.highWaterMark; n = 0; } else { state.length -= n; if (state.multiAwaitDrain) { state.awaitDrainWriters.clear(); } else { state.awaitDrainWriters = null; } } if (state.length === 0) { if (!state.ended) { state.needReadable = true; } if (nOrig !== n && state.ended) { endReadable(this); } } if (ret !== null && !state.errorEmitted && !state.closeEmitted) { state.dataEmitted = true; this.emit("data", ret); } return ret; }; function onEofChunk(stream, state) { debug("onEofChunk"); if (state.ended) { return; } if (state.decoder) { const chunk = state.decoder.end(); if (chunk && chunk.length) { state.buffer.push(chunk); state.length += state.objectMode ? 1 : chunk.length; } } state.ended = true; if (state.sync) { emitReadable(stream); } else { state.needReadable = false; state.emittedReadable = true; emitReadable_(stream); } } function emitReadable(stream) { const state = stream._readableState; debug("emitReadable", state.needReadable, state.emittedReadable); state.needReadable = false; if (!state.emittedReadable) { debug("emitReadable", state.flowing); state.emittedReadable = true; process.nextTick(emitReadable_, stream); } } function emitReadable_(stream) { const state = stream._readableState; debug("emitReadable_", state.destroyed, state.length, state.ended); if (!state.destroyed && !state.errored && (state.length || state.ended)) { stream.emit("readable"); state.emittedReadable = false; } state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; flow(stream); } function maybeReadMore(stream, state) { if (!state.readingMore && state.constructed) { state.readingMore = true; process.nextTick(maybeReadMore_, stream, state); } } function maybeReadMore_(stream, state) { while ( !state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0) ) { const len = state.length; debug("maybeReadMore read 0"); stream.read(0); if (len === state.length) { break; } } state.readingMore = false; } Readable.prototype._read = function (n) { throw new ERR_METHOD_NOT_IMPLEMENTED("_read()"); }; Readable.prototype.pipe = function (dest, pipeOpts) { const src = this; const state = this._readableState; if (state.pipes.length === 1) { if (!state.multiAwaitDrain) { state.multiAwaitDrain = true; state.awaitDrainWriters = new SafeSet( state.awaitDrainWriters ? [state.awaitDrainWriters] : [], ); } } state.pipes.push(dest); debug("pipe count=%d opts=%j", state.pipes.length, pipeOpts); const doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; const endFn = doEnd ? onend : unpipe; if (state.endEmitted) { process.nextTick(endFn); } else { src.once("end", endFn); } dest.on("unpipe", onunpipe); function onunpipe(readable, unpipeInfo) { debug("onunpipe"); if (readable === src) { if (unpipeInfo && unpipeInfo.hasUnpiped === false) { unpipeInfo.hasUnpiped = true; cleanup(); } } } function onend() { debug("onend"); dest.end(); } let ondrain; let cleanedUp = false; function cleanup() { debug("cleanup"); dest.removeListener("close", onclose); dest.removeListener("finish", onfinish); if (ondrain) { dest.removeListener("drain", ondrain); } dest.removeListener("error", onerror); dest.removeListener("unpipe", onunpipe); src.removeListener("end", onend); src.removeListener("end", unpipe); src.removeListener("data", ondata); cleanedUp = true; if ( ondrain && state.awaitDrainWriters && (!dest._writableState || dest._writableState.needDrain) ) { ondrain(); } } function pause() { if (!cleanedUp) { if (state.pipes.length === 1 && state.pipes[0] === dest) { debug("false write response, pause", 0); state.awaitDrainWriters = dest; state.multiAwaitDrain = false; } else if (state.pipes.length > 1 && state.pipes.includes(dest)) { debug("false write response, pause", state.awaitDrainWriters.size); state.awaitDrainWriters.add(dest); } src.pause(); } if (!ondrain) { ondrain = pipeOnDrain(src, dest); dest.on("drain", ondrain); } } src.on("data", ondata); function ondata(chunk) { debug("ondata"); const ret = dest.write(chunk); debug("dest.write", ret); if (ret === false) { pause(); } } function onerror(er) { debug("onerror", er); unpipe(); dest.removeListener("error", onerror); if (dest.listenerCount("error") === 0) { const s = dest._writableState || dest._readableState; if (s && !s.errorEmitted) { errorOrDestroy(dest, er); } else { dest.emit("error", er); } } } prependListener(dest, "error", onerror); function onclose() { dest.removeListener("finish", onfinish); unpipe(); } dest.once("close", onclose); function onfinish() { debug("onfinish"); dest.removeListener("close", onclose); unpipe(); } dest.once("finish", onfinish); function unpipe() { debug("unpipe"); src.unpipe(dest); } dest.emit("pipe", src); if (dest.writableNeedDrain === true) { if (state.flowing) { pause(); } } else if (!state.flowing) { debug("pipe resume"); src.resume(); } return dest; }; function pipeOnDrain(src, dest) { return function pipeOnDrainFunctionResult() { const state = src._readableState; if (state.awaitDrainWriters === dest) { debug("pipeOnDrain", 1); state.awaitDrainWriters = null; } else if (state.multiAwaitDrain) { debug("pipeOnDrain", state.awaitDrainWriters.size); state.awaitDrainWriters.delete(dest); } if ( (!state.awaitDrainWriters || state.awaitDrainWriters.size === 0) && src.listenerCount("data") ) { src.resume(); } }; } Readable.prototype.unpipe = function (dest) { const state = this._readableState; const unpipeInfo = { hasUnpiped: false, }; if (state.pipes.length === 0) { return this; } if (!dest) { const dests = state.pipes; state.pipes = []; this.pause(); for (let i = 0; i < dests.length; i++) { dests[i].emit("unpipe", this, { hasUnpiped: false, }); } return this; } const index = ArrayPrototypeIndexOf(state.pipes, dest); if (index === -1) { return this; } state.pipes.splice(index, 1); if (state.pipes.length === 0) { this.pause(); } dest.emit("unpipe", this, unpipeInfo); return this; }; Readable.prototype.on = function (ev, fn) { const res = Stream.prototype.on.call(this, ev, fn); const state = this._readableState; if (ev === "data") { state.readableListening = this.listenerCount("readable") > 0; if (state.flowing !== false) { this.resume(); } } else if (ev === "readable") { if (!state.endEmitted && !state.readableListening) { state.readableListening = state.needReadable = true; state.flowing = false; state.emittedReadable = false; debug("on readable", state.length, state.reading); if (state.length) { emitReadable(this); } else if (!state.reading) { process.nextTick(nReadingNextTick, this); } } } return res; }; Readable.prototype.addListener = Readable.prototype.on; Readable.prototype.removeListener = function (ev, fn) { const res = Stream.prototype.removeListener.call(this, ev, fn); if (ev === "readable") { process.nextTick(updateReadableListening, this); } return res; }; Readable.prototype.off = Readable.prototype.removeListener; Readable.prototype.removeAllListeners = function (ev) { const res = Stream.prototype.removeAllListeners.apply(this, arguments); if (ev === "readable" || ev === void 0) { process.nextTick(updateReadableListening, this); } return res; }; function updateReadableListening(self2) { const state = self2._readableState; state.readableListening = self2.listenerCount("readable") > 0; if (state.resumeScheduled && state[kPaused] === false) { state.flowing = true; } else if (self2.listenerCount("data") > 0) { self2.resume(); } else if (!state.readableListening) { state.flowing = null; } } function nReadingNextTick(self2) { debug("readable nexttick read 0"); self2.read(0); } Readable.prototype.resume = function () { const state = this._readableState; if (!state.flowing) { debug("resume"); state.flowing = !state.readableListening; resume(this, state); } state[kPaused] = false; return this; }; function resume(stream, state) { if (!state.resumeScheduled) { state.resumeScheduled = true; process.nextTick(resume_, stream, state); } } function resume_(stream, state) { debug("resume", state.reading); if (!state.reading) { stream.read(0); } state.resumeScheduled = false; stream.emit("resume"); flow(stream); if (state.flowing && !state.reading) { stream.read(0); } } Readable.prototype.pause = function () { debug("call pause flowing=%j", this._readableState.flowing); if (this._readableState.flowing !== false) { debug("pause"); this._readableState.flowing = false; this.emit("pause"); } this._readableState[kPaused] = true; return this; }; function flow(stream) { const state = stream._readableState; debug("flow", state.flowing); while (state.flowing && stream.read() !== null); } Readable.prototype.wrap = function (stream) { let paused = false; stream.on("data", (chunk) => { if (!this.push(chunk) && stream.pause) { paused = true; stream.pause(); } }); stream.on("end", () => { this.push(null); }); stream.on("error", (err) => { errorOrDestroy(this, err); }); stream.on("close", () => { this.destroy(); }); stream.on("destroy", () => { this.destroy(); }); this._read = () => { if (paused && stream.resume) { paused = false; stream.resume(); } }; const streamKeys = ObjectKeys(stream); for (let j = 1; j < streamKeys.length; j++) { const i = streamKeys[j]; if (this[i] === void 0 && typeof stream[i] === "function") { this[i] = stream[i].bind(stream); } } return this; }; Readable.prototype[SymbolAsyncIterator] = function () { return streamToAsyncIterator(this); }; Readable.prototype.iterator = function (options) { if (options !== void 0) { validateObject(options, "options"); } return streamToAsyncIterator(this, options); }; function streamToAsyncIterator(stream, options) { if (typeof stream.read !== "function") { stream = Readable.wrap(stream, { objectMode: true, }); } const iter = createAsyncIterator(stream, options); iter.stream = stream; return iter; } async function* createAsyncIterator(stream, options) { let callback = nop; function next(resolve) { if (this === stream) { callback(); callback = nop; } else { callback = resolve; } } stream.on("readable", next); let error; const cleanup = eos( stream, { writable: false, }, (err) => { error = err ? aggregateTwoErrors(error, err) : null; callback(); callback = nop; }, ); try { while (true) { const chunk = stream.destroyed ? null : stream.read(); if (chunk !== null) { yield chunk; } else if (error) { throw error; } else if (error === null) { return; } else { await new Promise2(next); } } } catch (err) { error = aggregateTwoErrors(error, err); throw error; } finally { if ( (error || (options === null || options === void 0 ? void 0 : options.destroyOnReturn) !== false) && (error === void 0 || stream._readableState.autoDestroy) ) { destroyImpl.destroyer(stream, null); } else { stream.off("readable", next); cleanup(); } } } ObjectDefineProperties(Readable.prototype, { readable: { __proto__: null, get() { const r = this._readableState; return !!r && r.readable !== false && !r.destroyed && !r.errorEmitted && !r.endEmitted; }, set(val) { if (this._readableState) { this._readableState.readable = !!val; } }, }, readableDidRead: { __proto__: null, enumerable: false, get: function () { return this._readableState.dataEmitted; }, }, readableAborted: { __proto__: null, enumerable: false, get: function () { return !!(this._readableState.readable !== false && (this._readableState.destroyed || this._readableState.errored) && !this._readableState.endEmitted); }, }, readableHighWaterMark: { __proto__: null, enumerable: false, get: function () { return this._readableState.highWaterMark; }, }, readableBuffer: { __proto__: null, enumerable: false, get: function () { return this._readableState && this._readableState.buffer; }, }, readableFlowing: { __proto__: null, enumerable: false, get: function () { return this._readableState.flowing; }, set: function (state) { if (this._readableState) { this._readableState.flowing = state; } }, }, readableLength: { __proto__: null, enumerable: false, get() { return this._readableState.length; }, }, readableObjectMode: { __proto__: null, enumerable: false, get() { return this._readableState ? this._readableState.objectMode : false; }, }, readableEncoding: { __proto__: null, enumerable: false, get() { return this._readableState ? this._readableState.encoding : null; }, }, errored: { __proto__: null, enumerable: false, get() { return this._readableState ? this._readableState.errored : null; }, }, closed: { __proto__: null, get() { return this._readableState ? this._readableState.closed : false; }, }, destroyed: { __proto__: null, enumerable: false, get() { return this._readableState ? this._readableState.destroyed : false; }, set(value) { if (!this._readableState) { return; } this._readableState.destroyed = value; }, }, readableEnded: { __proto__: null, enumerable: false, get() { return this._readableState ? this._readableState.endEmitted : false; }, }, }); ObjectDefineProperties(ReadableState.prototype, { // Legacy getter for `pipesCount`. pipesCount: { __proto__: null, get() { return this.pipes.length; }, }, // Legacy property for `paused`. paused: { __proto__: null, get() { return this[kPaused] !== false; }, set(value) { this[kPaused] = !!value; }, }, }); Readable._fromList = fromList; function fromList(n, state) { if (state.length === 0) { return null; } let ret; if (state.objectMode) { ret = state.buffer.shift(); } else if (!n || n >= state.length) { if (state.decoder) { ret = state.buffer.join(""); } else if (state.buffer.length === 1) { ret = state.buffer.first(); } else { ret = state.buffer.concat(state.length); } state.buffer.clear(); } else { ret = state.buffer.consume(n, state.decoder); } return ret; } function endReadable(stream) { const state = stream._readableState; debug("endReadable", state.endEmitted); if (!state.endEmitted) { state.ended = true; process.nextTick(endReadableNT, state, stream); } } function endReadableNT(state, stream) { debug("endReadableNT", state.endEmitted, state.length); if ( !state.errored && !state.closeEmitted && !state.endEmitted && state.length === 0 ) { state.endEmitted = true; stream.emit("end"); if (stream.writable && stream.allowHalfOpen === false) { process.nextTick(endWritableNT, stream); } else if (state.autoDestroy) { const wState = stream._writableState; const autoDestroy = !wState || wState.autoDestroy && // We don't expect the writable to ever 'finish' // if writable is explicitly set to false. (wState.finished || wState.writable === false); if (autoDestroy) { stream.destroy(); } } } } function endWritableNT(stream) { const writable = stream.writable && !stream.writableEnded && !stream.destroyed; if (writable) { stream.end(); } } Readable.from = function (iterable, opts) { return from(Readable, iterable, opts); }; var webStreamsAdapters; function lazyWebStreams() { if (webStreamsAdapters === void 0) { webStreamsAdapters = {}; } return webStreamsAdapters; } Readable.fromWeb = function (readableStream, options) { return lazyWebStreams().newStreamReadableFromReadableStream( readableStream, options, ); }; Readable.toWeb = function (streamReadable, options) { return lazyWebStreams().newReadableStreamFromStreamReadable( streamReadable, options, ); }; Readable.wrap = function (src, options) { var _ref, _src$readableObjectMo; return new Readable({ objectMode: (_ref = (_src$readableObjectMo = src.readableObjectMode) !== null && _src$readableObjectMo !== void 0 ? _src$readableObjectMo : src.objectMode) !== null && _ref !== void 0 ? _ref : true, ...options, destroy(err, callback) { destroyImpl.destroyer(src, err); callback(err); }, }).wrap(src); }; }, }); // lib/internal/streams/writable.js var require_writable = __commonJS({ "lib/internal/streams/writable.js"(exports, module) { var process = require_browser2(); var { ArrayPrototypeSlice, Error: Error2, FunctionPrototypeSymbolHasInstance, ObjectDefineProperty, ObjectDefineProperties, ObjectSetPrototypeOf, StringPrototypeToLowerCase, Symbol: Symbol2, SymbolHasInstance, } = require_primordials(); module.exports = Writable; Writable.WritableState = WritableState; var { EventEmitter: EE } = require_events(); var Stream = require_legacy().Stream; var { Buffer: Buffer2 } = require_buffer(); var destroyImpl = require_destroy(); var { addAbortSignal } = require_add_abort_signal(); var { getHighWaterMark, getDefaultHighWaterMark } = require_state(); var { errorOrDestroy } = destroyImpl; ObjectSetPrototypeOf(Writable.prototype, Stream.prototype); ObjectSetPrototypeOf(Writable, Stream); function nop() { } var kOnFinished = Symbol2("kOnFinished"); function WritableState(options, stream, isDuplex) { if (typeof isDuplex !== "boolean") { isDuplex = stream instanceof require_duplex(); } this.objectMode = !!(options && options.objectMode); if (isDuplex) { this.objectMode = this.objectMode || !!(options && options.writableObjectMode); } this.highWaterMark = options ? getHighWaterMark(this, options, "writableHighWaterMark", isDuplex) : getDefaultHighWaterMark(false); this.finalCalled = false; this.needDrain = false; this.ending = false; this.ended = false; this.finished = false; this.destroyed = false; const noDecode = !!(options && options.decodeStrings === false); this.decodeStrings = !noDecode; this.defaultEncoding = options && options.defaultEncoding || "utf8"; this.length = 0; this.writing = false; this.corked = 0; this.sync = true; this.bufferProcessing = false; this.onwrite = onwrite.bind(void 0, stream); this.writecb = null; this.writelen = 0; this.afterWriteTickInfo = null; resetBuffer(this); this.pendingcb = 0; this.constructed = true; this.prefinished = false; this.errorEmitted = false; this.emitClose = !options || options.emitClose !== false; this.autoDestroy = !options || options.autoDestroy !== false; this.errored = null; this.closed = false; this.closeEmitted = false; this[kOnFinished] = []; } function resetBuffer(state) { state.buffered = []; state.bufferedIndex = 0; state.allBuffers = true; state.allNoop = true; } WritableState.prototype.getBuffer = function getBuffer() { return ArrayPrototypeSlice(this.buffered, this.bufferedIndex); }; ObjectDefineProperty(WritableState.prototype, "bufferedRequestCount", { __proto__: null, get() { return this.buffered.length - this.bufferedIndex; }, }); function Writable(options) { const isDuplex = this instanceof require_duplex(); if (!isDuplex && !FunctionPrototypeSymbolHasInstance(Writable, this)) { return new Writable(options); } this._writableState = new WritableState(options, this, isDuplex); if (options) { if (typeof options.write === "function") { this._write = options.write; } if (typeof options.writev === "function") { this._writev = options.writev; } if (typeof options.destroy === "function") { this._destroy = options.destroy; } if (typeof options.final === "function") { this._final = options.final; } if (typeof options.construct === "function") { this._construct = options.construct; } if (options.signal) { addAbortSignal(options.signal, this); } } Stream.call(this, options); destroyImpl.construct(this, () => { const state = this._writableState; if (!state.writing) { clearBuffer(this, state); } finishMaybe(this, state); }); } ObjectDefineProperty(Writable, SymbolHasInstance, { __proto__: null, value: function (object) { if (FunctionPrototypeSymbolHasInstance(this, object)) { return true; } if (this !== Writable) { return false; } return object && object._writableState instanceof WritableState; }, }); Writable.prototype.pipe = function () { errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); }; function _write(stream, chunk, encoding, cb) { const state = stream._writableState; if (typeof encoding === "function") { cb = encoding; encoding = state.defaultEncoding; } else { if (!encoding) { encoding = state.defaultEncoding; } else if (encoding !== "buffer" && !Buffer2.isEncoding(encoding)) { throw new ERR_UNKNOWN_ENCODING(encoding); } if (typeof cb !== "function") { cb = nop; } } if (chunk === null) { throw new ERR_STREAM_NULL_VALUES(); } else if (!state.objectMode) { if (typeof chunk === "string") { if (state.decodeStrings !== false) { chunk = Buffer2.from(chunk, encoding); encoding = "buffer"; } } else if (chunk instanceof Buffer2) { encoding = "buffer"; } else if (Stream._isUint8Array(chunk)) { chunk = Stream._uint8ArrayToBuffer(chunk); encoding = "buffer"; } else { throw new ERR_INVALID_ARG_TYPE("chunk", [ "string", "Buffer", "Uint8Array", ], chunk); } } let err; if (state.ending) { err = new ERR_STREAM_WRITE_AFTER_END(); } else if (state.destroyed) { err = new ERR_STREAM_DESTROYED("write"); } if (err) { process.nextTick(cb, err); errorOrDestroy(stream, err, true); return err; } state.pendingcb++; return writeOrBuffer(stream, state, chunk, encoding, cb); } Writable.prototype.write = function (chunk, encoding, cb) { return _write(this, chunk, encoding, cb) === true; }; Writable.prototype.cork = function () { this._writableState.corked++; }; Writable.prototype.uncork = function () { const state = this._writableState; if (state.corked) { state.corked--; if (!state.writing) { clearBuffer(this, state); } } }; Writable.prototype.setDefaultEncoding = function setDefaultEncoding( encoding, ) { if (typeof encoding === "string") { encoding = StringPrototypeToLowerCase(encoding); } if (!Buffer2.isEncoding(encoding)) { throw new ERR_UNKNOWN_ENCODING(encoding); } this._writableState.defaultEncoding = encoding; return this; }; function writeOrBuffer(stream, state, chunk, encoding, callback) { const len = state.objectMode ? 1 : chunk.length; state.length += len; const ret = state.length < state.highWaterMark; if (!ret) { state.needDrain = true; } if ( state.writing || state.corked || state.errored || !state.constructed ) { state.buffered.push({ chunk, encoding, callback, }); if (state.allBuffers && encoding !== "buffer") { state.allBuffers = false; } if (state.allNoop && callback !== nop) { state.allNoop = false; } } else { state.writelen = len; state.writecb = callback; state.writing = true; state.sync = true; stream._write(chunk, encoding, state.onwrite); state.sync = false; } return ret && !state.errored && !state.destroyed; } function doWrite(stream, state, writev, len, chunk, encoding, cb) { state.writelen = len; state.writecb = cb; state.writing = true; state.sync = true; if (state.destroyed) { state.onwrite(new ERR_STREAM_DESTROYED("write")); } else if (writev) { stream._writev(chunk, state.onwrite); } else { stream._write(chunk, encoding, state.onwrite); } state.sync = false; } function onwriteError(stream, state, er, cb) { --state.pendingcb; cb(er); errorBuffer(state); errorOrDestroy(stream, er); } function onwrite(stream, er) { const state = stream._writableState; const sync = state.sync; const cb = state.writecb; if (typeof cb !== "function") { errorOrDestroy(stream, new ERR_MULTIPLE_CALLBACK()); return; } state.writing = false; state.writecb = null; state.length -= state.writelen; state.writelen = 0; if (er) { er.stack; if (!state.errored) { state.errored = er; } if (stream._readableState && !stream._readableState.errored) { stream._readableState.errored = er; } if (sync) { process.nextTick(onwriteError, stream, state, er, cb); } else { onwriteError(stream, state, er, cb); } } else { if (state.buffered.length > state.bufferedIndex) { clearBuffer(stream, state); } if (sync) { if ( state.afterWriteTickInfo !== null && state.afterWriteTickInfo.cb === cb ) { state.afterWriteTickInfo.count++; } else { state.afterWriteTickInfo = { count: 1, cb, stream, state, }; process.nextTick(afterWriteTick, state.afterWriteTickInfo); } } else { afterWrite(stream, state, 1, cb); } } } function afterWriteTick({ stream, state, count, cb }) { state.afterWriteTickInfo = null; return afterWrite(stream, state, count, cb); } function afterWrite(stream, state, count, cb) { const needDrain = !state.ending && !stream.destroyed && state.length === 0 && state.needDrain; if (needDrain) { state.needDrain = false; stream.emit("drain"); } while (count-- > 0) { state.pendingcb--; cb(); } if (state.destroyed) { errorBuffer(state); } finishMaybe(stream, state); } function errorBuffer(state) { if (state.writing) { return; } for (let n = state.bufferedIndex; n < state.buffered.length; ++n) { var _state$errored; const { chunk, callback } = state.buffered[n]; const len = state.objectMode ? 1 : chunk.length; state.length -= len; callback( (_state$errored = state.errored) !== null && _state$errored !== void 0 ? _state$errored : new ERR_STREAM_DESTROYED("write"), ); } const onfinishCallbacks = state[kOnFinished].splice(0); for (let i = 0; i < onfinishCallbacks.length; i++) { var _state$errored2; onfinishCallbacks[i]( (_state$errored2 = state.errored) !== null && _state$errored2 !== void 0 ? _state$errored2 : new ERR_STREAM_DESTROYED("end"), ); } resetBuffer(state); } function clearBuffer(stream, state) { if ( state.corked || state.bufferProcessing || state.destroyed || !state.constructed ) { return; } const { buffered, bufferedIndex, objectMode } = state; const bufferedLength = buffered.length - bufferedIndex; if (!bufferedLength) { return; } let i = bufferedIndex; state.bufferProcessing = true; if (bufferedLength > 1 && stream._writev) { state.pendingcb -= bufferedLength - 1; const callback = state.allNoop ? nop : (err) => { for (let n = i; n < buffered.length; ++n) { buffered[n].callback(err); } }; const chunks = state.allNoop && i === 0 ? buffered : ArrayPrototypeSlice(buffered, i); chunks.allBuffers = state.allBuffers; doWrite(stream, state, true, state.length, chunks, "", callback); resetBuffer(state); } else { do { const { chunk, encoding, callback } = buffered[i]; buffered[i++] = null; const len = objectMode ? 1 : chunk.length; doWrite(stream, state, false, len, chunk, encoding, callback); } while (i < buffered.length && !state.writing); if (i === buffered.length) { resetBuffer(state); } else if (i > 256) { buffered.splice(0, i); state.bufferedIndex = 0; } else { state.bufferedIndex = i; } } state.bufferProcessing = false; } Writable.prototype._write = function (chunk, encoding, cb) { if (this._writev) { this._writev( [ { chunk, encoding, }, ], cb, ); } else { throw new ERR_METHOD_NOT_IMPLEMENTED("_write()"); } }; Writable.prototype._writev = null; Writable.prototype.end = function (chunk, encoding, cb) { const state = this._writableState; if (typeof chunk === "function") { cb = chunk; chunk = null; encoding = null; } else if (typeof encoding === "function") { cb = encoding; encoding = null; } let err; if (chunk !== null && chunk !== void 0) { const ret = _write(this, chunk, encoding); if (ret instanceof Error2) { err = ret; } } if (state.corked) { state.corked = 1; this.uncork(); } if (err) { } else if (!state.errored && !state.ending) { state.ending = true; finishMaybe(this, state, true); state.ended = true; } else if (state.finished) { err = new ERR_STREAM_ALREADY_FINISHED("end"); } else if (state.destroyed) { err = new ERR_STREAM_DESTROYED("end"); } if (typeof cb === "function") { if (err || state.finished) { process.nextTick(cb, err); } else { state[kOnFinished].push(cb); } } return this; }; function needFinish(state) { return state.ending && !state.destroyed && state.constructed && state.length === 0 && !state.errored && state.buffered.length === 0 && !state.finished && !state.writing && !state.errorEmitted && !state.closeEmitted; } function callFinal(stream, state) { let called = false; function onFinish(err) { if (called) { errorOrDestroy( stream, err !== null && err !== void 0 ? err : ERR_MULTIPLE_CALLBACK(), ); return; } called = true; state.pendingcb--; if (err) { const onfinishCallbacks = state[kOnFinished].splice(0); for (let i = 0; i < onfinishCallbacks.length; i++) { onfinishCallbacks[i](err); } errorOrDestroy(stream, err, state.sync); } else if (needFinish(state)) { state.prefinished = true; stream.emit("prefinish"); state.pendingcb++; process.nextTick(finish, stream, state); } } state.sync = true; state.pendingcb++; try { stream._final(onFinish); } catch (err) { onFinish(err); } state.sync = false; } function prefinish(stream, state) { if (!state.prefinished && !state.finalCalled) { if (typeof stream._final === "function" && !state.destroyed) { state.finalCalled = true; callFinal(stream, state); } else { state.prefinished = true; stream.emit("prefinish"); } } } function finishMaybe(stream, state, sync) { if (needFinish(state)) { prefinish(stream, state); if (state.pendingcb === 0) { if (sync) { state.pendingcb++; process.nextTick( (stream2, state2) => { if (needFinish(state2)) { finish(stream2, state2); } else { state2.pendingcb--; } }, stream, state, ); } else if (needFinish(state)) { state.pendingcb++; finish(stream, state); } } } } function finish(stream, state) { state.pendingcb--; state.finished = true; const onfinishCallbacks = state[kOnFinished].splice(0); for (let i = 0; i < onfinishCallbacks.length; i++) { onfinishCallbacks[i](); } stream.emit("finish"); if (state.autoDestroy) { const rState = stream._readableState; const autoDestroy = !rState || rState.autoDestroy && // We don't expect the readable to ever 'end' // if readable is explicitly set to false. (rState.endEmitted || rState.readable === false); if (autoDestroy) { stream.destroy(); } } } ObjectDefineProperties(Writable.prototype, { closed: { __proto__: null, get() { return this._writableState ? this._writableState.closed : false; }, }, destroyed: { __proto__: null, get() { return this._writableState ? this._writableState.destroyed : false; }, set(value) { if (this._writableState) { this._writableState.destroyed = value; } }, }, writable: { __proto__: null, get() { const w = this._writableState; return !!w && w.writable !== false && !w.destroyed && !w.errored && !w.ending && !w.ended; }, set(val) { if (this._writableState) { this._writableState.writable = !!val; } }, }, writableFinished: { __proto__: null, get() { return this._writableState ? this._writableState.finished : false; }, }, writableObjectMode: { __proto__: null, get() { return this._writableState ? this._writableState.objectMode : false; }, }, writableBuffer: { __proto__: null, get() { return this._writableState && this._writableState.getBuffer(); }, }, writableEnded: { __proto__: null, get() { return this._writableState ? this._writableState.ending : false; }, }, writableNeedDrain: { __proto__: null, get() { const wState = this._writableState; if (!wState) { return false; } return !wState.destroyed && !wState.ending && wState.needDrain; }, }, writableHighWaterMark: { __proto__: null, get() { return this._writableState && this._writableState.highWaterMark; }, }, writableCorked: { __proto__: null, get() { return this._writableState ? this._writableState.corked : 0; }, }, writableLength: { __proto__: null, get() { return this._writableState && this._writableState.length; }, }, errored: { __proto__: null, enumerable: false, get() { return this._writableState ? this._writableState.errored : null; }, }, writableAborted: { __proto__: null, enumerable: false, get: function () { return !!(this._writableState.writable !== false && (this._writableState.destroyed || this._writableState.errored) && !this._writableState.finished); }, }, }); var destroy = destroyImpl.destroy; Writable.prototype.destroy = function (err, cb) { const state = this._writableState; if ( !state.destroyed && (state.bufferedIndex < state.buffered.length || state[kOnFinished].length) ) { process.nextTick(errorBuffer, state); } destroy.call(this, err, cb); return this; }; Writable.prototype._undestroy = destroyImpl.undestroy; Writable.prototype._destroy = function (err, cb) { cb(err); }; Writable.prototype[EE.captureRejectionSymbol] = function (err) { this.destroy(err); }; var webStreamsAdapters; function lazyWebStreams() { if (webStreamsAdapters === void 0) { webStreamsAdapters = {}; } return webStreamsAdapters; } Writable.fromWeb = function (writableStream, options) { return lazyWebStreams().newStreamWritableFromWritableStream( writableStream, options, ); }; Writable.toWeb = function (streamWritable) { return lazyWebStreams().newWritableStreamFromStreamWritable( streamWritable, ); }; }, }); // lib/internal/streams/duplexify.js var require_duplexify = __commonJS({ "lib/internal/streams/duplexify.js"(exports, module) { var process = require_browser2(); var bufferModule = require_buffer(); var { isReadable, isWritable, isIterable, isNodeStream, isReadableNodeStream, isWritableNodeStream, isDuplexNodeStream, } = require_utils(); var eos = require_end_of_stream(); var { destroyer } = require_destroy(); var Duplex = require_duplex(); var Readable = require_readable(); var from = require_from(); var isBlob = typeof Blob !== "undefined" ? function isBlob2(b) { return b instanceof Blob; } : function isBlob2(b) { return false; }; var { FunctionPrototypeCall } = require_primordials(); var Duplexify = class extends Duplex { constructor(options) { super(options); if ( (options === null || options === void 0 ? void 0 : options.readable) === false ) { this._readableState.readable = false; this._readableState.ended = true; this._readableState.endEmitted = true; } if ( (options === null || options === void 0 ? void 0 : options.writable) === false ) { this._writableState.writable = false; this._writableState.ending = true; this._writableState.ended = true; this._writableState.finished = true; } } }; module.exports = function duplexify(body, name) { if (isDuplexNodeStream(body)) { return body; } if (isReadableNodeStream(body)) { return _duplexify({ readable: body, }); } if (isWritableNodeStream(body)) { return _duplexify({ writable: body, }); } if (isNodeStream(body)) { return _duplexify({ writable: false, readable: false, }); } if (typeof body === "function") { const { value, write, final, destroy } = fromAsyncGen(body); if (isIterable(value)) { return from(Duplexify, value, { // TODO (ronag): highWaterMark? objectMode: true, write, final, destroy, }); } const then2 = value === null || value === void 0 ? void 0 : value.then; if (typeof then2 === "function") { let d; const promise = FunctionPrototypeCall( then2, value, (val) => { if (val != null) { throw new ERR_INVALID_RETURN_VALUE("nully", "body", val); } }, (err) => { destroyer(d, err); }, ); return d = new Duplexify({ // TODO (ronag): highWaterMark? objectMode: true, readable: false, write, final(cb) { final(async () => { try { await promise; process.nextTick(cb, null); } catch (err) { process.nextTick(cb, err); } }); }, destroy, }); } throw new ERR_INVALID_RETURN_VALUE( "Iterable, AsyncIterable or AsyncFunction", name, value, ); } if (isBlob(body)) { return duplexify(body.arrayBuffer()); } if (isIterable(body)) { return from(Duplexify, body, { // TODO (ronag): highWaterMark? objectMode: true, writable: false, }); } if ( typeof (body === null || body === void 0 ? void 0 : body.writable) === "object" || typeof (body === null || body === void 0 ? void 0 : body.readable) === "object" ) { const readable = body !== null && body !== void 0 && body.readable ? isReadableNodeStream( body === null || body === void 0 ? void 0 : body.readable, ) ? body === null || body === void 0 ? void 0 : body.readable : duplexify(body.readable) : void 0; const writable = body !== null && body !== void 0 && body.writable ? isWritableNodeStream( body === null || body === void 0 ? void 0 : body.writable, ) ? body === null || body === void 0 ? void 0 : body.writable : duplexify(body.writable) : void 0; return _duplexify({ readable, writable, }); } const then = body === null || body === void 0 ? void 0 : body.then; if (typeof then === "function") { let d; FunctionPrototypeCall( then, body, (val) => { if (val != null) { d.push(val); } d.push(null); }, (err) => { destroyer(d, err); }, ); return d = new Duplexify({ objectMode: true, writable: false, read() { }, }); } throw new ERR_INVALID_ARG_TYPE( name, [ "Blob", "ReadableStream", "WritableStream", "Stream", "Iterable", "AsyncIterable", "Function", "{ readable, writable } pair", "Promise", ], body, ); }; function fromAsyncGen(fn) { let { promise, resolve } = createDeferredPromise(); const ac = new AbortController(); const signal = ac.signal; const value = fn( async function* () { while (true) { const _promise = promise; promise = null; const { chunk, done, cb } = await _promise; process.nextTick(cb); if (done) { return; } if (signal.aborted) { throw new AbortError(void 0, { cause: signal.reason, }); } ({ promise, resolve } = createDeferredPromise()); yield chunk; } }(), { signal, }, ); return { value, write(chunk, encoding, cb) { const _resolve = resolve; resolve = null; _resolve({ chunk, done: false, cb, }); }, final(cb) { const _resolve = resolve; resolve = null; _resolve({ done: true, cb, }); }, destroy(err, cb) { ac.abort(); cb(err); }, }; } function _duplexify(pair) { const r = pair.readable && typeof pair.readable.read !== "function" ? Readable.wrap(pair.readable) : pair.readable; const w = pair.writable; let readable = !!isReadable(r); let writable = !!isWritable(w); let ondrain; let onfinish; let onreadable; let onclose; let d; function onfinished(err) { const cb = onclose; onclose = null; if (cb) { cb(err); } else if (err) { d.destroy(err); } } d = new Duplexify({ // TODO (ronag): highWaterMark? readableObjectMode: !!(r !== null && r !== void 0 && r.readableObjectMode), writableObjectMode: !!(w !== null && w !== void 0 && w.writableObjectMode), readable, writable, }); if (writable) { eos(w, (err) => { writable = false; if (err) { destroyer(r, err); } onfinished(err); }); d._write = function (chunk, encoding, callback) { if (w.write(chunk, encoding)) { callback(); } else { ondrain = callback; } }; d._final = function (callback) { w.end(); onfinish = callback; }; w.on("drain", function () { if (ondrain) { const cb = ondrain; ondrain = null; cb(); } }); w.on("finish", function () { if (onfinish) { const cb = onfinish; onfinish = null; cb(); } }); } if (readable) { eos(r, (err) => { readable = false; if (err) { destroyer(r, err); } onfinished(err); }); r.on("readable", function () { if (onreadable) { const cb = onreadable; onreadable = null; cb(); } }); r.on("end", function () { d.push(null); }); d._read = function () { while (true) { const buf = r.read(); if (buf === null) { onreadable = d._read; return; } if (!d.push(buf)) { return; } } }; } d._destroy = function (err, callback) { if (!err && onclose !== null) { err = new AbortError(); } onreadable = null; ondrain = null; onfinish = null; if (onclose === null) { callback(err); } else { onclose = callback; destroyer(w, err); destroyer(r, err); } }; return d; } }, }); // lib/internal/streams/duplex.js var require_duplex = __commonJS({ "lib/internal/streams/duplex.js"(exports, module) { "use strict"; var { ObjectDefineProperties, ObjectGetOwnPropertyDescriptor, ObjectKeys, ObjectSetPrototypeOf, } = require_primordials(); module.exports = Duplex; var Readable = require_readable(); var Writable = require_writable(); ObjectSetPrototypeOf(Duplex.prototype, Readable.prototype); ObjectSetPrototypeOf(Duplex, Readable); { const keys = ObjectKeys(Writable.prototype); for (let i = 0; i < keys.length; i++) { const method = keys[i]; if (!Duplex.prototype[method]) { Duplex.prototype[method] = Writable.prototype[method]; } } } function Duplex(options) { if (!(this instanceof Duplex)) { return new Duplex(options); } Readable.call(this, options); Writable.call(this, options); if (options) { this.allowHalfOpen = options.allowHalfOpen !== false; if (options.readable === false) { this._readableState.readable = false; this._readableState.ended = true; this._readableState.endEmitted = true; } if (options.writable === false) { this._writableState.writable = false; this._writableState.ending = true; this._writableState.ended = true; this._writableState.finished = true; } } else { this.allowHalfOpen = true; } } ObjectDefineProperties(Duplex.prototype, { writable: { __proto__: null, ...ObjectGetOwnPropertyDescriptor(Writable.prototype, "writable"), }, writableHighWaterMark: { __proto__: null, ...ObjectGetOwnPropertyDescriptor( Writable.prototype, "writableHighWaterMark", ), }, writableObjectMode: { __proto__: null, ...ObjectGetOwnPropertyDescriptor( Writable.prototype, "writableObjectMode", ), }, writableBuffer: { __proto__: null, ...ObjectGetOwnPropertyDescriptor(Writable.prototype, "writableBuffer"), }, writableLength: { __proto__: null, ...ObjectGetOwnPropertyDescriptor(Writable.prototype, "writableLength"), }, writableFinished: { __proto__: null, ...ObjectGetOwnPropertyDescriptor( Writable.prototype, "writableFinished", ), }, writableCorked: { __proto__: null, ...ObjectGetOwnPropertyDescriptor(Writable.prototype, "writableCorked"), }, writableEnded: { __proto__: null, ...ObjectGetOwnPropertyDescriptor(Writable.prototype, "writableEnded"), }, writableNeedDrain: { __proto__: null, ...ObjectGetOwnPropertyDescriptor( Writable.prototype, "writableNeedDrain", ), }, destroyed: { __proto__: null, get() { if ( this._readableState === void 0 || this._writableState === void 0 ) { return false; } return this._readableState.destroyed && this._writableState.destroyed; }, set(value) { if (this._readableState && this._writableState) { this._readableState.destroyed = value; this._writableState.destroyed = value; } }, }, }); var webStreamsAdapters; function lazyWebStreams() { if (webStreamsAdapters === void 0) { webStreamsAdapters = {}; } return webStreamsAdapters; } Duplex.fromWeb = function (pair, options) { return lazyWebStreams().newStreamDuplexFromReadableWritablePair( pair, options, ); }; Duplex.toWeb = function (duplex) { return lazyWebStreams().newReadableWritablePairFromDuplex(duplex); }; var duplexify; Duplex.from = function (body) { if (!duplexify) { duplexify = require_duplexify(); } return duplexify(body, "body"); }; }, }); // lib/internal/streams/transform.js var require_transform = __commonJS({ "lib/internal/streams/transform.js"(exports, module) { "use strict"; var { ObjectSetPrototypeOf, Symbol: Symbol2 } = require_primordials(); module.exports = Transform; var Duplex = require_duplex(); var { getHighWaterMark } = require_state(); ObjectSetPrototypeOf(Transform.prototype, Duplex.prototype); ObjectSetPrototypeOf(Transform, Duplex); var kCallback = Symbol2("kCallback"); function Transform(options) { if (!(this instanceof Transform)) { return new Transform(options); } const readableHighWaterMark = options ? getHighWaterMark(this, options, "readableHighWaterMark", true) : null; if (readableHighWaterMark === 0) { options = { ...options, highWaterMark: null, readableHighWaterMark, // TODO (ronag): 0 is not optimal since we have // a "bug" where we check needDrain before calling _write and not after. // Refs: https://github.com/nodejs/node/pull/32887 // Refs: https://github.com/nodejs/node/pull/35941 writableHighWaterMark: options.writableHighWaterMark || 0, }; } Duplex.call(this, options); this._readableState.sync = false; this[kCallback] = null; if (options) { if (typeof options.transform === "function") { this._transform = options.transform; } if (typeof options.flush === "function") { this._flush = options.flush; } } this.on("prefinish", prefinish); } function final(cb) { if (typeof this._flush === "function" && !this.destroyed) { this._flush((er, data) => { if (er) { if (cb) { cb(er); } else { this.destroy(er); } return; } if (data != null) { this.push(data); } this.push(null); if (cb) { cb(); } }); } else { this.push(null); if (cb) { cb(); } } } function prefinish() { if (this._final !== final) { final.call(this); } } Transform.prototype._final = final; Transform.prototype._transform = function (chunk, encoding, callback) { throw new ERR_METHOD_NOT_IMPLEMENTED("_transform()"); }; Transform.prototype._write = function (chunk, encoding, callback) { const rState = this._readableState; const wState = this._writableState; const length = rState.length; this._transform(chunk, encoding, (err, val) => { if (err) { callback(err); return; } if (val != null) { this.push(val); } if ( wState.ended || // Backwards compat. length === rState.length || // Backwards compat. rState.length < rState.highWaterMark ) { callback(); } else { this[kCallback] = callback; } }); }; Transform.prototype._read = function () { if (this[kCallback]) { const callback = this[kCallback]; this[kCallback] = null; callback(); } }; }, }); // lib/internal/streams/passthrough.js var require_passthrough = __commonJS({ "lib/internal/streams/passthrough.js"(exports, module) { "use strict"; var { ObjectSetPrototypeOf } = require_primordials(); module.exports = PassThrough; var Transform = require_transform(); ObjectSetPrototypeOf(PassThrough.prototype, Transform.prototype); ObjectSetPrototypeOf(PassThrough, Transform); function PassThrough(options) { if (!(this instanceof PassThrough)) { return new PassThrough(options); } Transform.call(this, options); } PassThrough.prototype._transform = function (chunk, encoding, cb) { cb(null, chunk); }; }, }); // lib/internal/streams/pipeline.js var require_pipeline = __commonJS({ "lib/internal/streams/pipeline.js"(exports, module) { var process = require_browser2(); var { ArrayIsArray, Promise: Promise2, SymbolAsyncIterator } = require_primordials(); var eos = require_end_of_stream(); var destroyImpl = require_destroy(); var Duplex = require_duplex(); var { validateFunction, validateAbortSignal } = require_validators(); var { isIterable, isReadable, isReadableNodeStream, isNodeStream } = require_utils(); var PassThrough; var Readable; function destroyer(stream, reading, writing) { let finished = false; stream.on("close", () => { finished = true; }); const cleanup = eos( stream, { readable: reading, writable: writing, }, (err) => { finished = !err; }, ); return { destroy: (err) => { if (finished) { return; } finished = true; destroyImpl.destroyer( stream, err || new ERR_STREAM_DESTROYED("pipe"), ); }, cleanup, }; } function popCallback(streams) { validateFunction( streams[streams.length - 1], "streams[stream.length - 1]", ); return streams.pop(); } function makeAsyncIterable(val) { if (isIterable(val)) { return val; } else if (isReadableNodeStream(val)) { return fromReadable(val); } throw new ERR_INVALID_ARG_TYPE("val", [ "Readable", "Iterable", "AsyncIterable", ], val); } async function* fromReadable(val) { if (!Readable) { Readable = require_readable(); } yield* Readable.prototype[SymbolAsyncIterator].call(val); } async function pump(iterable, writable, finish, { end }) { let error; let onresolve = null; const resume = (err) => { if (err) { error = err; } if (onresolve) { const callback = onresolve; onresolve = null; callback(); } }; const wait = () => new Promise2((resolve, reject) => { if (error) { reject(error); } else { onresolve = () => { if (error) { reject(error); } else { resolve(); } }; } }); writable.on("drain", resume); const cleanup = eos( writable, { readable: false, }, resume, ); try { if (writable.writableNeedDrain) { await wait(); } for await (const chunk of iterable) { if (!writable.write(chunk)) { await wait(); } } if (end) { writable.end(); } await wait(); finish(); } catch (err) { finish(error !== err ? aggregateTwoErrors(error, err) : err); } finally { cleanup(); writable.off("drain", resume); } } function pipeline(...streams) { return pipelineImpl(streams, once(popCallback(streams))); } function pipelineImpl(streams, callback, opts) { if (streams.length === 1 && ArrayIsArray(streams[0])) { streams = streams[0]; } if (streams.length < 2) { throw new ERR_MISSING_ARGS("streams"); } const ac = new AbortController(); const signal = ac.signal; const outerSignal = opts === null || opts === void 0 ? void 0 : opts.signal; const lastStreamCleanup = []; validateAbortSignal(outerSignal, "options.signal"); function abort() { finishImpl(new AbortError()); } outerSignal === null || outerSignal === void 0 ? void 0 : outerSignal.addEventListener("abort", abort); let error; let value; const destroys = []; let finishCount = 0; function finish(err) { finishImpl(err, --finishCount === 0); } function finishImpl(err, final) { if (err && (!error || error.code === "ERR_STREAM_PREMATURE_CLOSE")) { error = err; } if (!error && !final) { return; } while (destroys.length) { destroys.shift()(error); } outerSignal === null || outerSignal === void 0 ? void 0 : outerSignal.removeEventListener("abort", abort); ac.abort(); if (final) { if (!error) { lastStreamCleanup.forEach((fn) => fn()); } process.nextTick(callback, error, value); } } let ret; for (let i = 0; i < streams.length; i++) { const stream = streams[i]; const reading = i < streams.length - 1; const writing = i > 0; const end = reading || (opts === null || opts === void 0 ? void 0 : opts.end) !== false; const isLastStream = i === streams.length - 1; if (isNodeStream(stream)) { let onError2 = function (err) { if ( err && err.name !== "AbortError" && err.code !== "ERR_STREAM_PREMATURE_CLOSE" ) { finish(err); } }; var onError = onError2; if (end) { const { destroy, cleanup } = destroyer(stream, reading, writing); destroys.push(destroy); if (isReadable(stream) && isLastStream) { lastStreamCleanup.push(cleanup); } } stream.on("error", onError2); if (isReadable(stream) && isLastStream) { lastStreamCleanup.push(() => { stream.removeListener("error", onError2); }); } } if (i === 0) { if (typeof stream === "function") { ret = stream({ signal, }); if (!isIterable(ret)) { throw new ERR_INVALID_RETURN_VALUE( "Iterable, AsyncIterable or Stream", "source", ret, ); } } else if (isIterable(stream) || isReadableNodeStream(stream)) { ret = stream; } else { ret = Duplex.from(stream); } } else if (typeof stream === "function") { ret = makeAsyncIterable(ret); ret = stream(ret, { signal, }); if (reading) { if (!isIterable(ret, true)) { throw new ERR_INVALID_RETURN_VALUE( "AsyncIterable", `transform[${i - 1}]`, ret, ); } } else { var _ret; if (!PassThrough) { PassThrough = require_passthrough(); } const pt = new PassThrough({ objectMode: true, }); const then = (_ret = ret) === null || _ret === void 0 ? void 0 : _ret.then; if (typeof then === "function") { finishCount++; then.call( ret, (val) => { value = val; if (val != null) { pt.write(val); } if (end) { pt.end(); } process.nextTick(finish); }, (err) => { pt.destroy(err); process.nextTick(finish, err); }, ); } else if (isIterable(ret, true)) { finishCount++; pump(ret, pt, finish, { end, }); } else { throw new ERR_INVALID_RETURN_VALUE( "AsyncIterable or Promise", "destination", ret, ); } ret = pt; const { destroy, cleanup } = destroyer(ret, false, true); destroys.push(destroy); if (isLastStream) { lastStreamCleanup.push(cleanup); } } } else if (isNodeStream(stream)) { if (isReadableNodeStream(ret)) { finishCount += 2; const cleanup = pipe(ret, stream, finish, { end, }); if (isReadable(stream) && isLastStream) { lastStreamCleanup.push(cleanup); } } else if (isIterable(ret)) { finishCount++; pump(ret, stream, finish, { end, }); } else { throw new ERR_INVALID_ARG_TYPE("val", [ "Readable", "Iterable", "AsyncIterable", ], ret); } ret = stream; } else { ret = Duplex.from(stream); } } if ( signal !== null && signal !== void 0 && signal.aborted || outerSignal !== null && outerSignal !== void 0 && outerSignal.aborted ) { process.nextTick(abort); } return ret; } function pipe(src, dst, finish, { end }) { let ended = false; dst.on("close", () => { if (!ended) { finish(new ERR_STREAM_PREMATURE_CLOSE()); } }); src.pipe(dst, { end, }); if (end) { src.once("end", () => { ended = true; dst.end(); }); } else { finish(); } eos( src, { readable: true, writable: false, }, (err) => { const rState = src._readableState; if ( err && err.code === "ERR_STREAM_PREMATURE_CLOSE" && rState && rState.ended && !rState.errored && !rState.errorEmitted ) { src.once("end", finish).once("error", finish); } else { finish(err); } }, ); return eos( dst, { readable: false, writable: true, }, finish, ); } module.exports = { pipelineImpl, pipeline, }; }, }); // lib/internal/streams/compose.js var require_compose = __commonJS({ "lib/internal/streams/compose.js"(exports, module) { "use strict"; var { pipeline } = require_pipeline(); var Duplex = require_duplex(); var { destroyer } = require_destroy(); var { isNodeStream, isReadable, isWritable } = require_utils(); module.exports = function compose(...streams) { if (streams.length === 0) { throw new ERR_MISSING_ARGS("streams"); } if (streams.length === 1) { return Duplex.from(streams[0]); } const orgStreams = [...streams]; if (typeof streams[0] === "function") { streams[0] = Duplex.from(streams[0]); } if (typeof streams[streams.length - 1] === "function") { const idx = streams.length - 1; streams[idx] = Duplex.from(streams[idx]); } for (let n = 0; n < streams.length; ++n) { if (!isNodeStream(streams[n])) { continue; } if (n < streams.length - 1 && !isReadable(streams[n])) { throw new ERR_INVALID_ARG_VALUE( `streams[${n}]`, orgStreams[n], "must be readable", ); } if (n > 0 && !isWritable(streams[n])) { throw new ERR_INVALID_ARG_VALUE( `streams[${n}]`, orgStreams[n], "must be writable", ); } } let ondrain; let onfinish; let onreadable; let onclose; let d; function onfinished(err) { const cb = onclose; onclose = null; if (cb) { cb(err); } else if (err) { d.destroy(err); } else if (!readable && !writable) { d.destroy(); } } const head = streams[0]; const tail = pipeline(streams, onfinished); const writable = !!isWritable(head); const readable = !!isReadable(tail); d = new Duplex({ // TODO (ronag): highWaterMark? writableObjectMode: !!(head !== null && head !== void 0 && head.writableObjectMode), readableObjectMode: !!(tail !== null && tail !== void 0 && tail.writableObjectMode), writable, readable, }); if (writable) { d._write = function (chunk, encoding, callback) { if (head.write(chunk, encoding)) { callback(); } else { ondrain = callback; } }; d._final = function (callback) { head.end(); onfinish = callback; }; head.on("drain", function () { if (ondrain) { const cb = ondrain; ondrain = null; cb(); } }); tail.on("finish", function () { if (onfinish) { const cb = onfinish; onfinish = null; cb(); } }); } if (readable) { tail.on("readable", function () { if (onreadable) { const cb = onreadable; onreadable = null; cb(); } }); tail.on("end", function () { d.push(null); }); d._read = function () { while (true) { const buf = tail.read(); if (buf === null) { onreadable = d._read; return; } if (!d.push(buf)) { return; } } }; } d._destroy = function (err, callback) { if (!err && onclose !== null) { err = new AbortError(); } onreadable = null; ondrain = null; onfinish = null; if (onclose === null) { callback(err); } else { onclose = callback; destroyer(tail, err); } }; return d; }; }, }); // lib/stream/promises.js var require_promises = __commonJS({ "lib/stream/promises.js"(exports, module) { "use strict"; var { ArrayPrototypePop, Promise: Promise2 } = require_primordials(); var { isIterable, isNodeStream } = require_utils(); var { pipelineImpl: pl } = require_pipeline(); var { finished } = require_end_of_stream(); function pipeline(...streams) { return new Promise2((resolve, reject) => { let signal; let end; const lastArg = streams[streams.length - 1]; if ( lastArg && typeof lastArg === "object" && !isNodeStream(lastArg) && !isIterable(lastArg) ) { const options = ArrayPrototypePop(streams); signal = options.signal; end = options.end; } pl( streams, (err, value) => { if (err) { reject(err); } else { resolve(value); } }, { signal, end, }, ); }); } module.exports = { finished, pipeline, }; }, }); // lib/stream.js var require_stream = __commonJS({ "lib/stream.js"(exports, module) { var { Buffer: Buffer2 } = require_buffer(); var { ObjectDefineProperty, ObjectKeys, ReflectApply } = require_primordials(); var { streamReturningOperators, promiseReturningOperators } = require_operators(); var compose = require_compose(); var { pipeline } = require_pipeline(); var { destroyer } = require_destroy(); var eos = require_end_of_stream(); var promises = require_promises(); var utils = require_utils(); var Stream = module.exports = require_legacy().Stream; Stream.isDisturbed = utils.isDisturbed; Stream.isErrored = utils.isErrored; Stream.isReadable = utils.isReadable; Stream.Readable = require_readable(); for (const key of ObjectKeys(streamReturningOperators)) { let fn2 = function (...args) { if (new.target) { throw ERR_ILLEGAL_CONSTRUCTOR(); } return Stream.Readable.from(ReflectApply(op, this, args)); }; fn = fn2; const op = streamReturningOperators[key]; ObjectDefineProperty(fn2, "name", { __proto__: null, value: op.name, }); ObjectDefineProperty(fn2, "length", { __proto__: null, value: op.length, }); ObjectDefineProperty(Stream.Readable.prototype, key, { __proto__: null, value: fn2, enumerable: false, configurable: true, writable: true, }); } var fn; for (const key of ObjectKeys(promiseReturningOperators)) { let fn2 = function (...args) { if (new.target) { throw ERR_ILLEGAL_CONSTRUCTOR(); } return ReflectApply(op, this, args); }; fn = fn2; const op = promiseReturningOperators[key]; ObjectDefineProperty(fn2, "name", { __proto__: null, value: op.name, }); ObjectDefineProperty(fn2, "length", { __proto__: null, value: op.length, }); ObjectDefineProperty(Stream.Readable.prototype, key, { __proto__: null, value: fn2, enumerable: false, configurable: true, writable: true, }); } var fn; Stream.Writable = require_writable(); Stream.Duplex = require_duplex(); Stream.Transform = require_transform(); Stream.PassThrough = require_passthrough(); Stream.pipeline = pipeline; var { addAbortSignal } = require_add_abort_signal(); Stream.addAbortSignal = addAbortSignal; Stream.finished = eos; Stream.destroy = destroyer; Stream.compose = compose; ObjectDefineProperty(Stream, "promises", { __proto__: null, configurable: true, enumerable: true, get() { return promises; }, }); ObjectDefineProperty(pipeline, promisify, { __proto__: null, enumerable: true, get() { return promises.pipeline; }, }); ObjectDefineProperty(eos, promisify, { __proto__: null, enumerable: true, get() { return promises.finished; }, }); Stream.Stream = Stream; Stream._isUint8Array = function isUint8Array(value) { return value instanceof Uint8Array; }; Stream._uint8ArrayToBuffer = function _uint8ArrayToBuffer(chunk) { return Buffer2.from(chunk.buffer, chunk.byteOffset, chunk.byteLength); }; }, }); /* End esm.sh bundle */ // The following code implements Readable.fromWeb(), Writable.fromWeb(), and // Duplex.fromWeb(). These functions are not properly implemented in the // readable-stream module yet. This can be removed once the following upstream // issue is resolved: https://github.com/nodejs/readable-stream/issues/482 import { destroy } from "ext:deno_node/internal/streams/destroy.mjs"; import finished from "ext:deno_node/internal/streams/end-of-stream.mjs"; import { isDestroyed, isReadable, isReadableEnded, isWritable, isWritableEnded, } from "ext:deno_node/internal/streams/utils.mjs"; import { ReadableStream, WritableStream } from "node:stream/web"; import { validateBoolean, validateObject, } from "ext:deno_node/internal/validators.mjs"; const CustomStream = require_stream(); const process = __process$; const { Buffer } = __buffer$; export const Readable = CustomStream.Readable; export const Writable = CustomStream.Writable; export const Duplex = CustomStream.Duplex; export const PassThrough = CustomStream.PassThrough; export const Stream = CustomStream.Stream; export const Transform = CustomStream.Transform; export const _isUint8Array = CustomStream._isUint8Array; export const _uint8ArrayToBuffer = CustomStream._uint8ArrayToBuffer; export const addAbortSignal = CustomStream.addAbortSignal; export const pipeline = CustomStream.pipeline; export { finished }; function isWritableStream(object) { return object instanceof WritableStream; } function isReadableStream(object) { return object instanceof ReadableStream; } Readable.fromWeb = function ( readableStream, options = kEmptyObject, ) { if (!isReadableStream(readableStream)) { throw new ERR_INVALID_ARG_TYPE( "readableStream", "ReadableStream", readableStream, ); } validateObject(options, "options"); const { highWaterMark, encoding, objectMode = false, signal, } = options; if (encoding !== undefined && !Buffer.isEncoding(encoding)) { throw new ERR_INVALID_ARG_VALUE(encoding, "options.encoding"); } validateBoolean(objectMode, "options.objectMode"); const reader = readableStream.getReader(); let closed = false; const readable = new Readable({ objectMode, highWaterMark, encoding, signal, read() { reader.read().then( (chunk) => { if (chunk.done) { readable.push(null); } else { readable.push(chunk.value); } }, (error) => destroy.call(readable, error), ); }, destroy(error, callback) { function done() { try { callback(error); } catch (error) { // In a next tick because this is happening within // a promise context, and if there are any errors // thrown we don't want those to cause an unhandled // rejection. Let's just escape the promise and // handle it separately. process.nextTick(() => { throw error; }); } } if (!closed) { reader.cancel(error).then(done, done); return; } done(); }, }); reader.closed.then( () => { closed = true; if (!isReadableEnded(readable)) { readable.push(null); } }, (error) => { closed = true; destroy.call(readable, error); }, ); return readable; }; Writable.fromWeb = function ( writableStream, options = kEmptyObject, ) { if (!isWritableStream(writableStream)) { throw new ERR_INVALID_ARG_TYPE( "writableStream", "WritableStream", writableStream, ); } validateObject(options, "options"); const { highWaterMark, decodeStrings = true, objectMode = false, signal, } = options; validateBoolean(objectMode, "options.objectMode"); validateBoolean(decodeStrings, "options.decodeStrings"); const writer = writableStream.getWriter(); let closed = false; const writable = new Writable({ highWaterMark, objectMode, decodeStrings, signal, writev(chunks, callback) { function done(error) { error = error.filter((e) => e); try { callback(error.length === 0 ? undefined : error); } catch (error) { // In a next tick because this is happening within // a promise context, and if there are any errors // thrown we don't want those to cause an unhandled // rejection. Let's just escape the promise and // handle it separately. process.nextTick(() => destroy.call(writable, error)); } } writer.ready.then( () => Promise.all( chunks.map((data) => writer.write(data.chunk)), ).then(done, done), done, ); }, write(chunk, encoding, callback) { if (typeof chunk === "string" && decodeStrings && !objectMode) { chunk = Buffer.from(chunk, encoding); chunk = new Uint8Array( chunk.buffer, chunk.byteOffset, chunk.byteLength, ); } function done(error) { try { callback(error); } catch (error) { destroy(this, duplex, error); } } writer.ready.then( () => writer.write(chunk).then(done, done), done, ); }, destroy(error, callback) { function done() { try { callback(error); } catch (error) { // In a next tick because this is happening within // a promise context, and if there are any errors // thrown we don't want those to cause an unhandled // rejection. Let's just escape the promise and // handle it separately. process.nextTick(() => { throw error; }); } } if (!closed) { if (error != null) { writer.abort(error).then(done, done); } else { writer.close().then(done, done); } return; } done(); }, final(callback) { function done(error) { try { callback(error); } catch (error) { // In a next tick because this is happening within // a promise context, and if there are any errors // thrown we don't want those to cause an unhandled // rejection. Let's just escape the promise and // handle it separately. process.nextTick(() => destroy.call(writable, error)); } } if (!closed) { writer.close().then(done, done); } }, }); writer.closed.then( () => { closed = true; if (!isWritableEnded(writable)) { destroy.call(writable, new ERR_STREAM_PREMATURE_CLOSE()); } }, (error) => { closed = true; destroy.call(writable, error); }, ); return writable; }; Duplex.fromWeb = function (pair, options = kEmptyObject) { validateObject(pair, "pair"); const { readable: readableStream, writable: writableStream, } = pair; if (!isReadableStream(readableStream)) { throw new ERR_INVALID_ARG_TYPE( "pair.readable", "ReadableStream", readableStream, ); } if (!isWritableStream(writableStream)) { throw new ERR_INVALID_ARG_TYPE( "pair.writable", "WritableStream", writableStream, ); } validateObject(options, "options"); const { allowHalfOpen = false, objectMode = false, encoding, decodeStrings = true, highWaterMark, signal, } = options; validateBoolean(objectMode, "options.objectMode"); if (encoding !== undefined && !Buffer.isEncoding(encoding)) { throw new ERR_INVALID_ARG_VALUE(encoding, "options.encoding"); } const writer = writableStream.getWriter(); const reader = readableStream.getReader(); let writableClosed = false; let readableClosed = false; const duplex = new Duplex({ allowHalfOpen, highWaterMark, objectMode, encoding, decodeStrings, signal, writev(chunks, callback) { function done(error) { error = error.filter((e) => e); try { callback(error.length === 0 ? undefined : error); } catch (error) { // In a next tick because this is happening within // a promise context, and if there are any errors // thrown we don't want those to cause an unhandled // rejection. Let's just escape the promise and // handle it separately. process.nextTick(() => destroy(duplex, error)); } } writer.ready.then( () => Promise.all( chunks.map((data) => writer.write(data.chunk)), ).then(done, done), done, ); }, write(chunk, encoding, callback) { if (typeof chunk === "string" && decodeStrings && !objectMode) { chunk = Buffer.from(chunk, encoding); chunk = new Uint8Array( chunk.buffer, chunk.byteOffset, chunk.byteLength, ); } function done(error) { try { callback(error); } catch (error) { destroy(duplex, error); } } writer.ready.then( () => writer.write(chunk).then(done, done), done, ); }, final(callback) { function done(error) { try { callback(error); } catch (error) { // In a next tick because this is happening within // a promise context, and if there are any errors // thrown we don't want those to cause an unhandled // rejection. Let's just escape the promise and // handle it separately. process.nextTick(() => destroy(duplex, error)); } } if (!writableClosed) { writer.close().then(done, done); } }, read() { reader.read().then( (chunk) => { if (chunk.done) { duplex.push(null); } else { duplex.push(chunk.value); } }, (error) => destroy(duplex, error), ); }, destroy(error, callback) { function done() { try { callback(error); } catch (error) { // In a next tick because this is happening within // a promise context, and if there are any errors // thrown we don't want those to cause an unhandled // rejection. Let's just escape the promise and // handle it separately. process.nextTick(() => { throw error; }); } } async function closeWriter() { if (!writableClosed) { await writer.abort(error); } } async function closeReader() { if (!readableClosed) { await reader.cancel(error); } } if (!writableClosed || !readableClosed) { Promise.all([ closeWriter(), closeReader(), ]).then(done, done); return; } done(); }, }); writer.closed.then( () => { writableClosed = true; if (!isWritableEnded(duplex)) { destroy(duplex, new ERR_STREAM_PREMATURE_CLOSE()); } }, (error) => { writableClosed = true; readableClosed = true; destroy(duplex, error); }, ); reader.closed.then( () => { readableClosed = true; if (!isReadableEnded(duplex)) { duplex.push(null); } }, (error) => { writableClosed = true; readableClosed = true; destroy(duplex, error); }, ); return duplex; }; // readable-stream attaches these to Readable, but Node.js core does not. // Delete them here to better match Node.js core. These can be removed once // https://github.com/nodejs/readable-stream/issues/485 is resolved. delete Readable.Duplex; delete Readable.PassThrough; delete Readable.Readable; delete Readable.Stream; delete Readable.Transform; delete Readable.Writable; delete Readable._isUint8Array; delete Readable._uint8ArrayToBuffer; delete Readable.addAbortSignal; delete Readable.compose; delete Readable.destroy; delete Readable.finished; delete Readable.isDisturbed; delete Readable.isErrored; delete Readable.isReadable; delete Readable.pipeline; // The following code implements Readable.toWeb(), Writable.toWeb(), and // Duplex.toWeb(). These functions are not properly implemented in the // readable-stream module yet. This can be removed once the following upstream // issue is resolved: https://github.com/nodejs/readable-stream/issues/482 function newReadableStreamFromStreamReadable( streamReadable, options = kEmptyObject, ) { // Not using the internal/streams/utils isReadableNodeStream utility // here because it will return false if streamReadable is a Duplex // whose readable option is false. For a Duplex that is not readable, // we want it to pass this check but return a closed ReadableStream. if (typeof streamReadable?._readableState !== "object") { throw new ERR_INVALID_ARG_TYPE( "streamReadable", "stream.Readable", streamReadable, ); } if (isDestroyed(streamReadable) || !isReadable(streamReadable)) { const readable = new ReadableStream(); readable.cancel(); return readable; } const objectMode = streamReadable.readableObjectMode; const highWaterMark = streamReadable.readableHighWaterMark; const evaluateStrategyOrFallback = (strategy) => { // If there is a strategy available, use it if (strategy) { return strategy; } if (objectMode) { // When running in objectMode explicitly but no strategy, we just fall // back to CountQueuingStrategy return new CountQueuingStrategy({ highWaterMark }); } // When not running in objectMode explicitly, we just fall // back to a minimal strategy that just specifies the highWaterMark // and no size algorithm. Using a ByteLengthQueuingStrategy here // is unnecessary. return { highWaterMark }; }; const strategy = evaluateStrategyOrFallback(options?.strategy); let controller; function onData(chunk) { // Copy the Buffer to detach it from the pool. if (Buffer.isBuffer(chunk) && !objectMode) { chunk = new Uint8Array(chunk); } controller.enqueue(chunk); if (controller.desiredSize <= 0) { streamReadable.pause(); } } streamReadable.pause(); const cleanup = finished(streamReadable, (error) => { if (error?.code === "ERR_STREAM_PREMATURE_CLOSE") { const err = new AbortError(undefined, { cause: error }); error = err; } cleanup(); // This is a protection against non-standard, legacy streams // that happen to emit an error event again after finished is called. streamReadable.on("error", () => {}); if (error) { return controller.error(error); } controller.close(); }); streamReadable.on("data", onData); return new ReadableStream({ start(c) { controller = c; }, pull() { streamReadable.resume(); }, cancel(reason) { destroy(streamReadable, reason); }, }, strategy); } function newWritableStreamFromStreamWritable(streamWritable) { // Not using the internal/streams/utils isWritableNodeStream utility // here because it will return false if streamWritable is a Duplex // whose writable option is false. For a Duplex that is not writable, // we want it to pass this check but return a closed WritableStream. if (typeof streamWritable?._writableState !== "object") { throw new ERR_INVALID_ARG_TYPE( "streamWritable", "stream.Writable", streamWritable, ); } if (isDestroyed(streamWritable) || !isWritable(streamWritable)) { const writable = new WritableStream(); writable.close(); return writable; } const highWaterMark = streamWritable.writableHighWaterMark; const strategy = streamWritable.writableObjectMode ? new CountQueuingStrategy({ highWaterMark }) : { highWaterMark }; let controller; let backpressurePromise; let closed; function onDrain() { if (backpressurePromise !== undefined) { backpressurePromise.resolve(); } } const cleanup = finished(streamWritable, (error) => { if (error?.code === "ERR_STREAM_PREMATURE_CLOSE") { const err = new AbortError(undefined, { cause: error }); error = err; } cleanup(); // This is a protection against non-standard, legacy streams // that happen to emit an error event again after finished is called. streamWritable.on("error", () => {}); if (error != null) { if (backpressurePromise !== undefined) { backpressurePromise.reject(error); } // If closed is not undefined, the error is happening // after the WritableStream close has already started. // We need to reject it here. if (closed !== undefined) { closed.reject(error); closed = undefined; } controller.error(error); controller = undefined; return; } if (closed !== undefined) { closed.resolve(); closed = undefined; return; } controller.error(new AbortError()); controller = undefined; }); streamWritable.on("drain", onDrain); return new WritableStream({ start(c) { controller = c; }, async write(chunk) { if (streamWritable.writableNeedDrain || !streamWritable.write(chunk)) { backpressurePromise = createDeferredPromise(); return backpressurePromise.promise.finally(() => { backpressurePromise = undefined; }); } }, abort(reason) { destroy(streamWritable, reason); }, close() { if (closed === undefined && !isWritableEnded(streamWritable)) { closed = createDeferredPromise(); streamWritable.end(); return closed.promise; } controller = undefined; return Promise.resolve(); }, }, strategy); } function newReadableWritablePairFromDuplex(duplex) { // Not using the internal/streams/utils isWritableNodeStream and // isReadableNodestream utilities here because they will return false // if the duplex was created with writable or readable options set to // false. Instead, we'll check the readable and writable state after // and return closed WritableStream or closed ReadableStream as // necessary. if ( typeof duplex?._writableState !== "object" || typeof duplex?._readableState !== "object" ) { throw new ERR_INVALID_ARG_TYPE("duplex", "stream.Duplex", duplex); } if (isDestroyed(duplex)) { const writable = new WritableStream(); const readable = new ReadableStream(); writable.close(); readable.cancel(); return { readable, writable }; } const writable = isWritable(duplex) ? newWritableStreamFromStreamWritable(duplex) : new WritableStream(); if (!isWritable(duplex)) { writable.close(); } const readable = isReadable(duplex) ? newReadableStreamFromStreamReadable(duplex) : new ReadableStream(); if (!isReadable(duplex)) { readable.cancel(); } return { writable, readable }; } Readable.toWeb = newReadableStreamFromStreamReadable; Writable.toWeb = newWritableStreamFromStreamWritable; Duplex.toWeb = newReadableWritablePairFromDuplex; QdFext:deno_node/_stream.mjsa bD`M`# T`JLakD T  I`F}"Sb1!aA"b')*"3B5* "{ "p?A}??????????????????????????????Ib`LL` B ]`]`!]`Y3 ]`" ]` " ]`gb ]`"$ ]` ]`9* ]`b]`"]` :]`]`Q;]`2 ]`A" ]` L`  Dc CKL`B ` L`B " ` L`"  ` L` " ` L`"  ` L`  ` L` ` L`"` L`"[ `  L`[ Š`  L`Š]L`1 Dc  DBiBic", DbbcMQ Db b cFZ D  c^s D  cw D" " c DB B c D  c D" " c D""c Dc $ D  c(> DcBV D  cZp D""ct Dc Dc Dc D$$c D  c  DXXc) Dc} D^^c+9 Dac  Dc  Dᒐc { Dᓐc DIIc0B D  c D  c D  c  Dc CK D" " c!0 Dc D"3"3c:K D33cO^ DAAc Dc Dc DAAcʟ DcΟݟ D  c D± ± c DBBc DBBc D  c D  c_n D  cr`;± a?a?ba?a? a? a?Ba?Ba? a?"3a?3a? a?a?Bia?Ia?b a? a? a?" a?B a? a?" a?"a?a? a?a? a?"a?a?a?a?$a? a?" a?a?aa?a?a? a?a?Aa?a?a?Aa?a?Xa?^a? a? a? a? a?B a?" a?" a? a?a?"a?[ a ?Ša ?2b@ T I`ϣp*2b@ T I`T?$g3 @ @ @ @@?b,@ TI`mX$g8 ں @ @ @ @ @? @Ab,@ T  I`Cb*@"0Lj  a ' T,`L`8SbbpW"i ar`a` T<`8L`bb  3`Dh .b //~%-c - (SbqA!`Da3b   2b 3`Dd % %`bK T$` L`a 3`Db0(SbbpW`a5R*2 bKbC Tܐ`vIL`PYbR)TCcCAdC!CC^CACaC CaCC:CCCCaCC!C CCCb CC!C!+CCbCICB>C%CCbCnCboCjC CBsCsCCbCI C T  I`5 T*22b T T I`S cbc T I` AdbAd T I` / !b! T I`H { b  T I` ^b ^ T I`  Ab A T I`0 u ab a  T I` ab a T I` } ޔb"):BBFaGC! T(`L`B*  V4`Dc!-_(Sbqm `Da *2 a@2b  T,`L` n4`Dd( !-\(Sbqm`Dae a@b T(`L`  4`Dc!-_(Sbqm`Da*2 a@2b T(`L`%  4`Dc!-^(Sbqmb `Da!*2 a@2b b  T(`L`  4`Dc!-_(Sbqm`Da=*2 a@2b! T  I`!+b!+ T I`Vb T I`kbb bI T I`B>bB>% T I`Tbbb T I`nbn T I`Gbobbo T I`bjbj bZBsZs\ T I`Ab*2bbI   3`D~)ł3333 3 3 3 3!33 3!-3!3!!-#3%!-'3)!-+3-!- /3!1!-"33#5$ 3%7& 3'9( 3);* 3+=,3-?!.A3.C/30E132G334I!5K-6M37O839Q!:S3;U![?3@]A3B_C3Da!Ec3Ee!Ec-Fg3Gi!Ec-Hk3Im!Ec-Jo3KqL3Ms!Nu3Nw 2Oy(Sbqm`Da4k{       `2bbAC T`L`?SbqmTc!a!B6boj{a|^  as????????????????????A`Da54*2 T  I`( .5b@ T I`>qA{b@ T I`p}b@  T I`w b@$ T I`+! b@% T I`## b@( T I`#U$ab%@) T I`u()!b@, T I`+Q,b@. T I`k,- b@/ T I`b1@2b@4Tc!a!B6boj||"  T I`IbK! T I`fIbK" T I`YIbK# T I`T!"IbK& T I`$&IbK* T I`'S(IbK+ T I`**IbK- T I`./IbK0 T I`5//IbK1 T I`/0IbK2 T I`0E1IbK3b* CA{C}C!C C^ CC C"/ C"[ C C C" CC C!C C^ CaCCB C A{}! ^  "/ "[   "  ! ^ aB   &5`DƂłĂ%%   a- %- %-%-%- %- %-%-% -% -% -% -% -%-%%z%%0 b0 b!0 b#%0 b%0!b'0"b)0#b+0$b-0%b/0&b10'b3~(5) 3)6 3*8 3+: 3,< 3-> 3.@ 3/B 30D 31F 32H 33J 34L 35N 36P 37R 38T39V3:X 3;Z 3<\ 3=^ 2>`,ibPPPPP& 0 0 0 0 0 0 0 2bA T$` L`ᒑ 5`Db0(SbbpW`av44*2 bK5bC TЖ`^L`5SbqmBs!!!aAA!Aao????????????????`Da4d T  I`W68!6b@7 T I`8:ab@8 T I`=::b@9 T I`:;Ab@: T I`<=b@; T I`=>Ab@< T I`?@b@= T I`A]Cb@> T I`zCHEb@? T I`hEmG!b@@ T I`G=Ib@A T I`UIJAb@B T I`JLb@C T I`LNAb@D T I`OHQ!b@E T I`^QTb@F T I`TUab@G T I`U(Vb@H T I`EVfWb@I T I`WXb@J T I`XZb@K T I`+Zb!b@L Bs!!ؒb2!CCC!CCC!CCACCCC!CC!C!CACACaCCCACCCC!A!!!AAaA   6`D%% ł% Ă% %  ‚ % % %  %%a--%-%b%b %b %b%~)3 33 3 33!3 3" 3#! 3$# 3%% 3&'3') 3(+ 3)- 3*/ 3+13,3 3-5 3.7 3/9 30; 31=32? 33A 24C fEP@0`2b6bAC Tx``L`Sbqm* B   !!!!AaAAB r???????????????????A`Da|e"*2 T  I`gg6b@N T I`h~b @P T I`~b@ZB   !!!!AaAA T B `ghB bKO  6`Dw%%a%a-%-%-%a - %a-%- %- % - % - % - % -% -%- %-"%-$%%2&-( 2*d,P@PPPP,P 2b'MAbaC T`ZL`1SbqmB "[  "TA:A!b<=;!Ar???????????????????a`Da*2 T I`ܒb ʥ@ dԑ@@j<7b @^ TI`(b è@ȓb@e T  I`@Җ=bMQg T I`B=bMQh T I`4b5bMQj TI`ۘ)bݳ @b;bMQk TI`=b  @;b@m T I`>bMQp T I`bMQs TI` بb @<b@t T I`שAϓb@v TI`&b @ϓb @w TI`8b @ѓb @yB "[   A:!b  `T ``/ `/ `?  `  alD] ` aj]B  T  !`f!72b o@b CC;C<C<CC;<<"8@b B=Cb;C>CC=Cb5CB=b;>=b58  7`Dx%ł%Ă‚%   %  a-%-%-%a- ^ % a-%a-%-%-% -% -% -% - % -"b$%b&%0 e+ %- (~!*) 3"+ 3#-3$/ 3%13&3 3'5 2(7- (~)9) 3*: 3+< 3,> 3-@3.B 3/D 20F fHPPPPPPP` 0 0b#]ab!C T`L`Sbqm* !AaeaB !!!!q??????????????????!`Da-*2 T  I`s:a72b@| T I`Ob @  b@} TI`Ƹb@B b@ T I`!גb@ T I`<גb@  T I`U!ؒb@  T I`ؒb@  T I`!ْb@  T I`4b@  TI`bޑ@ ْb@ T I`ڒb@ T I`Kb@ T I`h!ےb@ T I`ےb@ T I`4PAܒb@ !Aae8b CAC CC!CA !  7`D|@% ł% % % % Ă%  % % % % %a%a-a-%- %- %-%b%b%~) 3 3 3 33 27c!PP@L`2b!{!bAC TA`@!L`FSbqmI  !a!ba!aq??????????????????A`Da5*2 T  I``8b@^ T I`Ao b@_ T I`!b@` T I`8b@a T I`a⒖b@b T I`㒖b@c T I`!䒖b@d T I`撖b@e T I` bb@f T I`<ᒖb@g T I`Sab@h T I`璖b@i T I`(b  @ c@ˀ@ Bb @j T I`S!꒖b&@k TI` b @ a钖b'@l T I`eޒbm"( T I`/ޒ2bn T I`9ޒboB T  I`&8bpB b44B5 (bGCC T y``` Qa.get`"82b @q T  ``` Qa.set`8pb @r T `  Qa.init`Ib @s  T I` bt  T I`@kbuk T I`qbmb vbm T I`-}lbwlB  T I`jXbxX T I`\啖by T I`Ka啖bza T I`blb{bll T I`Bnb|Bn T I` b} T I`aa蕖b~a T ` `b`Ib @b T I`Ikbk  ~8`D)@%%%% % % % % % % % % ł %%" !ƙ- -% -  -%!- %%! -%2- 22-2- 2 -2! %!-" #~$")%3&#'3(%\'Â)2*)-Â+2,+-Â-2.--Â/20/-Â1221---23235-Â4257-Â629-Â728;-Â92:=---:?2;A-Â<2=C-Â>2?E-Â@ 2AGÂB!2CI-2CK-ÂD"2EM$gO#PP,, 0``````bAbC T\`s TI`4>$g1@@ @@@>e;b @Bs"{   z;`Dja%a-%-%-%a - % 2bP@,bAbAC T`qL`Sbqm1* Ad!b !%" XA[ aB  B !  aABbaBB b  B " b b ?????????????????????????????????????????????????A`Da(?e*2 T  I`C@J ;2b@ T I`VJM b@ T I`PXb@ T I`Y[ab@ T I`^_b @ T I``aBb@  T I`AlTnb@! T I`nnob@" T I`oqbb@# T I`qMrab@$ T I`irsBb@% T I`Db @ b@ & T I`b @' T I`#pBb@( T I`: b@) T I`Okb b@* T I`Δdb @+ T I`fo b@!, TI`cط@B b#RQ"- T I`b@8. T I`հ"b@9/ T I`Ա b@:0 T I`b b@;1 T I`Ab@=2Ad! b !%Bs   " X"{ [  N T I`ABIbK3aB   T B `CCB bK4! "- T y` Qb ._destroy`]N}NIb @5B   T  ` Qb .`NNI;2b @6 T `   Qa.push` OaOIb @78 T `  Qa.unshift`OOIb @8"9 T ` Qb .isPaused`\y\Ib @9- T ` Qb .setEncoding`\^Ib @:  T `   Qa.read`a(lIb @; T `  Qa._read`tTtIb @<  T `   Qa.pipe`}t*4kW @@@@@@@˂@@Ib @=B  T `  Qa.unpipe`Ib @ > T Qb Readable.on`ȈڋIb @?B l T ` `bl`IIb @@bll T ` `Bn`eIb @ABn T `  Qa.resume`Ib @B  T `  Qa.pause`Ib @C  T `   Qa.wrap`Ib @Dv  T ` Qb .`I}Ib @E T ` Qb .iterator`BIb @ F\xb "C.C.C"jC/C/C0C0C"1CCMCB CC bCC T  I`U;2b%G T I`{b&H" bHC T y`* ``. Qa.get`)b @'I. bHC T `* ``. Qa.get`_b @(J. bHC T `0 ``"j Qa.get`Ӥb @)K"j bHC T `) ``/ Qa.get`ԥb @*L/(bHCC T  `* ``/ Qa.get`B~;2b @+M T `* ``/ Qa.set` b @,N/ bHC T I`mb-O0 bHC T I`kb.P0 bHC T I`Ϩ)b/Q"1 bHC T I`ݩb0RbC T I`ub1SM(bHCC T I`Ҫ.b2T T I`;ūb3UB  bHC T I`&b4V b1C CbC T I`-_b5W1 bCC T I`ŭb6X T I` @b7Y   T y`   Qa.from`õIb @<Ze T `  Qa.fromWeb`wIb @>[b  T `  Qa.toWeb`-Ib @?\  T `   Qa.wrap`L`b  @PIb @@]  ;`DP1%%%%%%% %! %" %# %$ %% %& %'%(%)%*%+%,%-%.%/%0%2a%a-%-%-%- %- -%-- %-!% -"-#2$2% a-&  a"-'$% -(&% a(-)*% a,-*.%  a0%0+,-c2%a4% a6%a8-.:%-/<%a>-0@%1bB%aD%-2F -2HcJ cL3%-4N%-2F-5P25R-2F-6T27V-2F829X-2F-:Z;4\-2F<2=^-2F>2?`-2F@2Ab-2FB2Cd @%-2FD 2Ef-2FF!2Gh-2FH"2Ij-2FJ#2Kl-2FL$2Mn-2F-2F-Mp2Nr-2FO%2Pt-2F-2F-Pv2Qx-2FR&2Sz-2FT'2U|-2FV(2W~-2FX)2Y-2FZ*4-2F[+2\-2F~]~^9_,3`a-3b 3c~d9e.3` 3f~g9h/3` 3i~j9k03` 3l~m9n13` 3o~p9q23`r33b 3s~t9u43` 3v~w9x53` 3y~z9{63` 3|~}9~73` 3~983` 3~993`Â:3b 3~9;3` 3c-2п~~9<3` 3~9=3`ق>3b 3c-2?2@2A2B2Y;XtCPPPP,@@P@PPP@,8 , , ,P ,P , , 00 L`2`2& 00 L Ps2`2b"AbC T`L`w9Sbqm"* abn" A[ aB !B    bbb" b ??????????????????????????????????`Daغ}*2 T  I`dnB >?b @C T I` b@D T I`<b@E T I` b@H T I`# b@L T I`zb@Q T I`&b@R T I`nb@S T I`b@T T I`b@U T I`Hbb@V T I`abb@W T I`b@X T I`bb@\ T I` b@ b@] T I`"b@_ T I`6b@` T I`Ab@b T I` % b@ua  n s  " "{ [ aB ! T I`w2bF2bC T  I`4z>?bGbC T y` Qa.value`zyb @J T `   Qa.pipe`Ib @KB  T `  Qa.write`LIb @Mb T `   Qa.cork`Ib @N  T `  Qa.uncork`$Ib @O"  T I`&^ bP  T `  Qa._write`1Ib @Z   T Qb Writable.end`Ib @[Bxb MCB CC C C C C" ChC" C CC3CbC T I`bcM bCC T I`B2bd T I`"beB  bCC T  I`c >?bf T I`bgbC T I`0bh bC T I`{bi bC T I`vbj bC T I`bk bC T I`_$bl" bC T I`rbmhbC T I`gbn" bC T I`bo  bHC T I`[bp bHC T y`* ``3 Qa.get`"  b @q3  T `  Qa.destroy`L  Ib @r"- T ` Qb ._destroy`  Ib @sB   T ` Qb .`G m Ib @t T `  Qa.fromWeb`F  Ib @vb  T `  Qa.toWeb` xIb @w   6?`DX"%%%%%%%% % % % % % %%%%% %#a%a-%-%-%- - --%--22 a- a- %a"-!$% a&% a(-"*% a,-#.% -$0%  -%2% -&4-&6c8c:'b<%-&>(2)@-&>*~+B9,3-C`E~.G9/30H`J-&4122L-&4324N-&4526P-&4728R-&492:T-&4;22?Z-&4~@\~A]9B3-^ 3C`~Db9E3-cF3Ge 3Hg~Ii9J 3-jK!3Gl 3Ln~Mp9N"3-q 3Os~Pu9Q#3-v 3Rx~Sz9T$3-{ 3U}~V9W%3- 3X~Y9Z&3- 3[~\9]'3- 3^~_9`(3- 3a~b9c)3- 3d~e9f*3- 3g~h9i+3- 3jc -k%!-&4l,2k-&4 -m2n-&4o-2p-&4-qr.4s/2tu02vHp1PPP P@@PP@&  , , L 00 L`2& 00 L`2,8 2b"Bb C T I`F44h?Ģ@ݢ@@ @@ @"*e&ڴ@@e(@@@ @8lZ@@@@@@@@ @ *2b#x b%C TI`KL`!XSbqm  B b "e??????%`Da4yD T  I`g7M:B Ab@ T I`,BBb@ b `b ChC C C C C" C C" CB Ch    "  "  bCC T  I`%@AA2b T I`!AAbB  T y`B  Qa.fromWeb`BPCIb @b  T Qb Duplex.toWeb`nCCIb @  T Qb Duplex.from`CtDIb @e  A`D1%%a----2 a %a%--cc-b - n9 /- /!-- /#4% P'<(-~ )~ *9- c+h 3 -~ /9- c0h 3 2~ 49-c5h 37~ 99-c:h 3<~ >9-c?h 3A~ C9-cDh 3F~ H9-cIh 3K~ M9-cNh 3P~ R9-cSh 3U~W93X3Z 3\c^2`2b2 d,ifPP@Px'&00 I L`&00 0@ ,b %b'C T|`LL`XSbqmB a( n"e??????'`DaDwQ*2 T  I`FJ B2b@ T I`JMnb@ T I`MlM"b@ a(  T y` Qb ._transform`M"NIb @ T `  Qa._write`NNPIb @  T `  Qa._read`PrQIb @   B`Dx0%%%a--2a%a - %--cc b%-2 - 2 - 2-Â2c P @P@ , b#'b)C TP`[$L`8Sbqm " a??)`DaQ+T*2 T  I`.SS" ~B2b@ T y`" Qb ._transform`S&TIb @  vB`Dm(%a-2a%-- c c-Ă2bPb%)b+C T``L`Sbqm* T!BsB  B !A"  A",--!".B u??????????????????????+`DaT|*2 T  I`VXAB2b@ T I`YY",b@ T I`YZ-b@ T I`Z[-bRQ T I`[`!ǒbMQ T I`` aŠb@ T I`'ax(h> @ @ @ @"T@".b@ T I`xn|B b @T!Bs B !A b".CŠC".Š  B`Dz %%%%%Ƃ%%a%a- %- %- % a % a %a%a- % - % a-% -% -% -%~ )3! 3# 2%Bd'P@@@PL`2b"+b3C TL`R(L`XSbqmŠB AAAe??????3`Da$}׋*2ŠAAA T I`,~ҋ8l\ @ ׌ @ @ @ @Ր ߑ @ @ƒ ʔ @ @?@b4Cb  C`Dla-%a% a-%a - %-%-%2b@@P 2b!3b5C TX`j4L` PSbqm^!Ab6d?????5`Da6K*2 T  I`V Š>Cb@^!A". bCŠCŠ  6C`Do(a-%-%a-%- %a -% a-~) 3 3  2 cPP@L`2b5b7C T `L`5HSbqmAI " c????7`Da*2"{ b I"88ŠA" !  Sb&@`?fC T  9`Z9jC2b @bCbC0bCHGGiSb&@`?fC T  9`&9C2b @bCbC0bCHGG B  " [  b4 (bGGC T$`]  C`Db(Sbqm`Da<fC 2b  bGC T  I`ܛb bGC T I`Iwb T I`͜ b T I`E"b"(Kh@ 0  ^C`Da-%a--- % a --aa- a- aa%a  a"- $2 & %- (2 *- ,2 .- 02 2a426b8:<->]@ߡe-B-D% /F%~H9-I3K`M~O9-P3R`T-V-X~Z9 3[`]ߋ_   &-`]be   ߪ  bdfh-j]lߡe-n-p% /r%~t9-I3u`w~y9-P3z`|-V-~~9 3`ߋ   &-]䈡e   ߪ  a2 a2!a2"a2# 2a-$ 2$ 2% 2& 2'(~)9*3+`0,~-9.3+`0~/903+`2 122324fCHp@PPP@@,P ,@ P@`P.@PPL`2@L@,@ , ,& 0`2b7a"{   B " "  "[ Š T y`  Qa.fromWeb`d @ @b @I*2b @b  T`  Qa.fromWeb`.ʸ0f- @ @ @ @(b @b @(b @b @Ib @ T`B  Qa.fromWeb`e8h; @ Ȅ @Ԅ @ @ @ b @b ݂ ݃ @(b @d @ @ ݐ @Ib @b4 !   2`DHh %%%%%% ei h  ! - % ł %~ )3b%~ )3 b % %~) 3b%~) 3b% ~) 3b% ~) 3b % ~ ")!3"#b%% ~#')$3%(b*% ~&,)'3(-b/%~)1)*3+2b4%~,6)-3.7b9%~/;)031~2@)334AbC%~5E)637FbH%~8J)93:KbM%~;O)<3=PbR%~>T)?3@UbW%~AY)B3CZb\%~D^)E3F_ba%~Gc)H3Idbf%~Jh)K3Libk%~Mm)N3Onbp%~Pr)Q3Rsbuaw0S%0T-Uy%-V{1-W}1-X1-Y1-Z1-[1-\1-]1-^1 -_1 0`2a0b 2a0c!2a0XW0YW0VW0ZW0[W0WW0\W0]W0^W0dW0eW0fW0gW0hW0iW0_W02j0 2j0 2j <m"0L`2@& 0L`2@& 0L`2@& 0L`2@   ``2bA33334 444"4*424:4B4J4R4j444444444445 5"525:5B5555J5R55DZ5b555j55r5z5555555666&6.666>6F6N6V6^6f6n6v6~6666666666666D6D7"7D27D>7F7DN7V7Db7D7n7Dv7~7D77D7D777D7D8888&8.868DB8J8R8Z8b8z89998&98829J9b9r98z998998899998999898888D89D99:D:.:F:>:N:V:Dz:::::::::::; ;;.;>;F;N;f;Dv;;D;v<~<;;D<<<<;;<<;;<;;;;;<=D<D=*=6=F=<<V="<*<f=2<v=D==:<B<D=====>2>J>f>r>~>>>>>>>>>N<V<^<f<>n<>??D2?B?J?R???Z?D?@b?@&@6@F@j?r?z??????DN@^@??D??D?r@~@@@@@@@@@@@@AA*A:AJA?ZAjAA (DAAAAAAAABB&BD.B6BFBDVBrBBBBBDBBBBDBBDBD CCD2CBCDZCnCCCCCCC"2v3CDCDD D~3D3D3D`RD]DH #Q#G// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Adapted from Node.js. Copyright Joyent, Inc. and other Node contributors. // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { inspect } from "node:util"; import { stripColor as removeColors } from "ext:deno_node/_util/std_fmt_colors.ts"; import * as io from "ext:deno_io/12_io.js"; function getConsoleWidth() { try { return Deno.consoleSize().columns; } catch { return 80; } } // TODO(schwarzkopfb): we should implement Node's concept of "primordials" // Ref: https://github.com/denoland/deno/issues/6040#issuecomment-637305828 const MathMax = Math.max; const { Error } = globalThis; const { create: ObjectCreate, defineProperty: ObjectDefineProperty, getPrototypeOf: ObjectGetPrototypeOf, getOwnPropertyDescriptor: ObjectGetOwnPropertyDescriptor, keys: ObjectKeys } = Object; import { ERR_INVALID_ARG_TYPE } from "ext:deno_node/internal/errors.ts"; let blue = ""; let green = ""; let red = ""; let defaultColor = ""; const kReadableOperator = { deepStrictEqual: "Expected values to be strictly deep-equal:", strictEqual: "Expected values to be strictly equal:", strictEqualObject: 'Expected "actual" to be reference-equal to "expected":', deepEqual: "Expected values to be loosely deep-equal:", notDeepStrictEqual: 'Expected "actual" not to be strictly deep-equal to:', notStrictEqual: 'Expected "actual" to be strictly unequal to:', notStrictEqualObject: 'Expected "actual" not to be reference-equal to "expected":', notDeepEqual: 'Expected "actual" not to be loosely deep-equal to:', notIdentical: "Values have same structure but are not reference-equal:", notDeepEqualUnequal: "Expected values not to be loosely deep-equal:" }; // Comparing short primitives should just show === / !== instead of using the // diff. const kMaxShortLength = 12; export function copyError(source) { const keys = ObjectKeys(source); const target = ObjectCreate(ObjectGetPrototypeOf(source)); for (const key of keys){ const desc = ObjectGetOwnPropertyDescriptor(source, key); if (desc !== undefined) { ObjectDefineProperty(target, key, desc); } } ObjectDefineProperty(target, "message", { value: source.message }); return target; } export function inspectValue(val) { // The util.inspect default values could be changed. This makes sure the // error messages contain the necessary information nevertheless. return inspect(val, { compact: true, customInspect: false, depth: 1000, maxArrayLength: Infinity, // Assert compares only enumerable properties (with a few exceptions). showHidden: false, // Assert does not detect proxies currently. showProxy: false, sorted: true, // Inspect getters as we also check them when comparing entries. getters: true }); } export function createErrDiff(actual, expected, operator) { let other = ""; let res = ""; let end = ""; let skipped = false; const actualInspected = inspectValue(actual); const actualLines = actualInspected.split("\n"); const expectedLines = inspectValue(expected).split("\n"); let i = 0; let indicator = ""; // In case both values are objects or functions explicitly mark them as not // reference equal for the `strictEqual` operator. if (operator === "strictEqual" && (typeof actual === "object" && actual !== null && typeof expected === "object" && expected !== null || typeof actual === "function" && typeof expected === "function")) { operator = "strictEqualObject"; } // If "actual" and "expected" fit on a single line and they are not strictly // equal, check further special handling. if (actualLines.length === 1 && expectedLines.length === 1 && actualLines[0] !== expectedLines[0]) { // Check for the visible length using the `removeColors()` function, if // appropriate. const c = inspect.defaultOptions.colors; const actualRaw = c ? removeColors(actualLines[0]) : actualLines[0]; const expectedRaw = c ? removeColors(expectedLines[0]) : expectedLines[0]; const inputLength = actualRaw.length + expectedRaw.length; // If the character length of "actual" and "expected" together is less than // kMaxShortLength and if neither is an object and at least one of them is // not `zero`, use the strict equal comparison to visualize the output. if (inputLength <= kMaxShortLength) { if ((typeof actual !== "object" || actual === null) && (typeof expected !== "object" || expected === null) && (actual !== 0 || expected !== 0)) { return `${kReadableOperator[operator]}\n\n` + `${actualLines[0]} !== ${expectedLines[0]}\n`; } } else if (operator !== "strictEqualObject") { // If the stderr is a tty and the input length is lower than the current // columns per line, add a mismatch indicator below the output. If it is // not a tty, use a default value of 80 characters. const maxLength = io.stderr.isTerminal() ? getConsoleWidth() : 80; if (inputLength < maxLength) { while(actualRaw[i] === expectedRaw[i]){ i++; } // Ignore the first characters. if (i > 2) { // Add position indicator for the first mismatch in case it is a // single line and the input length is less than the column length. indicator = `\n ${" ".repeat(i)}^`; i = 0; } } } } // Remove all ending lines that match (this optimizes the output for // readability by reducing the number of total changed lines). let a = actualLines[actualLines.length - 1]; let b = expectedLines[expectedLines.length - 1]; while(a === b){ if (i++ < 3) { end = `\n ${a}${end}`; } else { other = a; } actualLines.pop(); expectedLines.pop(); if (actualLines.length === 0 || expectedLines.length === 0) { break; } a = actualLines[actualLines.length - 1]; b = expectedLines[expectedLines.length - 1]; } const maxLines = MathMax(actualLines.length, expectedLines.length); // Strict equal with identical objects that are not identical by reference. // E.g., assert.deepStrictEqual({ a: Symbol() }, { a: Symbol() }) if (maxLines === 0) { // We have to get the result again. The lines were all removed before. const actualLines = actualInspected.split("\n"); // Only remove lines in case it makes sense to collapse those. if (actualLines.length > 50) { actualLines[46] = `${blue}...${defaultColor}`; while(actualLines.length > 47){ actualLines.pop(); } } return `${kReadableOperator.notIdentical}\n\n${actualLines.join("\n")}\n`; } // There were at least five identical lines at the end. Mark a couple of // skipped. if (i >= 5) { end = `\n${blue}...${defaultColor}${end}`; skipped = true; } if (other !== "") { end = `\n ${other}${end}`; other = ""; } let printedLines = 0; let identical = 0; const msg = kReadableOperator[operator] + `\n${green}+ actual${defaultColor} ${red}- expected${defaultColor}`; const skippedMsg = ` ${blue}...${defaultColor} Lines skipped`; let lines = actualLines; let plusMinus = `${green}+${defaultColor}`; let maxLength = expectedLines.length; if (actualLines.length < maxLines) { lines = expectedLines; plusMinus = `${red}-${defaultColor}`; maxLength = actualLines.length; } for(i = 0; i < maxLines; i++){ if (maxLength < i + 1) { // If more than two former lines are identical, print them. Collapse them // in case more than five lines were identical. if (identical > 2) { if (identical > 3) { if (identical > 4) { if (identical === 5) { res += `\n ${lines[i - 3]}`; printedLines++; } else { res += `\n${blue}...${defaultColor}`; skipped = true; } } res += `\n ${lines[i - 2]}`; printedLines++; } res += `\n ${lines[i - 1]}`; printedLines++; } // No identical lines before. identical = 0; // Add the expected line to the cache. if (lines === actualLines) { res += `\n${plusMinus} ${lines[i]}`; } else { other += `\n${plusMinus} ${lines[i]}`; } printedLines++; // Only extra actual lines exist // Lines diverge } else { const expectedLine = expectedLines[i]; let actualLine = actualLines[i]; // If the lines diverge, specifically check for lines that only diverge by // a trailing comma. In that case it is actually identical and we should // mark it as such. let divergingLines = actualLine !== expectedLine && (!actualLine.endsWith(",") || actualLine.slice(0, -1) !== expectedLine); // If the expected line has a trailing comma but is otherwise identical, // add a comma at the end of the actual line. Otherwise the output could // look weird as in: // // [ // 1 // No comma at the end! // + 2 // ] // if (divergingLines && expectedLine.endsWith(",") && expectedLine.slice(0, -1) === actualLine) { divergingLines = false; actualLine += ","; } if (divergingLines) { // If more than two former lines are identical, print them. Collapse // them in case more than five lines were identical. if (identical > 2) { if (identical > 3) { if (identical > 4) { if (identical === 5) { res += `\n ${actualLines[i - 3]}`; printedLines++; } else { res += `\n${blue}...${defaultColor}`; skipped = true; } } res += `\n ${actualLines[i - 2]}`; printedLines++; } res += `\n ${actualLines[i - 1]}`; printedLines++; } // No identical lines before. identical = 0; // Add the actual line to the result and cache the expected diverging // line so consecutive diverging lines show up as +++--- and not +-+-+-. res += `\n${green}+${defaultColor} ${actualLine}`; other += `\n${red}-${defaultColor} ${expectedLine}`; printedLines += 2; // Lines are identical } else { // Add all cached information to the result before adding other things // and reset the cache. res += other; other = ""; identical++; // The very first identical line since the last diverging line is be // added to the result. if (identical <= 2) { res += `\n ${actualLine}`; printedLines++; } } } // Inspected object to big (Show ~50 rows max) if (printedLines > 50 && i < maxLines - 2) { return `${msg}${skippedMsg}\n${res}\n${blue}...${defaultColor}${other}\n` + `${blue}...${defaultColor}`; } } return `${msg}${skipped ? skippedMsg : ""}\n${res}${other}${end}${indicator}`; } export class AssertionError extends Error { // deno-lint-ignore constructor-super constructor(options){ if (typeof options !== "object" || options === null) { throw new ERR_INVALID_ARG_TYPE("options", "Object", options); } const { message, operator, stackStartFn, details, // Compatibility with older versions. stackStartFunction } = options; let { actual, expected } = options; // TODO(schwarzkopfb): `stackTraceLimit` should be added to `ErrorConstructor` in // cli/dts/lib.deno.shared_globals.d.ts const limit = Error.stackTraceLimit; Error.stackTraceLimit = 0; if (message != null) { super(String(message)); } else { if (io.stderr.isTerminal()) { // Reset on each call to make sure we handle dynamically set environment // variables correct. if (Deno.noColor) { blue = ""; green = ""; defaultColor = ""; red = ""; } else { blue = "\u001b[34m"; green = "\u001b[32m"; defaultColor = "\u001b[39m"; red = "\u001b[31m"; } } // Prevent the error stack from being visible by duplicating the error // in a very close way to the original in case both sides are actually // instances of Error. if (typeof actual === "object" && actual !== null && typeof expected === "object" && expected !== null && "stack" in actual && actual instanceof Error && "stack" in expected && expected instanceof Error) { actual = copyError(actual); expected = copyError(expected); } if (operator === "deepStrictEqual" || operator === "strictEqual") { super(createErrDiff(actual, expected, operator)); } else if (operator === "notDeepStrictEqual" || operator === "notStrictEqual") { // In case the objects are equal but the operator requires unequal, show // the first object and say A equals B let base = kReadableOperator[operator]; const res = inspectValue(actual).split("\n"); // In case "actual" is an object or a function, it should not be // reference equal. if (operator === "notStrictEqual" && (typeof actual === "object" && actual !== null || typeof actual === "function")) { base = kReadableOperator.notStrictEqualObject; } // Only remove lines in case it makes sense to collapse those. if (res.length > 50) { res[46] = `${blue}...${defaultColor}`; while(res.length > 47){ res.pop(); } } // Only print a single input. if (res.length === 1) { super(`${base}${res[0].length > 5 ? "\n\n" : " "}${res[0]}`); } else { super(`${base}\n\n${res.join("\n")}\n`); } } else { let res = inspectValue(actual); let other = inspectValue(expected); const knownOperator = kReadableOperator[operator ?? ""]; if (operator === "notDeepEqual" && res === other) { res = `${knownOperator}\n\n${res}`; if (res.length > 1024) { res = `${res.slice(0, 1021)}...`; } super(res); } else { if (res.length > 512) { res = `${res.slice(0, 509)}...`; } if (other.length > 512) { other = `${other.slice(0, 509)}...`; } if (operator === "deepEqual") { res = `${knownOperator}\n\n${res}\n\nshould loosely deep-equal\n\n`; } else { const newOp = kReadableOperator[`${operator}Unequal`]; if (newOp) { res = `${newOp}\n\n${res}\n\nshould not loosely deep-equal\n\n`; } else { other = ` ${operator} ${other}`; } } super(`${res}${other}`); } } } Error.stackTraceLimit = limit; this.generatedMessage = !message; ObjectDefineProperty(this, "name", { __proto__: null, value: "AssertionError [ERR_ASSERTION]", enumerable: false, writable: true, configurable: true }); this.code = "ERR_ASSERTION"; if (details) { this.actual = undefined; this.expected = undefined; this.operator = undefined; for(let i = 0; i < details.length; i++){ this["message " + i] = details[i].message; this["actual " + i] = details[i].actual; this["expected " + i] = details[i].expected; this["operator " + i] = details[i].operator; this["stack trace " + i] = details[i].stack; } } else { this.actual = actual; this.expected = expected; this.operator = operator; } // @ts-ignore this function is not available in lib.dom.d.ts Error.captureStackTrace(this, stackStartFn || stackStartFunction); // Create error message including the error code in the name. this.stack; // Reset the name. this.name = "AssertionError"; } toString() { return `${this.name} [${this.code}]: ${this.message}`; } [inspect.custom](_recurseTimes, ctx) { // Long strings should not be fully inspected. const tmpActual = this.actual; const tmpExpected = this.expected; for (const name of [ "actual", "expected" ]){ if (typeof this[name] === "string") { const value = this[name]; const lines = value.split("\n"); if (lines.length > 10) { lines.length = 10; this[name] = `${lines.join("\n")}\n...`; } else if (value.length > 512) { this[name] = `${value.slice(512)}...`; } } } // This limits the `actual` and `expected` property default inspection to // the minimum depth. Otherwise those values would be too verbose compared // to the actual error message which contains a combined view of these two // input values. const result = inspect(this, { ...ctx, customInspect: false, depth: 0 }); // Reset the properties after inspection. this.actual = tmpActual; this.expected = tmpExpected; return result; } } export default AssertionError; Qd ext:deno_node/assertion_error.tsa bD`(M` T`dLaX T  I`FESb1GE  " b "bbFFTn???????????????IbG`L` : ]`LE]`b]` ]`]DL`` L`` L`U` L`UV` L`VU` L`U L`  DGDcL` Db b c Dc=D D%Dcbl`a?%a?b a?Ua?Ua?Va?a?a?JDb@4L`  T I` G UnDb@a T  I`d Ub@a T I`/Vb@ca " )%I`b b Gb HbIJb "K "L BMBNN "PBQQRS  `T ``/ `/ `?  `  a/GD]Pf 1 a D aHcD La T  I`0CnDJDb  T I`*CmCb#  T I`CG`b  ^D`DHh Ƃ%%%%%% % % % % %%%%ei e% h  !-%!-%! - %- %- % - % -% % % %%~)% %Â0-te+ 101 b`PPbAfDDDDDDED`RD]DH Q:R$// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // vendored from std/assert/mod.ts import { primordials } from "ext:core/mod.js"; const { DatePrototype, ArrayPrototypeJoin, ArrayPrototypeMap, DatePrototypeGetTime, Error, NumberIsNaN, Object, ObjectIs, ObjectKeys, ObjectPrototypeIsPrototypeOf, ReflectHas, ReflectOwnKeys, RegExpPrototype, RegExpPrototypeTest, SafeMap, SafeRegExp, String, StringPrototypeReplace, StringPrototypeSplit, SymbolIterator, TypeError, WeakMapPrototype, WeakSetPrototype, WeakRefPrototype, WeakRefPrototypeDeref } = primordials; import { URLPrototype } from "ext:deno_url/00_url.js"; import { red } from "ext:deno_node/_util/std_fmt_colors.ts"; import { buildMessage, diff, diffstr } from "ext:deno_node/_util/std_testing_diff.ts"; const FORMAT_PATTERN = new SafeRegExp(/(?=["\\])/g); /** Converts the input into a string. Objects, Sets and Maps are sorted so as to * make tests less flaky */ export function format(v) { // deno-lint-ignore no-explicit-any const { Deno } = globalThis; return typeof Deno?.inspect === "function" ? Deno.inspect(v, { depth: Infinity, sorted: true, trailingComma: true, compact: false, iterableLimit: Infinity, // getters should be true in assertEquals. getters: true }) : `"${StringPrototypeReplace(String(v), FORMAT_PATTERN, "\\")}"`; } const CAN_NOT_DISPLAY = "[Cannot display]"; export class AssertionError extends Error { name = "AssertionError"; constructor(message){ super(message); } } function isKeyedCollection(x) { return ReflectHas(x, SymbolIterator) && ReflectHas(x, "size"); } /** Deep equality comparison used in assertions */ export function equal(c, d) { const seen = new SafeMap(); return function compare(a, b) { // Have to render RegExp & Date for string comparison // unless it's mistreated as object if (a && b && (ObjectPrototypeIsPrototypeOf(RegExpPrototype, a) && ObjectPrototypeIsPrototypeOf(RegExpPrototype, b) || ObjectPrototypeIsPrototypeOf(URLPrototype, a) && ObjectPrototypeIsPrototypeOf(URLPrototype, b))) { return String(a) === String(b); } if (ObjectPrototypeIsPrototypeOf(DatePrototype, a) && ObjectPrototypeIsPrototypeOf(DatePrototype, b)) { const aTime = DatePrototypeGetTime(a); const bTime = DatePrototypeGetTime(b); // Check for NaN equality manually since NaN is not // equal to itself. if (NumberIsNaN(aTime) && NumberIsNaN(bTime)) { return true; } return aTime === bTime; } if (typeof a === "number" && typeof b === "number") { return NumberIsNaN(a) && NumberIsNaN(b) || a === b; } if (ObjectIs(a, b)) { return true; } if (a && typeof a === "object" && b && typeof b === "object") { if (a && b && !constructorsEqual(a, b)) { return false; } if (ObjectPrototypeIsPrototypeOf(WeakMapPrototype, a) || ObjectPrototypeIsPrototypeOf(WeakMapPrototype, b)) { if (!(ObjectPrototypeIsPrototypeOf(WeakMapPrototype, a) && ObjectPrototypeIsPrototypeOf(WeakMapPrototype, b))) return false; throw new TypeError("cannot compare WeakMap instances"); } if (ObjectPrototypeIsPrototypeOf(WeakSetPrototype, a) || ObjectPrototypeIsPrototypeOf(WeakSetPrototype, b)) { if (!(ObjectPrototypeIsPrototypeOf(WeakSetPrototype, a) && ObjectPrototypeIsPrototypeOf(WeakSetPrototype, b))) return false; throw new TypeError("cannot compare WeakSet instances"); } if (seen.get(a) === b) { return true; } if (ObjectKeys(a || {}).length !== ObjectKeys(b || {}).length) { return false; } seen.set(a, b); if (isKeyedCollection(a) && isKeyedCollection(b)) { if (a.size !== b.size) { return false; } let unmatchedEntries = a.size; // TODO(petamoriken): use primordials // deno-lint-ignore prefer-primordials for (const [aKey, aValue] of a.entries()){ // deno-lint-ignore prefer-primordials for (const [bKey, bValue] of b.entries()){ /* Given that Map keys can be references, we need * to ensure that they are also deeply equal */ if (aKey === aValue && bKey === bValue && compare(aKey, bKey) || compare(aKey, bKey) && compare(aValue, bValue)) { unmatchedEntries--; break; } } } return unmatchedEntries === 0; } const merged = { ...a, ...b }; const keys = ReflectOwnKeys(merged); for(let i = 0; i < keys.length; ++i){ const key = keys[i]; if (!compare(a && a[key], b && b[key])) { return false; } if (ReflectHas(a, key) && !ReflectHas(b, key) || ReflectHas(b, key) && !ReflectHas(a, key)) { return false; } } if (ObjectPrototypeIsPrototypeOf(WeakRefPrototype, a) || ObjectPrototypeIsPrototypeOf(WeakRefPrototype, b)) { if (!(ObjectPrototypeIsPrototypeOf(WeakRefPrototype, a) && ObjectPrototypeIsPrototypeOf(WeakRefPrototype, b))) return false; return compare(WeakRefPrototypeDeref(a), WeakRefPrototypeDeref(b)); } return true; } return false; }(c, d); } function constructorsEqual(a, b) { return a.constructor === b.constructor || a.constructor === Object && !b.constructor || !a.constructor && b.constructor === Object; } /** Make an assertion, error will be thrown if `expr` does not have truthy value. */ export function assert(expr, msg = "") { if (!expr) { throw new AssertionError(msg); } } /** Make an assertion that `actual` and `expected` are equal, deeply. If not * deeply equal, then throw. */ export function assertEquals(actual, expected, msg) { if (equal(actual, expected)) { return; } let message = ""; const actualString = format(actual); const expectedString = format(expected); try { const stringDiff = typeof actual === "string" && typeof expected === "string"; const diffResult = stringDiff ? diffstr(actual, expected) : diff(StringPrototypeSplit(actualString, "\n"), StringPrototypeSplit(expectedString, "\n")); const diffMsg = ArrayPrototypeJoin(buildMessage(diffResult, { stringDiff }), "\n"); message = `Values are not equal:\n${diffMsg}`; } catch { message = `\n${red(red(CAN_NOT_DISPLAY))} + \n\n`; } if (msg) { message = msg; } throw new AssertionError(message); } /** Make an assertion that `actual` and `expected` are not equal, deeply. * If not then throw. */ export function assertNotEquals(actual, expected, msg) { if (!equal(actual, expected)) { return; } let actualString; let expectedString; try { actualString = String(actual); } catch { actualString = "[Cannot display]"; } try { expectedString = String(expected); } catch { expectedString = "[Cannot display]"; } if (!msg) { msg = `actual: ${actualString} expected not to be: ${expectedString}`; } throw new AssertionError(msg); } /** Make an assertion that `actual` and `expected` are strictly equal. If * not then throw. */ export function assertStrictEquals(actual, expected, msg) { if (ObjectIs(actual, expected)) { return; } let message; if (msg) { message = msg; } else { const actualString = format(actual); const expectedString = format(expected); if (actualString === expectedString) { const withOffset = ArrayPrototypeJoin(ArrayPrototypeMap(StringPrototypeSplit(actualString, "\n"), (l)=>` ${l}`), "\n"); message = `Values have the same structure but are not reference-equal:\n\n${red(withOffset)}\n`; } else { try { const stringDiff = typeof actual === "string" && typeof expected === "string"; const diffResult = stringDiff ? diffstr(actual, expected) : diff(StringPrototypeSplit(actualString, "\n"), StringPrototypeSplit(expectedString, "\n")); const diffMsg = ArrayPrototypeJoin(buildMessage(diffResult, { stringDiff }), "\n"); message = `Values are not strictly equal:\n${diffMsg}`; } catch { message = `\n${CAN_NOT_DISPLAY} + \n\n`; } } } throw new AssertionError(message); } /** Make an assertion that `actual` and `expected` are not strictly equal. * If the values are strictly equal then throw. */ export function assertNotStrictEquals(actual, expected, msg) { if (!ObjectIs(actual, expected)) { return; } throw new AssertionError(msg ?? `Expected "actual" to be strictly unequal to: ${format(actual)}\n`); } /** Make an assertion that `actual` match RegExp `expected`. If not * then throw. */ export function assertMatch(actual, expected, msg) { if (!RegExpPrototypeTest(expected, actual)) { if (!msg) { msg = `actual: "${actual}" expected to match: "${expected}"`; } throw new AssertionError(msg); } } /** Make an assertion that `actual` not match RegExp `expected`. If match * then throw. */ export function assertNotMatch(actual, expected, msg) { if (RegExpPrototypeTest(expected, actual)) { if (!msg) { msg = `actual: "${actual}" expected to not match: "${expected}"`; } throw new AssertionError(msg); } } Qe=Es"ext:deno_node/_util/std_asserts.tsa bD`HM` T`^La&x T  I`WeSb1!b !Kb B>!$`"d= "bcdegz???????????????????????????Ib$`L` bS]`&]`cE]`c]`]L`` L` ` L`k` L`k"p` L`"pm` L`mp` L`po` L`obn` L`bn `  L` -`  L`] L`  DbbcO[ D"b"bc D""c Dbbc Dcw Dbbc`a?ba?ba?"ba?"a?ba?a ?a? a ?a?ka?ma?bna?oa?"pa?pa?Eb@ T  I`3g6Eb@xL` T I`Ob@b  T I`b ( @ b@a  T I`b@a T I`sBkb@ a T I`mb@ a T I` 2 bnb@ a  T I` !ob@ a  T I`!""pb@a  T I`F#$pb@a a ! b !Kb B>!$%`"d= "bbdbe  `T ``/ `/ `?  `  aD] ` aj] T  I`6EEb Ճ T$`L`  F` Ka-,b3(Sbqq`Da a b  &E`D@h %%%%%%% % % % % %%%%%%%%%%%%%%%%ei h  0-%-%- %- %- - %- %-% -% -% -% -% -%-%-%-- %-"%-$%-&%-(%-*%-,%-.%-0%z 2 i3%!%#"e+$2%5 1 6Ee7 PPPPPPPPLEbAEF F.EEDEEEEEDEEED`RD]DH QF9// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file import { isAnyArrayBuffer, isArrayBufferView, isBigIntObject, isBooleanObject, isBoxedPrimitive, isDate, isFloat32Array, isFloat64Array, isMap, isNativeError, isNumberObject, isRegExp, isSet, isStringObject, isSymbolObject, isTypedArray } from "ext:deno_node/internal/util/types.ts"; import { Buffer } from "node:buffer"; import { getOwnNonIndexProperties, ONLY_ENUMERABLE, SKIP_SYMBOLS } from "ext:deno_node/internal_binding/util.ts"; var valueType; (function(valueType) { valueType[valueType["noIterator"] = 0] = "noIterator"; valueType[valueType["isArray"] = 1] = "isArray"; valueType[valueType["isSet"] = 2] = "isSet"; valueType[valueType["isMap"] = 3] = "isMap"; })(valueType || (valueType = {})); let memo; export function isDeepStrictEqual(val1, val2) { return innerDeepEqual(val1, val2, true); } export function isDeepEqual(val1, val2) { return innerDeepEqual(val1, val2, false); } function innerDeepEqual(val1, val2, strict, memos = memo) { // Basic case covered by Strict Equality Comparison if (val1 === val2) { if (val1 !== 0) return true; return strict ? Object.is(val1, val2) : true; } if (strict) { // Cases where the values are not objects // If both values are Not a Number NaN if (typeof val1 !== "object") { return typeof val1 === "number" && Number.isNaN(val1) && Number.isNaN(val2); } // If either value is null if (typeof val2 !== "object" || val1 === null || val2 === null) { return false; } // If the prototype are not the same if (Object.getPrototypeOf(val1) !== Object.getPrototypeOf(val2)) { return false; } } else { // Non strict case where values are either null or NaN if (val1 === null || typeof val1 !== "object") { if (val2 === null || typeof val2 !== "object") { return val1 == val2 || Number.isNaN(val1) && Number.isNaN(val2); } return false; } if (val2 === null || typeof val2 !== "object") { return false; } } const val1Tag = Object.prototype.toString.call(val1); const val2Tag = Object.prototype.toString.call(val2); // prototype must be Strictly Equal if (val1Tag !== val2Tag) { return false; } // handling when values are array if (Array.isArray(val1)) { // quick rejection cases if (!Array.isArray(val2) || val1.length !== val2.length) { return false; } const filter = strict ? ONLY_ENUMERABLE : ONLY_ENUMERABLE | SKIP_SYMBOLS; const keys1 = getOwnNonIndexProperties(val1, filter); const keys2 = getOwnNonIndexProperties(val2, filter); if (keys1.length !== keys2.length) { return false; } return keyCheck(val1, val2, strict, memos, valueType.isArray, keys1); } else if (val1Tag === "[object Object]") { return keyCheck(val1, val2, strict, memos, valueType.noIterator); } else if (val1 instanceof Date) { if (!(val2 instanceof Date) || val1.getTime() !== val2.getTime()) { return false; } } else if (val1 instanceof RegExp) { if (!(val2 instanceof RegExp) || !areSimilarRegExps(val1, val2)) { return false; } } else if (isNativeError(val1) || val1 instanceof Error) { // stack may or may not be same, hence it shouldn't be compared if (// How to handle the type errors here !isNativeError(val2) && !(val2 instanceof Error) || val1.message !== val2.message || val1.name !== val2.name) { return false; } } else if (isArrayBufferView(val1)) { const TypedArrayPrototypeGetSymbolToStringTag = (val)=>Object.getOwnPropertySymbols(val).map((item)=>item.toString()).toString(); if (isTypedArray(val1) && isTypedArray(val2) && TypedArrayPrototypeGetSymbolToStringTag(val1) !== TypedArrayPrototypeGetSymbolToStringTag(val2)) { return false; } if (!strict && (isFloat32Array(val1) || isFloat64Array(val1))) { if (!areSimilarFloatArrays(val1, val2)) { return false; } } else if (!areSimilarTypedArrays(val1, val2)) { return false; } const filter = strict ? ONLY_ENUMERABLE : ONLY_ENUMERABLE | SKIP_SYMBOLS; const keysVal1 = getOwnNonIndexProperties(val1, filter); const keysVal2 = getOwnNonIndexProperties(val2, filter); if (keysVal1.length !== keysVal2.length) { return false; } return keyCheck(val1, val2, strict, memos, valueType.noIterator, keysVal1); } else if (isSet(val1)) { if (!isSet(val2) || val1.size !== val2.size) { return false; } return keyCheck(val1, val2, strict, memos, valueType.isSet); } else if (isMap(val1)) { if (!isMap(val2) || val1.size !== val2.size) { return false; } return keyCheck(val1, val2, strict, memos, valueType.isMap); } else if (isAnyArrayBuffer(val1)) { if (!isAnyArrayBuffer(val2) || !areEqualArrayBuffers(val1, val2)) { return false; } } else if (isBoxedPrimitive(val1)) { if (!isEqualBoxedPrimitive(val1, val2)) { return false; } } else if (Array.isArray(val2) || isArrayBufferView(val2) || isSet(val2) || isMap(val2) || isDate(val2) || isRegExp(val2) || isAnyArrayBuffer(val2) || isBoxedPrimitive(val2) || isNativeError(val2) || val2 instanceof Error) { return false; } return keyCheck(val1, val2, strict, memos, valueType.noIterator); } function keyCheck(val1, val2, strict, memos, iterationType, aKeys = []) { if (arguments.length === 5) { aKeys = Object.keys(val1); const bKeys = Object.keys(val2); // The pair must have the same number of owned properties. if (aKeys.length !== bKeys.length) { return false; } } // Cheap key test let i = 0; for(; i < aKeys.length; i++){ if (!val2.propertyIsEnumerable(aKeys[i])) { return false; } } if (strict && arguments.length === 5) { const symbolKeysA = Object.getOwnPropertySymbols(val1); if (symbolKeysA.length !== 0) { let count = 0; for(i = 0; i < symbolKeysA.length; i++){ const key = symbolKeysA[i]; if (val1.propertyIsEnumerable(key)) { if (!val2.propertyIsEnumerable(key)) { return false; } // added toString here aKeys.push(key.toString()); count++; } else if (val2.propertyIsEnumerable(key)) { return false; } } const symbolKeysB = Object.getOwnPropertySymbols(val2); if (symbolKeysA.length !== symbolKeysB.length && getEnumerables(val2, symbolKeysB).length !== count) { return false; } } else { const symbolKeysB = Object.getOwnPropertySymbols(val2); if (symbolKeysB.length !== 0 && getEnumerables(val2, symbolKeysB).length !== 0) { return false; } } } if (aKeys.length === 0 && (iterationType === valueType.noIterator || iterationType === valueType.isArray && val1.length === 0 || val1.size === 0)) { return true; } if (memos === undefined) { memos = { val1: new Map(), val2: new Map(), position: 0 }; } else { const val2MemoA = memos.val1.get(val1); if (val2MemoA !== undefined) { const val2MemoB = memos.val2.get(val2); if (val2MemoB !== undefined) { return val2MemoA === val2MemoB; } } memos.position++; } memos.val1.set(val1, memos.position); memos.val2.set(val2, memos.position); const areEq = objEquiv(val1, val2, strict, aKeys, memos, iterationType); memos.val1.delete(val1); memos.val2.delete(val2); return areEq; } function areSimilarRegExps(a, b) { return a.source === b.source && a.flags === b.flags && a.lastIndex === b.lastIndex; } // TODO(standvpmnt): add type for arguments function areSimilarFloatArrays(arr1, arr2) { if (arr1.byteLength !== arr2.byteLength) { return false; } for(let i = 0; i < arr1.byteLength; i++){ if (arr1[i] !== arr2[i]) { return false; } } return true; } // TODO(standvpmnt): add type for arguments function areSimilarTypedArrays(arr1, arr2) { if (arr1.byteLength !== arr2.byteLength) { return false; } return Buffer.compare(new Uint8Array(arr1.buffer, arr1.byteOffset, arr1.byteLength), new Uint8Array(arr2.buffer, arr2.byteOffset, arr2.byteLength)) === 0; } // TODO(standvpmnt): add type for arguments function areEqualArrayBuffers(buf1, buf2) { return buf1.byteLength === buf2.byteLength && Buffer.compare(new Uint8Array(buf1), new Uint8Array(buf2)) === 0; } // TODO(standvpmnt): this check of getOwnPropertySymbols and getOwnPropertyNames // length is sufficient to handle the current test case, however this will fail // to catch a scenario wherein the getOwnPropertySymbols and getOwnPropertyNames // length is the same(will be very contrived but a possible shortcoming function isEqualBoxedPrimitive(a, b) { if (Object.getOwnPropertyNames(a).length !== Object.getOwnPropertyNames(b).length) { return false; } if (Object.getOwnPropertySymbols(a).length !== Object.getOwnPropertySymbols(b).length) { return false; } if (isNumberObject(a)) { return isNumberObject(b) && Object.is(Number.prototype.valueOf.call(a), Number.prototype.valueOf.call(b)); } if (isStringObject(a)) { return isStringObject(b) && String.prototype.valueOf.call(a) === String.prototype.valueOf.call(b); } if (isBooleanObject(a)) { return isBooleanObject(b) && Boolean.prototype.valueOf.call(a) === Boolean.prototype.valueOf.call(b); } if (isBigIntObject(a)) { return isBigIntObject(b) && BigInt.prototype.valueOf.call(a) === BigInt.prototype.valueOf.call(b); } if (isSymbolObject(a)) { return isSymbolObject(b) && Symbol.prototype.valueOf.call(a) === Symbol.prototype.valueOf.call(b); } // assert.fail(`Unknown boxed type ${val1}`); // return false; throw Error(`Unknown boxed type`); } function getEnumerables(val, keys) { return keys.filter((key)=>val.propertyIsEnumerable(key)); } function objEquiv(obj1, obj2, strict, keys, memos, iterationType) { let i = 0; if (iterationType === valueType.isSet) { if (!setEquiv(obj1, obj2, strict, memos)) { return false; } } else if (iterationType === valueType.isMap) { if (!mapEquiv(obj1, obj2, strict, memos)) { return false; } } else if (iterationType === valueType.isArray) { for(; i < obj1.length; i++){ if (obj1.hasOwnProperty(i)) { if (!obj2.hasOwnProperty(i) || !innerDeepEqual(obj1[i], obj2[i], strict, memos)) { return false; } } else if (obj2.hasOwnProperty(i)) { return false; } else { const keys1 = Object.keys(obj1); for(; i < keys1.length; i++){ const key = keys1[i]; if (!obj2.hasOwnProperty(key) || !innerDeepEqual(obj1[key], obj2[key], strict, memos)) { return false; } } if (keys1.length !== Object.keys(obj2).length) { return false; } if (keys1.length !== Object.keys(obj2).length) { return false; } return true; } } } // Expensive test for(i = 0; i < keys.length; i++){ const key = keys[i]; if (!innerDeepEqual(obj1[key], obj2[key], strict, memos)) { return false; } } return true; } function findLooseMatchingPrimitives(primitive) { switch(typeof primitive){ case "undefined": return null; case "object": return undefined; case "symbol": return false; case "string": primitive = +primitive; case "number": if (Number.isNaN(primitive)) { return false; } } return true; } function setMightHaveLoosePrim(set1, set2, primitive) { const altValue = findLooseMatchingPrimitives(primitive); if (altValue != null) return altValue; return set2.has(altValue) && !set1.has(altValue); } function setHasEqualElement(set, val1, strict, memos) { for (const val2 of set){ if (innerDeepEqual(val1, val2, strict, memos)) { set.delete(val2); return true; } } return false; } function setEquiv(set1, set2, strict, memos) { let set = null; for (const item of set1){ if (typeof item === "object" && item !== null) { if (set === null) { // What is SafeSet from primordials? // set = new SafeSet(); set = new Set(); } set.add(item); } else if (!set2.has(item)) { if (strict) return false; if (!setMightHaveLoosePrim(set1, set2, item)) { return false; } if (set === null) { set = new Set(); } set.add(item); } } if (set !== null) { for (const item of set2){ if (typeof item === "object" && item !== null) { if (!setHasEqualElement(set, item, strict, memos)) return false; } else if (!strict && !set1.has(item) && !setHasEqualElement(set, item, strict, memos)) { return false; } } return set.size === 0; } return true; } // TODO(standvpmnt): add types for argument function mapMightHaveLoosePrimitive(map1, map2, primitive, item, memos) { const altValue = findLooseMatchingPrimitives(primitive); if (altValue != null) { return altValue; } const curB = map2.get(altValue); if (curB === undefined && !map2.has(altValue) || !innerDeepEqual(item, curB, false, memo)) { return false; } return !map1.has(altValue) && innerDeepEqual(item, curB, false, memos); } function mapEquiv(map1, map2, strict, memos) { let set = null; for (const { 0: key, 1: item1 } of map1){ if (typeof key === "object" && key !== null) { if (set === null) { set = new Set(); } set.add(key); } else { const item2 = map2.get(key); if (item2 === undefined && !map2.has(key) || !innerDeepEqual(item1, item2, strict, memos)) { if (strict) return false; if (!mapMightHaveLoosePrimitive(map1, map2, key, item1, memos)) { return false; } if (set === null) { set = new Set(); } set.add(key); } } } if (set !== null) { for (const { 0: key, 1: item } of map2){ if (typeof key === "object" && key !== null) { if (!mapHasEqualEntry(set, map1, key, item, strict, memos)) { return false; } } else if (!strict && (!map1.has(key) || !innerDeepEqual(map1.get(key), item, false, memos)) && !mapHasEqualEntry(set, map1, key, item, false, memos)) { return false; } } return set.size === 0; } return true; } function mapHasEqualEntry(set, map, key1, item1, strict, memos) { for (const key2 of set){ if (innerDeepEqual(key1, key2, strict, memos) && innerDeepEqual(item1, map.get(key2), strict, memos)) { set.delete(key2); return true; } } return false; }  Qf="*ext:deno_node/internal/util/comparisons.tsa bD`dM` Tx`\La T  I`N1btSb1rBsbtv"wwbxybzB}"B"q??????????????????Ib9`L` " ]`b]` ]`;] L` ` L` A` L`A]XL`  D"{ "{ c Dqqc% DBrBrc'3 D"q"qc D11c D"3"3c DB4B4c D44c DB5B5c DB6B6c Dc( DAAc*8 D77c:? Db9b9cAN D99cP^ DB;B;c`h D;;cjo D"="=cq D==c D">">c`1a?"3a?B4a?4a?B5a?B6a?a?Aa?7a?b9a?9a?B;a?;a?"=a?=a?">a?"{ a?"qa?qa?Bra?Aa? a?.Fb@ T I`CvRFb@ T I`1"wb@ T I`|Gwb@  T I` bxb@  T I` N!yb@  T I`"&bzb@  T I`&'B}b@  T I`',,"b@ T I`Q,-b$@ T I`-c.Bb@ T I`.2/b@ T I`D/2b@ T I` 34b#@ T I`48"b@ T I`89b@ L` T I`Ab@a T I`6 b@aa  T<`5L`b3;7  ZG`Dh 24 24 24 2 4(SbqAI`Da}Vb 8, 8b@ BF`Dw h %%%%%% % % % % % % % % %%%ei h  %b%  abAVGFGNGJFDFFFFFFFDG GGG"G*G2G:GD`RD]DH Q~// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Feross Aboukhadijeh, and other contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { core } from "ext:core/mod.js"; import { TextDecoder, TextEncoder } from "ext:deno_web/08_text_encoding.js"; import { codes } from "ext:deno_node/internal/error_codes.ts"; import { encodings } from "ext:deno_node/internal_binding/string_decoder.ts"; import { indexOfBuffer, indexOfNumber, } from "ext:deno_node/internal_binding/buffer.ts"; import { asciiToBytes, base64ToBytes, base64UrlToBytes, bytesToAscii, bytesToUtf16le, hexToBytes, utf16leToBytes, } from "ext:deno_node/internal_binding/_utils.ts"; import { isAnyArrayBuffer, isArrayBufferView, } from "ext:deno_node/internal/util/types.ts"; import { normalizeEncoding } from "ext:deno_node/internal/util.mjs"; import { validateBuffer } from "ext:deno_node/internal/validators.mjs"; import { isUint8Array } from "ext:deno_node/internal/util/types.ts"; import { forgivingBase64Encode, forgivingBase64UrlEncode, } from "ext:deno_web/00_infra.js"; import { atob, btoa } from "ext:deno_web/05_base64.js"; import { Blob } from "ext:deno_web/09_file.js"; export { atob, Blob, btoa }; const utf8Encoder = new TextEncoder(); // Temporary buffers to convert numbers. const float32Array = new Float32Array(1); const uInt8Float32Array = new Uint8Array(float32Array.buffer); const float64Array = new Float64Array(1); const uInt8Float64Array = new Uint8Array(float64Array.buffer); // Check endianness. float32Array[0] = -1; // 0xBF800000 // Either it is [0, 0, 128, 191] or [191, 128, 0, 0]. It is not possible to // check this with `os.endianness()` because that is determined at compile time. export const bigEndian = uInt8Float32Array[3] === 0; export const kMaxLength = 2147483647; export const kStringMaxLength = 536870888; const MAX_UINT32 = 2 ** 32; const customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null; const INSPECT_MAX_BYTES = 50; export const constants = { MAX_LENGTH: kMaxLength, MAX_STRING_LENGTH: kStringMaxLength, }; Object.defineProperty(Buffer.prototype, "parent", { enumerable: true, get: function () { if (!Buffer.isBuffer(this)) { return void 0; } return this.buffer; }, }); Object.defineProperty(Buffer.prototype, "offset", { enumerable: true, get: function () { if (!Buffer.isBuffer(this)) { return void 0; } return this.byteOffset; }, }); function createBuffer(length) { if (length > kMaxLength) { throw new RangeError( 'The value "' + length + '" is invalid for option "size"', ); } const buf = new Uint8Array(length); Object.setPrototypeOf(buf, Buffer.prototype); return buf; } export function Buffer(arg, encodingOrOffset, length) { if (typeof arg === "number") { if (typeof encodingOrOffset === "string") { throw new codes.ERR_INVALID_ARG_TYPE( "string", "string", arg, ); } return _allocUnsafe(arg); } return _from(arg, encodingOrOffset, length); } Buffer.poolSize = 8192; function _from(value, encodingOrOffset, length) { if (typeof value === "string") { return fromString(value, encodingOrOffset); } if (typeof value === "object" && value !== null) { if (isAnyArrayBuffer(value)) { return fromArrayBuffer(value, encodingOrOffset, length); } const valueOf = value.valueOf && value.valueOf(); if ( valueOf != null && valueOf !== value && (typeof valueOf === "string" || typeof valueOf === "object") ) { return _from(valueOf, encodingOrOffset, length); } const b = fromObject(value); if (b) { return b; } if (typeof value[Symbol.toPrimitive] === "function") { const primitive = value[Symbol.toPrimitive]("string"); if (typeof primitive === "string") { return fromString(primitive, encodingOrOffset); } } } throw new codes.ERR_INVALID_ARG_TYPE( "first argument", ["string", "Buffer", "ArrayBuffer", "Array", "Array-like Object"], value, ); } Buffer.from = function from(value, encodingOrOffset, length) { return _from(value, encodingOrOffset, length); }; Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype); Object.setPrototypeOf(Buffer, Uint8Array); function assertSize(size) { validateNumber(size, "size"); if (!(size >= 0 && size <= kMaxLength)) { throw new codes.ERR_INVALID_ARG_VALUE.RangeError("size", size); } } function _alloc(size, fill, encoding) { assertSize(size); const buffer = createBuffer(size); if (fill !== undefined) { if (encoding !== undefined && typeof encoding !== "string") { throw new codes.ERR_INVALID_ARG_TYPE( "encoding", "string", encoding, ); } return buffer.fill(fill, encoding); } return buffer; } Buffer.alloc = function alloc(size, fill, encoding) { return _alloc(size, fill, encoding); }; function _allocUnsafe(size) { assertSize(size); return createBuffer(size < 0 ? 0 : checked(size) | 0); } Buffer.allocUnsafe = function allocUnsafe(size) { return _allocUnsafe(size); }; Buffer.allocUnsafeSlow = function allocUnsafeSlow(size) { return _allocUnsafe(size); }; function fromString(string, encoding) { if (typeof encoding !== "string" || encoding === "") { encoding = "utf8"; } if (!Buffer.isEncoding(encoding)) { throw new codes.ERR_UNKNOWN_ENCODING(encoding); } const length = byteLength(string, encoding) | 0; let buf = createBuffer(length); const actual = buf.write(string, encoding); if (actual !== length) { buf = buf.slice(0, actual); } return buf; } function fromArrayLike(array) { const length = array.length < 0 ? 0 : checked(array.length) | 0; const buf = createBuffer(length); for (let i = 0; i < length; i += 1) { buf[i] = array[i] & 255; } return buf; } function fromObject(obj) { if (obj.length !== undefined || isAnyArrayBuffer(obj.buffer)) { if (typeof obj.length !== "number") { return createBuffer(0); } return fromArrayLike(obj); } if (obj.type === "Buffer" && Array.isArray(obj.data)) { return fromArrayLike(obj.data); } } function checked(length) { if (length >= kMaxLength) { throw new RangeError( "Attempt to allocate Buffer larger than maximum size: 0x" + kMaxLength.toString(16) + " bytes", ); } return length | 0; } export function SlowBuffer(length) { assertSize(length); return Buffer.alloc(+length); } Object.setPrototypeOf(SlowBuffer.prototype, Uint8Array.prototype); Object.setPrototypeOf(SlowBuffer, Uint8Array); Buffer.isBuffer = function isBuffer(b) { return b != null && b._isBuffer === true && b !== Buffer.prototype; }; Buffer.compare = function compare(a, b) { if (isInstance(a, Uint8Array)) { a = Buffer.from(a, a.offset, a.byteLength); } if (isInstance(b, Uint8Array)) { b = Buffer.from(b, b.offset, b.byteLength); } if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { throw new TypeError( 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array', ); } if (a === b) { return 0; } let x = a.length; let y = b.length; for (let i = 0, len = Math.min(x, y); i < len; ++i) { if (a[i] !== b[i]) { x = a[i]; y = b[i]; break; } } if (x < y) { return -1; } if (y < x) { return 1; } return 0; }; Buffer.isEncoding = function isEncoding(encoding) { return typeof encoding === "string" && encoding.length !== 0 && normalizeEncoding(encoding) !== undefined; }; Buffer.concat = function concat(list, length) { if (!Array.isArray(list)) { throw new codes.ERR_INVALID_ARG_TYPE("list", "Array", list); } if (list.length === 0) { return Buffer.alloc(0); } if (length === undefined) { length = 0; for (let i = 0; i < list.length; i++) { if (list[i].length) { length += list[i].length; } } } else { validateOffset(length, "length"); } const buffer = Buffer.allocUnsafe(length); let pos = 0; for (let i = 0; i < list.length; i++) { const buf = list[i]; if (!isUint8Array(buf)) { // TODO(BridgeAR): This should not be of type ERR_INVALID_ARG_TYPE. // Instead, find the proper error code for this. throw new codes.ERR_INVALID_ARG_TYPE( `list[${i}]`, ["Buffer", "Uint8Array"], list[i], ); } pos += _copyActual(buf, buffer, pos, 0, buf.length); } // Note: `length` is always equal to `buffer.length` at this point if (pos < length) { // Zero-fill the remaining bytes if the specified `length` was more than // the actual total length, i.e. if we have some remaining allocated bytes // there were not initialized. buffer.fill(0, pos, length); } return buffer; }; function byteLength(string, encoding) { if (typeof string !== "string") { if (isArrayBufferView(string) || isAnyArrayBuffer(string)) { return string.byteLength; } throw new codes.ERR_INVALID_ARG_TYPE( "string", ["string", "Buffer", "ArrayBuffer"], string, ); } const len = string.length; const mustMatch = arguments.length > 2 && arguments[2] === true; if (!mustMatch && len === 0) { return 0; } if (!encoding) { return (mustMatch ? -1 : byteLengthUtf8(string)); } const ops = getEncodingOps(encoding); if (ops === undefined) { return (mustMatch ? -1 : byteLengthUtf8(string)); } return ops.byteLength(string); } Buffer.byteLength = byteLength; Buffer.prototype._isBuffer = true; function swap(b, n, m) { const i = b[n]; b[n] = b[m]; b[m] = i; } Buffer.prototype.swap16 = function swap16() { const len = this.length; if (len % 2 !== 0) { throw new RangeError("Buffer size must be a multiple of 16-bits"); } for (let i = 0; i < len; i += 2) { swap(this, i, i + 1); } return this; }; Buffer.prototype.swap32 = function swap32() { const len = this.length; if (len % 4 !== 0) { throw new RangeError("Buffer size must be a multiple of 32-bits"); } for (let i = 0; i < len; i += 4) { swap(this, i, i + 3); swap(this, i + 1, i + 2); } return this; }; Buffer.prototype.swap64 = function swap64() { const len = this.length; if (len % 8 !== 0) { throw new RangeError("Buffer size must be a multiple of 64-bits"); } for (let i = 0; i < len; i += 8) { swap(this, i, i + 7); swap(this, i + 1, i + 6); swap(this, i + 2, i + 5); swap(this, i + 3, i + 4); } return this; }; Buffer.prototype.toString = function toString(encoding, start, end) { if (arguments.length === 0) { return this.utf8Slice(0, this.length); } const len = this.length; if (start <= 0) { start = 0; } else if (start >= len) { return ""; } else { start |= 0; } if (end === undefined || end > len) { end = len; } else { end |= 0; } if (end <= start) { return ""; } if (encoding === undefined) { return this.utf8Slice(start, end); } const ops = getEncodingOps(encoding); if (ops === undefined) { throw new codes.ERR_UNKNOWN_ENCODING(encoding); } return ops.slice(this, start, end); }; Buffer.prototype.toLocaleString = Buffer.prototype.toString; Buffer.prototype.equals = function equals(b) { if (!isUint8Array(b)) { throw new codes.ERR_INVALID_ARG_TYPE( "otherBuffer", ["Buffer", "Uint8Array"], b, ); } if (this === b) { return true; } return Buffer.compare(this, b) === 0; }; Buffer.prototype.inspect = function inspect() { let str = ""; const max = INSPECT_MAX_BYTES; str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim(); if (this.length > max) { str += " ... "; } return ""; }; if (customInspectSymbol) { Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect; } Buffer.prototype.compare = function compare( target, start, end, thisStart, thisEnd, ) { if (isInstance(target, Uint8Array)) { target = Buffer.from(target, target.offset, target.byteLength); } if (!Buffer.isBuffer(target)) { throw new codes.ERR_INVALID_ARG_TYPE( "target", ["Buffer", "Uint8Array"], target, ); } if (start === undefined) { start = 0; } else { validateOffset(start, "targetStart", 0, kMaxLength); } if (end === undefined) { end = target.length; } else { validateOffset(end, "targetEnd", 0, target.length); } if (thisStart === undefined) { thisStart = 0; } else { validateOffset(start, "sourceStart", 0, kMaxLength); } if (thisEnd === undefined) { thisEnd = this.length; } else { validateOffset(end, "sourceEnd", 0, this.length); } if ( start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length ) { throw new codes.ERR_OUT_OF_RANGE("out of range index", "range"); } if (thisStart >= thisEnd && start >= end) { return 0; } if (thisStart >= thisEnd) { return -1; } if (start >= end) { return 1; } start >>>= 0; end >>>= 0; thisStart >>>= 0; thisEnd >>>= 0; if (this === target) { return 0; } let x = thisEnd - thisStart; let y = end - start; const len = Math.min(x, y); const thisCopy = this.slice(thisStart, thisEnd); const targetCopy = target.slice(start, end); for (let i = 0; i < len; ++i) { if (thisCopy[i] !== targetCopy[i]) { x = thisCopy[i]; y = targetCopy[i]; break; } } if (x < y) { return -1; } if (y < x) { return 1; } return 0; }; function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) { validateBuffer(buffer); if (typeof byteOffset === "string") { encoding = byteOffset; byteOffset = undefined; } else if (byteOffset > 0x7fffffff) { byteOffset = 0x7fffffff; } else if (byteOffset < -0x80000000) { byteOffset = -0x80000000; } byteOffset = +byteOffset; if (Number.isNaN(byteOffset)) { byteOffset = dir ? 0 : (buffer.length || buffer.byteLength); } dir = !!dir; if (typeof val === "number") { return indexOfNumber(buffer, val >>> 0, byteOffset, dir); } let ops; if (encoding === undefined) { ops = encodingOps.utf8; } else { ops = getEncodingOps(encoding); } if (typeof val === "string") { if (ops === undefined) { throw new codes.ERR_UNKNOWN_ENCODING(encoding); } return ops.indexOf(buffer, val, byteOffset, dir); } if (isUint8Array(val)) { const encodingVal = ops === undefined ? encodingsMap.utf8 : ops.encodingVal; return indexOfBuffer(buffer, val, byteOffset, encodingVal, dir); } throw new codes.ERR_INVALID_ARG_TYPE( "value", ["number", "string", "Buffer", "Uint8Array"], val, ); } Buffer.prototype.includes = function includes(val, byteOffset, encoding) { return this.indexOf(val, byteOffset, encoding) !== -1; }; Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, true); }; Buffer.prototype.lastIndexOf = function lastIndexOf( val, byteOffset, encoding, ) { return bidirectionalIndexOf(this, val, byteOffset, encoding, false); }; Buffer.prototype.asciiSlice = function asciiSlice(offset, length) { if (offset === 0 && length === this.length) { return bytesToAscii(this); } else { return bytesToAscii(this.slice(offset, length)); } }; Buffer.prototype.asciiWrite = function asciiWrite(string, offset, length) { return blitBuffer(asciiToBytes(string), this, offset, length); }; Buffer.prototype.base64Slice = function base64Slice( offset, length, ) { if (offset === 0 && length === this.length) { return forgivingBase64Encode(this); } else { return forgivingBase64Encode(this.slice(offset, length)); } }; Buffer.prototype.base64Write = function base64Write( string, offset, length, ) { return blitBuffer(base64ToBytes(string), this, offset, length); }; Buffer.prototype.base64urlSlice = function base64urlSlice( offset, length, ) { if (offset === 0 && length === this.length) { return forgivingBase64UrlEncode(this); } else { return forgivingBase64UrlEncode(this.slice(offset, length)); } }; Buffer.prototype.base64urlWrite = function base64urlWrite( string, offset, length, ) { return blitBuffer(base64UrlToBytes(string), this, offset, length); }; Buffer.prototype.hexWrite = function hexWrite(string, offset, length) { return blitBuffer( hexToBytes(string), this, offset, length, ); }; Buffer.prototype.hexSlice = function hexSlice(string, offset, length) { return _hexSlice(this, string, offset, length); }; Buffer.prototype.latin1Slice = function latin1Slice( string, offset, length, ) { return _latin1Slice(this, string, offset, length); }; Buffer.prototype.latin1Write = function latin1Write( string, offset, length, ) { return blitBuffer(asciiToBytes(string), this, offset, length); }; Buffer.prototype.ucs2Slice = function ucs2Slice(offset, length) { if (offset === 0 && length === this.length) { return bytesToUtf16le(this); } else { return bytesToUtf16le(this.slice(offset, length)); } }; Buffer.prototype.ucs2Write = function ucs2Write(string, offset, length) { return blitBuffer( utf16leToBytes(string, this.length - offset), this, offset, length, ); }; Buffer.prototype.utf8Slice = function utf8Slice(string, offset, length) { return _utf8Slice(this, string, offset, length); }; Buffer.prototype.utf8Write = function utf8Write(string, offset, length) { offset = offset || 0; const maxLength = Math.min(length || Infinity, this.length - offset); const buf = offset || maxLength < this.length ? this.subarray(offset, maxLength + offset) : this; return utf8Encoder.encodeInto(string, buf).written; }; Buffer.prototype.write = function write(string, offset, length, encoding) { if (typeof string !== "string") { throw new codes.ERR_INVALID_ARG_TYPE("argument", "string"); } // Buffer#write(string); if (offset === undefined) { return this.utf8Write(string, 0, this.length); } // Buffer#write(string, encoding) if (length === undefined && typeof offset === "string") { encoding = offset; length = this.length; offset = 0; // Buffer#write(string, offset[, length][, encoding]) } else { validateOffset(offset, "offset", 0, this.length); const remaining = this.length - offset; if (length === undefined) { length = remaining; } else if (typeof length === "string") { encoding = length; length = remaining; } else { validateOffset(length, "length", 0, this.length); if (length > remaining) { length = remaining; } } } if (!encoding) { return this.utf8Write(string, offset, length); } const ops = getEncodingOps(encoding); if (ops === undefined) { throw new codes.ERR_UNKNOWN_ENCODING(encoding); } return ops.write(this, string, offset, length); }; Buffer.prototype.toJSON = function toJSON() { return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0), }; }; function fromArrayBuffer(obj, byteOffset, length) { // Convert byteOffset to integer if (byteOffset === undefined) { byteOffset = 0; } else { byteOffset = +byteOffset; if (Number.isNaN(byteOffset)) { byteOffset = 0; } } const maxLength = obj.byteLength - byteOffset; if (maxLength < 0) { throw new codes.ERR_BUFFER_OUT_OF_BOUNDS("offset"); } if (length === undefined) { length = maxLength; } else { // Convert length to non-negative integer. length = +length; if (length > 0) { if (length > maxLength) { throw new codes.ERR_BUFFER_OUT_OF_BOUNDS("length"); } } else { length = 0; } } const buffer = new Uint8Array(obj, byteOffset, length); Object.setPrototypeOf(buffer, Buffer.prototype); return buffer; } function _base64Slice(buf, start, end) { if (start === 0 && end === buf.length) { return forgivingBase64Encode(buf); } else { return forgivingBase64Encode(buf.slice(start, end)); } } const decoder = new TextDecoder(); function _utf8Slice(buf, start, end) { return decoder.decode(buf.slice(start, end)); } function _latin1Slice(buf, start, end) { let ret = ""; end = Math.min(buf.length, end); for (let i = start; i < end; ++i) { ret += String.fromCharCode(buf[i]); } return ret; } function _hexSlice(buf, start, end) { const len = buf.length; if (!start || start < 0) { start = 0; } if (!end || end < 0 || end > len) { end = len; } let out = ""; for (let i = start; i < end; ++i) { out += hexSliceLookupTable[buf[i]]; } return out; } Buffer.prototype.slice = function slice(start, end) { return this.subarray(start, end); }; Buffer.prototype.readUintLE = Buffer.prototype.readUIntLE = function readUIntLE( offset, byteLength, ) { if (offset === undefined) { throw new codes.ERR_INVALID_ARG_TYPE("offset", "number", offset); } if (byteLength === 6) { return readUInt48LE(this, offset); } if (byteLength === 5) { return readUInt40LE(this, offset); } if (byteLength === 3) { return readUInt24LE(this, offset); } if (byteLength === 4) { return this.readUInt32LE(offset); } if (byteLength === 2) { return this.readUInt16LE(offset); } if (byteLength === 1) { return this.readUInt8(offset); } boundsError(byteLength, 6, "byteLength"); }; Buffer.prototype.readUintBE = Buffer.prototype.readUIntBE = function readUIntBE( offset, byteLength, ) { if (offset === undefined) { throw new codes.ERR_INVALID_ARG_TYPE("offset", "number", offset); } if (byteLength === 6) { return readUInt48BE(this, offset); } if (byteLength === 5) { return readUInt40BE(this, offset); } if (byteLength === 3) { return readUInt24BE(this, offset); } if (byteLength === 4) { return this.readUInt32BE(offset); } if (byteLength === 2) { return this.readUInt16BE(offset); } if (byteLength === 1) { return this.readUInt8(offset); } boundsError(byteLength, 6, "byteLength"); }; Buffer.prototype.readUint8 = Buffer.prototype.readUInt8 = function readUInt8( offset = 0, ) { validateNumber(offset, "offset"); const val = this[offset]; if (val === undefined) { boundsError(offset, this.length - 1); } return val; }; Buffer.prototype.readUint16BE = Buffer.prototype.readUInt16BE = readUInt16BE; Buffer.prototype.readUint16LE = Buffer.prototype.readUInt16LE = function readUInt16LE(offset = 0) { validateNumber(offset, "offset"); const first = this[offset]; const last = this[offset + 1]; if (first === undefined || last === undefined) { boundsError(offset, this.length - 2); } return first + last * 2 ** 8; }; Buffer.prototype.readUint32LE = Buffer.prototype.readUInt32LE = function readUInt32LE(offset = 0) { validateNumber(offset, "offset"); const first = this[offset]; const last = this[offset + 3]; if (first === undefined || last === undefined) { boundsError(offset, this.length - 4); } return first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last * 2 ** 24; }; Buffer.prototype.readUint32BE = Buffer.prototype.readUInt32BE = readUInt32BE; Buffer.prototype.readBigUint64LE = Buffer.prototype.readBigUInt64LE = defineBigIntMethod( function readBigUInt64LE(offset) { offset = offset >>> 0; validateNumber(offset, "offset"); const first = this[offset]; const last = this[offset + 7]; if (first === void 0 || last === void 0) { boundsError(offset, this.length - 8); } const lo = first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24; const hi = this[++offset] + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last * 2 ** 24; return BigInt(lo) + (BigInt(hi) << BigInt(32)); }, ); Buffer.prototype.readBigUint64BE = Buffer.prototype.readBigUInt64BE = defineBigIntMethod( function readBigUInt64BE(offset) { offset = offset >>> 0; validateNumber(offset, "offset"); const first = this[offset]; const last = this[offset + 7]; if (first === void 0 || last === void 0) { boundsError(offset, this.length - 8); } const hi = first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset]; const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last; return (BigInt(hi) << BigInt(32)) + BigInt(lo); }, ); Buffer.prototype.readIntLE = function readIntLE( offset, byteLength, ) { if (offset === undefined) { throw new codes.ERR_INVALID_ARG_TYPE("offset", "number", offset); } if (byteLength === 6) { return readInt48LE(this, offset); } if (byteLength === 5) { return readInt40LE(this, offset); } if (byteLength === 3) { return readInt24LE(this, offset); } if (byteLength === 4) { return this.readInt32LE(offset); } if (byteLength === 2) { return this.readInt16LE(offset); } if (byteLength === 1) { return this.readInt8(offset); } boundsError(byteLength, 6, "byteLength"); }; Buffer.prototype.readIntBE = function readIntBE(offset, byteLength) { if (offset === undefined) { throw new codes.ERR_INVALID_ARG_TYPE("offset", "number", offset); } if (byteLength === 6) { return readInt48BE(this, offset); } if (byteLength === 5) { return readInt40BE(this, offset); } if (byteLength === 3) { return readInt24BE(this, offset); } if (byteLength === 4) { return this.readInt32BE(offset); } if (byteLength === 2) { return this.readInt16BE(offset); } if (byteLength === 1) { return this.readInt8(offset); } boundsError(byteLength, 6, "byteLength"); }; Buffer.prototype.readInt8 = function readInt8(offset = 0) { validateNumber(offset, "offset"); const val = this[offset]; if (val === undefined) { boundsError(offset, this.length - 1); } return val | (val & 2 ** 7) * 0x1fffffe; }; Buffer.prototype.readInt16LE = function readInt16LE(offset = 0) { validateNumber(offset, "offset"); const first = this[offset]; const last = this[offset + 1]; if (first === undefined || last === undefined) { boundsError(offset, this.length - 2); } const val = first + last * 2 ** 8; return val | (val & 2 ** 15) * 0x1fffe; }; Buffer.prototype.readInt16BE = function readInt16BE(offset = 0) { validateNumber(offset, "offset"); const first = this[offset]; const last = this[offset + 1]; if (first === undefined || last === undefined) { boundsError(offset, this.length - 2); } const val = first * 2 ** 8 + last; return val | (val & 2 ** 15) * 0x1fffe; }; Buffer.prototype.readInt32LE = function readInt32LE(offset = 0) { validateNumber(offset, "offset"); const first = this[offset]; const last = this[offset + 3]; if (first === undefined || last === undefined) { boundsError(offset, this.length - 4); } return first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + (last << 24); // Overflow }; Buffer.prototype.readInt32BE = function readInt32BE(offset = 0) { validateNumber(offset, "offset"); const first = this[offset]; const last = this[offset + 3]; if (first === undefined || last === undefined) { boundsError(offset, this.length - 4); } return (first << 24) + // Overflow this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last; }; Buffer.prototype.readBigInt64LE = defineBigIntMethod( function readBigInt64LE(offset) { offset = offset >>> 0; validateNumber(offset, "offset"); const first = this[offset]; const last = this[offset + 7]; if (first === void 0 || last === void 0) { boundsError(offset, this.length - 8); } const val = this[offset + 4] + this[offset + 5] * 2 ** 8 + this[offset + 6] * 2 ** 16 + (last << 24); return (BigInt(val) << BigInt(32)) + BigInt( first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24, ); }, ); Buffer.prototype.readBigInt64BE = defineBigIntMethod( function readBigInt64BE(offset) { offset = offset >>> 0; validateNumber(offset, "offset"); const first = this[offset]; const last = this[offset + 7]; if (first === void 0 || last === void 0) { boundsError(offset, this.length - 8); } const val = (first << 24) + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset]; return (BigInt(val) << BigInt(32)) + BigInt( this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last, ); }, ); Buffer.prototype.readFloatLE = function readFloatLE(offset) { return bigEndian ? readFloatBackwards(this, offset) : readFloatForwards(this, offset); }; Buffer.prototype.readFloatBE = function readFloatBE(offset) { return bigEndian ? readFloatForwards(this, offset) : readFloatBackwards(this, offset); }; Buffer.prototype.readDoubleLE = function readDoubleLE(offset) { return bigEndian ? readDoubleBackwards(this, offset) : readDoubleForwards(this, offset); }; Buffer.prototype.readDoubleBE = function readDoubleBE(offset) { return bigEndian ? readDoubleForwards(this, offset) : readDoubleBackwards(this, offset); }; Buffer.prototype.writeUintLE = Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength) { if (byteLength === 6) { return writeU_Int48LE(this, value, offset, 0, 0xffffffffffff); } if (byteLength === 5) { return writeU_Int40LE(this, value, offset, 0, 0xffffffffff); } if (byteLength === 3) { return writeU_Int24LE(this, value, offset, 0, 0xffffff); } if (byteLength === 4) { return writeU_Int32LE(this, value, offset, 0, 0xffffffff); } if (byteLength === 2) { return writeU_Int16LE(this, value, offset, 0, 0xffff); } if (byteLength === 1) { return writeU_Int8(this, value, offset, 0, 0xff); } boundsError(byteLength, 6, "byteLength"); }; Buffer.prototype.writeUintBE = Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength) { if (byteLength === 6) { return writeU_Int48BE(this, value, offset, 0, 0xffffffffffff); } if (byteLength === 5) { return writeU_Int40BE(this, value, offset, 0, 0xffffffffff); } if (byteLength === 3) { return writeU_Int24BE(this, value, offset, 0, 0xffffff); } if (byteLength === 4) { return writeU_Int32BE(this, value, offset, 0, 0xffffffff); } if (byteLength === 2) { return writeU_Int16BE(this, value, offset, 0, 0xffff); } if (byteLength === 1) { return writeU_Int8(this, value, offset, 0, 0xff); } boundsError(byteLength, 6, "byteLength"); }; Buffer.prototype.writeUint8 = Buffer.prototype.writeUInt8 = function writeUInt8( value, offset = 0, ) { return writeU_Int8(this, value, offset, 0, 0xff); }; Buffer.prototype.writeUint16LE = Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset = 0) { return writeU_Int16LE(this, value, offset, 0, 0xffff); }; Buffer.prototype.writeUint16BE = Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset = 0) { return writeU_Int16BE(this, value, offset, 0, 0xffff); }; Buffer.prototype.writeUint32LE = Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset = 0) { return _writeUInt32LE(this, value, offset, 0, 0xffffffff); }; Buffer.prototype.writeUint32BE = Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset = 0) { return _writeUInt32BE(this, value, offset, 0, 0xffffffff); }; function wrtBigUInt64LE(buf, value, offset, min, max) { checkIntBI(value, min, max, buf, offset, 7); let lo = Number(value & BigInt(4294967295)); buf[offset++] = lo; lo = lo >> 8; buf[offset++] = lo; lo = lo >> 8; buf[offset++] = lo; lo = lo >> 8; buf[offset++] = lo; let hi = Number(value >> BigInt(32) & BigInt(4294967295)); buf[offset++] = hi; hi = hi >> 8; buf[offset++] = hi; hi = hi >> 8; buf[offset++] = hi; hi = hi >> 8; buf[offset++] = hi; return offset; } function wrtBigUInt64BE(buf, value, offset, min, max) { checkIntBI(value, min, max, buf, offset, 7); let lo = Number(value & BigInt(4294967295)); buf[offset + 7] = lo; lo = lo >> 8; buf[offset + 6] = lo; lo = lo >> 8; buf[offset + 5] = lo; lo = lo >> 8; buf[offset + 4] = lo; let hi = Number(value >> BigInt(32) & BigInt(4294967295)); buf[offset + 3] = hi; hi = hi >> 8; buf[offset + 2] = hi; hi = hi >> 8; buf[offset + 1] = hi; hi = hi >> 8; buf[offset] = hi; return offset + 8; } Buffer.prototype.writeBigUint64LE = Buffer.prototype.writeBigUInt64LE = defineBigIntMethod( function writeBigUInt64LE(value, offset = 0) { return wrtBigUInt64LE( this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"), ); }, ); Buffer.prototype.writeBigUint64BE = Buffer.prototype.writeBigUInt64BE = defineBigIntMethod( function writeBigUInt64BE(value, offset = 0) { return wrtBigUInt64BE( this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"), ); }, ); Buffer.prototype.writeIntLE = function writeIntLE( value, offset, byteLength, ) { if (byteLength === 6) { return writeU_Int48LE( this, value, offset, -0x800000000000, 0x7fffffffffff, ); } if (byteLength === 5) { return writeU_Int40LE(this, value, offset, -0x8000000000, 0x7fffffffff); } if (byteLength === 3) { return writeU_Int24LE(this, value, offset, -0x800000, 0x7fffff); } if (byteLength === 4) { return writeU_Int32LE(this, value, offset, -0x80000000, 0x7fffffff); } if (byteLength === 2) { return writeU_Int16LE(this, value, offset, -0x8000, 0x7fff); } if (byteLength === 1) { return writeU_Int8(this, value, offset, -0x80, 0x7f); } boundsError(byteLength, 6, "byteLength"); }; Buffer.prototype.writeIntBE = function writeIntBE( value, offset, byteLength, ) { if (byteLength === 6) { return writeU_Int48BE( this, value, offset, -0x800000000000, 0x7fffffffffff, ); } if (byteLength === 5) { return writeU_Int40BE(this, value, offset, -0x8000000000, 0x7fffffffff); } if (byteLength === 3) { return writeU_Int24BE(this, value, offset, -0x800000, 0x7fffff); } if (byteLength === 4) { return writeU_Int32BE(this, value, offset, -0x80000000, 0x7fffffff); } if (byteLength === 2) { return writeU_Int16BE(this, value, offset, -0x8000, 0x7fff); } if (byteLength === 1) { return writeU_Int8(this, value, offset, -0x80, 0x7f); } boundsError(byteLength, 6, "byteLength"); }; Buffer.prototype.writeInt8 = function writeInt8(value, offset = 0) { return writeU_Int8(this, value, offset, -0x80, 0x7f); }; Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset = 0) { return writeU_Int16LE(this, value, offset, -0x8000, 0x7fff); }; Buffer.prototype.writeInt16BE = function writeInt16BE( value, offset = 0, ) { return writeU_Int16BE(this, value, offset, -0x8000, 0x7fff); }; Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset = 0) { return writeU_Int32LE(this, value, offset, -0x80000000, 0x7fffffff); }; Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset = 0) { return writeU_Int32BE(this, value, offset, -0x80000000, 0x7fffffff); }; Buffer.prototype.writeBigInt64LE = defineBigIntMethod( function writeBigInt64LE(value, offset = 0) { return wrtBigUInt64LE( this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"), ); }, ); Buffer.prototype.writeBigInt64BE = defineBigIntMethod( function writeBigInt64BE(value, offset = 0) { return wrtBigUInt64BE( this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"), ); }, ); Buffer.prototype.writeFloatLE = function writeFloatLE( value, offset, ) { return bigEndian ? writeFloatBackwards(this, value, offset) : writeFloatForwards(this, value, offset); }; Buffer.prototype.writeFloatBE = function writeFloatBE( value, offset, ) { return bigEndian ? writeFloatForwards(this, value, offset) : writeFloatBackwards(this, value, offset); }; Buffer.prototype.writeDoubleLE = function writeDoubleLE( value, offset, ) { return bigEndian ? writeDoubleBackwards(this, value, offset) : writeDoubleForwards(this, value, offset); }; Buffer.prototype.writeDoubleBE = function writeDoubleBE( value, offset, ) { return bigEndian ? writeDoubleForwards(this, value, offset) : writeDoubleBackwards(this, value, offset); }; Buffer.prototype.copy = function copy( target, targetStart, sourceStart, sourceEnd, ) { if (!isUint8Array(this)) { throw new codes.ERR_INVALID_ARG_TYPE( "source", ["Buffer", "Uint8Array"], this, ); } if (!isUint8Array(target)) { throw new codes.ERR_INVALID_ARG_TYPE( "target", ["Buffer", "Uint8Array"], target, ); } if (targetStart === undefined) { targetStart = 0; } else { targetStart = toInteger(targetStart, 0); if (targetStart < 0) { throw new codes.ERR_OUT_OF_RANGE("targetStart", ">= 0", targetStart); } } if (sourceStart === undefined) { sourceStart = 0; } else { sourceStart = toInteger(sourceStart, 0); if (sourceStart < 0 || sourceStart > this.length) { throw new codes.ERR_OUT_OF_RANGE( "sourceStart", `>= 0 && <= ${this.length}`, sourceStart, ); } if (sourceStart >= MAX_UINT32) { throw new codes.ERR_OUT_OF_RANGE( "sourceStart", `< ${MAX_UINT32}`, sourceStart, ); } } if (sourceEnd === undefined) { sourceEnd = this.length; } else { sourceEnd = toInteger(sourceEnd, 0); if (sourceEnd < 0) { throw new codes.ERR_OUT_OF_RANGE("sourceEnd", ">= 0", sourceEnd); } if (sourceEnd >= MAX_UINT32) { throw new codes.ERR_OUT_OF_RANGE( "sourceEnd", `< ${MAX_UINT32}`, sourceEnd, ); } } if (targetStart >= target.length) { return 0; } if (sourceEnd > 0 && sourceEnd < sourceStart) { sourceEnd = sourceStart; } if (sourceEnd === sourceStart) { return 0; } if (target.length === 0 || this.length === 0) { return 0; } if (sourceEnd > this.length) { sourceEnd = this.length; } if (target.length - targetStart < sourceEnd - sourceStart) { sourceEnd = target.length - targetStart + sourceStart; } const len = sourceEnd - sourceStart; if ( this === target && typeof Uint8Array.prototype.copyWithin === "function" ) { this.copyWithin(targetStart, sourceStart, sourceEnd); } else { Uint8Array.prototype.set.call( target, this.subarray(sourceStart, sourceEnd), targetStart, ); } return len; }; Buffer.prototype.fill = function fill(val, start, end, encoding) { if (typeof val === "string") { if (typeof start === "string") { encoding = start; start = 0; end = this.length; } else if (typeof end === "string") { encoding = end; end = this.length; } if (encoding !== void 0 && typeof encoding !== "string") { throw new TypeError("encoding must be a string"); } if (typeof encoding === "string" && !Buffer.isEncoding(encoding)) { throw new TypeError("Unknown encoding: " + encoding); } if (val.length === 1) { const code = val.charCodeAt(0); if (encoding === "utf8" && code < 128 || encoding === "latin1") { val = code; } } } else if (typeof val === "number") { val = val & 255; } else if (typeof val === "boolean") { val = Number(val); } if (start < 0 || this.length < start || this.length < end) { throw new RangeError("Out of range index"); } if (end <= start) { return this; } start = start >>> 0; end = end === void 0 ? this.length : end >>> 0; if (!val) { val = 0; } let i; if (typeof val === "number") { for (i = start; i < end; ++i) { this[i] = val; } } else { const bytes = Buffer.isBuffer(val) ? val : Buffer.from(val, encoding); const len = bytes.length; if (len === 0) { throw new codes.ERR_INVALID_ARG_VALUE( "value", val, ); } for (i = 0; i < end - start; ++i) { this[i + start] = bytes[i % len]; } } return this; }; function checkBounds(buf, offset, byteLength2) { validateNumber(offset, "offset"); if (buf[offset] === void 0 || buf[offset + byteLength2] === void 0) { boundsError(offset, buf.length - (byteLength2 + 1)); } } function checkIntBI(value, min, max, buf, offset, byteLength2) { if (value > max || value < min) { const n = typeof min === "bigint" ? "n" : ""; let range; if (byteLength2 > 3) { if (min === 0 || min === BigInt(0)) { range = `>= 0${n} and < 2${n} ** ${(byteLength2 + 1) * 8}${n}`; } else { range = `>= -(2${n} ** ${(byteLength2 + 1) * 8 - 1}${n}) and < 2 ** ${ (byteLength2 + 1) * 8 - 1 }${n}`; } } else { range = `>= ${min}${n} and <= ${max}${n}`; } throw new codes.ERR_OUT_OF_RANGE("value", range, value); } checkBounds(buf, offset, byteLength2); } /** * @param {Uint8Array} src Source buffer to read from * @param {Buffer} dst Destination buffer to write to * @param {number} [offset] Byte offset to write at in the destination buffer * @param {number} [byteLength] Optional number of bytes to, at most, write into destination buffer. * @returns {number} Number of bytes written to destination buffer */ function blitBuffer(src, dst, offset, byteLength = Infinity) { const srcLength = src.length; // Establish the number of bytes to be written const bytesToWrite = Math.min( // If byte length is defined in the call, then it sets an upper bound, // otherwise it is Infinity and is never chosen. byteLength, // The length of the source sets an upper bound being the source of data. srcLength, // The length of the destination minus any offset into it sets an upper bound. dst.length - (offset || 0), ); if (bytesToWrite < srcLength) { // Resize the source buffer to the number of bytes we're about to write. // This both makes sure that we're actually only writing what we're told to // write but also prevents `Uint8Array#set` from throwing an error if the // source is longer than the target. src = src.subarray(0, bytesToWrite); } dst.set(src, offset); return bytesToWrite; } function isInstance(obj, type) { return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name; } const hexSliceLookupTable = function () { const alphabet = "0123456789abcdef"; const table = new Array(256); for (let i = 0; i < 16; ++i) { const i16 = i * 16; for (let j = 0; j < 16; ++j) { table[i16 + j] = alphabet[i] + alphabet[j]; } } return table; }(); function defineBigIntMethod(fn) { return typeof BigInt === "undefined" ? BufferBigIntNotDefined : fn; } function BufferBigIntNotDefined() { throw new Error("BigInt not supported"); } export function readUInt48LE(buf, offset = 0) { validateNumber(offset, "offset"); const first = buf[offset]; const last = buf[offset + 5]; if (first === undefined || last === undefined) { boundsError(offset, buf.length - 6); } return first + buf[++offset] * 2 ** 8 + buf[++offset] * 2 ** 16 + buf[++offset] * 2 ** 24 + (buf[++offset] + last * 2 ** 8) * 2 ** 32; } export function readUInt40LE(buf, offset = 0) { validateNumber(offset, "offset"); const first = buf[offset]; const last = buf[offset + 4]; if (first === undefined || last === undefined) { boundsError(offset, buf.length - 5); } return first + buf[++offset] * 2 ** 8 + buf[++offset] * 2 ** 16 + buf[++offset] * 2 ** 24 + last * 2 ** 32; } export function readUInt24LE(buf, offset = 0) { validateNumber(offset, "offset"); const first = buf[offset]; const last = buf[offset + 2]; if (first === undefined || last === undefined) { boundsError(offset, buf.length - 3); } return first + buf[++offset] * 2 ** 8 + last * 2 ** 16; } export function readUInt48BE(buf, offset = 0) { validateNumber(offset, "offset"); const first = buf[offset]; const last = buf[offset + 5]; if (first === undefined || last === undefined) { boundsError(offset, buf.length - 6); } return (first * 2 ** 8 + buf[++offset]) * 2 ** 32 + buf[++offset] * 2 ** 24 + buf[++offset] * 2 ** 16 + buf[++offset] * 2 ** 8 + last; } export function readUInt40BE(buf, offset = 0) { validateNumber(offset, "offset"); const first = buf[offset]; const last = buf[offset + 4]; if (first === undefined || last === undefined) { boundsError(offset, buf.length - 5); } return first * 2 ** 32 + buf[++offset] * 2 ** 24 + buf[++offset] * 2 ** 16 + buf[++offset] * 2 ** 8 + last; } export function readUInt24BE(buf, offset = 0) { validateNumber(offset, "offset"); const first = buf[offset]; const last = buf[offset + 2]; if (first === undefined || last === undefined) { boundsError(offset, buf.length - 3); } return first * 2 ** 16 + buf[++offset] * 2 ** 8 + last; } export function readUInt16BE(offset = 0) { validateNumber(offset, "offset"); const first = this[offset]; const last = this[offset + 1]; if (first === undefined || last === undefined) { boundsError(offset, this.length - 2); } return first * 2 ** 8 + last; } export function readUInt32BE(offset = 0) { validateNumber(offset, "offset"); const first = this[offset]; const last = this[offset + 3]; if (first === undefined || last === undefined) { boundsError(offset, this.length - 4); } return first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last; } export function readDoubleBackwards(buffer, offset = 0) { validateNumber(offset, "offset"); const first = buffer[offset]; const last = buffer[offset + 7]; if (first === undefined || last === undefined) { boundsError(offset, buffer.length - 8); } uInt8Float64Array[7] = first; uInt8Float64Array[6] = buffer[++offset]; uInt8Float64Array[5] = buffer[++offset]; uInt8Float64Array[4] = buffer[++offset]; uInt8Float64Array[3] = buffer[++offset]; uInt8Float64Array[2] = buffer[++offset]; uInt8Float64Array[1] = buffer[++offset]; uInt8Float64Array[0] = last; return float64Array[0]; } export function readDoubleForwards(buffer, offset = 0) { validateNumber(offset, "offset"); const first = buffer[offset]; const last = buffer[offset + 7]; if (first === undefined || last === undefined) { boundsError(offset, buffer.length - 8); } uInt8Float64Array[0] = first; uInt8Float64Array[1] = buffer[++offset]; uInt8Float64Array[2] = buffer[++offset]; uInt8Float64Array[3] = buffer[++offset]; uInt8Float64Array[4] = buffer[++offset]; uInt8Float64Array[5] = buffer[++offset]; uInt8Float64Array[6] = buffer[++offset]; uInt8Float64Array[7] = last; return float64Array[0]; } export function writeDoubleForwards(buffer, val, offset = 0) { val = +val; checkBounds(buffer, offset, 7); float64Array[0] = val; buffer[offset++] = uInt8Float64Array[0]; buffer[offset++] = uInt8Float64Array[1]; buffer[offset++] = uInt8Float64Array[2]; buffer[offset++] = uInt8Float64Array[3]; buffer[offset++] = uInt8Float64Array[4]; buffer[offset++] = uInt8Float64Array[5]; buffer[offset++] = uInt8Float64Array[6]; buffer[offset++] = uInt8Float64Array[7]; return offset; } export function writeDoubleBackwards(buffer, val, offset = 0) { val = +val; checkBounds(buffer, offset, 7); float64Array[0] = val; buffer[offset++] = uInt8Float64Array[7]; buffer[offset++] = uInt8Float64Array[6]; buffer[offset++] = uInt8Float64Array[5]; buffer[offset++] = uInt8Float64Array[4]; buffer[offset++] = uInt8Float64Array[3]; buffer[offset++] = uInt8Float64Array[2]; buffer[offset++] = uInt8Float64Array[1]; buffer[offset++] = uInt8Float64Array[0]; return offset; } export function readFloatBackwards(buffer, offset = 0) { validateNumber(offset, "offset"); const first = buffer[offset]; const last = buffer[offset + 3]; if (first === undefined || last === undefined) { boundsError(offset, buffer.length - 4); } uInt8Float32Array[3] = first; uInt8Float32Array[2] = buffer[++offset]; uInt8Float32Array[1] = buffer[++offset]; uInt8Float32Array[0] = last; return float32Array[0]; } export function readFloatForwards(buffer, offset = 0) { validateNumber(offset, "offset"); const first = buffer[offset]; const last = buffer[offset + 3]; if (first === undefined || last === undefined) { boundsError(offset, buffer.length - 4); } uInt8Float32Array[0] = first; uInt8Float32Array[1] = buffer[++offset]; uInt8Float32Array[2] = buffer[++offset]; uInt8Float32Array[3] = last; return float32Array[0]; } export function writeFloatForwards(buffer, val, offset = 0) { val = +val; checkBounds(buffer, offset, 3); float32Array[0] = val; buffer[offset++] = uInt8Float32Array[0]; buffer[offset++] = uInt8Float32Array[1]; buffer[offset++] = uInt8Float32Array[2]; buffer[offset++] = uInt8Float32Array[3]; return offset; } export function writeFloatBackwards(buffer, val, offset = 0) { val = +val; checkBounds(buffer, offset, 3); float32Array[0] = val; buffer[offset++] = uInt8Float32Array[3]; buffer[offset++] = uInt8Float32Array[2]; buffer[offset++] = uInt8Float32Array[1]; buffer[offset++] = uInt8Float32Array[0]; return offset; } export function readInt24LE(buf, offset = 0) { validateNumber(offset, "offset"); const first = buf[offset]; const last = buf[offset + 2]; if (first === undefined || last === undefined) { boundsError(offset, buf.length - 3); } const val = first + buf[++offset] * 2 ** 8 + last * 2 ** 16; return val | (val & 2 ** 23) * 0x1fe; } export function readInt40LE(buf, offset = 0) { validateNumber(offset, "offset"); const first = buf[offset]; const last = buf[offset + 4]; if (first === undefined || last === undefined) { boundsError(offset, buf.length - 5); } return (last | (last & 2 ** 7) * 0x1fffffe) * 2 ** 32 + first + buf[++offset] * 2 ** 8 + buf[++offset] * 2 ** 16 + buf[++offset] * 2 ** 24; } export function readInt48LE(buf, offset = 0) { validateNumber(offset, "offset"); const first = buf[offset]; const last = buf[offset + 5]; if (first === undefined || last === undefined) { boundsError(offset, buf.length - 6); } const val = buf[offset + 4] + last * 2 ** 8; return (val | (val & 2 ** 15) * 0x1fffe) * 2 ** 32 + first + buf[++offset] * 2 ** 8 + buf[++offset] * 2 ** 16 + buf[++offset] * 2 ** 24; } export function readInt24BE(buf, offset = 0) { validateNumber(offset, "offset"); const first = buf[offset]; const last = buf[offset + 2]; if (first === undefined || last === undefined) { boundsError(offset, buf.length - 3); } const val = first * 2 ** 16 + buf[++offset] * 2 ** 8 + last; return val | (val & 2 ** 23) * 0x1fe; } export function readInt48BE(buf, offset = 0) { validateNumber(offset, "offset"); const first = buf[offset]; const last = buf[offset + 5]; if (first === undefined || last === undefined) { boundsError(offset, buf.length - 6); } const val = buf[++offset] + first * 2 ** 8; return (val | (val & 2 ** 15) * 0x1fffe) * 2 ** 32 + buf[++offset] * 2 ** 24 + buf[++offset] * 2 ** 16 + buf[++offset] * 2 ** 8 + last; } export function readInt40BE(buf, offset = 0) { validateNumber(offset, "offset"); const first = buf[offset]; const last = buf[offset + 4]; if (first === undefined || last === undefined) { boundsError(offset, buf.length - 5); } return (first | (first & 2 ** 7) * 0x1fffffe) * 2 ** 32 + buf[++offset] * 2 ** 24 + buf[++offset] * 2 ** 16 + buf[++offset] * 2 ** 8 + last; } export function byteLengthUtf8(str) { return core.byteLength(str); } function base64ByteLength(str, bytes) { // Handle padding if (str.charCodeAt(bytes - 1) === 0x3D) { bytes--; } if (bytes > 1 && str.charCodeAt(bytes - 1) === 0x3D) { bytes--; } // Base64 ratio: 3/4 return (bytes * 3) >>> 2; } export const encodingsMap = Object.create(null); for (let i = 0; i < encodings.length; ++i) { encodingsMap[encodings[i]] = i; } export const encodingOps = { ascii: { byteLength: (string) => string.length, encoding: "ascii", encodingVal: encodingsMap.ascii, indexOf: (buf, val, byteOffset, dir) => indexOfBuffer( buf, asciiToBytes(val), byteOffset, encodingsMap.ascii, dir, ), slice: (buf, start, end) => buf.asciiSlice(start, end), write: (buf, string, offset, len) => buf.asciiWrite(string, offset, len), }, base64: { byteLength: (string) => base64ByteLength(string, string.length), encoding: "base64", encodingVal: encodingsMap.base64, indexOf: (buf, val, byteOffset, dir) => indexOfBuffer( buf, base64ToBytes(val), byteOffset, encodingsMap.base64, dir, ), slice: (buf, start, end) => buf.base64Slice(start, end), write: (buf, string, offset, len) => buf.base64Write(string, offset, len), }, base64url: { byteLength: (string) => base64ByteLength(string, string.length), encoding: "base64url", encodingVal: encodingsMap.base64url, indexOf: (buf, val, byteOffset, dir) => indexOfBuffer( buf, base64UrlToBytes(val), byteOffset, encodingsMap.base64url, dir, ), slice: (buf, start, end) => buf.base64urlSlice(start, end), write: (buf, string, offset, len) => buf.base64urlWrite(string, offset, len), }, hex: { byteLength: (string) => string.length >>> 1, encoding: "hex", encodingVal: encodingsMap.hex, indexOf: (buf, val, byteOffset, dir) => indexOfBuffer( buf, hexToBytes(val), byteOffset, encodingsMap.hex, dir, ), slice: (buf, start, end) => buf.hexSlice(start, end), write: (buf, string, offset, len) => buf.hexWrite(string, offset, len), }, latin1: { byteLength: (string) => string.length, encoding: "latin1", encodingVal: encodingsMap.latin1, indexOf: (buf, val, byteOffset, dir) => indexOfBuffer( buf, asciiToBytes(val), byteOffset, encodingsMap.latin1, dir, ), slice: (buf, start, end) => buf.latin1Slice(start, end), write: (buf, string, offset, len) => buf.latin1Write(string, offset, len), }, ucs2: { byteLength: (string) => string.length * 2, encoding: "ucs2", encodingVal: encodingsMap.utf16le, indexOf: (buf, val, byteOffset, dir) => indexOfBuffer( buf, utf16leToBytes(val), byteOffset, encodingsMap.utf16le, dir, ), slice: (buf, start, end) => buf.ucs2Slice(start, end), write: (buf, string, offset, len) => buf.ucs2Write(string, offset, len), }, utf8: { byteLength: byteLengthUtf8, encoding: "utf8", encodingVal: encodingsMap.utf8, indexOf: (buf, val, byteOffset, dir) => indexOfBuffer( buf, utf8Encoder.encode(val), byteOffset, encodingsMap.utf8, dir, ), slice: (buf, start, end) => buf.utf8Slice(start, end), write: (buf, string, offset, len) => buf.utf8Write(string, offset, len), }, utf16le: { byteLength: (string) => string.length * 2, encoding: "utf16le", encodingVal: encodingsMap.utf16le, indexOf: (buf, val, byteOffset, dir) => indexOfBuffer( buf, utf16leToBytes(val), byteOffset, encodingsMap.utf16le, dir, ), slice: (buf, start, end) => buf.ucs2Slice(start, end), write: (buf, string, offset, len) => buf.ucs2Write(string, offset, len), }, }; export function getEncodingOps(encoding) { encoding = String(encoding).toLowerCase(); switch (encoding.length) { case 4: if (encoding === "utf8") return encodingOps.utf8; if (encoding === "ucs2") return encodingOps.ucs2; break; case 5: if (encoding === "utf-8") return encodingOps.utf8; if (encoding === "ascii") return encodingOps.ascii; if (encoding === "ucs-2") return encodingOps.ucs2; break; case 7: if (encoding === "utf16le") { return encodingOps.utf16le; } break; case 8: if (encoding === "utf-16le") { return encodingOps.utf16le; } break; // deno-lint-ignore no-fallthrough case 6: if (encoding === "latin1" || encoding === "binary") { return encodingOps.latin1; } if (encoding === "base64") return encodingOps.base64; case 3: if (encoding === "hex") { return encodingOps.hex; } break; case 9: if (encoding === "base64url") { return encodingOps.base64url; } break; } } export function _copyActual( source, target, targetStart, sourceStart, sourceEnd, ) { if (sourceEnd - sourceStart > target.length - targetStart) { sourceEnd = sourceStart + target.length - targetStart; } let nb = sourceEnd - sourceStart; const sourceLen = source.length - sourceStart; if (nb > sourceLen) { nb = sourceLen; } if (sourceStart !== 0 || sourceEnd < source.length) { source = new Uint8Array(source.buffer, source.byteOffset + sourceStart, nb); } target.set(source, targetStart); return nb; } export function boundsError(value, length, type) { if (Math.floor(value) !== value) { validateNumber(value, type); throw new codes.ERR_OUT_OF_RANGE(type || "offset", "an integer", value); } if (length < 0) { throw new codes.ERR_BUFFER_OUT_OF_BOUNDS(); } throw new codes.ERR_OUT_OF_RANGE( type || "offset", `>= ${type ? 1 : 0} and <= ${length}`, value, ); } export function validateNumber(value, name) { if (typeof value !== "number") { throw new codes.ERR_INVALID_ARG_TYPE(name, "number", value); } } function checkInt(value, min, max, buf, offset, byteLength) { if (value > max || value < min) { const n = typeof min === "bigint" ? "n" : ""; let range; if (byteLength > 3) { if (min === 0 || min === 0n) { range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`; } else { range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and ` + `< 2${n} ** ${(byteLength + 1) * 8 - 1}${n}`; } } else { range = `>= ${min}${n} and <= ${max}${n}`; } throw new codes.ERR_OUT_OF_RANGE("value", range, value); } checkBounds(buf, offset, byteLength); } export function toInteger(n, defaultVal) { n = +n; if ( !Number.isNaN(n) && n >= Number.MIN_SAFE_INTEGER && n <= Number.MAX_SAFE_INTEGER ) { return ((n % 1) === 0 ? n : Math.floor(n)); } return defaultVal; } // deno-lint-ignore camelcase export function writeU_Int8(buf, value, offset, min, max) { value = +value; validateNumber(offset, "offset"); if (value > max || value < min) { throw new codes.ERR_OUT_OF_RANGE("value", `>= ${min} and <= ${max}`, value); } if (buf[offset] === undefined) { boundsError(offset, buf.length - 1); } buf[offset] = value; return offset + 1; } // deno-lint-ignore camelcase export function writeU_Int16BE(buf, value, offset, min, max) { value = +value; checkInt(value, min, max, buf, offset, 1); buf[offset++] = value >>> 8; buf[offset++] = value; return offset; } export function _writeUInt32LE(buf, value, offset, min, max) { value = +value; checkInt(value, min, max, buf, offset, 3); buf[offset++] = value; value = value >>> 8; buf[offset++] = value; value = value >>> 8; buf[offset++] = value; value = value >>> 8; buf[offset++] = value; return offset; } // deno-lint-ignore camelcase export function writeU_Int16LE(buf, value, offset, min, max) { value = +value; checkInt(value, min, max, buf, offset, 1); buf[offset++] = value; buf[offset++] = value >>> 8; return offset; } export function _writeUInt32BE(buf, value, offset, min, max) { value = +value; checkInt(value, min, max, buf, offset, 3); buf[offset + 3] = value; value = value >>> 8; buf[offset + 2] = value; value = value >>> 8; buf[offset + 1] = value; value = value >>> 8; buf[offset] = value; return offset + 4; } // deno-lint-ignore camelcase export function writeU_Int48BE(buf, value, offset, min, max) { value = +value; checkInt(value, min, max, buf, offset, 5); const newVal = Math.floor(value * 2 ** -32); buf[offset++] = newVal >>> 8; buf[offset++] = newVal; buf[offset + 3] = value; value = value >>> 8; buf[offset + 2] = value; value = value >>> 8; buf[offset + 1] = value; value = value >>> 8; buf[offset] = value; return offset + 4; } // deno-lint-ignore camelcase export function writeU_Int40BE(buf, value, offset, min, max) { value = +value; checkInt(value, min, max, buf, offset, 4); buf[offset++] = Math.floor(value * 2 ** -32); buf[offset + 3] = value; value = value >>> 8; buf[offset + 2] = value; value = value >>> 8; buf[offset + 1] = value; value = value >>> 8; buf[offset] = value; return offset + 4; } // deno-lint-ignore camelcase export function writeU_Int32BE(buf, value, offset, min, max) { value = +value; checkInt(value, min, max, buf, offset, 3); buf[offset + 3] = value; value = value >>> 8; buf[offset + 2] = value; value = value >>> 8; buf[offset + 1] = value; value = value >>> 8; buf[offset] = value; return offset + 4; } // deno-lint-ignore camelcase export function writeU_Int24BE(buf, value, offset, min, max) { value = +value; checkInt(value, min, max, buf, offset, 2); buf[offset + 2] = value; value = value >>> 8; buf[offset + 1] = value; value = value >>> 8; buf[offset] = value; return offset + 3; } export function validateOffset( value, name, min = 0, max = Number.MAX_SAFE_INTEGER, ) { if (typeof value !== "number") { throw new codes.ERR_INVALID_ARG_TYPE(name, "number", value); } if (!Number.isInteger(value)) { throw new codes.ERR_OUT_OF_RANGE(name, "an integer", value); } if (value < min || value > max) { throw new codes.ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value); } } // deno-lint-ignore camelcase export function writeU_Int48LE(buf, value, offset, min, max) { value = +value; checkInt(value, min, max, buf, offset, 5); const newVal = Math.floor(value * 2 ** -32); buf[offset++] = value; value = value >>> 8; buf[offset++] = value; value = value >>> 8; buf[offset++] = value; value = value >>> 8; buf[offset++] = value; buf[offset++] = newVal; buf[offset++] = newVal >>> 8; return offset; } // deno-lint-ignore camelcase export function writeU_Int40LE(buf, value, offset, min, max) { value = +value; checkInt(value, min, max, buf, offset, 4); const newVal = value; buf[offset++] = value; value = value >>> 8; buf[offset++] = value; value = value >>> 8; buf[offset++] = value; value = value >>> 8; buf[offset++] = value; buf[offset++] = Math.floor(newVal * 2 ** -32); return offset; } // deno-lint-ignore camelcase export function writeU_Int32LE(buf, value, offset, min, max) { value = +value; checkInt(value, min, max, buf, offset, 3); buf[offset++] = value; value = value >>> 8; buf[offset++] = value; value = value >>> 8; buf[offset++] = value; value = value >>> 8; buf[offset++] = value; return offset; } // deno-lint-ignore camelcase export function writeU_Int24LE(buf, value, offset, min, max) { value = +value; checkInt(value, min, max, buf, offset, 2); buf[offset++] = value; value = value >>> 8; buf[offset++] = value; value = value >>> 8; buf[offset++] = value; return offset; } export default { atob, btoa, Blob, Buffer, constants, kMaxLength, kStringMaxLength, SlowBuffer, }; QegQ!ext:deno_node/internal/buffer.mjsa bD`M` T` La* TH`L(L` 9TBUI   G`Dk(0o! 88 i! i ! - 0-_ (SbqA"`Da Sb1""B“b""bBM"bbbb"""""??????????????????????????????????Ib`8L`  bS]`z]` ]`]`4]`]`M" ]`" ]`" ]`>n]`]`(]`ZL`  bDbc NR "D"c  Dc  mL`` L`"{ ` L`"{  ` L` ` L`` L`"` L`"b` L`bb` L`b`  L`b`  L`b`  L``  L`"`  L`" ` L` " ` L`" ` L`` L`` L`B` L`BB` L`BB` L`B¿` L`¿½` L`½B` L`BB` L`B` L`` L`` L`` L`b` L`bb` L`b`  L``! L`"`" L`" `# L` "`$ L`"`% L``& L``' L`B`( L`B`) L``* L``+ L``, L`"`- L`""`. L`""`/ L`""`0 L`"`1 L``2 L`"`3 L`"]hL` Dbbc NR Deec DBBc Dc D""c  Dc Dc Dc   Dc Dc$ D" " c D  cnr D""c#, D==c  D"B"Bc  Dc(2 Dcs D""c D11c D"3"3c D  cp| DBBc Dc6D D^ ^ c(6`K a?ea?Ba?" a?"a?a?"a?a?a?a?a?a?a?a?1a?"3a?Ba?^ a? a?=a?"Ba?"a?a?ba?ba? a?" a?ba ?"{ a? a?a!?ba?a?a ?ba?a?a?a?a?a?a&?a%?a?Ba?Ba(?a'?Ba?½a?Ba?Ba?Ba?¿a?a ?a ?a ?"a ?a?ba? a#?"a"?"a3?a)?"a?a*?a?a1?"a/?"a-?a+?"a$?a2?"a0?"a.?a,?a?b  vGb@ T`,L` 1m  \" b R  `M`"{ S  .I`D{8   c   0b`- -]' m   ` b ř !-/ $!-/^  c0-{% i(SbqA"`DaH 'Gc @  &vGb@ T  I`bb@ T I`-b@ T I`b@  TX`l$L`I " $b9 fI`Do0   m0-^0- ic J  b -_ m- _ (SbqA`DaWb H@b@  T I`o8b@ T I`Mlb@ T I`~PBb@ Tt`(L`"31M" b   `M`"{   I`Dv@  =0b0b-0-{% i - - o /Ř m   0 b0 bğ  0 b-^(SbqA`Da#z&GcPL vGb@ T  I`&'"b @ T I`6;bb@  T I`pLObb@3  T I`OHPbb@4  T I`PPb@5  T I`PQbb@6  T I`QRbb@7 T I`8"b@T T I`/"b@U T I`hb@g T I`}b@h T I`gb@i T I`"b@j T(` L`!  J`Dc" " (SbqAb`DaCG avGb@l T  I`d"b@m T I`b@ T I`#"b@5Ld  T I`  "{ b@a T I`l b@a T I`#b@na! T I`Abb@oa T I`űb@pa T I`Sb@qa  T I`qƴbb@ra T I`b@sa T I`b@ta T I`&]b@ua T I`b@va T I`"b@wa T I`Gb@xa& T I`= b@ya% T I`1b@za T I`xBb@{a T I`Bb@|a( T I` b@}a' T I`&dBb@~a T I`½b@a T I`Bb@a T I`Bb@a T I`,Bb@a T I`^¿b@a T,`L` M  K`Dd0-^(SbqA`Da~G avGb@c  T`#dL`Wf,dx ="SŒTbbTBy ? *K`D!b-]-  + q  p  J m   m 0 -  m 0 -  m 0 - m 0 -m 0 - }m 0 -im 0 -Um m 0 -m! 0 -"m$ 0 -%m' 0 -((SbqA"`DaFgd*P#0"X1#XXb@a  T  I`b@a T I`bb@a T I`: b@a# T I`>"b@a" T I`I"b@a3 T I`b@a) T I`"b@a T I`b@a* T I`b@a T I`'b@a1 T I`F"b@a/ T I`"b@a- T I`b@a+ T I`"b@a$ T I`Cb@a2 T I`"b@a0 T I`$@"b@a. T I`~jb@b,a BYI I]Y`A Yb bCC bGC T  y``` Qa.get`  GvGb @ bGC T  y``` Qa.get`f GvGb @ T,`]  L`Dd  `(SbqAe`DaD ab  T  I`LT GvGb T  T I`'Nb  T I`"b " T I`Gb T I`9b  T0`L`B  NL`De  - mU0bU(SbqA`Dac aDb! T  I`#"4GvGb""4M T I`3'(b# T I`4(')b$ T I`S)*Bb%B T I`*-1 b&" T I`~-c.b' T I`.c/b( T I`/i6b) T I`@;;:b *: T I`;+<;b!+; T I`a<<"7b","7 T I`==b#- T I`=<>b$. T I`r>2?b%/ T I`h??b&0 T I` @@b'1 T I` AwAb(2 T I`ABb)3 T I`GBB"b*4" T I`B%Cb+5 T I`[CCb,6 T I`CDbb-7b T I`DZEb.8 T I`EEbb/9b TT`c(L`""kBo  &M`Dn0  !- !- 9_  - n - 8_ -_-(SbpA‘`Da F+GGc`   vGb0:‘ T`,L` " b V‘$b  >M`D@(  0- i - -\   -  `0$ - `- 9   4    $0$ -` o  -\0 bƟ0- i -"\$(SbpAb`DaUGKGd&PP "@PvGb1;b T  I`KVL- b2<e T I`RR9b8=9 T I`PSUbb9>b T I`U:Xbb:?b T I`X6Yb;@bb T I`YZb<Ab T I`V[\b=Bbb T I`]_b>Cb T I`M`bBb?DB» T I`bd¼b@E¼ T I`0eog¾bAF¾ T I`gdhbBG T I`hi"bCH" T I`ikbDI T I`Nkl"bEJ" T I`lnbFK T I`Xndp"bGL" T I`prbHM T I`res"bIN" T I`stbJO T I`@ttbbKPb T I`tVu"bLQ" T I`urx"bMR" T I`x{"bNS" T I`{2|bOT" T I`||bPU" T I`L}}bQV" T I`~a~bRW" T I`~"bSX" T I`W"bVY" T I`"bWZ" T I`ԅbX[ T I`݈"bY\" T I`3bZ] T I`k"b[^" T I`Vb\_ T I`"b]`" T I`$b^a T I`֎"b_b" T I`؏b`c T I`I"bad" T I` bbe T I`FӒbbcfb T I` "bdg" T I`“mb eh T I`5b fi5 TP`YL`   N`Dm@!  i n; F n# 8 / / 84 P‹$ Pċ< (SbqAI`DaլGb!Bx!vGb @kj)"PbCBC?Cy CbC=C CŒC@b MChC;C9CbC T  y```Qb .byteLength`]vGbKk T ```  Qa.indexOf`a;bKl T `Qb .ascii.slice`n9bKm T `Qb .ascii.write`bbKn@b ChBC;C9CbC T ```BQb .byteLength`AbKoB T ```B Qa.indexOf`0;bKp T `` Qb base64.slice`=m9bKq T `` Qb base64.write`zbbKr@b Ch?C;C9CbC T ` ``?Qb .byteLength`bKs? T ```? Qa.indexOf`h;bKt T ```? Qa.slice`P9bKu T ```? Qa.write`]bbKv@b Chy C;C9CbC T ```y Qb .byteLength`bKwy  T `Qb .hex.indexOf`.;bKx T `Qb .hex.slice`9bKy T `Qb .hex.write`PbbKz@b ChbC;C9CbC T ```bQb .byteLength`sbK{b T ```b Qa.indexOf`z;bK| T `` Qb latin1.slice`9bK} T `` Qb latin1.write`bbK~@b Ch=C;C9CbC T ```=Qb .byteLength`'DbKŒ T `` Qb ucs2.indexOf`4;bK T `Qb .ucs2.slice`Ao9bK T `Qb .ucs2.write`|bbK=@b Ch C;C9CbC  T `` Qb utf8.indexOf`4;bK T `Qb .utf8.slice`9bK T,` L`‘  Q`Dd((-\(SbbpWb``Qb .utf8.writea!a avGbK@b MChŒC;C9CbC T  y```ŒQb .byteLength`GbK T ```Œ Qa.indexOf`;bK T ``` Œ Qa.slice`9bK T ``` Œ Qa.write`bbKPb"CCbC"{ CbC C" C C"b"{ b "    G`DXh %%%%%%% % % % % %%%% % % % % % %%%%%%%%%% %!Â%"%#%$ei h  0i%!   i%!!-" i %!#  i%!!-" i% 4 / m1 1 1$%"% !!%-& !%-&'^ 2% ~(!)03)"03*$ 1 !+&-,(0--*.~/,)031-\/!+&-,(0--*2~31)4312\40 25606278!+&-8:0--*!!--<_>!+&-8:0!!_@092:B0;2F!+&-8:0--H!!--<_J!+&-8:0!!_L0?!2@N0A"2BP0C#2DR0E$2FT02GV0--*2HX0--*I%2JZ0--*K&2L\0--*M'2N^0--*O(2P`0--*0--*-Pb2Qd0--*R)2Sf0--*T*2Uh 0--*0--*-Uj4l0--*V+2Bn0--*W,2Xp0--*Y-2Zr0--*[.2\t0--*]/2^v0--*_02`x0--*a12bz0--*c22d|0--*e32f~0--*g42h0--*i52j0--*k62l0--*m72n0--*o82p0--*q92r0--*s:2t0--*u;2v0--*w<2x0--*y=2z0--*{>2|0}i%0--*~?20--*0--*@2 20--*0--*A2 20--*0--*B2 20--*0--*02 20--*0--*C2 20--*0--*D2 20--*0--*02 20--*0--*Eb2 20--*0--*Fb2 20--*G20--*H20--*I20--*J20--*K20--*L20--*M20--*Nb20--*Ob20--*P20--*Q20--*R20--*S20--*0--*T2 20--*0--*U2 20--*0--*V2 20--*0--*W2 20--*0--*X2 20--*0--*Y2 20--*0--*Z2 20--*0--*[b2 20--*0--*\b2 20--*]20--*^2 0--*_2 0--*`20--*a20--*b20--*c20--*db20--*eb20--*f20--*g2 0--*h2"0--*i2$0--*j2&0--*k2(la*%!!+&-,^.1 0-0n2/0 0 /3 45 P7<8~9~:)m3G;0 -=3?n3ZAo3Cp3zE 3G~I)q3GJ0 -L3Nr3ZPs3Rt3zT 3V~X)u3GY0 -[3]v3Z_w3ax3zc 3e~g)y3Gh0 -j3lz3Zn{3p |3zr 3t~ v) }3Gw0 - y3{ ~3Z}33z 3 ~)3G0 -33Z33z 3~)0 3G0 -33Z33z 3~)3G0 -33Z3 3z 3 1 ~!)0"3"0#3#0$3$03%0 3&03'03(03) 1 @@P8 PL`2@ ,P@ ,@ , , ,  ,P, , , , , , ,, , , , ,   , , ,@  , , , , , ,,, , , , , ,@P wN &  0 L &  0 L &  0 L & 0 0vGbAKKGNJ*ILJIRI"LZI*L2LbIzIIIVJ:LBLJLbLIIjLrLzLLLLLILLLLLLLLLLLLM MMM"M:MRMIIIIIZMbMjMrMzMMMMMMMMMMMMMMMMMN NNN"N*N2NII:NBNJNRNZNbNjNrNzNNNNNNNNNIJ JJNJ2J^JfJnJvJ~JJJJJJJJJJJJJJJJJKK:JNNO"O6ONOfOzOOOOOOPP.PBPZPrPPPPPPPQQ6QNQfQ~Q&K>KFKNKBJVK^KfKnKvK~KKKKKKKKKKD`RD]DH QD\// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // deno-lint-ignore-file prefer-primordials export const ArrayIsArray = Array.isArray; export const ArrayPrototypeFilter = (that, ...args) => that.filter(...args); export const ArrayPrototypeForEach = (that, ...args) => that.forEach(...args); export const ArrayPrototypeIncludes = (that, ...args) => that.includes(...args); export const ArrayPrototypeJoin = (that, ...args) => that.join(...args); export const ArrayPrototypePush = (that, ...args) => that.push(...args); export const ArrayPrototypeSlice = (that, ...args) => that.slice(...args); export const ArrayPrototypeSome = (that, ...args) => that.some(...args); export const ArrayPrototypeSort = (that, ...args) => that.sort(...args); export const ArrayPrototypeUnshift = (that, ...args) => that.unshift(...args); export const ObjectAssign = Object.assign; export const ObjectCreate = Object.create; export const ObjectHasOwn = Object.hasOwn; export const RegExpPrototypeTest = (that, ...args) => that.test(...args); export const RegExpPrototypeExec = RegExp.prototype.exec; export const StringFromCharCode = String.fromCharCode; export const StringPrototypeCharCodeAt = (that, ...args) => that.charCodeAt(...args); export const StringPrototypeEndsWith = (that, ...args) => that.endsWith(...args); export const StringPrototypeIncludes = (that, ...args) => that.includes(...args); export const StringPrototypeReplace = (that, ...args) => that.replace(...args); export const StringPrototypeSlice = (that, ...args) => that.slice(...args); export const StringPrototypeSplit = (that, ...args) => that.split(...args); export const StringPrototypeStartsWith = (that, ...args) => that.startsWith(...args); export const StringPrototypeToUpperCase = (that) => that.toUpperCase(); Qel&ext:deno_node/internal/primordials.mjsa bD`TM` T`La!!hLx a b3 T  f`fISb1Ib`])L`HT` L`Tf` L`f` L`c` L`c!` L`!A` L`Aa` L`aAi` L`Aiab`  L`ab`  L``  L` `  L` `  L`B6` L`B6B>` L`B>L` L`LS` L`SU` L`UbX` L`bX`` L``b` L`b"d` L`"dg` L`gbo` L`bo]`Ta?fa?a?ca?!a?Aa?aa?Aia?aba ?a ?a ? a ?a ?B>a?B6a?La?Sa?Ua?bXa?`a?ba?"da?ga?boa?QbK T `>QbK T c`fcbK T !`!bK T A`!AbK T a`FlabK T Ai`AibK T ab`abbK T `%MbK b&)( T B>`B>bK QEG T  S`SbK  T U` 5UbK  T bX`^bXbK  T ```bK T b`%bbK T "d`Kq"dbK T g`gbK T bo`bobK  Q`D h ei h  !-1111 1 1 1 1 1 1 !-1 !-1 !- 1  1! --1!-1 1 1 1 1111 1 Qb`PPQbAQ6R>RFRNRVR^RfRnRvR~RRRRRRRRD`RD]DH %Q%Z.K// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { op_preview_entries } from "ext:core/ops"; // Mock trace for now const trace = () => {}; import { ERR_CONSOLE_WRITABLE_STREAM, ERR_INCOMPATIBLE_OPTION_PAIR, ERR_INVALID_ARG_VALUE, isStackOverflowError, } from "ext:deno_node/internal/errors.ts"; import { validateArray, validateInteger, validateObject, } from "ext:deno_node/internal/validators.mjs"; import { Buffer } from "node:buffer"; const { isBuffer } = Buffer; import { formatWithOptions, inspect, } from "ext:deno_node/internal/util/inspect.mjs"; import { isMap, isMapIterator, isSet, isSetIterator, isTypedArray, } from "ext:deno_node/internal/util/types.ts"; import { CHAR_LOWERCASE_B as kTraceBegin, CHAR_LOWERCASE_E as kTraceEnd, CHAR_LOWERCASE_N as kTraceInstant, CHAR_UPPERCASE_C as kTraceCount, } from "ext:deno_node/internal/constants.ts"; import { clearScreenDown, cursorTo, } from "ext:deno_node/internal/readline/callbacks.mjs"; import cliTable from "ext:deno_node/internal/cli_table.ts"; const kCounts = Symbol("counts"); const kTraceConsoleCategory = "node,node.console"; const kSecond = 1000; const kMinute = 60 * kSecond; const kHour = 60 * kMinute; const kMaxGroupIndentation = 1000; // Track amount of indentation required via `console.group()`. const kGroupIndent = Symbol("kGroupIndent"); const kGroupIndentationWidth = Symbol("kGroupIndentWidth"); const kFormatForStderr = Symbol("kFormatForStderr"); const kFormatForStdout = Symbol("kFormatForStdout"); const kGetInspectOptions = Symbol("kGetInspectOptions"); const kColorMode = Symbol("kColorMode"); const kIsConsole = Symbol("kIsConsole"); const kWriteToConsole = Symbol("kWriteToConsole"); const kBindProperties = Symbol("kBindProperties"); const kBindStreamsEager = Symbol("kBindStreamsEager"); const kBindStreamsLazy = Symbol("kBindStreamsLazy"); const kUseStdout = Symbol("kUseStdout"); const kUseStderr = Symbol("kUseStderr"); const optionsMap = new WeakMap(); function Console(options /* or: stdout, stderr, ignoreErrors = true */) { // We have to test new.target here to see if this function is called // with new, because we need to define a custom instanceof to accommodate // the global console. if (!new.target) { return Reflect.construct(Console, arguments); } if (!options || typeof options.write === "function") { options = { stdout: options, stderr: arguments[1], ignoreErrors: arguments[2], }; } const { stdout, stderr = stdout, ignoreErrors = true, colorMode = "auto", inspectOptions, groupIndentation, } = options; if (!stdout || typeof stdout.write !== "function") { throw new ERR_CONSOLE_WRITABLE_STREAM("stdout"); } if (!stderr || typeof stderr.write !== "function") { throw new ERR_CONSOLE_WRITABLE_STREAM("stderr"); } if (typeof colorMode !== "boolean" && colorMode !== "auto") { throw new ERR_INVALID_ARG_VALUE("colorMode", colorMode); } if (groupIndentation !== undefined) { validateInteger( groupIndentation, "groupIndentation", 0, kMaxGroupIndentation, ); } if (inspectOptions !== undefined) { validateObject(inspectOptions, "options.inspectOptions"); if ( inspectOptions.colors !== undefined && options.colorMode !== undefined ) { throw new ERR_INCOMPATIBLE_OPTION_PAIR( "options.inspectOptions.color", "colorMode", ); } optionsMap.set(this, inspectOptions); } // Bind the prototype functions to this Console instance Object.keys(Console.prototype).forEach((key) => { // We have to bind the methods grabbed from the instance instead of from // the prototype so that users extending the Console can override them // from the prototype chain of the subclass. this[key] = this[key].bind(this); Object.defineProperty(this[key], "name", { value: key, }); }); this[kBindStreamsEager](stdout, stderr); this[kBindProperties](ignoreErrors, colorMode, groupIndentation); } const consolePropAttributes = { writable: true, enumerable: false, configurable: true, }; // Fixup global.console instanceof global.console.Console Object.defineProperty(Console, Symbol.hasInstance, { value(instance) { return instance === console || instance[kIsConsole]; }, }); const kColorInspectOptions = { colors: true }; const kNoColorInspectOptions = {}; Object.defineProperties(Console.prototype, { [kBindStreamsEager]: { ...consolePropAttributes, // Eager version for the Console constructor value: function (stdout, stderr) { Object.defineProperties(this, { "_stdout": { ...consolePropAttributes, value: stdout }, "_stderr": { ...consolePropAttributes, value: stderr }, }); }, }, [kBindStreamsLazy]: { ...consolePropAttributes, // Lazily load the stdout and stderr from an object so we don't // create the stdio streams when they are not even accessed value: function (object) { let stdout; let stderr; Object.defineProperties(this, { "_stdout": { enumerable: false, configurable: true, get() { if (!stdout) stdout = object.stdout; return stdout; }, set(value) { stdout = value; }, }, "_stderr": { enumerable: false, configurable: true, get() { if (!stderr) stderr = object.stderr; return stderr; }, set(value) { stderr = value; }, }, }); }, }, [kBindProperties]: { ...consolePropAttributes, value: function (ignoreErrors, colorMode, groupIndentation = 2) { Object.defineProperties(this, { "_stdoutErrorHandler": { ...consolePropAttributes, value: createWriteErrorHandler(this, kUseStdout), }, "_stderrErrorHandler": { ...consolePropAttributes, value: createWriteErrorHandler(this, kUseStderr), }, "_ignoreErrors": { ...consolePropAttributes, value: Boolean(ignoreErrors), }, "_times": { ...consolePropAttributes, value: new Map() }, // Corresponds to https://console.spec.whatwg.org/#count-map [kCounts]: { ...consolePropAttributes, value: new Map() }, [kColorMode]: { ...consolePropAttributes, value: colorMode }, [kIsConsole]: { ...consolePropAttributes, value: true }, [kGroupIndent]: { ...consolePropAttributes, value: "" }, [kGroupIndentationWidth]: { ...consolePropAttributes, value: groupIndentation, }, [Symbol.toStringTag]: { writable: false, enumerable: false, configurable: true, value: "console", }, }); }, }, [kWriteToConsole]: { ...consolePropAttributes, value: function (streamSymbol, string) { const ignoreErrors = this._ignoreErrors; const groupIndent = this[kGroupIndent]; const useStdout = streamSymbol === kUseStdout; const stream = useStdout ? this._stdout : this._stderr; const errorHandler = useStdout ? this._stdoutErrorHandler : this._stderrErrorHandler; if (groupIndent.length !== 0) { if (string.includes("\n")) { string = string.replace(/\n/g, `\n${groupIndent}`); } string = groupIndent + string; } string += "\n"; if (ignoreErrors === false) return stream.write(string); // There may be an error occurring synchronously (e.g. for files or TTYs // on POSIX systems) or asynchronously (e.g. pipes on POSIX systems), so // handle both situations. try { // Add and later remove a noop error handler to catch synchronous // errors. if (stream.listenerCount("error") === 0) { stream.once("error", noop); } stream.write(string, errorHandler); } catch (e) { // Console is a debugging utility, so it swallowing errors is not // desirable even in edge cases such as low stack space. if (isStackOverflowError(e)) { throw e; } // Sorry, there's no proper way to pass along the error here. } finally { stream.removeListener("error", noop); } }, }, [kGetInspectOptions]: { ...consolePropAttributes, value: function (stream) { let color = this[kColorMode]; if (color === "auto") { color = stream.isTTY && ( typeof stream.getColorDepth === "function" ? stream.getColorDepth() > 2 : true ); } const options = optionsMap.get(this); if (options) { if (options.colors === undefined) { options.colors = color; } return options; } return color ? kColorInspectOptions : kNoColorInspectOptions; }, }, [kFormatForStdout]: { ...consolePropAttributes, value: function (args) { const opts = this[kGetInspectOptions](this._stdout); args.unshift(opts); return Reflect.apply(formatWithOptions, null, args); }, }, [kFormatForStderr]: { ...consolePropAttributes, value: function (args) { const opts = this[kGetInspectOptions](this._stderr); args.unshift(opts); return Reflect.apply(formatWithOptions, null, args); }, }, }); // Make a function that can serve as the callback passed to `stream.write()`. function createWriteErrorHandler(instance, streamSymbol) { return (err) => { // This conditional evaluates to true if and only if there was an error // that was not already emitted (which happens when the _write callback // is invoked asynchronously). const stream = streamSymbol === kUseStdout ? instance._stdout : instance._stderr; if (err !== null && !stream._writableState.errorEmitted) { // If there was an error, it will be emitted on `stream` as // an `error` event. Adding a `once` listener will keep that error // from becoming an uncaught exception, but since the handler is // removed after the event, non-console.* writes won't be affected. // we are only adding noop if there is no one else listening for 'error' if (stream.listenerCount("error") === 0) { stream.once("error", noop); } } }; } const consoleMethods = { log(...args) { this[kWriteToConsole](kUseStdout, this[kFormatForStdout](args)); }, warn(...args) { this[kWriteToConsole](kUseStderr, this[kFormatForStderr](args)); }, dir(object, options) { this[kWriteToConsole]( kUseStdout, inspect(object, { customInspect: false, ...this[kGetInspectOptions](this._stdout), ...options, }), ); }, time(label = "default") { // Coerces everything other than Symbol to a string label = `${label}`; if (this._times.has(label)) { emitWarning(`Label '${label}' already exists for console.time()`); return; } trace(kTraceBegin, kTraceConsoleCategory, `time::${label}`, 0); this._times.set(label, process.hrtime()); }, timeEnd(label = "default") { // Coerces everything other than Symbol to a string label = `${label}`; const found = timeLogImpl(this, "timeEnd", label); trace(kTraceEnd, kTraceConsoleCategory, `time::${label}`, 0); if (found) { this._times.delete(label); } }, timeLog(label = "default", ...data) { // Coerces everything other than Symbol to a string label = `${label}`; timeLogImpl(this, "timeLog", label, data); trace(kTraceInstant, kTraceConsoleCategory, `time::${label}`, 0); }, trace: function trace(...args) { const err = { name: "Trace", message: this[kFormatForStderr](args), }; Error.captureStackTrace(err, trace); this.error(err.stack); }, assert(expression, ...args) { if (!expression) { args[0] = `Assertion failed${args.length === 0 ? "" : `: ${args[0]}`}`; // The arguments will be formatted in warn() again Reflect.apply(this.warn, this, args); } }, // Defined by: https://console.spec.whatwg.org/#clear clear() { // It only makes sense to clear if _stdout is a TTY. // Otherwise, do nothing. if (this._stdout.isTTY && process.env.TERM !== "dumb") { cursorTo(this._stdout, 0, 0); clearScreenDown(this._stdout); } }, // Defined by: https://console.spec.whatwg.org/#count count(label = "default") { // Ensures that label is a string, and only things that can be // coerced to strings. e.g. Symbol is not allowed label = `${label}`; const counts = this[kCounts]; let count = counts.get(label); if (count === undefined) { count = 1; } else { count++; } counts.set(label, count); trace(kTraceCount, kTraceConsoleCategory, `count::${label}`, 0, count); this.log(`${label}: ${count}`); }, // Defined by: https://console.spec.whatwg.org/#countreset countReset(label = "default") { const counts = this[kCounts]; if (!counts.has(label)) { emitWarning(`Count for '${label}' does not exist`); return; } trace(kTraceCount, kTraceConsoleCategory, `count::${label}`, 0, 0); counts.delete(`${label}`); }, group(...data) { if (data.length > 0) { Reflect.apply(this.log, this, data); } this[kGroupIndent] += " ".repeat(this[kGroupIndentationWidth]); }, groupEnd() { this[kGroupIndent] = this[kGroupIndent].slice( 0, this[kGroupIndent].length - this[kGroupIndentationWidth], ); }, // https://console.spec.whatwg.org/#table table(tabularData, properties) { if (properties !== undefined) { validateArray(properties, "properties"); } if (tabularData === null || typeof tabularData !== "object") { return this.log(tabularData); } const final = (k, v) => this.log(cliTable(k, v)); const _inspect = (v) => { const depth = v !== null && typeof v === "object" && !isArray(v) && Object.keys(v).length > 2 ? -1 : 0; const opt = { depth, maxArrayLength: 3, breakLength: Infinity, ...this[kGetInspectOptions](this._stdout), }; return inspect(v, opt); }; const getIndexArray = (length) => Array.from( { length }, (_, i) => _inspect(i), ); const mapIter = isMapIterator(tabularData); let isKeyValue = false; let i = 0; if (mapIter) { const res = op_preview_entries(tabularData, true); tabularData = res[0]; isKeyValue = res[1]; } if (isKeyValue || isMap(tabularData)) { const keys = []; const values = []; let length = 0; if (mapIter) { for (; i < tabularData.length / 2; ++i) { keys.push(_inspect(tabularData[i * 2])); values.push(_inspect(tabularData[i * 2 + 1])); length++; } } else { for (const { 0: k, 1: v } of tabularData) { keys.push(_inspect(k)); values.push(_inspect(v)); length++; } } return final([ iterKey, keyKey, valuesKey, ], [ getIndexArray(length), keys, values, ]); } const setIter = isSetIterator(tabularData); if (setIter) { tabularData = op_preview_entries(tabularData, false); } const setlike = setIter || mapIter || isSet(tabularData); if (setlike) { const values = []; let length = 0; console.log("tabularData", tabularData); for (const v of tabularData) { values.push(_inspect(v)); length++; } return final([iterKey, valuesKey], [getIndexArray(length), values]); } const map = Object.create(null); let hasPrimitives = false; const valuesKeyArray = []; const indexKeyArray = Object.keys(tabularData); for (; i < indexKeyArray.length; i++) { const item = tabularData[indexKeyArray[i]]; const primitive = item === null || (typeof item !== "function" && typeof item !== "object"); if (properties === undefined && primitive) { hasPrimitives = true; valuesKeyArray[i] = _inspect(item); } else { const keys = properties || Object.keys(item); for (const key of keys) { if (map[key] === undefined) { map[key] = []; } if ( (primitive && properties) || !Object.hasOwn(item, key) ) { map[key][i] = ""; } else { map[key][i] = _inspect(item[key]); } } } } const keys = Object.keys(map); const values = Object.values(map); if (hasPrimitives) { keys.push(valuesKey); values.push(valuesKeyArray); } keys.unshift(indexKey); values.unshift(indexKeyArray); return final(keys, values); }, }; // Returns true if label was found function timeLogImpl(self, name, label, data) { const time = self._times.get(label); if (time === undefined) { emitWarning(`No such label '${label}' for console.${name}()`); return false; } const duration = process.hrtime(time); const ms = duration[0] * 1000 + duration[1] / 1e6; const formatted = formatTime(ms); if (data === undefined) { self.log("%s: %s", label, formatted); } else { self.log("%s: %s", label, formatted, ...data); } return true; } function pad(value) { return `${value}`.padStart(2, "0"); } function formatTime(ms) { let hours = 0; let minutes = 0; let seconds = 0; if (ms >= kSecond) { if (ms >= kMinute) { if (ms >= kHour) { hours = Math.floor(ms / kHour); ms = ms % kHour; } minutes = Math.floor(ms / kMinute); ms = ms % kMinute; } seconds = ms / kSecond; } if (hours !== 0 || minutes !== 0) { ({ 0: seconds, 1: ms } = seconds.toFixed(3).split(".")); const res = hours !== 0 ? `${hours}:${pad(minutes)}` : minutes; return `${res}:${pad(seconds)}.${ms} (${hours !== 0 ? "h:m" : ""}m:ss.mmm)`; } if (seconds !== 0) { return `${seconds.toFixed(3)}s`; } return `${Number(ms.toFixed(3))}ms`; } const keyKey = "Key"; const valuesKey = "Values"; const indexKey = "(index)"; const iterKey = "(iteration index)"; const isArray = (v) => Array.isArray(v) || isTypedArray(v) || isBuffer(v); function noop() {} for (const method of Reflect.ownKeys(consoleMethods)) { Console.prototype[method] = consoleMethods[method]; } Console.prototype.debug = Console.prototype.log; Console.prototype.info = Console.prototype.log; Console.prototype.dirxml = Console.prototype.log; Console.prototype.error = Console.prototype.warn; Console.prototype.groupCollapsed = Console.prototype.group; export { Console, formatTime, kBindProperties, kBindStreamsLazy }; export default { Console, kBindStreamsLazy, kBindProperties, formatTime, };  Qf.ext:deno_node/internal/console/constructor.mjsa bD`M`) T]`t}La] T  I`d&)BySb1 b""Bb"BBBbbbB!—b3H????????????????????????????????IbK`,L`  B]`, ]`" ]`Ub]`"$ ]`" ]`pb]`4B]`B]`]DL`` L`` L`B` L`B` L`` L`]dL`  D"{ "{ c D½ ½ cv D\ \ c D  c DB{B{cfu DAc DB|B|cy DBBc Dc D77c', DB8B8c0= D;;cAF D<<cJW D§ § c D">">c[g Dbc Dbc  Dbc Dbc D 1 1c$ D!!c' D"[ "[ c+: D  c>L` 1a?½ a?\ a? a?§ a?!a?"[ a? a?"{ a?Ba?a?7a?B8a?;a?<a?">a?a?a?a?a?B{a?B|a?Aa?a?a?a?Ba?a?Rb @ T I`CERb@$ T I`EF!b @% T I`IIHb @(,Lb  T I`b@a T I`FHBb@&ba  T b`aibbK"{  "BBBbq (bGHGZbC T  I`RRbbGB* T y```B* Qa.value`RRb @ T ```B* Qa.value`~d*+@++@,-@--@ b @ T  y```B* Qa.value`>RRb @  T ```B* Qa.value`$!b @  T ```B* Qa.value`" $b @  T ```B* Qa.value`]$$b @ T ```B* Qa.value`L%%b @bCCCCbCCbC CCCBCICCC T  I`)7*b T I`@**b T I`*n+b T I`w+,b T I`,-bbb T I`..b T I`//bbb T I`/0b T I`01b T I`23b T I`24@5Bb B T I`J55b T I`56b T I`6CbB" T b3`(3"@ 7B0t)D)3"F 7Ht)J* 3"L 7Nt)P+ 3"R 7Tt)V, 3"X 7Z t)\- 3"^ 7`_b~.d)/ 30e132g334i536k738m93:o;3s?3@uA3BwC3DyE3F{G3H}I3JK%L%M%N% O%!!P-Q^񇉿-R]򍺡e-S%-"0-%5 /43   #-T]e   0-%50-%5-02U0-%50-%5-02V0-%50-%5-02W0-%50-%5-22X0-%50-%5-F2Y~Z)03[030303\ 1 RHp@@@@@`L  `ZXXXXXX0  @,P ,P LRbASSDSSSDT&T>TVTnTRDTTTTTTTTTTTTTTDSSSTSD`RD]DH QQM*// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { core } from "ext:core/mod.js"; import * as event from "ext:deno_web/02_event.js"; import * as timers from "ext:deno_web/02_timers.js"; import * as base64 from "ext:deno_web/05_base64.js"; import * as encoding from "ext:deno_web/08_text_encoding.js"; import * as console from "ext:deno_console/01_console.js"; import * as caches from "ext:deno_cache/01_cache.js"; import * as compression from "ext:deno_web/14_compression.js"; import * as worker from "ext:runtime/11_workers.js"; import * as performance from "ext:deno_web/15_performance.js"; import * as crypto from "ext:deno_crypto/00_crypto.js"; import * as url from "ext:deno_url/00_url.js"; import * as urlPattern from "ext:deno_url/01_urlpattern.js"; import * as headers from "ext:deno_fetch/20_headers.js"; import * as streams from "ext:deno_web/06_streams.js"; import * as fileReader from "ext:deno_web/10_filereader.js"; import * as webSocket from "ext:deno_websocket/01_websocket.js"; import * as webSocketStream from "ext:deno_websocket/02_websocketstream.js"; import * as broadcastChannel from "ext:deno_broadcast_channel/01_broadcast_channel.js"; import * as file from "ext:deno_web/09_file.js"; import * as formData from "ext:deno_fetch/21_formdata.js"; import * as request from "ext:deno_fetch/23_request.js"; import * as response from "ext:deno_fetch/23_response.js"; import * as fetch from "ext:deno_fetch/26_fetch.js"; import * as eventSource from "ext:deno_fetch/27_eventsource.js"; import * as messagePort from "ext:deno_web/13_message_port.js"; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { DOMException } from "ext:deno_web/01_dom_exception.js"; import * as abortSignal from "ext:deno_web/03_abort_signal.js"; import * as imageData from "ext:deno_web/16_image_data.js"; import { loadWebGPU } from "ext:deno_webgpu/00_init.js"; import * as webgpuSurface from "ext:deno_webgpu/02_surface.js"; import { unstableIds } from "ext:runtime/90_deno_ns.js"; const loadImage = core.createLazyLoader("ext:deno_canvas/01_image.js"); // https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope const windowOrWorkerGlobalScope = { AbortController: core.propNonEnumerable(abortSignal.AbortController), AbortSignal: core.propNonEnumerable(abortSignal.AbortSignal), Blob: core.propNonEnumerable(file.Blob), ByteLengthQueuingStrategy: core.propNonEnumerable( streams.ByteLengthQueuingStrategy, ), CloseEvent: core.propNonEnumerable(event.CloseEvent), CompressionStream: core.propNonEnumerable(compression.CompressionStream), CountQueuingStrategy: core.propNonEnumerable( streams.CountQueuingStrategy, ), CryptoKey: core.propNonEnumerable(crypto.CryptoKey), CustomEvent: core.propNonEnumerable(event.CustomEvent), DecompressionStream: core.propNonEnumerable(compression.DecompressionStream), DOMException: core.propNonEnumerable(DOMException), ErrorEvent: core.propNonEnumerable(event.ErrorEvent), Event: core.propNonEnumerable(event.Event), EventTarget: core.propNonEnumerable(event.EventTarget), File: core.propNonEnumerable(file.File), FileReader: core.propNonEnumerable(fileReader.FileReader), FormData: core.propNonEnumerable(formData.FormData), Headers: core.propNonEnumerable(headers.Headers), ImageData: core.propNonEnumerable(imageData.ImageData), ImageBitmap: core.propNonEnumerableLazyLoaded( (image) => image.ImageBitmap, loadImage, ), MessageEvent: core.propNonEnumerable(event.MessageEvent), Performance: core.propNonEnumerable(performance.Performance), PerformanceEntry: core.propNonEnumerable(performance.PerformanceEntry), PerformanceMark: core.propNonEnumerable(performance.PerformanceMark), PerformanceMeasure: core.propNonEnumerable(performance.PerformanceMeasure), PromiseRejectionEvent: core.propNonEnumerable(event.PromiseRejectionEvent), ProgressEvent: core.propNonEnumerable(event.ProgressEvent), ReadableStream: core.propNonEnumerable(streams.ReadableStream), ReadableStreamDefaultReader: core.propNonEnumerable( streams.ReadableStreamDefaultReader, ), Request: core.propNonEnumerable(request.Request), Response: core.propNonEnumerable(response.Response), TextDecoder: core.propNonEnumerable(encoding.TextDecoder), TextEncoder: core.propNonEnumerable(encoding.TextEncoder), TextDecoderStream: core.propNonEnumerable(encoding.TextDecoderStream), TextEncoderStream: core.propNonEnumerable(encoding.TextEncoderStream), TransformStream: core.propNonEnumerable(streams.TransformStream), URL: core.propNonEnumerable(url.URL), URLPattern: core.propNonEnumerable(urlPattern.URLPattern), URLSearchParams: core.propNonEnumerable(url.URLSearchParams), WebSocket: core.propNonEnumerable(webSocket.WebSocket), MessageChannel: core.propNonEnumerable(messagePort.MessageChannel), MessagePort: core.propNonEnumerable(messagePort.MessagePort), Worker: core.propNonEnumerable(worker.Worker), WritableStream: core.propNonEnumerable(streams.WritableStream), WritableStreamDefaultWriter: core.propNonEnumerable( streams.WritableStreamDefaultWriter, ), WritableStreamDefaultController: core.propNonEnumerable( streams.WritableStreamDefaultController, ), ReadableByteStreamController: core.propNonEnumerable( streams.ReadableByteStreamController, ), ReadableStreamBYOBReader: core.propNonEnumerable( streams.ReadableStreamBYOBReader, ), ReadableStreamBYOBRequest: core.propNonEnumerable( streams.ReadableStreamBYOBRequest, ), ReadableStreamDefaultController: core.propNonEnumerable( streams.ReadableStreamDefaultController, ), TransformStreamDefaultController: core.propNonEnumerable( streams.TransformStreamDefaultController, ), atob: core.propWritable(base64.atob), btoa: core.propWritable(base64.btoa), createImageBitmap: core.propWritableLazyLoaded( (image) => image.createImageBitmap, loadImage, ), clearInterval: core.propWritable(timers.clearInterval), clearTimeout: core.propWritable(timers.clearTimeout), caches: { enumerable: true, configurable: true, get: caches.cacheStorage, }, CacheStorage: core.propNonEnumerable(caches.CacheStorage), Cache: core.propNonEnumerable(caches.Cache), console: core.propNonEnumerable( new console.Console((msg, level) => core.print(msg, level > 1)), ), crypto: core.propReadOnly(crypto.crypto), Crypto: core.propNonEnumerable(crypto.Crypto), SubtleCrypto: core.propNonEnumerable(crypto.SubtleCrypto), fetch: core.propWritable(fetch.fetch), EventSource: core.propWritable(eventSource.EventSource), performance: core.propWritable(performance.performance), reportError: core.propWritable(event.reportError), setInterval: core.propWritable(timers.setInterval), setTimeout: core.propWritable(timers.setTimeout), structuredClone: core.propWritable(messagePort.structuredClone), // Branding as a WebIDL object [webidl.brand]: core.propNonEnumerable(webidl.brand), }; const unstableForWindowOrWorkerGlobalScope = {}; unstableForWindowOrWorkerGlobalScope[unstableIds.broadcastChannel] = { BroadcastChannel: core.propNonEnumerable(broadcastChannel.BroadcastChannel), }; unstableForWindowOrWorkerGlobalScope[unstableIds.net] = { WebSocketStream: core.propNonEnumerable(webSocketStream.WebSocketStream), }; // deno-fmt-ignore unstableForWindowOrWorkerGlobalScope[unstableIds.webgpu] = { GPU: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPU, loadWebGPU), GPUAdapter: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUAdapter, loadWebGPU), GPUAdapterInfo: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUAdapterInfo, loadWebGPU), GPUSupportedLimits: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUSupportedLimits, loadWebGPU), GPUSupportedFeatures: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUSupportedFeatures, loadWebGPU), GPUDeviceLostInfo: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUDeviceLostInfo, loadWebGPU), GPUDevice: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUDevice, loadWebGPU), GPUQueue: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUQueue, loadWebGPU), GPUBuffer: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUBuffer, loadWebGPU), GPUBufferUsage: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUBufferUsage, loadWebGPU), GPUMapMode: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUMapMode, loadWebGPU), GPUTextureUsage: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUTextureUsage, loadWebGPU), GPUTexture: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUTexture, loadWebGPU), GPUTextureView: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUTextureView, loadWebGPU), GPUSampler: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUSampler, loadWebGPU), GPUBindGroupLayout: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUBindGroupLayout, loadWebGPU), GPUPipelineLayout: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUPipelineLayout, loadWebGPU), GPUBindGroup: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUBindGroup, loadWebGPU), GPUShaderModule: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUShaderModule, loadWebGPU), GPUShaderStage: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUShaderStage, loadWebGPU), GPUComputePipeline: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUComputePipeline, loadWebGPU), GPURenderPipeline: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPURenderPipeline, loadWebGPU), GPUColorWrite: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUColorWrite, loadWebGPU), GPUCommandEncoder: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUCommandEncoder, loadWebGPU), GPURenderPassEncoder: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPURenderPassEncoder, loadWebGPU), GPUComputePassEncoder: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUComputePassEncoder, loadWebGPU), GPUCommandBuffer: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUCommandBuffer, loadWebGPU), GPURenderBundleEncoder: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPURenderBundleEncoder, loadWebGPU), GPURenderBundle: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPURenderBundle, loadWebGPU), GPUQuerySet: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUQuerySet, loadWebGPU), GPUError: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUError, loadWebGPU), GPUValidationError: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUValidationError, loadWebGPU), GPUOutOfMemoryError: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUOutOfMemoryError, loadWebGPU), GPUCanvasContext: core.propNonEnumerable(webgpuSurface.GPUCanvasContext), }; export { unstableForWindowOrWorkerGlobalScope, windowOrWorkerGlobalScope }; Qe0%ext:runtime/98_global_scope_shared.jsa bD`M`% T`LaRLba  $AbGCbCbC;CCbCb?CbCCBClCC"CCCC"CC"CCCCCBCbCCCXCOC>CQCeCBC"lCoCTCB C"CBCŒCCbCb2 C^C"TC"_CfCQCBCBZCb C"CCbCBCCC"wCyCCCBCCbCqCCCC"C"Cbb;bb?bBl"""# T  I`l IpSb1Ib*`L`! bS]`a]`]`]`]`,"]`i" ]`b ]`" ]`b6]`R" ]`&]`b ]`b,]`1"t]`j ]`j]`b]`'/]`u]`]`V]`0BW]`je]`B]`0]`b]`YB]`]`]`b]`QB]`]`] L`b` L`b7 ` L`7 |L`  DDc DDc DBDc DhDc& DDc\c DDc D Dc D6 Dc  DDc AL DDc  DDc  D Dc  DBDc $+ D,Dc]d D" Dc DbDc DDc! DBDc_o DDc DDc D.Dc#* DbKDc\d DbDc DDc DDc  DDcMS D-Dc DDc DDc{L` Dllc D  cUY D""c?I Dc ` a?la?"a?a?7 a?ba?UbKBbXO>QeB"loTB "BŒbb2 ^"T"_fQBBZb b"! T I`=I>UbKbB(bGGC"wy T  I`IbK Bbq""BbC% bBCBB!bD"CCCCCBCCbCCBCCB C CB!C!CB"C"C#C$C$C%C%CB&C&Cb'C(C(C")C)CB*C*C"+C+C"C T I`>TIbK" T I`IbK T I`IbK T I`X}IbK T I`IbK T I`1UIbK B T I`IbK  T I` IbK b T I`B ^ IbK  T I` IbK B T I` !IbK T I`_!!IbKB  T I`!!IbK  T I`"?"IbKB! T I`}""IbK! T I`"#IbKB" T I`J#n#IbK" T I`##IbK# T I`$2$IbK$ T I`t$$IbK$ T I`$%IbK% T I`E%i%IbK% T I`%%IbKB& T I`&3&IbK& T I`{&&IbKb' T I`&'IbK( T I`W'z'IbK( T I`''IbK") T I`0(R(IbK ) T I`((IbK!B* T I`()IbK"* T I`L)q)IbK#"+ T I`))IbK$+"  &U`D8h ei e e e e e e e e e e e e e e e e e e e e e e e e e e e e e h  ٩ ٫0-^~0-- ^ 3 0-- ^3 0-- ^3 0-- ^3 0-- ^!3 #0--%^'3)0--+^-3/0--1^3350--7^93;0--=^?3A0-0^C3E0--G^I3K0--M^O3Q0--S^U3W0--Y^[3]0--_^a3c0--e^g3i0--k^m3o0--q^s3u0-w؂_y3{0--}^30-- ^օ3 0--!^֋3!0--"^֑3"0--#^֗3#0--$^֝3$0--%^֣3%0--&^֩3&0--'^֯3'0--(^ֵ3(0--)^ֻ3)0--*^3*0--+^3+0--,^3,0---^3-0--.^3.0--/^3/0--0^300--1^310--2^320--3^330--4^340--5^350--6^ 36 0--7 ^370--8^380--9^390--:^!3:#0--;%^'3;)0--<+^-3</0--=1^33=50->7-?9^;3?=0->7-@?^A3@C0-AE؂B_G3CI0->7-DK^M3DO0->7-EQ^S3EU~FW)-GX3HZ 3I\0--J^^`3Jb0--Kd^f3Kh0--LjւM il^n3Np0-Or-Pt^v3Px0--Qz^|3Q~0--R^3R0->7-S^3S0->7-T^3T0->7-U^3U0->7-V^3V0->7-W^3W0->7-X^3X0->7-Y^3Y-Zt0--Z^7 1100[-\~])0--^^3^ 400-_~`)0--a^3a 400-b~c)0-wւd0e_3f0-wւg0_3h0-wւi0_3j0-wւk0_3l0-wւm0_3n0-wւo0_3p0-wւq 0_3r0-wւs 0_3t0-wւu 0_3v0-wւw 0_3x0-wւy 0_3z0-wւ{0_3|0-wւ}0_3~0-wւ0_30-wւ0_3 0-wւ0_ 3 0-wւ0_30-wւ0_30-wւ0_30-wւ0_30-wւ0_3!0-wւ0_#3%0-wւ0_'3)0-wւ0_+3-0-wւ0_/310-wւ0_3350-wւ0_7390-wւ0_;3=0-wւ0_?3A0-wւ 0_C3E0-wւ!0_G3I0-wւ"0_K3M0-wւ#0_O3Q0--S^U3W 4Y ګ>U[$0                                          ` @ @ @0P  `@ 8PUbA6UfVrVVVVVVVVVVVVVVVVVWWWW&W.W6W>WFWNWVW^WfWnWvW~WWD`RD]DH =!Q9! bB// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { op_node_build_os } from "ext:core/ops"; let os; const buildOs = op_node_build_os(); if (buildOs === "darwin") { os = { UV_UDP_REUSEADDR: 4, dlopen: { RTLD_LAZY: 1, RTLD_NOW: 2, RTLD_GLOBAL: 8, RTLD_LOCAL: 4 }, errno: { E2BIG: 7, EACCES: 13, EADDRINUSE: 48, EADDRNOTAVAIL: 49, EAFNOSUPPORT: 47, EAGAIN: 35, EALREADY: 37, EBADF: 9, EBADMSG: 94, EBUSY: 16, ECANCELED: 89, ECHILD: 10, ECONNABORTED: 53, ECONNREFUSED: 61, ECONNRESET: 54, EDEADLK: 11, EDESTADDRREQ: 39, EDOM: 33, EDQUOT: 69, EEXIST: 17, EFAULT: 14, EFBIG: 27, EHOSTUNREACH: 65, EIDRM: 90, EILSEQ: 92, EINPROGRESS: 36, EINTR: 4, EINVAL: 22, EIO: 5, EISCONN: 56, EISDIR: 21, ELOOP: 62, EMFILE: 24, EMLINK: 31, EMSGSIZE: 40, EMULTIHOP: 95, ENAMETOOLONG: 63, ENETDOWN: 50, ENETRESET: 52, ENETUNREACH: 51, ENFILE: 23, ENOBUFS: 55, ENODATA: 96, ENODEV: 19, ENOENT: 2, ENOEXEC: 8, ENOLCK: 77, ENOLINK: 97, ENOMEM: 12, ENOMSG: 91, ENOPROTOOPT: 42, ENOSPC: 28, ENOSR: 98, ENOSTR: 99, ENOSYS: 78, ENOTCONN: 57, ENOTDIR: 20, ENOTEMPTY: 66, ENOTSOCK: 38, ENOTSUP: 45, ENOTTY: 25, ENXIO: 6, EOPNOTSUPP: 102, EOVERFLOW: 84, EPERM: 1, EPIPE: 32, EPROTO: 100, EPROTONOSUPPORT: 43, EPROTOTYPE: 41, ERANGE: 34, EROFS: 30, ESPIPE: 29, ESRCH: 3, ESTALE: 70, ETIME: 101, ETIMEDOUT: 60, ETXTBSY: 26, EWOULDBLOCK: 35, EXDEV: 18 }, signals: { SIGHUP: 1, SIGINT: 2, SIGQUIT: 3, SIGILL: 4, SIGTRAP: 5, SIGABRT: 6, SIGIOT: 6, SIGBUS: 10, SIGFPE: 8, SIGKILL: 9, SIGUSR1: 30, SIGSEGV: 11, SIGUSR2: 31, SIGPIPE: 13, SIGALRM: 14, SIGTERM: 15, SIGCHLD: 20, SIGCONT: 19, SIGSTOP: 17, SIGTSTP: 18, SIGTTIN: 21, SIGTTOU: 22, SIGURG: 16, SIGXCPU: 24, SIGXFSZ: 25, SIGVTALRM: 26, SIGPROF: 27, SIGWINCH: 28, SIGIO: 23, SIGINFO: 29, SIGSYS: 12 }, priority: { PRIORITY_LOW: 19, PRIORITY_BELOW_NORMAL: 10, PRIORITY_NORMAL: 0, PRIORITY_ABOVE_NORMAL: -7, PRIORITY_HIGH: -14, PRIORITY_HIGHEST: -20 } }; } else if (buildOs === "linux" || buildOs === "android") { os = { UV_UDP_REUSEADDR: 4, dlopen: { RTLD_LAZY: 1, RTLD_NOW: 2, RTLD_GLOBAL: 256, RTLD_LOCAL: 0, RTLD_DEEPBIND: 8 }, errno: { E2BIG: 7, EACCES: 13, EADDRINUSE: 98, EADDRNOTAVAIL: 99, EAFNOSUPPORT: 97, EAGAIN: 11, EALREADY: 114, EBADF: 9, EBADMSG: 74, EBUSY: 16, ECANCELED: 125, ECHILD: 10, ECONNABORTED: 103, ECONNREFUSED: 111, ECONNRESET: 104, EDEADLK: 35, EDESTADDRREQ: 89, EDOM: 33, EDQUOT: 122, EEXIST: 17, EFAULT: 14, EFBIG: 27, EHOSTUNREACH: 113, EIDRM: 43, EILSEQ: 84, EINPROGRESS: 115, EINTR: 4, EINVAL: 22, EIO: 5, EISCONN: 106, EISDIR: 21, ELOOP: 40, EMFILE: 24, EMLINK: 31, EMSGSIZE: 90, EMULTIHOP: 72, ENAMETOOLONG: 36, ENETDOWN: 100, ENETRESET: 102, ENETUNREACH: 101, ENFILE: 23, ENOBUFS: 105, ENODATA: 61, ENODEV: 19, ENOENT: 2, ENOEXEC: 8, ENOLCK: 37, ENOLINK: 67, ENOMEM: 12, ENOMSG: 42, ENOPROTOOPT: 92, ENOSPC: 28, ENOSR: 63, ENOSTR: 60, ENOSYS: 38, ENOTCONN: 107, ENOTDIR: 20, ENOTEMPTY: 39, ENOTSOCK: 88, ENOTSUP: 95, ENOTTY: 25, ENXIO: 6, EOPNOTSUPP: 95, EOVERFLOW: 75, EPERM: 1, EPIPE: 32, EPROTO: 71, EPROTONOSUPPORT: 93, EPROTOTYPE: 91, ERANGE: 34, EROFS: 30, ESPIPE: 29, ESRCH: 3, ESTALE: 116, ETIME: 62, ETIMEDOUT: 110, ETXTBSY: 26, EWOULDBLOCK: 11, EXDEV: 18 }, signals: { SIGHUP: 1, SIGINT: 2, SIGQUIT: 3, SIGILL: 4, SIGTRAP: 5, SIGABRT: 6, SIGIOT: 6, SIGBUS: 7, SIGFPE: 8, SIGKILL: 9, SIGUSR1: 10, SIGSEGV: 11, SIGUSR2: 12, SIGPIPE: 13, SIGALRM: 14, SIGTERM: 15, SIGCHLD: 17, SIGSTKFLT: 16, SIGCONT: 18, SIGSTOP: 19, SIGTSTP: 20, SIGTTIN: 21, SIGTTOU: 22, SIGURG: 23, SIGXCPU: 24, SIGXFSZ: 25, SIGVTALRM: 26, SIGPROF: 27, SIGWINCH: 28, SIGIO: 29, SIGPOLL: 29, SIGPWR: 30, SIGSYS: 31, SIGUNUSED: 31 }, priority: { PRIORITY_LOW: 19, PRIORITY_BELOW_NORMAL: 10, PRIORITY_NORMAL: 0, PRIORITY_ABOVE_NORMAL: -7, PRIORITY_HIGH: -14, PRIORITY_HIGHEST: -20 } }; } else { os = { UV_UDP_REUSEADDR: 4, dlopen: {}, errno: { E2BIG: 7, EACCES: 13, EADDRINUSE: 100, EADDRNOTAVAIL: 101, EAFNOSUPPORT: 102, EAGAIN: 11, EALREADY: 103, EBADF: 9, EBADMSG: 104, EBUSY: 16, ECANCELED: 105, ECHILD: 10, ECONNABORTED: 106, ECONNREFUSED: 107, ECONNRESET: 108, EDEADLK: 36, EDESTADDRREQ: 109, EDOM: 33, EEXIST: 17, EFAULT: 14, EFBIG: 27, EHOSTUNREACH: 110, EIDRM: 111, EILSEQ: 42, EINPROGRESS: 112, EINTR: 4, EINVAL: 22, EIO: 5, EISCONN: 113, EISDIR: 21, ELOOP: 114, EMFILE: 24, EMLINK: 31, EMSGSIZE: 115, ENAMETOOLONG: 38, ENETDOWN: 116, ENETRESET: 117, ENETUNREACH: 118, ENFILE: 23, ENOBUFS: 119, ENODATA: 120, ENODEV: 19, ENOENT: 2, ENOEXEC: 8, ENOLCK: 39, ENOLINK: 121, ENOMEM: 12, ENOMSG: 122, ENOPROTOOPT: 123, ENOSPC: 28, ENOSR: 124, ENOSTR: 125, ENOSYS: 40, ENOTCONN: 126, ENOTDIR: 20, ENOTEMPTY: 41, ENOTSOCK: 128, ENOTSUP: 129, ENOTTY: 25, ENXIO: 6, EOPNOTSUPP: 130, EOVERFLOW: 132, EPERM: 1, EPIPE: 32, EPROTO: 134, EPROTONOSUPPORT: 135, EPROTOTYPE: 136, ERANGE: 34, EROFS: 30, ESPIPE: 29, ESRCH: 3, ETIME: 137, ETIMEDOUT: 138, ETXTBSY: 139, EWOULDBLOCK: 140, EXDEV: 18, WSAEINTR: 10004, WSAEBADF: 10009, WSAEACCES: 10013, WSAEFAULT: 10014, WSAEINVAL: 10022, WSAEMFILE: 10024, WSAEWOULDBLOCK: 10035, WSAEINPROGRESS: 10036, WSAEALREADY: 10037, WSAENOTSOCK: 10038, WSAEDESTADDRREQ: 10039, WSAEMSGSIZE: 10040, WSAEPROTOTYPE: 10041, WSAENOPROTOOPT: 10042, WSAEPROTONOSUPPORT: 10043, WSAESOCKTNOSUPPORT: 10044, WSAEOPNOTSUPP: 10045, WSAEPFNOSUPPORT: 10046, WSAEAFNOSUPPORT: 10047, WSAEADDRINUSE: 10048, WSAEADDRNOTAVAIL: 10049, WSAENETDOWN: 10050, WSAENETUNREACH: 10051, WSAENETRESET: 10052, WSAECONNABORTED: 10053, WSAECONNRESET: 10054, WSAENOBUFS: 10055, WSAEISCONN: 10056, WSAENOTCONN: 10057, WSAESHUTDOWN: 10058, WSAETOOMANYREFS: 10059, WSAETIMEDOUT: 10060, WSAECONNREFUSED: 10061, WSAELOOP: 10062, WSAENAMETOOLONG: 10063, WSAEHOSTDOWN: 10064, WSAEHOSTUNREACH: 10065, WSAENOTEMPTY: 10066, WSAEPROCLIM: 10067, WSAEUSERS: 10068, WSAEDQUOT: 10069, WSAESTALE: 10070, WSAEREMOTE: 10071, WSASYSNOTREADY: 10091, WSAVERNOTSUPPORTED: 10092, WSANOTINITIALISED: 10093, WSAEDISCON: 10101, WSAENOMORE: 10102, WSAECANCELLED: 10103, WSAEINVALIDPROCTABLE: 10104, WSAEINVALIDPROVIDER: 10105, WSAEPROVIDERFAILEDINIT: 10106, WSASYSCALLFAILURE: 10107, WSASERVICE_NOT_FOUND: 10108, WSATYPE_NOT_FOUND: 10109, WSA_E_NO_MORE: 10110, WSA_E_CANCELLED: 10111, WSAEREFUSED: 10112 }, signals: { SIGHUP: 1, SIGINT: 2, SIGILL: 4, SIGABRT: 22, SIGFPE: 8, SIGKILL: 9, SIGSEGV: 11, SIGTERM: 15, SIGBREAK: 21, SIGWINCH: 28 }, priority: { PRIORITY_LOW: 19, PRIORITY_BELOW_NORMAL: 10, PRIORITY_NORMAL: 0, PRIORITY_ABOVE_NORMAL: -7, PRIORITY_HIGH: -14, PRIORITY_HIGHEST: -20 } }; } export { os }; export const fs = { UV_FS_SYMLINK_DIR: 1, UV_FS_SYMLINK_JUNCTION: 2, O_RDONLY: 0, O_WRONLY: 1, O_RDWR: 2, UV_DIRENT_UNKNOWN: 0, UV_DIRENT_FILE: 1, UV_DIRENT_DIR: 2, UV_DIRENT_LINK: 3, UV_DIRENT_FIFO: 4, UV_DIRENT_SOCKET: 5, UV_DIRENT_CHAR: 6, UV_DIRENT_BLOCK: 7, S_IFMT: 61440, S_IFREG: 32768, S_IFDIR: 16384, S_IFCHR: 8192, S_IFBLK: 24576, S_IFIFO: 4096, S_IFLNK: 40960, S_IFSOCK: 49152, O_CREAT: 512, O_EXCL: 2048, UV_FS_O_FILEMAP: 0, O_NOCTTY: 131072, O_TRUNC: 1024, O_APPEND: 8, O_DIRECTORY: 1048576, O_NOFOLLOW: 256, O_SYNC: 128, O_DSYNC: 4194304, O_SYMLINK: 2097152, O_NONBLOCK: 4, S_IRWXU: 448, S_IRUSR: 256, S_IWUSR: 128, S_IXUSR: 64, S_IRWXG: 56, S_IRGRP: 32, S_IWGRP: 16, S_IXGRP: 8, S_IRWXO: 7, S_IROTH: 4, S_IWOTH: 2, S_IXOTH: 1, F_OK: 0, R_OK: 4, W_OK: 2, X_OK: 1, UV_FS_COPYFILE_EXCL: 1, COPYFILE_EXCL: 1, UV_FS_COPYFILE_FICLONE: 2, COPYFILE_FICLONE: 2, UV_FS_COPYFILE_FICLONE_FORCE: 4, COPYFILE_FICLONE_FORCE: 4 }; export const crypto = { OPENSSL_VERSION_NUMBER: 269488319, SSL_OP_ALL: 2147485780, SSL_OP_ALLOW_NO_DHE_KEX: 1024, SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: 262144, SSL_OP_CIPHER_SERVER_PREFERENCE: 4194304, SSL_OP_CISCO_ANYCONNECT: 32768, SSL_OP_COOKIE_EXCHANGE: 8192, SSL_OP_CRYPTOPRO_TLSEXT_BUG: 2147483648, SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: 2048, SSL_OP_EPHEMERAL_RSA: 0, SSL_OP_LEGACY_SERVER_CONNECT: 4, SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: 0, SSL_OP_MICROSOFT_SESS_ID_BUG: 0, SSL_OP_MSIE_SSLV2_RSA_PADDING: 0, SSL_OP_NETSCAPE_CA_DN_BUG: 0, SSL_OP_NETSCAPE_CHALLENGE_BUG: 0, SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: 0, SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: 0, SSL_OP_NO_COMPRESSION: 131072, SSL_OP_NO_ENCRYPT_THEN_MAC: 524288, SSL_OP_NO_QUERY_MTU: 4096, SSL_OP_NO_RENEGOTIATION: 1073741824, SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: 65536, SSL_OP_NO_SSLv2: 0, SSL_OP_NO_SSLv3: 33554432, SSL_OP_NO_TICKET: 16384, SSL_OP_NO_TLSv1: 67108864, SSL_OP_NO_TLSv1_1: 268435456, SSL_OP_NO_TLSv1_2: 134217728, SSL_OP_NO_TLSv1_3: 536870912, SSL_OP_PKCS1_CHECK_1: 0, SSL_OP_PKCS1_CHECK_2: 0, SSL_OP_PRIORITIZE_CHACHA: 2097152, SSL_OP_SINGLE_DH_USE: 0, SSL_OP_SINGLE_ECDH_USE: 0, SSL_OP_SSLEAY_080_CLIENT_DH_BUG: 0, SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: 0, SSL_OP_TLS_BLOCK_PADDING_BUG: 0, SSL_OP_TLS_D5_BUG: 0, SSL_OP_TLS_ROLLBACK_BUG: 8388608, ENGINE_METHOD_RSA: 1, ENGINE_METHOD_DSA: 2, ENGINE_METHOD_DH: 4, ENGINE_METHOD_RAND: 8, ENGINE_METHOD_EC: 2048, ENGINE_METHOD_CIPHERS: 64, ENGINE_METHOD_DIGESTS: 128, ENGINE_METHOD_PKEY_METHS: 512, ENGINE_METHOD_PKEY_ASN1_METHS: 1024, ENGINE_METHOD_ALL: 65535, ENGINE_METHOD_NONE: 0, DH_CHECK_P_NOT_SAFE_PRIME: 2, DH_CHECK_P_NOT_PRIME: 1, DH_UNABLE_TO_CHECK_GENERATOR: 4, DH_NOT_SUITABLE_GENERATOR: 8, ALPN_ENABLED: 1, RSA_PKCS1_PADDING: 1, RSA_SSLV23_PADDING: 2, RSA_NO_PADDING: 3, RSA_PKCS1_OAEP_PADDING: 4, RSA_X931_PADDING: 5, RSA_PKCS1_PSS_PADDING: 6, RSA_PSS_SALTLEN_DIGEST: -1, RSA_PSS_SALTLEN_MAX_SIGN: -2, RSA_PSS_SALTLEN_AUTO: -2, defaultCoreCipherList: "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA", TLS1_VERSION: 769, TLS1_1_VERSION: 770, TLS1_2_VERSION: 771, TLS1_3_VERSION: 772, POINT_CONVERSION_COMPRESSED: 2, POINT_CONVERSION_UNCOMPRESSED: 4, POINT_CONVERSION_HYBRID: 6 }; export const zlib = { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, ZLIB_VERNUM: 4784, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: Infinity, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_PARAM_MODE: 0, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_PARAM_LGWIN: 2, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_PARAM_LGBLOCK: 3, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 }; export const trace = { TRACE_EVENT_PHASE_BEGIN: 66, TRACE_EVENT_PHASE_END: 69, TRACE_EVENT_PHASE_COMPLETE: 88, TRACE_EVENT_PHASE_INSTANT: 73, TRACE_EVENT_PHASE_ASYNC_BEGIN: 83, TRACE_EVENT_PHASE_ASYNC_STEP_INTO: 84, TRACE_EVENT_PHASE_ASYNC_STEP_PAST: 112, TRACE_EVENT_PHASE_ASYNC_END: 70, TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN: 98, TRACE_EVENT_PHASE_NESTABLE_ASYNC_END: 101, TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT: 110, TRACE_EVENT_PHASE_FLOW_BEGIN: 115, TRACE_EVENT_PHASE_FLOW_STEP: 116, TRACE_EVENT_PHASE_FLOW_END: 102, TRACE_EVENT_PHASE_METADATA: 77, TRACE_EVENT_PHASE_COUNTER: 67, TRACE_EVENT_PHASE_SAMPLE: 80, TRACE_EVENT_PHASE_CREATE_OBJECT: 78, TRACE_EVENT_PHASE_SNAPSHOT_OBJECT: 79, TRACE_EVENT_PHASE_DELETE_OBJECT: 68, TRACE_EVENT_PHASE_MEMORY_DUMP: 118, TRACE_EVENT_PHASE_MARK: 82, TRACE_EVENT_PHASE_CLOCK_SYNC: 99, TRACE_EVENT_PHASE_ENTER_CONTEXT: 40, TRACE_EVENT_PHASE_LEAVE_CONTEXT: 41, TRACE_EVENT_PHASE_LINK_IDS: 61 };  Qf6+ext:deno_node/internal_binding/constants.tsa bD` M` Tp`LLa!Lea  ,8b " `+0bbJ `bK `I `J `b: bOK `"L ` L `0M `1M `/N `#bN `%N ` "O `^O `O `YbP ` P `5BQ `=Q `6BR ` R `'"S `!S `ES `BT `T `U `AU `ZU `\BV `$V `"W `W `W `8BX `X `>Y `bY `Y `("Z `_Z `?"[ `2[ `4\ `3\ `\ `7B] ``] `^ `b^ `^ `M"_ `a_ ` _ `[B` `*` `"a `ba `ca `NBb `9b `c `Bc `&c `-Bd `d `e `fe `Tf `bf ` f `d"g `+g `)"h `"h `h `Bi `i `Fj `ebj `<j `Bk `#k ` b>q `br `bu `r `w `bo `"s `"p ` Bq `s ` "z `u ` z `s ` o `bw `p `p `v `"x `x `x `y `{ `"| `z `t `b{ `r `"-`w ` : @b bn `l ` n `"l `bm `m `--8b " `+8b bJ `bK `I `J `bI `b: bOK `"L ` L `bM `cM `aN ` bN `rN ` "O `JO `O `}bP ` P `gBQ `oQ `hBR `#R `Y"S `!S `zS `BT `T `U `qU `+U `TBV `sV `"W `W `W `jBX `X `(Y `bY `Y `Z"Z `HZ `$"[ `d[ `f\ `e\ `\ `iB] `=] `^ `b^ `^ `%"_ `C_ ` _ `*B` `\` `"a `?a `<a `&Bb `kb `c `'c `Xc `_Bd `d `e `_e `Kf `bf ` f `G"g `]g `["h `"h `h `Bi `i `tj `>bj `nj `Bk ` k `!bD"q `br `bu `r `w `bo `"s `"p `Bq `s ` "z ` u ` z ` s ` o `bw `p `"v `p `v `"x `x `x `y `{ `"| `z `t `b{ `r `Bt `u `w `By `: @b bn `l ` n `"l `bm `m `8b " `+bb: Ab K `"L ` L `dM `eM `fN ` bN `gN ` "O `hO `O `ibP ` P `jBQ `kQ `lBR `$R `m"S `!S `BT `T `U `nU `oU `*BV `pV `"W `W `W `qBX `X `rY `bY `Y `sZ `&"[ `t[ `u\ `v\ `\ `wB] `x] `^ `b^ `^ `'"_ `y_ ` _ `zB` `{` `"a `|a `}a `(Bb `~b `c `)c `c `Bd `d `e `e `f `bf ` f `"g `g `"h `"h `h `Bi `j `bj `j `Bk `k `B.`'.`'/`'/`'0`&'0`('1`3'1`4'2`5'2`6'3`7'3`8'4`9'4`:'5`;'5`<'B6`='6`>'B7`?'7`@'B8`A'8`B'B9`C'9`D'B:`E':`F'B;`G';`H'B<`I'<`J'B=`K'=`L'B>`M'>`N'"?`O'?`P'"@`Q'@`R'"A`S'A`T'"B`U'B`V'"C`W'C`k'"D`l'D`m'bE`u'E`v'bF`w'F`x'G`y'"H`z'H`{'bI`|'J`}'J`~'"K`'K`'`b q `br `r `bo `Bq `s ` u ` bw `"L`b{ `: @b bn `l ` n `"l `bm `m `bn7v`w`< `= `b= `"x`x`By`y`Bz`z`B{`{`u`"v`t`@Bt` s``u`bu`v`A `B `L`= `"> `> `> `b? `? `B@ `@@ ` "A `M`bB `B `"C `@bM`8C ` C `BD `M`D `E `bE `"; `; `; `B< `bG `E `H `BF `H `F `YbI"N`NY` ABO`O`P`@Q`"R` RY`AS`bT`U`U`V`bW`"X`X`Y`Z`b[`\`\`b]`@^`_`_```@``a`a`Bb` b`c`"d` d`be`f`f`g`bh`i`i`Bj`j`bk`l`l`@"m`m`bn`"o`o`bp`"q`q`r`Bs`s`bt`u`u`"v`v`Bw`w`x`"yy`````B``ibk`"``"```b`‡`B`ˆ`"``"``"``"`` B``b``B``B``"```B`’`B``"` `"``B`@–CB`@—`B` ˜`b`` b```"`œ``"`ž`B`Ÿ`b``` B` `` "`¤``"`¦``B`B```B```b`B`"`B`"`±`b`"```µ`````````¾```b`B`"``````b`B`B`–b4`B`EB`X`I`S`Tb`pB`F`b`e`n`sb`t"`f`M`Cb`P`N`O`Db`v"`R`c`(B`)`=  W`Du(h ei h  10am ~1Č"m m ~ 1Č ~ 1~ )1~ )1~ )! 3 1~)1 pSb1IbbB` L` B]`l]DL`` L`` L`` L`b` L`b> ` L`> ] L`  D  cTd` a?a?a?a?> a?ba?b#s9 WbAD`RD]DH Q;H// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { getOptions } from "ext:deno_node/internal_binding/node_options.ts"; let optionsMap; function getOptionsFromBinding() { if (!optionsMap) { ({ options: optionsMap } = getOptions()); } return optionsMap; } export function getOptionValue(optionName) { const options = getOptionsFromBinding(); if (optionName.startsWith("--no-")) { const option = options.get("--" + optionName.slice(5)); return option && !option.value; } return options.get(optionName)?.value; } Qe֚!ext:deno_node/internal/options.tsa bD`M` TD`FLa* T0`L`b‡/  bX`De0a-%(SbqA`DaPSb1ba??Ib` L` ]`B]L`"~ ` L`"~ ] L`  D‡‡c0:`‡a?"~ a? aBXb@L` TL`R L`BSb'9  X`Dl@a-^)-- ^ 8^ ř-T-^Ġ-(SbqA"~ `Da#rXb@BXb@aa  VX`Dj h %%ei h  % `bA^XXD`RD]DH QKD// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. import { notImplemented } from "ext:deno_node/_utils.ts"; export { timingSafeEqual } from "ext:deno_node/internal_binding/_timingSafeEqual.ts"; export function getFipsCrypto() { notImplemented("crypto.getFipsCrypto"); } export function setFipsCrypto(_fips) { notImplemented("crypto.setFipsCrypto"); } QeK(ext:deno_node/internal_binding/crypto.tsa bD`M` T@`:La! L` T  I`N~ LSb1Ib`L`  ]`]` L`   D c L` ` L`  ` L` ] L` Db b c`b a? a? a?Xb@a T I` Xb@aa   X`Di h ei h   `bAXYD`RD]DH Q"bX)// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { op_node_unstable_net_listen_udp, op_node_unstable_net_listen_unixpacket } from "ext:core/ops"; import { AsyncWrap, providerType } from "ext:deno_node/internal_binding/async_wrap.ts"; import { HandleWrap } from "ext:deno_node/internal_binding/handle_wrap.ts"; import { ownerSymbol } from "ext:deno_node/internal_binding/symbols.ts"; import { codeMap, errorMap } from "ext:deno_node/internal_binding/uv.ts"; import { notImplemented } from "ext:deno_node/_utils.ts"; import { Buffer } from "node:buffer"; import { isIP } from "ext:deno_node/internal/net.ts"; import * as net from "ext:deno_net/01_net.js"; import { isLinux, isWindows } from "ext:deno_node/_util/os.ts"; const DenoListenDatagram = net.createListenDatagram(op_node_unstable_net_listen_udp, op_node_unstable_net_listen_unixpacket); const AF_INET = 2; const AF_INET6 = 10; const UDP_DGRAM_MAXSIZE = 64 * 1024; export class SendWrap extends AsyncWrap { list; address; port; callback; oncomplete; constructor(){ super(providerType.UDPSENDWRAP); } } export class UDP extends HandleWrap { [ownerSymbol] = null; #address; #family; #port; #remoteAddress; #remoteFamily; #remotePort; #listener; #receiving = false; #unrefed = false; #recvBufferSize = UDP_DGRAM_MAXSIZE; #sendBufferSize = UDP_DGRAM_MAXSIZE; onmessage; lookup; constructor(){ super(providerType.UDPWRAP); } addMembership(_multicastAddress, _interfaceAddress) { notImplemented("udp.UDP.prototype.addMembership"); } addSourceSpecificMembership(_sourceAddress, _groupAddress, _interfaceAddress) { notImplemented("udp.UDP.prototype.addSourceSpecificMembership"); } /** * Bind to an IPv4 address. * @param ip The hostname to bind to. * @param port The port to bind to * @return An error status code. */ bind(ip, port, flags) { return this.#doBind(ip, port, flags, AF_INET); } /** * Bind to an IPv6 address. * @param ip The hostname to bind to. * @param port The port to bind to * @return An error status code. */ bind6(ip, port, flags) { return this.#doBind(ip, port, flags, AF_INET6); } bufferSize(size, buffer, ctx) { let err; if (size > UDP_DGRAM_MAXSIZE) { err = "EINVAL"; } else if (!this.#address) { err = isWindows ? "ENOTSOCK" : "EBADF"; } if (err) { ctx.errno = codeMap.get(err); ctx.code = err; ctx.message = errorMap.get(ctx.errno)[1]; ctx.syscall = buffer ? "uv_recv_buffer_size" : "uv_send_buffer_size"; return; } if (size !== 0) { size = isLinux ? size * 2 : size; if (buffer) { return this.#recvBufferSize = size; } return this.#sendBufferSize = size; } return buffer ? this.#recvBufferSize : this.#sendBufferSize; } connect(ip, port) { return this.#doConnect(ip, port, AF_INET); } connect6(ip, port) { return this.#doConnect(ip, port, AF_INET6); } disconnect() { this.#remoteAddress = undefined; this.#remotePort = undefined; this.#remoteFamily = undefined; return 0; } dropMembership(_multicastAddress, _interfaceAddress) { notImplemented("udp.UDP.prototype.dropMembership"); } dropSourceSpecificMembership(_sourceAddress, _groupAddress, _interfaceAddress) { notImplemented("udp.UDP.prototype.dropSourceSpecificMembership"); } /** * Populates the provided object with remote address entries. * @param peername An object to add the remote address entries to. * @return An error status code. */ getpeername(peername) { if (this.#remoteAddress === undefined) { return codeMap.get("EBADF"); } peername.address = this.#remoteAddress; peername.port = this.#remotePort; peername.family = this.#remoteFamily; return 0; } /** * Populates the provided object with local address entries. * @param sockname An object to add the local address entries to. * @return An error status code. */ getsockname(sockname) { if (this.#address === undefined) { return codeMap.get("EBADF"); } sockname.address = this.#address; sockname.port = this.#port; sockname.family = this.#family; return 0; } /** * Opens a file descriptor. * @param fd The file descriptor to open. * @return An error status code. */ open(_fd) { // REF: https://github.com/denoland/deno/issues/6529 notImplemented("udp.UDP.prototype.open"); } /** * Start receiving on the connection. * @return An error status code. */ recvStart() { if (!this.#receiving) { this.#receiving = true; this.#receive(); } return 0; } /** * Stop receiving on the connection. * @return An error status code. */ recvStop() { this.#receiving = false; return 0; } ref() { this.#listener?.ref(); this.#unrefed = false; } send(req, bufs, count, ...args) { return this.#doSend(req, bufs, count, args, AF_INET); } send6(req, bufs, count, ...args) { return this.#doSend(req, bufs, count, args, AF_INET6); } setBroadcast(_bool) { notImplemented("udp.UDP.prototype.setBroadcast"); } setMulticastInterface(_interfaceAddress) { notImplemented("udp.UDP.prototype.setMulticastInterface"); } setMulticastLoopback(_bool) { notImplemented("udp.UDP.prototype.setMulticastLoopback"); } setMulticastTTL(_ttl) { notImplemented("udp.UDP.prototype.setMulticastTTL"); } setTTL(_ttl) { notImplemented("udp.UDP.prototype.setTTL"); } unref() { this.#listener?.unref(); this.#unrefed = true; } #doBind(ip, port, _flags, family) { // TODO(cmorten): use flags to inform socket reuse etc. const listenOptions = { port, hostname: ip, transport: "udp" }; let listener; try { listener = DenoListenDatagram(listenOptions); } catch (e) { if (e instanceof Deno.errors.AddrInUse) { return codeMap.get("EADDRINUSE"); } else if (e instanceof Deno.errors.AddrNotAvailable) { return codeMap.get("EADDRNOTAVAIL"); } else if (e instanceof Deno.errors.PermissionDenied) { throw e; } // TODO(cmorten): map errors to appropriate error codes. return codeMap.get("UNKNOWN"); } const address = listener.addr; this.#address = address.hostname; this.#port = address.port; this.#family = family === AF_INET6 ? "IPv6" : "IPv4"; this.#listener = listener; return 0; } #doConnect(ip, port, family) { this.#remoteAddress = ip; this.#remotePort = port; this.#remoteFamily = family === AF_INET6 ? "IPv6" : "IPv4"; return 0; } #doSend(req, bufs, _count, args, _family) { let hasCallback; if (args.length === 3) { this.#remotePort = args[0]; this.#remoteAddress = args[1]; hasCallback = args[2]; } else { hasCallback = args[0]; } const addr = { hostname: this.#remoteAddress, port: this.#remotePort, transport: "udp" }; // Deno.DatagramConn.prototype.send accepts only one Uint8Array const payload = new Uint8Array(Buffer.concat(bufs.map((buf)=>{ if (typeof buf === "string") { return Buffer.from(buf); } return Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); }))); (async ()=>{ let sent; let err = null; try { sent = await this.#listener.send(payload, addr); } catch (e) { // TODO(cmorten): map errors to appropriate error codes. if (e instanceof Deno.errors.BadResource) { err = codeMap.get("EBADF"); } else if (e instanceof Error && e.message.match(/os error (40|90|10040)/)) { err = codeMap.get("EMSGSIZE"); } else { err = codeMap.get("UNKNOWN"); } sent = 0; } if (hasCallback) { try { req.oncomplete(err, sent); } catch { // swallow callback errors } } })(); return 0; } async #receive() { if (!this.#receiving) { return; } const p = new Uint8Array(this.#recvBufferSize); let buf; let remoteAddr; let nread; if (this.#unrefed) { this.#listener.unref(); } try { [buf, remoteAddr] = await this.#listener.receive(p); nread = buf.length; } catch (e) { // TODO(cmorten): map errors to appropriate error codes. if (e instanceof Deno.errors.Interrupted || e instanceof Deno.errors.BadResource) { nread = 0; } else { nread = codeMap.get("UNKNOWN"); } buf = new Uint8Array(0); remoteAddr = null; } nread ??= 0; const rinfo = remoteAddr ? { address: remoteAddr.hostname, port: remoteAddr.port, family: isIP(remoteAddr.hostname) === 6 ? "IPv6" : "IPv4" } : undefined; try { this.onmessage(nread, this, Buffer.from(buf), rinfo); } catch { // swallow callback errors. } this.#receive(); } /** Handle socket closure. */ _onClose() { this.#receiving = false; this.#address = undefined; this.#port = undefined; this.#family = undefined; try { this.#listener.close(); } catch { // listener already closed } this.#listener = undefined; return 0; } }  Qf0*ext:deno_node/internal_binding/udp_wrap.tsa bD`M`$ T)`La;6Lba <    `T ``/ `/ `?  `  a0 D] ` aj]b T  I` . " Sb1b"c????IbX)`0L`  B]`b]`b]`a_]`O ]` ]`b]` ]`;>]`q" ]`] L`" ` L`"  ` L`  L`  D% Dchkaj baj  aj0 B aj  aj$ ajaj.Bvaj,b ajaj B'aj&bajaj( aj aj" aj aj* aj 'aj"aj] B¯ b T  I`X"Y"Yb T I`eb  T I`J$Bb T I`[$$("bQ! T I`j  b Ճ  T I`   b  T I`#  b T I`? b T I`) t b T I` " b  T I`O>b  T I`Zbb  T I`( b   T I`9B b  T I`: b  T I`b  T I`b  T I`pBvb T I`>b b  T I`b T I`B'b T I`vbb T I`~b T I`, b  T I`D b T I`" b T I`U b T I`^ b T I`'b T I`M(U)"b" T``L`"b»   Z`Ke$JP 0,$HD<hPlT 4 q555555 5  5 5 5 5 533(Sbqq `DaU W)c 4 4 4 4 0b#  6Y`Dh %%%%ei e h  -00_% % % %0 e+ 2  1 %e%e%e%e%e%e%e%e% e% e% e% e% %%%%0 0 t%!"# $ % & ' ()*+,-./012߂3ނ4݂5܂6ۂ7ڂ8ق9e+: 2  1 ZY a! bARYY*Z2Z:ZBZJZRZZZbZjZrZzZZZZZZZZZZZZZZZ ZZZD"ZZZD`RD]DH QF// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // This module ports: // - https://github.com/nodejs/node/blob/master/src/util-inl.h // - https://github.com/nodejs/node/blob/master/src/util.cc // - https://github.com/nodejs/node/blob/master/src/util.h // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { op_node_guess_handle_type } from "ext:core/ops"; const handleTypes = [ "TCP", "TTY", "UDP", "FILE", "PIPE", "UNKNOWN" ]; export function guessHandleType(fd) { const type = op_node_guess_handle_type(fd); return handleTypes[type]; } export const ALL_PROPERTIES = 0; export const ONLY_WRITABLE = 1; export const ONLY_ENUMERABLE = 2; export const ONLY_CONFIGURABLE = 4; export const ONLY_ENUM_WRITABLE = 6; export const SKIP_STRINGS = 8; export const SKIP_SYMBOLS = 16; /** * Efficiently determine whether the provided property key is numeric * (and thus could be an array indexer) or not. * * Always returns true for values of type `'number'`. * * Otherwise, only returns true for strings that consist only of positive integers. * * Results are cached. */ const isNumericLookup = {}; export function isArrayIndex(value) { switch(typeof value){ case "number": return value >= 0 && (value | 0) === value; case "string": { const result = isNumericLookup[value]; if (result !== void 0) { return result; } const length = value.length; if (length === 0) { return isNumericLookup[value] = false; } let ch = 0; let i = 0; for(; i < length; ++i){ ch = value.charCodeAt(i); if (i === 0 && ch === 0x30 && length > 1 /* must not start with 0 */ || ch < 0x30 /* 0 */ || ch > 0x39 /* 9 */ ) { return isNumericLookup[value] = false; } } return isNumericLookup[value] = true; } default: return false; } } export function getOwnNonIndexProperties(obj, filter) { let allProperties = [ ...Object.getOwnPropertyNames(obj), ...Object.getOwnPropertySymbols(obj) ]; if (Array.isArray(obj)) { allProperties = allProperties.filter((k)=>!isArrayIndex(k)); } if (filter === ALL_PROPERTIES) { return allProperties; } const result = []; for (const key of allProperties){ const desc = Object.getOwnPropertyDescriptor(obj, key); if (desc === undefined) { continue; } if (filter & ONLY_WRITABLE && !desc.writable) { continue; } if (filter & ONLY_ENUMERABLE && !desc.enumerable) { continue; } if (filter & ONLY_CONFIGURABLE && !desc.configurable) { continue; } if (filter & SKIP_STRINGS && typeof key === "string") { continue; } if (filter & SKIP_SYMBOLS && typeof key === "symbol") { continue; } result.push(key); } return result; } QeIb&ext:deno_node/internal_binding/util.tsa bD`M` TX`kLa'HL` T  I`b Sb1"a??Ib` L` B]`]L`b` L`bb` L`bq` L`q` L`` L`` L`Br` L`Br"q` L`"qb `  L`b `  L`] L`  D  c` a?b a ?ba?a?qa?ba?a?a?Bra?a ?"qa?[b@ h  T I`> > F[b@ a  T I`g "qb!@ aa   ` M`b^ B "    2[`Do h %%ei h  {%% 1 1 1 1 1 1 1%  abA >[[[DD`RD]DH QvQ-|// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { core } from "ext:core/mod.js"; import { validateFunction } from "ext:deno_node/internal/validators.mjs"; import { _exiting } from "ext:deno_node/_process/exiting.ts"; import { FixedQueue } from "ext:deno_node/internal/fixed_queue.ts"; let nextTickEnabled = false; export function enableNextTick() { nextTickEnabled = true; } const queue = new FixedQueue(); export function processTicksAndRejections() { let tock; do { // deno-lint-ignore no-cond-assign while(tock = queue.shift()){ // FIXME(bartlomieju): Deno currently doesn't support async hooks // const asyncId = tock[async_id_symbol]; // emitBefore(asyncId, tock[trigger_async_id_symbol], tock); try { const callback = tock.callback; if (tock.args === undefined) { callback(); } else { const args = tock.args; switch(args.length){ case 1: callback(args[0]); break; case 2: callback(args[0], args[1]); break; case 3: callback(args[0], args[1], args[2]); break; case 4: callback(args[0], args[1], args[2], args[3]); break; default: callback(...args); } } } finally{ // FIXME(bartlomieju): Deno currently doesn't support async hooks // if (destroyHooksExist()) // emitDestroy(asyncId); } // FIXME(bartlomieju): Deno currently doesn't support async hooks // emitAfter(asyncId); } core.runMicrotasks(); // FIXME(bartlomieju): Deno currently doesn't unhandled rejections // } while (!queue.isEmpty() || processPromiseRejections()); }while (!queue.isEmpty()) core.setHasTickScheduled(false); // FIXME(bartlomieju): Deno currently doesn't unhandled rejections // setHasRejectionToWarn(false); } export function runNextTicks() { // FIXME(bartlomieju): Deno currently doesn't unhandled rejections // if (!hasTickScheduled() && !hasRejectionToWarn()) // runMicrotasks(); // if (!hasTickScheduled() && !hasRejectionToWarn()) // return; if (!core.hasTickScheduled()) { core.runMicrotasks(); return true; } processTicksAndRejections(); return true; } export function nextTick(callback, ...args) { // If we're snapshotting we don't want to push nextTick to be run. We'll // enable next ticks in "__bootstrapNodeProcess()"; if (!nextTickEnabled) { return; } validateFunction(callback, "callback"); if (_exiting) { return; } // TODO(bartlomieju): seems superfluous if we don't depend on `arguments` let args_; switch(args.length){ case 0: break; case 1: args_ = [ args[0] ]; break; case 2: args_ = [ args[0], args[1] ]; break; case 3: args_ = [ args[0], args[1], args[2] ]; break; default: args_ = new Array(args.length); for(let i = 0; i < args.length; i++){ args_[i] = args[i]; } } if (queue.isEmpty()) { core.setHasTickScheduled(true); } // FIXME(bartlomieju): Deno currently doesn't support async hooks // const asyncId = newAsyncId(); // const triggerAsyncId = getDefaultTriggerAsyncId(); const tickObject = { // FIXME(bartlomieju): Deno currently doesn't support async hooks // [async_id_symbol]: asyncId, // [trigger_async_id_symbol]: triggerAsyncId, callback, args: args_ }; // FIXME(bartlomieju): Deno currently doesn't support async hooks // if (initHooksExist()) // emitInit(asyncId, 'TickObject', triggerAsyncId, tickObject); queue.push(tickObject); } Qdext:deno_node/_next_tick.tsa bD`M` TH`PLa'8L`  T  I` @ESb1"a??Ib|`L` bS]`" ]`:B]`|"]`]8L` E` L`E± ` L`± bF` L`bF"G` L`"G]L`  Dc DBBclt D  c D  c"2` a? a?Ba?a?Ea?bFa?"Ga?± a?[b@a T I`]bF[b"@a T I`z "Gb@a T`&HL` B  ` La `Lb `Lc"B B+ bCC8  *\`DH0c0- m m m# m>j{% /6 { % / 6  /6  ^{% /6  /6  /6 0!- i -n /4! P#$ - %]'0 - )^+~ -) 3. 30-2^4(Sbq@± `Da {e6'<0&<@  @[b@aa  [`Dk h %%ei h  %0i% [ abA[\\&\D`RD]DH Qfލ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { Buffer } from "node:buffer"; import { uvException } from "ext:deno_node/internal/errors.ts"; import { writeBuffer } from "ext:deno_node/internal_binding/node_file.ts"; // IPv4 Segment const v4Seg = "(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])"; const v4Str = `(${v4Seg}[.]){3}${v4Seg}`; const IPv4Reg = new RegExp(`^${v4Str}$`); // IPv6 Segment const v6Seg = "(?:[0-9a-fA-F]{1,4})"; const IPv6Reg = new RegExp("^(" + `(?:${v6Seg}:){7}(?:${v6Seg}|:)|` + `(?:${v6Seg}:){6}(?:${v4Str}|:${v6Seg}|:)|` + `(?:${v6Seg}:){5}(?::${v4Str}|(:${v6Seg}){1,2}|:)|` + `(?:${v6Seg}:){4}(?:(:${v6Seg}){0,1}:${v4Str}|(:${v6Seg}){1,3}|:)|` + `(?:${v6Seg}:){3}(?:(:${v6Seg}){0,2}:${v4Str}|(:${v6Seg}){1,4}|:)|` + `(?:${v6Seg}:){2}(?:(:${v6Seg}){0,3}:${v4Str}|(:${v6Seg}){1,5}|:)|` + `(?:${v6Seg}:){1}(?:(:${v6Seg}){0,4}:${v4Str}|(:${v6Seg}){1,6}|:)|` + `(?::((?::${v6Seg}){0,5}:${v4Str}|(?::${v6Seg}){1,7}|:))` + ")(%[0-9a-zA-Z-.:]{1,})?$"); export function isIPv4(ip) { return RegExp.prototype.test.call(IPv4Reg, ip); } export function isIPv6(ip) { return RegExp.prototype.test.call(IPv6Reg, ip); } export function isIP(ip) { if (isIPv4(ip)) { return 4; } if (isIPv6(ip)) { return 6; } return 0; } export function makeSyncWrite(fd) { return function(// deno-lint-ignore no-explicit-any chunk, enc, cb) { if (enc !== "buffer") { chunk = Buffer.from(chunk, enc); } this._handle.bytesWritten += chunk.length; const ctx = {}; writeBuffer(fd, chunk, 0, chunk.length, null, ctx); if (ctx.errno !== undefined) { const ex = uvException(ctx); ex.errno = ctx.errno; return cb(ex); } cb(); }; } export const normalizedArgsSymbol = Symbol("normalizedArgs"); Qd2Jext:deno_node/internal/net.tsa bD` M` T9`-La'' ]`iB]`]DL`" ` L`" ` L`b` L`b` L`` L`]L`  D"{ "{ c06 Db b cVa Dc`"{ a?b a?a?a?ba?" a?a?a?b\b@a T I`: t b\b@a T I` " b @a T I` b @b@ba b"Q&BBb"bbB  "  "     b  B" B  v\`D!@h %%ei h   x88 x8! x8 8 i% !  x8 8 x888 x88 x88 x888  x8 8 x8 8 x8 8 8  x8 8 x8 8 x8 8 x8 8 8  x88 x88 x88 x888 x88 x88 x88 x888 x88 x88 x88 x888 x8!8 x8"8 x8#88$8 i%!%&b1 cHB!B!B b\bA\\\\DD`RD]DH )Q%9"// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { getOptionValue } from "ext:deno_node/internal/options.ts"; import { emitWarning } from "node:process"; import { AI_ADDRCONFIG, AI_ALL, AI_V4MAPPED } from "ext:deno_node/internal_binding/ares.ts"; import { ChannelWrap, strerror } from "ext:deno_node/internal_binding/cares_wrap.ts"; import { ERR_DNS_SET_SERVERS_FAILED, ERR_INVALID_ARG_VALUE, ERR_INVALID_IP_ADDRESS } from "ext:deno_node/internal/errors.ts"; import { validateArray, validateInt32, validateOneOf, validateString } from "ext:deno_node/internal/validators.mjs"; import { isIP } from "ext:deno_node/internal/net.ts"; export function isLookupOptions(options) { return typeof options === "object" || typeof options === "undefined"; } export function isLookupCallback(options) { return typeof options === "function"; } export function isFamily(options) { return typeof options === "number"; } export function isResolveCallback(callback) { return typeof callback === "function"; } const IANA_DNS_PORT = 53; const IPv6RE = /^\[([^[\]]*)\]/; const addrSplitRE = /(^.+?)(?::(\d+))?$/; export function validateTimeout(options) { const { timeout = -1 } = { ...options }; validateInt32(timeout, "options.timeout", -1, 2 ** 31 - 1); return timeout; } export function validateTries(options) { const { tries = 4 } = { ...options }; validateInt32(tries, "options.tries", 1, 2 ** 31 - 1); return tries; } /** * An independent resolver for DNS requests. * * Creating a new resolver uses the default server settings. Setting * the servers used for a resolver using `resolver.setServers()` does not affect * other resolvers: * * ```js * const { Resolver } = require('dns'); * const resolver = new Resolver(); * resolver.setServers(['4.4.4.4']); * * // This request will use the server at 4.4.4.4, independent of global settings. * resolver.resolve4('example.org', (err, addresses) => { * // ... * }); * ``` * * The following methods from the `dns` module are available: * * - `resolver.getServers()` * - `resolver.resolve()` * - `resolver.resolve4()` * - `resolver.resolve6()` * - `resolver.resolveAny()` * - `resolver.resolveCaa()` * - `resolver.resolveCname()` * - `resolver.resolveMx()` * - `resolver.resolveNaptr()` * - `resolver.resolveNs()` * - `resolver.resolvePtr()` * - `resolver.resolveSoa()` * - `resolver.resolveSrv()` * - `resolver.resolveTxt()` * - `resolver.reverse()` * - `resolver.setServers()` */ export class Resolver { _handle; constructor(options){ const timeout = validateTimeout(options); const tries = validateTries(options); this._handle = new ChannelWrap(timeout, tries); } cancel() { this._handle.cancel(); } getServers() { return this._handle.getServers().map((val)=>{ if (!val[1] || val[1] === IANA_DNS_PORT) { return val[0]; } const host = isIP(val[0]) === 6 ? `[${val[0]}]` : val[0]; return `${host}:${val[1]}`; }); } setServers(servers) { validateArray(servers, "servers"); // Cache the original servers because in the event of an error while // setting the servers, c-ares won't have any servers available for // resolution. const orig = this._handle.getServers(); const newSet = []; servers.forEach((serv, index)=>{ validateString(serv, `servers[${index}]`); let ipVersion = isIP(serv); if (ipVersion !== 0) { return newSet.push([ ipVersion, serv, IANA_DNS_PORT ]); } const match = serv.match(IPv6RE); // Check for an IPv6 in brackets. if (match) { ipVersion = isIP(match[1]); if (ipVersion !== 0) { const port = Number.parseInt(serv.replace(addrSplitRE, "$2")) || IANA_DNS_PORT; return newSet.push([ ipVersion, match[1], port ]); } } // addr::port const addrSplitMatch = serv.match(addrSplitRE); if (addrSplitMatch) { const hostIP = addrSplitMatch[1]; const port = addrSplitMatch[2] || `${IANA_DNS_PORT}`; ipVersion = isIP(hostIP); if (ipVersion !== 0) { return newSet.push([ ipVersion, hostIP, Number.parseInt(port) ]); } } throw new ERR_INVALID_IP_ADDRESS(serv); }); const errorNumber = this._handle.setServers(newSet); if (errorNumber !== 0) { // Reset the servers to the old servers, because ares probably unset them. this._handle.setServers(orig.join(",")); const err = strerror(errorNumber); throw new ERR_DNS_SET_SERVERS_FAILED(err, servers.toString()); } } /** * The resolver instance will send its requests from the specified IP address. * This allows programs to specify outbound interfaces when used on multi-homed * systems. * * If a v4 or v6 address is not specified, it is set to the default, and the * operating system will choose a local address automatically. * * The resolver will use the v4 local address when making requests to IPv4 DNS * servers, and the v6 local address when making requests to IPv6 DNS servers. * The `rrtype` of resolution requests has no impact on the local address used. * * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address. * @param [ipv6='::0'] A string representation of an IPv6 address. */ setLocalAddress(ipv4, ipv6) { validateString(ipv4, "ipv4"); if (ipv6 !== undefined) { validateString(ipv6, "ipv6"); } this._handle.setLocalAddress(ipv4, ipv6); } } let defaultResolver = new Resolver(); export function getDefaultResolver() { return defaultResolver; } export function setDefaultResolver(resolver) { defaultResolver = resolver; } export function validateHints(hints) { if ((hints & ~(AI_ADDRCONFIG | AI_ALL | AI_V4MAPPED)) !== 0) { throw new ERR_INVALID_ARG_VALUE("hints", hints, "is invalid"); } } let invalidHostnameWarningEmitted = false; export function emitInvalidHostnameWarning(hostname) { if (invalidHostnameWarningEmitted) { return; } invalidHostnameWarningEmitted = true; emitWarning(`The provided hostname "${hostname}" is not a valid ` + "hostname, and is supported in the dns module solely for compatibility.", "DeprecationWarning", "DEP0118"); } let dnsOrder = getOptionValue("--dns-result-order") || "ipv4first"; export function getDefaultVerbatim() { switch(dnsOrder){ case "verbatim": { return true; } case "ipv4first": { return false; } default: { return false; } } } /** * Set the default value of `verbatim` in `lookup` and `dnsPromises.lookup()`. * The value could be: * * - `ipv4first`: sets default `verbatim` `false`. * - `verbatim`: sets default `verbatim` `true`. * * The default is `ipv4first` and `setDefaultResultOrder` have higher * priority than `--dns-result-order`. When using `worker threads`, * `setDefaultResultOrder` from the main thread won't affect the default * dns orders in workers. * * @param order must be `'ipv4first'` or `'verbatim'`. */ export function setDefaultResultOrder(order) { validateOneOf(order, "dnsOrder", [ "verbatim", "ipv4first" ]); dnsOrder = order; } export function defaultResolverSetServers(servers) { const resolver = new Resolver(); resolver.setServers(servers); setDefaultResolver(resolver); } Qe#ext:deno_node/internal/dns/utils.tsa bD``M` T|`LLa3L`( T  I`" Sb1"b"e??????Ib9"`$L` ~ ]`F* ]`b ]` ]` ]`" ]` ]`R]L`*B ` L`B ` L`B ` L`B  ` L`  ` L` B ` L`B  ` L` " ` L`"  `  L` " `  L`"  `  L` b `  L`b  `  L` "` L`"]DL`  D  c D  c D  c Dc D  cSm D  co D  c DKKct D"~ "~ c0> D" " cFJ DBBc  D!!c D"/ "/ c D" " c D  c `"~ a?Ka? a? a? a?a?Ba? a? a? a?!a?"/ a?" a? a?" a?" a? a?B a? a ? a ?"a?B a? a?" a ?b a ?B a? a? a ?a?\b@a T I`= ]b@a T I`VB b@a T I` b@a  T8`,L`H"/ J  ]`Dg0)- 0  ` (SbqA `Dag  a@b@a  T8`,L`"/ K ]`Dg0)- 0  ` (SbqA"`Da  a@b@b  T  I`Ll \b@a  T I`" ]b@ a  T I`lb b@!a  T I`B b#@"a T I`H b@#a T I`4!! b@$a  T I`!8"b"@%aa   `T ``/ `/ `?  `  aD]H ` ajbajB ajb ajaj] T@`9L` B  N^`Di@- ]0 b0b0 i2 (SbpGB `Daw] a @\b Ճ& T  I`bb' T I`B b  ( T I`ib b  ) T I`Wb * T$` L`B ^` Kav ab3(SbqqB `Da a b+ "~    ]`DxPh %%%%%%ei h   5%z%z%   e+ 2  10i%%0b% ] as.@\bA]]]]]]J^b^j^Dr^Dz^^^ ^^^"^*^2^D`RD]DH QWA // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. /* Copyright 1998 by the Massachusetts Institute of Technology. * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without * fee is hereby granted, provided that the above copyright * notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting * documentation, and that the name of M.I.T. not be used in * advertising or publicity pertaining to distribution of the * software without specific, written prior permission. * M.I.T. makes no representations about the suitability of * this software for any purpose. It is provided "as is" * without express or implied warranty. */ // REF: https://github.com/nodejs/node/blob/master/deps/cares/include/ares.h#L190 export const ARES_AI_CANONNAME = 1 << 0; export const ARES_AI_NUMERICHOST = 1 << 1; export const ARES_AI_PASSIVE = 1 << 2; export const ARES_AI_NUMERICSERV = 1 << 3; export const AI_V4MAPPED = 1 << 4; export const AI_ALL = 1 << 5; export const AI_ADDRCONFIG = 1 << 6; export const ARES_AI_NOSORT = 1 << 7; export const ARES_AI_ENVHOSTS = 1 << 8; // REF: https://github.com/nodejs/node/blob/master/deps/cares/src/lib/ares_strerror.c // deno-lint-ignore camelcase export function ares_strerror(code) { /* Return a string literal from a table. */ const errorText = [ "Successful completion", "DNS server returned answer with no data", "DNS server claims query was misformatted", "DNS server returned general failure", "Domain name not found", "DNS server does not implement requested operation", "DNS server refused query", "Misformatted DNS query", "Misformatted domain name", "Unsupported address family", "Misformatted DNS reply", "Could not contact DNS servers", "Timeout while contacting DNS servers", "End of file", "Error reading file", "Out of memory", "Channel is being destroyed", "Misformatted string", "Illegal flags specified", "Given hostname is not numeric", "Illegal hints flags specified", "c-ares library initialization not yet performed", "Error loading iphlpapi.dll", "Could not find GetNetworkParams function", "DNS query cancelled" ]; if (code >= 0 && code < errorText.length) { return errorText[code]; } else { return "unknown"; } } QeJF'&ext:deno_node/internal_binding/ares.tsa bD`M` TX`kLa!8Li   T  I`H "Sb1Ib `]L` ` L`  ` L`  ` L` ` L`` L`"` L`"b` L`b` L``  L`"`  L`"]` a?ba?a ?a? a? a? a?"a?a?"a ?^b@-a a   ^`Do h ei h   1 1 1 1 1 1 @1 1 1 ^`bA,^D`RD]DH Qw/// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // This module ports: // - https://github.com/nodejs/node/blob/master/src/cares_wrap.cc // - https://github.com/nodejs/node/blob/master/src/cares_wrap.h // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { isIPv4 } from "ext:deno_node/internal/net.ts"; import { codeMap } from "ext:deno_node/internal_binding/uv.ts"; import { AsyncWrap, providerType } from "ext:deno_node/internal_binding/async_wrap.ts"; import { ares_strerror } from "ext:deno_node/internal_binding/ares.ts"; import { notImplemented } from "ext:deno_node/_utils.ts"; import { isWindows } from "ext:deno_node/_util/os.ts"; export class GetAddrInfoReqWrap extends AsyncWrap { family; hostname; callback; resolve; reject; oncomplete; constructor(){ super(providerType.GETADDRINFOREQWRAP); } } export function getaddrinfo(req, hostname, family, _hints, verbatim) { let addresses = []; // TODO(cmorten): use hints // REF: https://nodejs.org/api/dns.html#dns_supported_getaddrinfo_flags const recordTypes = []; if (family === 0 || family === 4) { recordTypes.push("A"); } if (family === 0 || family === 6) { recordTypes.push("AAAA"); } (async ()=>{ await Promise.allSettled(recordTypes.map((recordType)=>Deno.resolveDns(hostname, recordType).then((records)=>{ records.forEach((record)=>addresses.push(record)); }))); const error = addresses.length ? 0 : codeMap.get("EAI_NODATA"); // TODO(cmorten): needs work // REF: https://github.com/nodejs/node/blob/master/src/cares_wrap.cc#L1444 if (!verbatim) { addresses.sort((a, b)=>{ if (isIPv4(a)) { return -1; } else if (isIPv4(b)) { return 1; } return 0; }); } // TODO(@bartlomieju): Forces IPv4 as a workaround for Deno not // aligning with Node on implicit binding on Windows // REF: https://github.com/denoland/deno/issues/10762 if (isWindows && hostname === "localhost") { addresses = addresses.filter((address)=>isIPv4(address)); } req.oncomplete(error, addresses); })(); return 0; } export class QueryReqWrap extends AsyncWrap { bindingName; hostname; ttl; callback; // deno-lint-ignore no-explicit-any resolve; reject; oncomplete; constructor(){ super(providerType.QUERYWRAP); } } function fqdnToHostname(fqdn) { return fqdn.replace(/\.$/, ""); } function compressIPv6(address) { const formatted = address.replace(/\b(?:0+:){2,}/, ":"); const finalAddress = formatted.split(":").map((octet)=>{ if (octet.match(/^\d+\.\d+\.\d+\.\d+$/)) { // decimal return Number(octet.replaceAll(".", "")).toString(16); } return octet.replace(/\b0+/g, ""); }).join(":"); return finalAddress; } export class ChannelWrap extends AsyncWrap { #servers = []; #timeout; #tries; constructor(timeout, tries){ super(providerType.DNSCHANNEL); this.#timeout = timeout; this.#tries = tries; } async #query(query, recordType) { // TODO(@bartlomieju): TTL logic. let code; let ret; if (this.#servers.length) { for (const [ipAddr, port] of this.#servers){ const resolveOptions = { nameServer: { ipAddr, port } }; ({ code, ret } = await this.#resolve(query, recordType, resolveOptions)); if (code === 0 || code === codeMap.get("EAI_NODATA")) { break; } } } else { ({ code, ret } = await this.#resolve(query, recordType)); } return { code: code, ret: ret }; } async #resolve(query, recordType, resolveOptions) { let ret = []; let code = 0; try { ret = await Deno.resolveDns(query, recordType, resolveOptions); } catch (e) { if (e instanceof Deno.errors.NotFound) { code = codeMap.get("EAI_NODATA"); } else { // TODO(cmorten): map errors to appropriate error codes. code = codeMap.get("UNKNOWN"); } } return { code, ret }; } queryAny(req, name) { // TODO(@bartlomieju): implemented temporary measure to allow limited usage of // `resolveAny` like APIs. // // Ideally we move to using the "ANY" / "*" DNS query in future // REF: https://github.com/denoland/deno/issues/14492 (async ()=>{ const records = []; await Promise.allSettled([ this.#query(name, "A").then(({ ret })=>{ ret.forEach((record)=>records.push({ type: "A", address: record })); }), this.#query(name, "AAAA").then(({ ret })=>{ ret.forEach((record)=>records.push({ type: "AAAA", address: compressIPv6(record) })); }), this.#query(name, "CAA").then(({ ret })=>{ ret.forEach(({ critical, tag, value })=>records.push({ type: "CAA", [tag]: value, critical: +critical && 128 })); }), this.#query(name, "CNAME").then(({ ret })=>{ ret.forEach((record)=>records.push({ type: "CNAME", value: record })); }), this.#query(name, "MX").then(({ ret })=>{ ret.forEach(({ preference, exchange })=>records.push({ type: "MX", priority: preference, exchange: fqdnToHostname(exchange) })); }), this.#query(name, "NAPTR").then(({ ret })=>{ ret.forEach(({ order, preference, flags, services, regexp, replacement })=>records.push({ type: "NAPTR", order, preference, flags, service: services, regexp, replacement })); }), this.#query(name, "NS").then(({ ret })=>{ ret.forEach((record)=>records.push({ type: "NS", value: fqdnToHostname(record) })); }), this.#query(name, "PTR").then(({ ret })=>{ ret.forEach((record)=>records.push({ type: "PTR", value: fqdnToHostname(record) })); }), this.#query(name, "SOA").then(({ ret })=>{ ret.forEach(({ mname, rname, serial, refresh, retry, expire, minimum })=>records.push({ type: "SOA", nsname: fqdnToHostname(mname), hostmaster: fqdnToHostname(rname), serial, refresh, retry, expire, minttl: minimum })); }), this.#query(name, "SRV").then(({ ret })=>{ ret.forEach(({ priority, weight, port, target })=>records.push({ type: "SRV", priority, weight, port, name: target })); }), this.#query(name, "TXT").then(({ ret })=>{ ret.forEach((record)=>records.push({ type: "TXT", entries: record })); }) ]); const err = records.length ? 0 : codeMap.get("EAI_NODATA"); req.oncomplete(err, records); })(); return 0; } queryA(req, name) { this.#query(name, "A").then(({ code, ret })=>{ req.oncomplete(code, ret); }); return 0; } queryAaaa(req, name) { this.#query(name, "AAAA").then(({ code, ret })=>{ const records = ret.map((record)=>compressIPv6(record)); req.oncomplete(code, records); }); return 0; } queryCaa(req, name) { this.#query(name, "CAA").then(({ code, ret })=>{ const records = ret.map(({ critical, tag, value })=>({ [tag]: value, critical: +critical && 128 })); req.oncomplete(code, records); }); return 0; } queryCname(req, name) { this.#query(name, "CNAME").then(({ code, ret })=>{ req.oncomplete(code, ret); }); return 0; } queryMx(req, name) { this.#query(name, "MX").then(({ code, ret })=>{ const records = ret.map(({ preference, exchange })=>({ priority: preference, exchange: fqdnToHostname(exchange) })); req.oncomplete(code, records); }); return 0; } queryNaptr(req, name) { this.#query(name, "NAPTR").then(({ code, ret })=>{ const records = ret.map(({ order, preference, flags, services, regexp, replacement })=>({ flags, service: services, regexp, replacement, order, preference })); req.oncomplete(code, records); }); return 0; } queryNs(req, name) { this.#query(name, "NS").then(({ code, ret })=>{ const records = ret.map((record)=>fqdnToHostname(record)); req.oncomplete(code, records); }); return 0; } queryPtr(req, name) { this.#query(name, "PTR").then(({ code, ret })=>{ const records = ret.map((record)=>fqdnToHostname(record)); req.oncomplete(code, records); }); return 0; } querySoa(req, name) { this.#query(name, "SOA").then(({ code, ret })=>{ let record = {}; if (ret.length) { const { mname, rname, serial, refresh, retry, expire, minimum } = ret[0]; record = { nsname: fqdnToHostname(mname), hostmaster: fqdnToHostname(rname), serial, refresh, retry, expire, minttl: minimum }; } req.oncomplete(code, record); }); return 0; } querySrv(req, name) { this.#query(name, "SRV").then(({ code, ret })=>{ const records = ret.map(({ priority, weight, port, target })=>({ priority, weight, port, name: target })); req.oncomplete(code, records); }); return 0; } queryTxt(req, name) { this.#query(name, "TXT").then(({ code, ret })=>{ req.oncomplete(code, ret); }); return 0; } getHostByAddr(_req, _name) { // TODO(@bartlomieju): https://github.com/denoland/deno/issues/14432 notImplemented("cares.ChannelWrap.prototype.getHostByAddr"); } getServers() { return this.#servers; } setServers(servers) { if (typeof servers === "string") { const tuples = []; for(let i = 0; i < servers.length; i += 2){ tuples.push([ servers[i], parseInt(servers[i + 1]) ]); } this.#servers = tuples; } else { this.#servers = servers.map(([_ipVersion, ip, port])=>[ ip, port ]); } return 0; } setLocalAddress(_addr0, _addr1) { notImplemented("cares.ChannelWrap.prototype.setLocalAddress"); } cancel() { notImplemented("cares.ChannelWrap.prototype.cancel"); } } const DNS_ESETSRVPENDING = -1000; const EMSG_ESETSRVPENDING = "There are pending queries."; export function strerror(code) { return code === DNS_ESETSRVPENDING ? EMSG_ESETSRVPENDING : ares_strerror(code); }  Qfʞ,ext:deno_node/internal_binding/cares_wrap.tsa bD`EM`O T`[La*3 T  I`< Sb1 !"--c????Ib/` L`  ]` ]`b]``b ]` ]`" ]`,]DL`` L` ` L` b ` L`b B ` L`B B` L`B]$L`  DbbcAJ D""c D  c Dc Dttc$ Db b c DcLX` a? a?ba?a?"a?b a?ta? a?B a?b a?a?Ba? _b@ 1 T I`R!._b@ 2,La  T I`  B b@/c T I`y//Bb@N0aa   `T ``/ `/ `?  `  aPD] ` aj]b T  I` ._ _b Ճ3 T0`  L`  Y  _`Kc; ( 0 0 , ( e333333 (Sbqq `Da{ a 0 0b4   `T ``/ `/ `?  `  a! D] ` aj] T  I` b ._ _b Ճ 5 T4`%$L`b 9 Y  _`Kcj < 0   , ( f333333 3 (Sbqqb `DaF b 0 0 b 6LSb @b$$"%%Bg??????/._  `T ``/ `/ `?  `  a/D] ` ajB aj aj"" aj  aj aj" ajb aj b aj " aj  aj  aj  aj " ajB ajb ajajbaj]b$$"% T  I`%` _b Q7 T I`BbQ8 TP`\L`   6``Dm@0-Z  i  5- ] 4  4 (SbzM`Dawbb Ճ9 T  I`!B ` _b: T I` !! b*; T I`!h"" b ,< T I`s"{# b/= T I`#$ b 2> T I`$(%" b4? T I`5%&b b 7@ T I`&m'b b:A T I`x':(" b=B T I`E($* b@C T I`/*Q+ bBD T I`\++ bEE T I`+," b GF T I`,,B b HG T I`,L.b b IH T I`^..bKI T I`./bbLJ T0`] ``Kb ~<0 e}555(Sbqq`Da/ abMKb.  _`Dh Ƃ%%%%ei h  0e+ 2 10  e+ 2  1e%e%e%e%%%0‚      !"#$%&'e+(2  1 %)% ._ a ,bA.___D__&__D2`"`*`J` DR`DZ`Db`Dj`Dr`Dz`D`D`D`D`D`D```D```_D`RD]DH 97Q57r\n// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials "use strict"; const kRejection = Symbol.for("nodejs.rejection"); import { inspect } from "ext:deno_node/internal/util/inspect.mjs"; import { AbortError, // kEnhanceStackBeforeInspector, ERR_INVALID_ARG_TYPE, ERR_OUT_OF_RANGE, ERR_UNHANDLED_ERROR, } from "ext:deno_node/internal/errors.ts"; import { validateAbortSignal, validateBoolean, validateFunction, } from "ext:deno_node/internal/validators.mjs"; import { spliceOne } from "ext:deno_node/_utils.ts"; import { nextTick } from "ext:deno_node/_process/process.ts"; const kCapture = Symbol("kCapture"); const kErrorMonitor = Symbol("events.errorMonitor"); const kMaxEventTargetListeners = Symbol("events.maxEventTargetListeners"); const kMaxEventTargetListenersWarned = Symbol( "events.maxEventTargetListenersWarned", ); /** * Creates a new `EventEmitter` instance. * @param {{ captureRejections?: boolean; }} [opts] * @returns {EventEmitter} */ export function EventEmitter(opts) { EventEmitter.init.call(this, opts); } export default EventEmitter; EventEmitter.on = on; EventEmitter.once = once; EventEmitter.getEventListeners = getEventListeners; EventEmitter.setMaxListeners = setMaxListeners; EventEmitter.listenerCount = listenerCount; // Backwards-compat with node 0.10.x EventEmitter.EventEmitter = EventEmitter; EventEmitter.usingDomains = false; EventEmitter.captureRejectionSymbol = kRejection; export const captureRejectionSymbol = EventEmitter.captureRejectionSymbol; export const errorMonitor = EventEmitter.errorMonitor; Object.defineProperty(EventEmitter, "captureRejections", { get() { return EventEmitter.prototype[kCapture]; }, set(value) { validateBoolean(value, "EventEmitter.captureRejections"); EventEmitter.prototype[kCapture] = value; }, enumerable: true, }); EventEmitter.errorMonitor = kErrorMonitor; // The default for captureRejections is false Object.defineProperty(EventEmitter.prototype, kCapture, { value: false, writable: true, enumerable: false, }); EventEmitter.prototype._events = undefined; EventEmitter.prototype._eventsCount = 0; EventEmitter.prototype._maxListeners = undefined; // By default EventEmitters will print a warning if more than 10 listeners are // added to it. This is a useful default which helps finding memory leaks. export let defaultMaxListeners = 10; function checkListener(listener) { validateFunction(listener, "listener"); } Object.defineProperty(EventEmitter, "defaultMaxListeners", { enumerable: true, get: function () { return defaultMaxListeners; }, set: function (arg) { if (typeof arg !== "number" || arg < 0 || Number.isNaN(arg)) { throw new ERR_OUT_OF_RANGE( "defaultMaxListeners", "a non-negative number", arg, ); } defaultMaxListeners = arg; }, }); Object.defineProperties(EventEmitter, { kMaxEventTargetListeners: { value: kMaxEventTargetListeners, enumerable: false, configurable: false, writable: false, }, kMaxEventTargetListenersWarned: { value: kMaxEventTargetListenersWarned, enumerable: false, configurable: false, writable: false, }, }); /** * Sets the max listeners. * @param {number} n * @param {EventTarget[] | EventEmitter[]} [eventTargets] * @returns {void} */ export function setMaxListeners( n = defaultMaxListeners, ...eventTargets ) { if (typeof n !== "number" || n < 0 || Number.isNaN(n)) { throw new ERR_OUT_OF_RANGE("n", "a non-negative number", n); } if (eventTargets.length === 0) { defaultMaxListeners = n; } else { for (let i = 0; i < eventTargets.length; i++) { const target = eventTargets[i]; if (target instanceof EventTarget) { target[kMaxEventTargetListeners] = n; target[kMaxEventTargetListenersWarned] = false; } else if (typeof target.setMaxListeners === "function") { target.setMaxListeners(n); } else { throw new ERR_INVALID_ARG_TYPE( "eventTargets", ["EventEmitter", "EventTarget"], target, ); } } } } EventEmitter.init = function (opts) { if ( this._events === undefined || this._events === Object.getPrototypeOf(this)._events ) { this._events = Object.create(null); this._eventsCount = 0; } this._maxListeners = this._maxListeners || undefined; if (opts?.captureRejections) { validateBoolean(opts.captureRejections, "options.captureRejections"); this[kCapture] = Boolean(opts.captureRejections); } else { // Assigning the kCapture property directly saves an expensive // prototype lookup in a very sensitive hot path. this[kCapture] = EventEmitter.prototype[kCapture]; } }; function addCatch(that, promise, type, args) { if (!that[kCapture]) { return; } // Handle Promises/A+ spec, then could be a getter // that throws on second use. try { const then = promise.then; if (typeof then === "function") { then.call(promise, undefined, function (err) { // The callback is called with nextTick to avoid a follow-up // rejection from this promise. nextTick(emitUnhandledRejectionOrErr, that, err, type, args); }); } } catch (err) { that.emit("error", err); } } function emitUnhandledRejectionOrErr(ee, err, type, args) { if (typeof ee[kRejection] === "function") { ee[kRejection](err, type, ...args); } else { // We have to disable the capture rejections mechanism, otherwise // we might end up in an infinite loop. const prev = ee[kCapture]; // If the error handler throws, it is not catcheable and it // will end up in 'uncaughtException'. We restore the previous // value of kCapture in case the uncaughtException is present // and the exception is handled. try { ee[kCapture] = false; ee.emit("error", err); } finally { ee[kCapture] = prev; } } } /** * Increases the max listeners of the event emitter. * @param {number} n * @returns {EventEmitter} */ EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { if (typeof n !== "number" || n < 0 || Number.isNaN(n)) { throw new ERR_OUT_OF_RANGE("n", "a non-negative number", n); } this._maxListeners = n; return this; }; function _getMaxListeners(that) { if (that._maxListeners === undefined) { return EventEmitter.defaultMaxListeners; } return that._maxListeners; } /** * Returns the current max listener value for the event emitter. * @returns {number} */ EventEmitter.prototype.getMaxListeners = function getMaxListeners() { return _getMaxListeners(this); }; // Returns the length and line number of the first sequence of `a` that fully // appears in `b` with a length of at least 4. function identicalSequenceRange(a, b) { for (let i = 0; i < a.length - 3; i++) { // Find the first entry of b that matches the current entry of a. const pos = b.indexOf(a[i]); if (pos !== -1) { const rest = b.length - pos; if (rest > 3) { let len = 1; const maxLen = Math.min(a.length - i, rest); // Count the number of consecutive entries. while (maxLen > len && a[i + len] === b[pos + len]) { len++; } if (len > 3) { return [len, i]; } } } } return [0, 0]; } // deno-lint-ignore no-unused-vars function enhanceStackTrace(err, own) { let ctorInfo = ""; try { const { name } = this.constructor; if (name !== "EventEmitter") { ctorInfo = ` on ${name} instance`; } } catch { // pass } const sep = `\nEmitted 'error' event${ctorInfo} at:\n`; const errStack = err.stack.split("\n").slice(1); const ownStack = own.stack.split("\n").slice(1); const { 0: len, 1: off } = identicalSequenceRange(ownStack, errStack); if (len > 0) { ownStack.splice( off + 1, len - 2, " [... lines matching original stack trace ...]", ); } return err.stack + sep + ownStack.join("\n"); } /** * Synchronously calls each of the listeners registered * for the event. * @param {string | symbol} type * @param {...any} [args] * @returns {boolean} */ EventEmitter.prototype.emit = function emit(type, ...args) { let doError = type === "error"; const events = this._events; if (events !== undefined) { if (doError && events[kErrorMonitor] !== undefined) { this.emit(kErrorMonitor, ...args); } doError = doError && events.error === undefined; } else if (!doError) { return false; } // If there is no 'error' event listener then throw. if (doError) { let er; if (args.length > 0) { er = args[0]; } if (er instanceof Error) { try { const capture = {}; Error.captureStackTrace(capture, EventEmitter.prototype.emit); // Object.defineProperty(er, kEnhanceStackBeforeInspector, { // value: enhanceStackTrace.bind(this, er, capture), // configurable: true // }); } catch { // pass } // Note: The comments on the `throw` lines are intentional, they show // up in Node's output if this results in an unhandled exception. throw er; // Unhandled 'error' event } let stringifiedEr; try { stringifiedEr = inspect(er); } catch { stringifiedEr = er; } // At least give some kind of context to the user const err = new ERR_UNHANDLED_ERROR(stringifiedEr); err.context = er; throw err; // Unhandled 'error' event } const handler = events[type]; if (handler === undefined) { return false; } if (typeof handler === "function") { const result = handler.apply(this, args); // We check if result is undefined first because that // is the most common case so we do not pay any perf // penalty if (result !== undefined && result !== null) { addCatch(this, result, type, args); } } else { const len = handler.length; const listeners = arrayClone(handler); for (let i = 0; i < len; ++i) { const result = listeners[i].apply(this, args); // We check if result is undefined first because that // is the most common case so we do not pay any perf // penalty. // This code is duplicated because extracting it away // would make it non-inlineable. if (result !== undefined && result !== null) { addCatch(this, result, type, args); } } } return true; }; function _addListener(target, type, listener, prepend) { let m; let events; let existing; checkListener(listener); events = target._events; if (events === undefined) { events = target._events = Object.create(null); target._eventsCount = 0; } else { // To avoid recursion in the case that type === "newListener"! Before // adding it to the listeners, first emit "newListener". if (events.newListener !== undefined) { target.emit("newListener", type, listener.listener ?? listener); // Re-assign `events` because a newListener handler could have caused the // this._events to be assigned to a new object events = target._events; } existing = events[type]; } if (existing === undefined) { // Optimize the case of one listener. Don't need the extra array object. events[type] = listener; ++target._eventsCount; } else { if (typeof existing === "function") { // Adding the second element, need to change to array. existing = events[type] = prepend ? [listener, existing] : [existing, listener]; // If we've already got an array, just append. } else if (prepend) { existing.unshift(listener); } else { existing.push(listener); } // Check for listener leak m = _getMaxListeners(target); if (m > 0 && existing.length > m && !existing.warned) { existing.warned = true; // No error code for this since it is a Warning // eslint-disable-next-line no-restricted-syntax const w = new Error( "Possible EventEmitter memory leak detected. " + `${existing.length} ${String(type)} listeners ` + `added to ${inspect(target, { depth: -1 })}. Use ` + "emitter.setMaxListeners() to increase limit", ); w.name = "MaxListenersExceededWarning"; w.emitter = target; w.type = type; w.count = existing.length; process.emitWarning(w); } } return target; } /** * Adds a listener to the event emitter. * @param {string | symbol} type * @param {Function} listener * @returns {EventEmitter} */ EventEmitter.prototype.addListener = function addListener(type, listener) { return _addListener(this, type, listener, false); }; EventEmitter.prototype.on = EventEmitter.prototype.addListener; /** * Adds the `listener` function to the beginning of * the listeners array. * @param {string | symbol} type * @param {Function} listener * @returns {EventEmitter} */ EventEmitter.prototype.prependListener = function prependListener( type, listener, ) { return _addListener(this, type, listener, true); }; function onceWrapper() { if (!this.fired) { this.target.removeListener(this.type, this.wrapFn); this.fired = true; if (arguments.length === 0) { return this.listener.call(this.target); } return this.listener.apply(this.target, arguments); } } function _onceWrap(target, type, listener) { const state = { fired: false, wrapFn: undefined, target, type, listener }; const wrapped = onceWrapper.bind(state); wrapped.listener = listener; state.wrapFn = wrapped; return wrapped; } /** * Adds a one-time `listener` function to the event emitter. * @param {string | symbol} type * @param {Function} listener * @returns {EventEmitter} */ EventEmitter.prototype.once = function once(type, listener) { checkListener(listener); this.on(type, _onceWrap(this, type, listener)); return this; }; /** * Adds a one-time `listener` function to the beginning of * the listeners array. * @param {string | symbol} type * @param {Function} listener * @returns {EventEmitter} */ EventEmitter.prototype.prependOnceListener = function prependOnceListener( type, listener, ) { checkListener(listener); this.prependListener(type, _onceWrap(this, type, listener)); return this; }; /** * Removes the specified `listener` from the listeners array. * @param {string | symbol} type * @param {Function} listener * @returns {EventEmitter} */ EventEmitter.prototype.removeListener = function removeListener( type, listener, ) { checkListener(listener); const events = this._events; if (events === undefined) { return this; } const list = events[type]; if (list === undefined) { return this; } if (list === listener || list.listener === listener) { if (--this._eventsCount === 0) { this._events = Object.create(null); } else { delete events[type]; if (events.removeListener) { this.emit("removeListener", type, list.listener || listener); } } } else if (typeof list !== "function") { let position = -1; for (let i = list.length - 1; i >= 0; i--) { if (list[i] === listener || list[i].listener === listener) { position = i; break; } } if (position < 0) { return this; } if (position === 0) { list.shift(); } else { spliceOne(list, position); } if (list.length === 1) { events[type] = list[0]; } if (events.removeListener !== undefined) { this.emit("removeListener", type, listener); } } return this; }; EventEmitter.prototype.off = EventEmitter.prototype.removeListener; /** * Removes all listeners from the event emitter. (Only * removes listeners for a specific event name if specified * as `type`). * @param {string | symbol} [type] * @returns {EventEmitter} */ EventEmitter.prototype.removeAllListeners = function removeAllListeners(type) { const events = this._events; if (events === undefined) { return this; } // Not listening for removeListener, no need to emit if (events.removeListener === undefined) { if (arguments.length === 0) { this._events = Object.create(null); this._eventsCount = 0; } else if (events[type] !== undefined) { if (--this._eventsCount === 0) { this._events = Object.create(null); } else { delete events[type]; } } return this; } // Emit removeListener for all listeners on all events if (arguments.length === 0) { for (const key of Reflect.ownKeys(events)) { if (key === "removeListener") continue; this.removeAllListeners(key); } this.removeAllListeners("removeListener"); this._events = Object.create(null); this._eventsCount = 0; return this; } const listeners = events[type]; if (typeof listeners === "function") { this.removeListener(type, listeners); } else if (listeners !== undefined) { // LIFO order for (let i = listeners.length - 1; i >= 0; i--) { this.removeListener(type, listeners[i]); } } return this; }; function _listeners(target, type, unwrap) { const events = target._events; if (events === undefined) { return []; } const evlistener = events[type]; if (evlistener === undefined) { return []; } if (typeof evlistener === "function") { return unwrap ? [evlistener.listener || evlistener] : [evlistener]; } return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener); } /** * Returns a copy of the array of listeners for the event name * specified as `type`. * @param {string | symbol} type * @returns {Function[]} */ EventEmitter.prototype.listeners = function listeners(type) { return _listeners(this, type, true); }; /** * Returns a copy of the array of listeners and wrappers for * the event name specified as `type`. * @param {string | symbol} type * @returns {Function[]} */ EventEmitter.prototype.rawListeners = function rawListeners(type) { return _listeners(this, type, false); }; /** * Returns the number of listeners listening to event name * specified as `type`. * @param {string | symbol} type * @returns {number} */ const _listenerCount = function listenerCount(type) { const events = this._events; if (events !== undefined) { const evlistener = events[type]; if (typeof evlistener === "function") { return 1; } else if (evlistener !== undefined) { return evlistener.length; } } return 0; }; EventEmitter.prototype.listenerCount = _listenerCount; /** * Returns the number of listeners listening to the event name * specified as `type`. * @deprecated since v3.2.0 * @param {EventEmitter} emitter * @param {string | symbol} type * @returns {number} */ export function listenerCount(emitter, type) { if (typeof emitter.listenerCount === "function") { return emitter.listenerCount(type); } return _listenerCount.call(emitter, type); } /** * Returns an array listing the events for which * the emitter has registered listeners. * @returns {any[]} */ EventEmitter.prototype.eventNames = function eventNames() { return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : []; }; function arrayClone(arr) { // At least since V8 8.3, this implementation is faster than the previous // which always used a simple for-loop switch (arr.length) { case 2: return [arr[0], arr[1]]; case 3: return [arr[0], arr[1], arr[2]]; case 4: return [arr[0], arr[1], arr[2], arr[3]]; case 5: return [arr[0], arr[1], arr[2], arr[3], arr[4]]; case 6: return [arr[0], arr[1], arr[2], arr[3], arr[4], arr[5]]; } return arr.slice(); } function unwrapListeners(arr) { const ret = arrayClone(arr); for (let i = 0; i < ret.length; ++i) { const orig = ret[i].listener; if (typeof orig === "function") { ret[i] = orig; } } return ret; } /** * Returns a copy of the array of listeners for the event name * specified as `type`. * @param {EventEmitter | EventTarget} emitterOrTarget * @param {string | symbol} type * @returns {Function[]} */ export function getEventListeners(emitterOrTarget, type) { // First check if EventEmitter if (typeof emitterOrTarget.listeners === "function") { return emitterOrTarget.listeners(type); } if (emitterOrTarget instanceof EventTarget) { // TODO: kEvents is not defined const root = emitterOrTarget[kEvents].get(type); const listeners = []; let handler = root?.next; while (handler?.listener !== undefined) { const listener = handler.listener?.deref ? handler.listener.deref() : handler.listener; listeners.push(listener); handler = handler.next; } return listeners; } throw new ERR_INVALID_ARG_TYPE( "emitter", ["EventEmitter", "EventTarget"], emitterOrTarget, ); } /** * Creates a `Promise` that is fulfilled when the emitter * emits the given event. * @param {EventEmitter} emitter * @param {string} name * @param {{ signal: AbortSignal; }} [options] * @returns {Promise} */ // deno-lint-ignore require-await export async function once(emitter, name, options = {}) { const signal = options?.signal; validateAbortSignal(signal, "options.signal"); if (signal?.aborted) { throw new AbortError(); } return new Promise((resolve, reject) => { const errorListener = (err) => { emitter.removeListener(name, resolver); if (signal != null) { eventTargetAgnosticRemoveListener(signal, "abort", abortListener); } reject(err); }; const resolver = (...args) => { if (typeof emitter.removeListener === "function") { emitter.removeListener("error", errorListener); } if (signal != null) { eventTargetAgnosticRemoveListener(signal, "abort", abortListener); } resolve(args); }; eventTargetAgnosticAddListener(emitter, name, resolver, { once: true }); if (name !== "error" && typeof emitter.once === "function") { emitter.once("error", errorListener); } function abortListener() { eventTargetAgnosticRemoveListener(emitter, name, resolver); eventTargetAgnosticRemoveListener(emitter, "error", errorListener); reject(new AbortError()); } if (signal != null) { eventTargetAgnosticAddListener( signal, "abort", abortListener, { once: true }, ); } }); } const AsyncIteratorPrototype = Object.getPrototypeOf( Object.getPrototypeOf(async function* () {}).prototype, ); function createIterResult(value, done) { return { value, done }; } function eventTargetAgnosticRemoveListener(emitter, name, listener, flags) { if (typeof emitter.removeListener === "function") { emitter.removeListener(name, listener); } else if (typeof emitter.removeEventListener === "function") { emitter.removeEventListener(name, listener, flags); } else { throw new ERR_INVALID_ARG_TYPE("emitter", "EventEmitter", emitter); } } function eventTargetAgnosticAddListener(emitter, name, listener, flags) { if (typeof emitter.on === "function") { if (flags?.once) { emitter.once(name, listener); } else { emitter.on(name, listener); } } else if (typeof emitter.addEventListener === "function") { // EventTarget does not have `error` event semantics like Node // EventEmitters, we do not listen to `error` events here. emitter.addEventListener(name, (arg) => { listener(arg); }, flags); } else { throw new ERR_INVALID_ARG_TYPE("emitter", "EventEmitter", emitter); } } /** * Returns an `AsyncIterator` that iterates `event` events. * @param {EventEmitter} emitter * @param {string | symbol} event * @param {{ signal: AbortSignal; }} [options] * @returns {AsyncIterator} */ export function on(emitter, event, options) { const signal = options?.signal; validateAbortSignal(signal, "options.signal"); if (signal?.aborted) { throw new AbortError(); } const unconsumedEvents = []; const unconsumedPromises = []; let error = null; let finished = false; const iterator = Object.setPrototypeOf({ next() { // First, we consume all unread events const value = unconsumedEvents.shift(); if (value) { return Promise.resolve(createIterResult(value, false)); } // Then we error, if an error happened // This happens one time if at all, because after 'error' // we stop listening if (error) { const p = Promise.reject(error); // Only the first element errors error = null; return p; } // If the iterator is finished, resolve to done if (finished) { return Promise.resolve(createIterResult(undefined, true)); } // Wait until an event happens return new Promise(function (resolve, reject) { unconsumedPromises.push({ resolve, reject }); }); }, return() { eventTargetAgnosticRemoveListener(emitter, event, eventHandler); eventTargetAgnosticRemoveListener(emitter, "error", errorHandler); if (signal) { eventTargetAgnosticRemoveListener( signal, "abort", abortListener, { once: true }, ); } finished = true; for (const promise of unconsumedPromises) { promise.resolve(createIterResult(undefined, true)); } return Promise.resolve(createIterResult(undefined, true)); }, throw(err) { if (!err || !(err instanceof Error)) { throw new ERR_INVALID_ARG_TYPE( "EventEmitter.AsyncIterator", "Error", err, ); } error = err; eventTargetAgnosticRemoveListener(emitter, event, eventHandler); eventTargetAgnosticRemoveListener(emitter, "error", errorHandler); }, [Symbol.asyncIterator]() { return this; }, }, AsyncIteratorPrototype); eventTargetAgnosticAddListener(emitter, event, eventHandler); if (event !== "error" && typeof emitter.on === "function") { emitter.on("error", errorHandler); } if (signal) { eventTargetAgnosticAddListener( signal, "abort", abortListener, { once: true }, ); } return iterator; function abortListener() { errorHandler(new AbortError()); } function eventHandler(...args) { const promise = unconsumedPromises.shift(); if (promise) { promise.resolve(createIterResult(args, false)); } else { unconsumedEvents.push(args); } } function errorHandler(err) { finished = true; const toError = unconsumedPromises.shift(); if (toError) { toError.reject(err); } else { // The next time we call next() error = err; } iterator.return(); } } Qdξrext:deno_node/_events.mjsa bD`M`7 T`eLaW T(`L`   a`Dc0c(SbqA!`DaWSb1"/"00PP!BhB67a!b;_=b<at?????????????????????Ib\n`L` "$ ]` ]`3" ]` ]`A]`]L`` L` ` L`  ` L`  ` L` " ` L`"  ` L` b` L`bB ` L`B B`  L`B `  L` ]0L`   DBiBic Db b c D" " c D""c* Dcu| D± ± c  Daac DB B ccv D  cz D  c`a?Bia?b a?" a?"a?B a? a? a?aa?± a? a?a? a?" a? a? a ?ba? a?Ba ?B a? a`b@S T I`b12@Bh"ab@ T T  I`?B6b$@ U T I`=b@ V T I`!7b@W T I`"k$8b@X T`L`b4)4bcbm  `Lb `Lb"98 )b**bG`+b+b,B* K`  a`DP(b-ş!!-^2  2 1-%-- \- /  4-P2  J {% 6  6 { % 6!  6! 4#  - %^' - )^+ b- o/- 0 o2- 32 5! 7- 0x89!:b0~@)cAx8?8?8C8D iE2G 2I 2K- 02M!O-Q^S (SbqAa`Da$.5"a(hU` P' "h@8 B``b@Y T  I`8}9㗑b@Z T I`9p:!䗑b@[ T I`SHI旑b@\ T I`PoRᗑb@!] T I`ROS痑b@"^ T I`]]=b@*_ T I`%^|_b<b*@+` T I`_aa闑b'@,a`L` T,`L` 1 >b`Dd0--_(SbpA `Da  a@b@Me" T I` b@Na#  T I`NObb@Oa$ T I`BTW b@#Pa% T I`*X?]c@ BbMQ$Qa&  TI`b[n0iD@@@@@@@ *b @B b @.Ra'a  Y/"011b2B B  b B3 " 3(bCCG T  I`X "a`bb T I`  bc(bHGHb44B5 (bGCC T  y``` Qa.get`"a`b @d T ``` Qa.set`,b @eB* bPCPC0bCHHHP0bCHHHP Tp`8L` b4)4B53 "09  b`Du --!-^- m !- ^2 2-2 --0-c ! -b4! 0- #/%4'(SbpAI`y`  Qa.inita-"ad)`P`  `b @f  T  I` b g T I`kbhk T`O8L` 1b40bm b"BKd kY  c`Dm-ž1 !/-d - Ì  }- o  /!r2!-0--_ 0b  0 i 2  /! *- #_%  `'N-)b+ n-8 /.- 0_2  `4 P697(Sbp@bm`Da;% ."ae8  "` `  @`b ibm T,`] .c`Dd( `(SbpAl`Da66 abjl T  I`8j8XbkX T I`<;;Bb l T I`<3=a吒bma T I`>SBblbnbll T I`C=HBnboBn T I`JJbp T I`KKa萒bqa T I`LMbbr T I`7PPkb sk T I`]]IbRP)t  a`D@h %%%%%%% % % % ł% % % %% % %% % %%ei h  !-^%!b%!b%!b %!b %0100200 200200 200200202 02!0-!10-" 1!#"-$$0%~&&)'3(')3*)\+02"-!#"-$$0-+/~,1)\20-+/2-40-+/ 2.60-+/2/8 1!#"-$$00~1:)23(;33*=\?!#"-4A0~5C~6D)37E 38G~9I)37J 3:L_N0Â;22?T0-+/Â@2AV0-+/ÂB2CX0-+/0-+/-CZ2\0-+/ÂD2E^0-+/ÂF2`0-+/ÂG2Hb0-+/ÂI2Jd0-+/0-+/-Jf2Kh0-+/ÂL2Mj0-+/ÂN2Ol0-+/ÂP2QnR%0-+/2p0-+/ÂS 2Tr!#"-Ut!#"-UtV!^v-+x^z% "a4k|(@@, , ,`L ` ,0 `N`2, ,, ,, , @`bAL:bbbabbRbbaDabacaaca*c>caaFcNcVc^cbfcncvcZb~cbbbbjbDcb&b.bDvbDD`RD]DH Q // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { makeCallback } from "ext:deno_node/_fs/_fs_common.ts"; import { fs } from "ext:deno_node/internal_binding/constants.ts"; import { codeMap } from "ext:deno_node/internal_binding/uv.ts"; import { getValidatedPath, getValidMode } from "ext:deno_node/internal/fs/utils.mjs"; import { promisify } from "ext:deno_node/internal/util.mjs"; export function access(path, mode, callback) { if (typeof mode === "function") { callback = mode; mode = fs.F_OK; } path = getValidatedPath(path).toString(); mode = getValidMode(mode, "access"); const cb = makeCallback(callback); Deno.lstat(path).then((info)=>{ if (info.mode === null) { // If the file mode is unavailable, we pretend it has // the permission cb(null); return; } const m = +mode || 0; let fileMode = +info.mode || 0; if (Deno.build.os !== "windows" && info.uid === Deno.uid()) { // If the user is the owner of the file, then use the owner bits of // the file permission fileMode >>= 6; } // TODO(kt3k): Also check the case when the user belong to the group // of the file if ((m & fileMode) === m) { // all required flags exist cb(null); } else { // some required flags don't // deno-lint-ignore no-explicit-any const e = new Error(`EACCES: permission denied, access '${path}'`); e.path = path; e.syscall = "access"; e.errno = codeMap.get("EACCES"); e.code = "EACCES"; cb(e); } }, (err)=>{ if (err instanceof Deno.errors.NotFound) { // deno-lint-ignore no-explicit-any const e = new Error(`ENOENT: no such file or directory, access '${path}'`); e.path = path; e.syscall = "access"; e.errno = codeMap.get("ENOENT"); e.code = "ENOENT"; cb(e); } else { cb(err); } }); } export const accessPromise = promisify(access); export function accessSync(path, mode) { path = getValidatedPath(path).toString(); mode = getValidMode(mode, "access"); try { const info = Deno.lstatSync(path.toString()); if (info.mode === null) { // If the file mode is unavailable, we pretend it has // the permission return; } const m = +mode || 0; let fileMode = +info.mode || 0; if (Deno.build.os !== "windows" && info.uid === Deno.uid()) { // If the user is the owner of the file, then use the owner bits of // the file permission fileMode >>= 6; } // TODO(kt3k): Also check the case when the user belong to the group // of the file if ((m & fileMode) === m) { // all required flags exist } else { // some required flags don't // deno-lint-ignore no-explicit-any const e = new Error(`EACCES: permission denied, access '${path}'`); e.path = path; e.syscall = "access"; e.errno = codeMap.get("EACCES"); e.code = "EACCES"; throw e; } } catch (err) { if (err instanceof Deno.errors.NotFound) { // deno-lint-ignore no-explicit-any const e = new Error(`ENOENT: no such file or directory, access '${path}'`); e.path = path; e.syscall = "access"; e.errno = codeMap.get("ENOENT"); e.code = "ENOENT"; throw e; } else { throw err; } } } Qd4ext:deno_node/_fs/_fs_access.tsa bD`M` TH`KLa!$L` T  I`% Sb1Ib `L` B@]`"} ]`  ]`T ]`" ]`],L`  ` L` B ` L`B  ` L` ] L`  D  cEL Dc Dc D  c D??c D  c` ?a?a? a? a?a? a? a?B a? a?cb@vb T I`C  cb@waa    c`Dk h ei h  00b1  abAucD dD`RD]DH yQu~E// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { isFd, maybeCallback } from "ext:deno_node/_fs/_fs_common.ts"; import { copyObject, getOptions } from "ext:deno_node/internal/fs/utils.mjs"; import { writeFile, writeFileSync } from "ext:deno_node/_fs/_fs_writeFile.ts"; import { promisify } from "ext:deno_node/internal/util.mjs"; /** * TODO: Also accept 'data' parameter as a Node polyfill Buffer type once these * are implemented. See https://github.com/denoland/deno/issues/3403 */ export function appendFile(path, data, options, callback) { callback = maybeCallback(callback || options); options = getOptions(options, { encoding: "utf8", mode: 0o666, flag: "a" }); // Don't make changes directly on options object options = copyObject(options); // Force append behavior when using a supplied file descriptor if (!options.flag || isFd(path)) { options.flag = "a"; } writeFile(path, data, options, callback); } /** * TODO: Also accept 'data' parameter as a Node polyfill Buffer type once these * are implemented. See https://github.com/denoland/deno/issues/3403 */ export const appendFilePromise = promisify(appendFile); /** * TODO: Also accept 'data' parameter as a Node polyfill Buffer type once these * are implemented. See https://github.com/denoland/deno/issues/3403 */ export function appendFileSync(path, data, options) { options = getOptions(options, { encoding: "utf8", mode: 0o666, flag: "a" }); // Don't make changes directly on options object options = copyObject(options); // Force append behavior when using a supplied file descriptor if (!options.flag || isFd(path)) { options.flag = "a"; } writeFileSync(path, data, options); } Qen #ext:deno_node/_fs/_fs_appendFile.tsa bD`M` TH`KLa!$L` T  I`# Sb1Ib`L` B@]`o ]`U ]` " ]`I],L`  ` L`  ` L` " ` L`" ]$L`  Dc D‡‡c DbAbAcTX D! ! cZg D  c8A Dbbc Dc` bAa?! a?a?‡a?ba?a? a? a? a?" a?db@yb T I`g" Bdb@zaa    .d`Dk h ei h  00b1  abAx:ddD`RD]DH Qr// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { getValidatedPath } from "ext:deno_node/internal/fs/utils.mjs"; import * as pathModule from "node:path"; import { parseFileMode } from "ext:deno_node/internal/validators.mjs"; import { promisify } from "ext:deno_node/internal/util.mjs"; export function chmod(path, mode, callback) { path = getValidatedPath(path).toString(); try { mode = parseFileMode(mode, "mode"); } catch (error) { // TODO(PolarETech): Errors should not be ignored when Deno.chmod is supported on Windows. // https://github.com/denoland/deno_std/issues/2916 if (Deno.build.os === "windows") { mode = 0; // set dummy value to avoid type checking error at Deno.chmod } else { throw error; } } Deno.chmod(pathModule.toNamespacedPath(path), mode).catch((error)=>{ // Ignore NotSupportedError that occurs on windows // https://github.com/denoland/deno_std/issues/2995 if (!(error instanceof Deno.errors.NotSupported)) { throw error; } }).then(()=>callback(null), callback); } export const chmodPromise = promisify(chmod); export function chmodSync(path, mode) { path = getValidatedPath(path).toString(); try { mode = parseFileMode(mode, "mode"); } catch (error) { // TODO(PolarETech): Errors should not be ignored when Deno.chmodSync is supported on Windows. // https://github.com/denoland/deno_std/issues/2916 if (Deno.build.os === "windows") { mode = 0; // set dummy value to avoid type checking error at Deno.chmodSync } else { throw error; } } try { Deno.chmodSync(pathModule.toNamespacedPath(path), mode); } catch (error) { // Ignore NotSupportedError that occurs on windows // https://github.com/denoland/deno_std/issues/2995 if (!(error instanceof Deno.errors.NotSupported)) { throw error; } } } Qdext:deno_node/_fs/_fs_chmod.tsa bD`M` TL`ULa+$L` T  I`xSb1r`?Ib`L`  ]`"( ]`" ]`I" ]`],L` ` L` ` L` ` L` L`  DrDcL` D  c D}}c4A D  c{` a?}a? a?a? a?a?db@|b T I`db@}aa    d`Dl h ei e% h  00b1  abA{dD eD`RD]DH Q}DR// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { makeCallback } from "ext:deno_node/_fs/_fs_common.ts"; import { getValidatedPath, kMaxUserId } from "ext:deno_node/internal/fs/utils.mjs"; import * as pathModule from "node:path"; import { validateInteger } from "ext:deno_node/internal/validators.mjs"; import { promisify } from "ext:deno_node/internal/util.mjs"; /** * Asynchronously changes the owner and group * of a file. */ export function chown(path, uid, gid, callback) { callback = makeCallback(callback); path = getValidatedPath(path).toString(); validateInteger(uid, "uid", -1, kMaxUserId); validateInteger(gid, "gid", -1, kMaxUserId); Deno.chown(pathModule.toNamespacedPath(path), uid, gid).then(()=>callback(null), callback); } export const chownPromise = promisify(chown); /** * Synchronously changes the owner and group * of a file. */ export function chownSync(path, uid, gid) { path = getValidatedPath(path).toString(); validateInteger(uid, "uid", -1, kMaxUserId); validateInteger(gid, "gid", -1, kMaxUserId); Deno.chownSync(pathModule.toNamespacedPath(path), uid, gid); } Qddrext:deno_node/_fs/_fs_chown.tsa bD`M` TL`ULa+$L` T  I`V"Sb1r`?Ib`L` B@]` ]`'"( ]`j" ]`" ]`],L` "` L`"! ` L`! ` L` L`  DrDcZdL` D  c Dc D??c D  c D"[ "[ c`?a? a?a?"[ a? a?"a?! a?a?eb@b T I` Beb@aa    .e`Dl h ei e% h  00b1  abA~:eDeD`RD]DH Q2Ub u// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { getValidatedFd } from "ext:deno_node/internal/fs/utils.mjs"; import { core } from "ext:core/mod.js"; export function close(fd, callback) { fd = getValidatedFd(fd); setTimeout(()=>{ let error = null; try { // TODO(@littledivy): Treat `fd` as real file descriptor. `rid` is an // implementation detail and may change. core.close(fd); } catch (err) { error = err instanceof Error ? err : new Error("[non-error thrown]"); } callback(error); }, 0); } export function closeSync(fd) { fd = getValidatedFd(fd); // TODO(@littledivy): Treat `fd` as real file descriptor. `rid` is an // implementation detail and may change. core.close(fd); } Qdjext:deno_node/_fs/_fs_close.tsa bD`M` T@`:La! L` T  I`=XSb1Ibu`L`  ]`bS]`] L`` L`# ` L`# ]L`  D  c   Dc`a? a?a?# a?eb@a T I`t# eb@aa   e`Di h ei h   `bAeDeD`RD]DH Q_// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { fs } from "ext:deno_node/internal_binding/constants.ts"; export const { F_OK, R_OK, W_OK, X_OK, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, COPYFILE_EXCL, COPYFILE_FICLONE, COPYFILE_FICLONE_FORCE, UV_FS_COPYFILE_EXCL, UV_FS_COPYFILE_FICLONE, UV_FS_COPYFILE_FICLONE_FORCE, O_RDONLY, O_WRONLY, O_RDWR, O_NOCTTY, O_TRUNC, O_APPEND, O_DIRECTORY, O_NOFOLLOW, O_SYNC, O_DSYNC, O_SYMLINK, O_NONBLOCK, O_CREAT, O_EXCL } = fs; Qe2Gp"ext:deno_node/_fs/_fs_constants.tsa bD` M` T`'La&!L! !     a "; ; ; B< bB B "C C C BD D E bE E BF F bG H H < = b= = "> > > b? ? B@ @ "A A B   f`D h ei h  0-1-1-1 -1!- 1- 1- 1- 1- 1-1-1-1-1-1-1-1- 1-"1-$1-&1 -(1-*1-,1 -.1-01-21-41 - 61-!81-":1-#<1 -$>1-%@1 Sb1Ib` L` "} ]`^]L`cE ` L`E BF ` L`BF F ` L`F "; ` L`"; > ` L`> A ` L`A > ` L`> B@ ` L`B@ B `  L`B = `  L`= b? `  L`b? "A `  L`"A < `  L`< b= ` L`b= @ ` L`@ ? ` L`? "> ` L`"> = ` L`= ; ` L`; C ` L`C D ` L`D bB ` L`bB C ` L`C E ` L`E B ` L`B BD ` L`BD bE ` L`bE "C ` L`"C bG ` L`bG H ` L`H H ` L`H ; `  L`; B< `! L`B< ] L`  DcTV`"a?"; a?; a?; a ?B< a!?bB a?B a?"C a?C a?C a?BD a?D a?E a?bE a?E a?BF a?F a?bG a?H a?H a?< a ?= a?b= a?= a ?"> a?> a?> a?b? a ?? a?B@ a?@ a?"A a ?A a?B a ? fBPPPPPPPPPPPfbAD`RD]DH QX// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { makeCallback } from "ext:deno_node/_fs/_fs_common.ts"; import { getValidatedPath, getValidMode } from "ext:deno_node/internal/fs/utils.mjs"; import { fs } from "ext:deno_node/internal_binding/constants.ts"; import { codeMap } from "ext:deno_node/internal_binding/uv.ts"; import { promisify } from "ext:deno_node/internal/util.mjs"; export function copyFile(src, dest, mode, callback) { if (typeof mode === "function") { callback = mode; mode = 0; } const srcStr = getValidatedPath(src, "src").toString(); const destStr = getValidatedPath(dest, "dest").toString(); const modeNum = getValidMode(mode, "copyFile"); const cb = makeCallback(callback); if ((modeNum & fs.COPYFILE_EXCL) === fs.COPYFILE_EXCL) { Deno.lstat(destStr).then(()=>{ // deno-lint-ignore no-explicit-any const e = new Error(`EEXIST: file already exists, copyfile '${srcStr}' -> '${destStr}'`); e.syscall = "copyfile"; e.errno = codeMap.get("EEXIST"); e.code = "EEXIST"; cb(e); }, (e)=>{ if (e instanceof Deno.errors.NotFound) { Deno.copyFile(srcStr, destStr).then(()=>cb(null), cb); } cb(e); }); } else { Deno.copyFile(srcStr, destStr).then(()=>cb(null), cb); } } export const copyFilePromise = promisify(copyFile); export function copyFileSync(src, dest, mode) { const srcStr = getValidatedPath(src, "src").toString(); const destStr = getValidatedPath(dest, "dest").toString(); const modeNum = getValidMode(mode, "copyFile"); if ((modeNum & fs.COPYFILE_EXCL) === fs.COPYFILE_EXCL) { try { Deno.lstatSync(destStr); throw new Error(`A file exists at the destination: ${destStr}`); } catch (e) { if (e instanceof Deno.errors.NotFound) { Deno.copyFileSync(srcStr, destStr); } throw e; } } else { Deno.copyFileSync(srcStr, destStr); } } QdN .ext:deno_node/_fs/_fs_copy.tsa bD`$M` TH`KLa!$L` T  I`'¦Sb1Ib`L` B@]` ]`)"} ]`c ]`" ]`],L` ¦` L`¦"% ` L`"% ` L`] L`  D  c DcY[ Dc! D  c D??c D  c` ?a? a?a?a? a? a?¦a?"% a?a?fb@b T I`fb@aa    f`Dk h ei h  00b1  abAfDBgD`RD]DH Qz@Q// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // deno-lint-ignore-file prefer-primordials import { op_node_cp, op_node_cp_sync } from "ext:core/ops"; import { getValidatedPath, validateCpOptions, } from "ext:deno_node/internal/fs/utils.mjs"; import { promisify } from "ext:deno_node/internal/util.mjs"; export function cpSync(src, dest, options) { validateCpOptions(options); const srcPath = getValidatedPath(src, "src"); const destPath = getValidatedPath(dest, "dest"); op_node_cp_sync(srcPath, destPath); } export function cp(src, dest, options, callback) { if (typeof options === "function") { callback = options; options = {}; } validateCpOptions(options); const srcPath = getValidatedPath(src, "src"); const destPath = getValidatedPath(dest, "dest"); op_node_cp( srcPath, destPath, ).then( (res) => callback(null, res), (err) => callback(err, null), ); } export const cpPromise = promisify(cp); Qdb=ext:deno_node/_fs/_fs_cp.jsa bD`M` TH`KLa!$L` T  I`j*B' Sb1Ib`L` B]` ]`" ]`0],L` b& ` L`b& & ` L`& B' ` L`B' ]L`  D  c D  c D  c D  c( Dc` a? a? a?a? a?B' a?b& a?& a?Rgb@a T I`>b& zgb @ba    fg`Dk h ei h  00b1  abArggDD`RD]DH Q // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import Dirent from "ext:deno_node/_fs/_fs_dirent.ts"; import { assert } from "ext:deno_node/_util/asserts.ts"; import { ERR_MISSING_ARGS } from "ext:deno_node/internal/errors.ts"; import { TextDecoder } from "ext:deno_web/08_text_encoding.js"; export default class Dir { #dirPath; #syncIterator; #asyncIterator; constructor(path){ if (!path) { throw new ERR_MISSING_ARGS("path"); } this.#dirPath = path; } get path() { if (this.#dirPath instanceof Uint8Array) { return new TextDecoder().decode(this.#dirPath); } return this.#dirPath; } // deno-lint-ignore no-explicit-any read(callback) { return new Promise((resolve, reject)=>{ if (!this.#asyncIterator) { this.#asyncIterator = Deno.readDir(this.path)[Symbol.asyncIterator](); } assert(this.#asyncIterator); this.#asyncIterator.next().then((iteratorResult)=>{ resolve(iteratorResult.done ? null : new Dirent(iteratorResult.value)); if (callback) { callback(null, iteratorResult.done ? null : new Dirent(iteratorResult.value)); } }, (err)=>{ if (callback) { callback(err); } reject(err); }); }); } readSync() { if (!this.#syncIterator) { this.#syncIterator = Deno.readDirSync(this.path)[Symbol.iterator](); } const iteratorResult = this.#syncIterator.next(); if (iteratorResult.done) { return null; } else { return new Dirent(iteratorResult.value); } } /** * Unlike Node, Deno does not require managing resource ids for reading * directories, and therefore does not need to close directories when * finished reading. */ // deno-lint-ignore no-explicit-any close(callback) { return new Promise((resolve)=>{ if (callback) { callback(null); } resolve(); }); } /** * Unlike Node, Deno does not require managing resource ids for reading * directories, and therefore does not need to close directories when * finished reading */ closeSync() { //No op } async *[Symbol.asyncIterator]() { try { while(true){ const dirent = await this.read(); if (dirent === null) { break; } yield dirent; } } finally{ await this.close(); } } } Qd#ext:deno_node/_fs/_fs_dir.tsa bD`<M`  Tx`XLa! Laa 4Sb @BCC"Dd??? dSb1Ib `L` ) ]`b ]` ]`J]`]L`b( ` L`]L`  D) c DB B c2B Deecw D c`) a?a?B a?ea?b( a?  ` T ``/ `/ `?  `  a D]f6a Da # a D aDa I } `F` HcD La BCC"D T  I`kb( ggb Ճ T I`v Qaget pathb T I`0b T I`b T I`b T I`# b   bZ T I` `bБ  T0`]  h`Kb  0D ?e555(Sbqqb( `Da  a 4b   g`Dwph ei h  e%e%e% ‚    !-te+ 2 1 g agbABhJhVhD^hfhDnhvh~hD`RD]DH Q6// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { notImplemented } from "ext:deno_node/_utils.ts"; export default class Dirent { entry; constructor(entry){ this.entry = entry; } isBlockDevice() { notImplemented("Deno does not yet support identification of block devices"); return false; } isCharacterDevice() { notImplemented("Deno does not yet support identification of character devices"); return false; } isDirectory() { return this.entry.isDirectory; } isFIFO() { notImplemented("Deno does not yet support identification of FIFO named pipes"); return false; } isFile() { return this.entry.isFile; } isSocket() { notImplemented("Deno does not yet support identification of sockets"); return false; } isSymbolicLink() { return this.entry.isSymlink; } get name() { return this.entry.name; } } Qd'rext:deno_node/_fs/_fs_dirent.tsa bD`4M`  Td`HLa! Laa   ` T ``/ `/ `?  `  aD]x `  ajBajajaj ajajaj "aj `+ } ` F] T  I`) @Sb1Ib` L`  ]`j]L`) ` L`] L`  Db b cTb`b a?) a?hb Ճ T I`XBhb  T I`lb T I`b  T I`b T I`b T I`*b T I`;d"b T I`o Qaget nameb  T$` L`  Bi` Ka b3(Sbqq) `Da a b   h`Drph ei h       e+  2 1  a hbAhhi iii"i*i2i>iD`RD]DH QVj`// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { op_node_fs_exists_sync } from "ext:core/ops"; import { pathFromURL } from "ext:deno_web/00_infra.js"; /** * TODO: Also accept 'path' parameter as a Node polyfill Buffer type once these * are implemented. See https://github.com/denoland/deno/issues/3403 * Deprecated in node api */ export function exists(path, callback) { path = path instanceof URL ? pathFromURL(path) : path; Deno.lstat(path).then(()=>callback(true), ()=>callback(false)); } // The callback of fs.exists doesn't have standard callback signature. // We need to provide special implementation for promisify. // See https://github.com/nodejs/node/pull/13316 const kCustomPromisifiedSymbol = Symbol.for("nodejs.util.promisify.custom"); Object.defineProperty(exists, kCustomPromisifiedSymbol, { value: (path)=>{ return new Promise((resolve)=>{ exists(path, (exists)=>resolve(exists)); }); } }); /** * TODO: Also accept 'path' parameter as a Node polyfill Buffer or URL type once these * are implemented. See https://github.com/denoland/deno/issues/3403 */ export function existsSync(path) { path = path instanceof URL ? pathFromURL(path) : path; return op_node_fs_exists_sync(path); } QdJzlext:deno_node/_fs/_fs_exists.tsa bD`(M` TX`j8La ! L` T  I`* XSb1Ib``L` B]`n]` ] L`* ` L`* + ` L`+ ]L`  D  c DbJbJc` a?bJa?* a?+ a?bib@a T I`_+ ib@aa  YbC T  y``` Qa.value`2ibibK  vi`Do@h ei h  !-^!-0~ ) 3 \ īb@0bAiDiDiD`RD]DH Q>h-// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { FsFile } from "ext:deno_fs/30_fs.js"; export function fdatasync(fd, callback) { new FsFile(fd, Symbol.for("Deno.internal.FsFile")).syncData().then(()=>callback(null), callback); } export function fdatasyncSync(fd) { new FsFile(fd, Symbol.for("Deno.internal.FsFile")).syncDataSync(); } Qeq"ext:deno_node/_fs/_fs_fdatasync.tsa bD`M` T@`:La! L` T  I`xbLSb1Ib` L` E]`] L`b` L`b` L`] L`  Dc`a?ba?a?ib@a T I` jb@aa   i`Di h ei h   `bAjD.jD`RD]DH Q~C{// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { CFISBIS } from "ext:deno_node/_fs/_fs_stat.ts"; import { FsFile } from "ext:deno_fs/30_fs.js"; export function fstat(fd, optionsOrCallback, maybeCallback) { const callback = typeof optionsOrCallback === "function" ? optionsOrCallback : maybeCallback; const options = typeof optionsOrCallback === "object" ? optionsOrCallback : { bigint: false }; if (!callback) throw new Error("No callback function supplied"); new FsFile(fd, Symbol.for("Deno.internal.FsFile")).stat().then((stat)=>callback(null, CFISBIS(stat, options.bigint)), (err)=>callback(err)); } export function fstatSync(fd, options) { const origin = new FsFile(fd, Symbol.for("Deno.internal.FsFile")).statSync(); return CFISBIS(origin, options?.bigint || false); } Qd5Sext:deno_node/_fs/_fs_fstat.tsa bD`M` T@`:La! L` T  I`7»XSb1Ib`L` I ]`E]` ] L`»` L`»B` L`B]L`  D"F"Fc Dc`"Fa?a?»a?Ba?>jb@a T I`Bfjb@aa   Rj`Di h ei h   `bA^jDjD`RD]DH Q:// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { FsFile } from "ext:deno_fs/30_fs.js"; export function fsync(fd, callback) { new FsFile(fd, Symbol.for("Deno.internal.FsFile")).sync().then(()=>callback(null), callback); } export function fsyncSync(fd) { new FsFile(fd, Symbol.for("Deno.internal.FsFile")).syncSync(); } Qdext:deno_node/_fs/_fs_fsync.tsa bD`M` T@`:La! L` T  I`pbLSb1Ib` L` E]`] L`b` L`b` L`] L`  Dc`a?ba?a?jb@a T I`jb@aa   j`Di h ei h   `bAjDjD`RD]DH Q}// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { FsFile } from "ext:deno_fs/30_fs.js"; export function ftruncate(fd, lenOrCallback, maybeCallback) { const len = typeof lenOrCallback === "number" ? lenOrCallback : undefined; const callback = typeof lenOrCallback === "function" ? lenOrCallback : maybeCallback; if (!callback) throw new Error("No callback function supplied"); new FsFile(fd, Symbol.for("Deno.internal.FsFile")).truncate(len).then(()=>callback(null), callback); } export function ftruncateSync(fd, len) { new FsFile(fd, Symbol.for("Deno.internal.FsFile")).truncateSync(len); } Qeb3F"ext:deno_node/_fs/_fs_ftruncate.tsa bD`M` T@`:La! L` T  I`w¾LSb1Ib` L` E]`] L`¾` L`¾B` L`B] L`  Dc`a?¾a?Ba?jb@a T I`B&kb@aa   k`Di h ei h   `bAkDJkD`RD]DH ]QYrdM// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { FsFile } from "ext:deno_fs/30_fs.js"; function getValidTime(time, name) { if (typeof time === "string") { time = Number(time); } if (typeof time === "number" && (Number.isNaN(time) || !Number.isFinite(time))) { throw new Deno.errors.InvalidData(`invalid ${name}, must not be infinity or NaN`); } return time; } export function futimes(fd, atime, mtime, callback) { if (!callback) { throw new Deno.errors.InvalidData("No callback function supplied"); } atime = getValidTime(atime, "atime"); mtime = getValidTime(mtime, "mtime"); // TODO(@littledivy): Treat `fd` as real file descriptor. new FsFile(fd, Symbol.for("Deno.internal.FsFile")).utime(atime, mtime).then(()=>callback(null), callback); } export function futimesSync(fd, atime, mtime) { atime = getValidTime(atime, "atime"); mtime = getValidTime(mtime, "mtime"); // TODO(@littledivy): Treat `fd` as real file descriptor. new FsFile(fd, Symbol.for("Deno.internal.FsFile")).utimeSync(atime, mtime); } Qd/ ext:deno_node/_fs/_fs_futimes.tsa bD`M` T@`@La' T  I` GTSb1G`?Ib` L` E]`] L`/ ` L`/ / ` L`/ ] L`  Dc`a?/ a?/ a?Zkb@ L` T I`#/ ~kb@a T I`/ b@aa   nk`Di h Ƃ%ei h   `bAvkkDkD`RD]DH Q.UjK// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { pathFromURL } from "ext:deno_web/00_infra.js"; import { promisify } from "ext:deno_node/internal/util.mjs"; /** * TODO: Also accept 'path' parameter as a Node polyfill Buffer type once these * are implemented. See https://github.com/denoland/deno/issues/3403 */ export function link(existingPath, newPath, callback) { existingPath = existingPath instanceof URL ? pathFromURL(existingPath) : existingPath; newPath = newPath instanceof URL ? pathFromURL(newPath) : newPath; Deno.link(existingPath, newPath).then(()=>callback(null), callback); } /** * TODO: Also accept 'path' parameter as a Node polyfill Buffer type once these * are implemented. See https://github.com/denoland/deno/issues/3403 */ export const linkPromise = promisify(link); /** * TODO: Also accept 'path' parameter as a Node polyfill Buffer type once these * are implemented. See https://github.com/denoland/deno/issues/3403 */ export function linkSync(existingPath, newPath) { existingPath = existingPath instanceof URL ? pathFromURL(existingPath) : existingPath; newPath = newPath instanceof URL ? pathFromURL(newPath) : newPath; Deno.linkSync(existingPath, newPath); } Qd]ext:deno_node/_fs/_fs_link.tsa bD`M` TH`KLa!$L` T  I`MdSb1IbK`L` n]`" ]` ],L` M` L`M"1 ` L`"1 ` L`]L`  DbJbJc D  c`bJa? a?Ma?"1 a?a?kb @b T I`iJkb@aa    k`Dk h ei h  00b1  abAkDlD`RD]DH Q // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { CFISBIS } from "ext:deno_node/_fs/_fs_stat.ts"; import { promisify } from "ext:deno_node/internal/util.mjs"; export function lstat(path, optionsOrCallback, maybeCallback) { const callback = typeof optionsOrCallback === "function" ? optionsOrCallback : maybeCallback; const options = typeof optionsOrCallback === "object" ? optionsOrCallback : { bigint: false }; if (!callback) throw new Error("No callback function supplied"); Deno.lstat(path).then((stat)=>callback(null, CFISBIS(stat, options.bigint)), (err)=>callback(err)); } export const lstatPromise = promisify(lstat); export function lstatSync(path, options) { const origin = Deno.lstatSync(path); return CFISBIS(origin, options?.bigint || false); } Qd rext:deno_node/_fs/_fs_lstat.tsa bD`M` TH`KLa!$L` T  I`E"dSb1Ib`L` I ]`" ]` ],L` "` L`"b2 ` L`b2 ` L`]L`  D"F"Fc D  c`"Fa? a?"a?b2 a?a?&lb@b T I`)Nlb@aa    :l`Dk h ei h  00b1  abAFlD~lD`RD]DH Q"Ih// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { promisify } from "ext:deno_node/internal/util.mjs"; import { denoErrorToNodeError } from "ext:deno_node/internal/errors.ts"; import { getValidatedPath } from "ext:deno_node/internal/fs/utils.mjs"; import { validateBoolean } from "ext:deno_node/internal/validators.mjs"; export function mkdir(path, options, callback) { path = getValidatedPath(path); let mode = 0o777; let recursive = false; if (typeof options == "function") { callback = options; } else if (typeof options === "number") { mode = options; } else if (typeof options === "boolean") { recursive = options; } else if (options) { if (options.recursive !== undefined) recursive = options.recursive; if (options.mode !== undefined) mode = options.mode; } validateBoolean(recursive, "options.recursive"); Deno.mkdir(path, { recursive, mode }).then(()=>{ if (typeof callback === "function") { callback(null); } }, (err)=>{ if (typeof callback === "function") { callback(err); } }); } export const mkdirPromise = promisify(mkdir); export function mkdirSync(path, options) { path = getValidatedPath(path); let mode = 0o777; let recursive = false; if (typeof options === "number") { mode = options; } else if (typeof options === "boolean") { recursive = options; } else if (options) { if (options.recursive !== undefined) recursive = options.recursive; if (options.mode !== undefined) mode = options.mode; } validateBoolean(recursive, "options.recursive"); try { Deno.mkdirSync(path, { recursive, mode }); } catch (err) { throw denoErrorToNodeError(err, { syscall: "mkdir", path }); } } Qdiyext:deno_node/_fs/_fs_mkdir.tsa bD`M` TH`KLa!$L` T  I`|Sb1Ibh`L` " ]` ]` ]`a" ]`],L` ` L`3 ` L`3 b` L`b]L`  DbGbGc D  cIY D  c D  c` a?bGa? a? a?a?3 a?ba?lb@b T I` gblb@aa    l`Dk h ei h  00b1  abAlDlD`RD]DH Q // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Node.js contributors. All rights reserved. MIT License. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { TextDecoder, TextEncoder } from "ext:deno_web/08_text_encoding.js"; import { existsSync } from "ext:deno_node/_fs/_fs_exists.ts"; import { mkdir, mkdirSync } from "ext:deno_node/_fs/_fs_mkdir.ts"; import { ERR_INVALID_ARG_TYPE, ERR_INVALID_OPT_VALUE_ENCODING } from "ext:deno_node/internal/errors.ts"; import { promisify } from "ext:deno_node/internal/util.mjs"; export function mkdtemp(prefix, optionsOrCallback, maybeCallback) { const callback = typeof optionsOrCallback == "function" ? optionsOrCallback : maybeCallback; if (!callback) { throw new ERR_INVALID_ARG_TYPE("callback", "function", callback); } const encoding = parseEncoding(optionsOrCallback); const path = tempDirPath(prefix); mkdir(path, { recursive: false, mode: 0o700 }, (err)=>{ if (err) callback(err); else callback(null, decode(path, encoding)); }); } export const mkdtempPromise = promisify(mkdtemp); // https://nodejs.org/dist/latest-v15.x/docs/api/fs.html#fs_fs_mkdtempsync_prefix_options export function mkdtempSync(prefix, options) { const encoding = parseEncoding(options); const path = tempDirPath(prefix); mkdirSync(path, { recursive: false, mode: 0o700 }); return decode(path, encoding); } function parseEncoding(optionsOrCallback) { let encoding; if (typeof optionsOrCallback == "function") encoding = undefined; else if (optionsOrCallback instanceof Object) { encoding = optionsOrCallback?.encoding; } else encoding = optionsOrCallback; if (encoding) { try { new TextDecoder(encoding); } catch { throw new ERR_INVALID_OPT_VALUE_ENCODING(encoding); } } return encoding; } function decode(str, encoding) { if (!encoding) return str; else { const decoder = new TextDecoder(encoding); const encoder = new TextEncoder(); return decoder.decode(encoder.encode(str)); } } const CHARS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; function randomName() { return [ ...Array(6) ].map(()=>CHARS[Math.floor(Math.random() * CHARS.length)]).join(""); } function tempDirPath(prefix) { let path; do { path = prefix + randomName(); }while (existsSync(path)) return path; } QdhO ext:deno_node/_fs/_fs_mkdtemp.tsa bD`,M`  TX`j0La < T  I`{bHSb1bH".bIKHd?????Ib `L` ]`(+ ]`g"4 ]` ]`" ]`P],L` 4 ` L`4 B5 ` L`B5 5 ` L`5 ](L`  Db b c DB B c  Deec DBBc  D+ + cU_ Dc Dbbc D  c?H` ea?Ba?+ a?a?ba?b a?B a? a?4 a?B5 a?5 a?mb@ T I`N".*mb@ T I` Kb@ T I`/ Hb@$L` T I`d4 b@b T I` 5 b@aa  I  m`Do h Ƃ%%%%%ei h  00b1 %  abAmDm"m~mmDmD`RD]DH =Q9c+b// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { core } from "ext:core/mod.js"; const { internalRidSymbol } = core; import { O_APPEND, O_CREAT, O_EXCL, O_RDWR, O_TRUNC, O_WRONLY } from "ext:deno_node/_fs/_fs_constants.ts"; import { getOpenOptions } from "ext:deno_node/_fs/_fs_common.ts"; import { parseFileMode } from "ext:deno_node/internal/validators.mjs"; import { ERR_INVALID_ARG_TYPE } from "ext:deno_node/internal/errors.ts"; import { getValidatedPath } from "ext:deno_node/internal/fs/utils.mjs"; import { FileHandle } from "ext:deno_node/internal/fs/handle.ts"; function existsSync(filePath) { try { Deno.lstatSync(filePath); return true; } catch (error) { if (error instanceof Deno.errors.NotFound) { return false; } throw error; } } const FLAGS_AX = O_APPEND | O_CREAT | O_WRONLY | O_EXCL; const FLAGS_AX_PLUS = O_APPEND | O_CREAT | O_RDWR | O_EXCL; const FLAGS_WX = O_TRUNC | O_CREAT | O_WRONLY | O_EXCL; const FLAGS_WX_PLUS = O_TRUNC | O_CREAT | O_RDWR | O_EXCL; function convertFlagAndModeToOptions(flag, mode) { if (flag === undefined && mode === undefined) return undefined; if (flag === undefined && mode) return { mode }; return { ...getOpenOptions(flag), mode }; } export function open(path, flags, mode, callback) { if (flags === undefined) { throw new ERR_INVALID_ARG_TYPE("flags or callback", [ "string", "function" ], flags); } path = getValidatedPath(path); if (arguments.length < 3) { // deno-lint-ignore no-explicit-any callback = flags; flags = "r"; mode = 0o666; } else if (typeof mode === "function") { callback = mode; mode = 0o666; } else { mode = parseFileMode(mode, "mode", 0o666); } if (typeof callback !== "function") { throw new ERR_INVALID_ARG_TYPE("callback", "function", callback); } if (flags === undefined) { flags = "r"; } if (existenceCheckRequired(flags) && existsSync(path)) { const err = new Error(`EEXIST: file already exists, open '${path}'`); callback(err); } else { if (flags === "as" || flags === "as+") { let err = null, res; try { res = openSync(path, flags, mode); } catch (error) { err = error instanceof Error ? error : new Error("[non-error thrown]"); } if (err) { callback(err); } else { callback(null, res); } return; } Deno.open(path, convertFlagAndModeToOptions(flags, mode)).then((file)=>callback(null, file[internalRidSymbol]), (err)=>callback(err)); } } export function openPromise(path, flags = "r", mode = 0o666) { return new Promise((resolve, reject)=>{ open(path, flags, mode, (err, fd)=>{ if (err) reject(err); else resolve(new FileHandle(fd)); }); }); } export function openSync(path, flags, maybeMode) { const mode = parseFileMode(maybeMode, "mode", 0o666); path = getValidatedPath(path); if (flags === undefined) { flags = "r"; } if (existenceCheckRequired(flags) && existsSync(path)) { throw new Error(`EEXIST: file already exists, open '${path}'`); } return Deno.openSync(path, convertFlagAndModeToOptions(flags, mode))[internalRidSymbol]; } function existenceCheckRequired(flags) { return typeof flags === "string" && [ "ax", "ax+", "wx", "wx+" ].includes(flags) || typeof flags === "number" && ((flags & FLAGS_AX) === FLAGS_AX || (flags & FLAGS_AX_PLUS) === FLAGS_AX_PLUS || (flags & FLAGS_WX) === FLAGS_WX || (flags & FLAGS_WX_PLUS) === FLAGS_WX_PLUS); } Qd윙ext:deno_node/_fs/_fs_open.tsa bD`4M`  T`DLaB T  I`+ Sb1&+ M"NNOOBPg????????Ibb`$L` bS]`B$ ]`KB@]`" ]` ]` ]`dL]`],L` Bv` L`Bv7 ` L`7 "` L`"]8L`   Db b c DLLc D> > c DA A c  DB B c"( Db= b= c*0 D"> "> c29 D= = c;C D  c DKKcz D  cL\ D}}c` a?> a?A a?B a?b= a?"> a?= a?Ka?}a?b a? a?La?Bva?7 a?"a?mb@ T I`gOmb$@ T I`1 aBPb@ ,L`  T I`| Bvb @a T I` s 7 b@a T I`  "b@ aa  &> A = B b= ">   m`D} h %%%%%%% % ei h  0-%0 0 >0 >0 >%00>0 >0>%00>0> 0> %00> 0> 0> % b@!B!bAmBnVnD^nDfnJnD`RD]DH Qsq// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import Dir from "ext:deno_node/_fs/_fs_dir.ts"; import { getOptions, getValidatedPath } from "ext:deno_node/internal/fs/utils.mjs"; import { denoErrorToNodeError } from "ext:deno_node/internal/errors.ts"; import { validateFunction, validateInteger } from "ext:deno_node/internal/validators.mjs"; import { promisify } from "ext:deno_node/internal/util.mjs"; function _validateFunction(callback) { validateFunction(callback, "callback"); } /** @link https://nodejs.org/api/fs.html#fsopendirsyncpath-options */ export function opendir(path, options, callback) { callback = typeof options === "function" ? options : callback; _validateFunction(callback); path = getValidatedPath(path).toString(); let err, dir; try { const { bufferSize } = getOptions(options, { encoding: "utf8", bufferSize: 32 }); validateInteger(bufferSize, "options.bufferSize", 1, 4294967295); /** Throws if path is invalid */ Deno.readDirSync(path); dir = new Dir(path); } catch (error) { err = denoErrorToNodeError(error, { syscall: "opendir" }); } if (err) { callback(err); } else { callback(null, dir); } } /** @link https://nodejs.org/api/fs.html#fspromisesopendirpath-options */ export const opendirPromise = promisify(opendir); export function opendirSync(path, options) { path = getValidatedPath(path).toString(); const { bufferSize } = getOptions(options, { encoding: "utf8", bufferSize: 32 }); validateInteger(bufferSize, "options.bufferSize", 1, 4294967295); try { /** Throws if path is invalid */ Deno.readDirSync(path); return new Dir(path); } catch (err) { throw denoErrorToNodeError(err, { syscall: "opendir" }); } } Qd=Hf ext:deno_node/_fs/_fs_opendir.tsa bD`M` TL`Q La' T  I`9qbQSb1bQ`?Ibq`L` ( ]` ]` ]`c" ]`" ]`],L` B8 ` L`B8 8 ` L`8 "9 ` L`"9 ]$L`  Db( c DbGbGcG[ D‡‡c D  c D  c D  c D"[ "[ c` b( a?‡a? a?bGa? a?"[ a? a?B8 a?8 a?"9 a?vnb@$L` T I`;B8 nb@b T I`p"9 b@aa    n`Dl h Ƃ%ei h  00b1  abAnnnD`RD]DH Qz8// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { Buffer } from "node:buffer"; import { ERR_INVALID_ARG_TYPE } from "ext:deno_node/internal/errors.ts"; import * as io from "ext:deno_io/12_io.js"; import * as fs from "ext:deno_fs/30_fs.js"; import { validateOffsetLengthRead, validatePosition } from "ext:deno_node/internal/fs/utils.mjs"; import { validateBuffer, validateInteger } from "ext:deno_node/internal/validators.mjs"; export function read(fd, optOrBufferOrCb, offsetOrCallback, length, position, callback) { let cb; let offset = 0, buffer; if (typeof fd !== "number") { throw new ERR_INVALID_ARG_TYPE("fd", "number", fd); } if (length == null) { length = 0; } if (typeof offsetOrCallback === "function") { cb = offsetOrCallback; } else if (typeof optOrBufferOrCb === "function") { cb = optOrBufferOrCb; } else { offset = offsetOrCallback; validateInteger(offset, "offset", 0); cb = callback; } if (optOrBufferOrCb instanceof Buffer || optOrBufferOrCb instanceof Uint8Array) { buffer = optOrBufferOrCb; } else if (typeof optOrBufferOrCb === "function") { offset = 0; buffer = Buffer.alloc(16384); length = buffer.byteLength; position = null; } else { const opt = optOrBufferOrCb; if (!(opt.buffer instanceof Buffer) && !(opt.buffer instanceof Uint8Array)) { if (opt.buffer === null) { // @ts-ignore: Intentionally create TypeError for passing test-fs-read.js#L87 length = opt.buffer.byteLength; } throw new ERR_INVALID_ARG_TYPE("buffer", [ "Buffer", "TypedArray", "DataView" ], optOrBufferOrCb); } offset = opt.offset ?? 0; buffer = opt.buffer ?? Buffer.alloc(16384); length = opt.length ?? buffer.byteLength; position = opt.position ?? null; } if (position == null) { position = -1; } validatePosition(position); validateOffsetLengthRead(offset, length, buffer.byteLength); if (!cb) throw new ERR_INVALID_ARG_TYPE("cb", "Callback", cb); (async ()=>{ try { let nread; if (typeof position === "number" && position >= 0) { const currentPosition = await fs.seek(fd, 0, io.SeekMode.Current); // We use sync calls below to avoid being affected by others during // these calls. fs.seekSync(fd, position, io.SeekMode.Start); nread = io.readSync(fd, buffer); fs.seekSync(fd, currentPosition, io.SeekMode.Start); } else { nread = await io.read(fd, buffer); } cb(null, nread ?? 0, Buffer.from(buffer.buffer, offset, length)); } catch (error) { cb(error, null); } })(); } export function readSync(fd, buffer, offsetOrOpt, length, position) { let offset = 0; if (typeof fd !== "number") { throw new ERR_INVALID_ARG_TYPE("fd", "number", fd); } validateBuffer(buffer); if (length == null) { length = 0; } if (typeof offsetOrOpt === "number") { offset = offsetOrOpt; validateInteger(offset, "offset", 0); } else if (offsetOrOpt !== undefined) { const opt = offsetOrOpt; offset = opt.offset ?? 0; length = opt.length ?? buffer.byteLength; position = opt.position ?? null; } if (position == null) { position = -1; } validatePosition(position); validateOffsetLengthRead(offset, length, buffer.byteLength); let currentPosition = 0; if (typeof position === "number" && position >= 0) { currentPosition = fs.seekSync(fd, 0, io.SeekMode.Current); fs.seekSync(fd, position, io.SeekMode.Start); } const numberOfBytesRead = io.readSync(fd, buffer); if (typeof position === "number" && position >= 0) { fs.seekSync(fd, currentPosition, io.SeekMode.Start); } return numberOfBytesRead ?? 0; } Qd'ext:deno_node/_fs/_fs_read.tsa bD`M` TH`NLa5 L` T  I`P Sb1Ga??Ib8` L` b]` ]`b]`=E]`i ]`" ]`] L`` L`` L`L`  DGDc57 DDcac L` D"{ "{ c Db b c D^ ^ c D"[ "[ c  D""c Dc`"{ a?b a?"a?a?^ a?"[ a?a?a?ob @a T I` 7.ob@aa   o`Dk h ei e% e% h   `bA&oDoD`RD]DH =Q9Dh // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { TextDecoder, TextEncoder } from "ext:deno_web/08_text_encoding.js"; import { asyncIterableToCallback } from "ext:deno_node/_fs/_fs_watch.ts"; import Dirent from "ext:deno_node/_fs/_fs_dirent.ts"; import { denoErrorToNodeError } from "ext:deno_node/internal/errors.ts"; import { getValidatedPath } from "ext:deno_node/internal/fs/utils.mjs"; import { promisify } from "ext:deno_node/internal/util.mjs"; function toDirent(val) { return new Dirent(val); } export function readdir(path, optionsOrCallback, maybeCallback) { const callback = typeof optionsOrCallback === "function" ? optionsOrCallback : maybeCallback; const options = typeof optionsOrCallback === "object" ? optionsOrCallback : null; const result = []; path = getValidatedPath(path); if (!callback) throw new Error("No callback function supplied"); if (options?.encoding) { try { new TextDecoder(options.encoding); } catch { throw new Error(`TypeError [ERR_INVALID_OPT_VALUE_ENCODING]: The value "${options.encoding}" is invalid for option "encoding"`); } } try { asyncIterableToCallback(Deno.readDir(path.toString()), (val, done)=>{ if (typeof path !== "string") return; if (done) { callback(null, result); return; } if (options?.withFileTypes) { result.push(toDirent(val)); } else result.push(decode(val.name)); }, (e)=>{ callback(denoErrorToNodeError(e, { syscall: "readdir" })); }); } catch (e) { callback(denoErrorToNodeError(e, { syscall: "readdir" })); } } function decode(str, encoding) { if (!encoding) return str; else { const decoder = new TextDecoder(encoding); const encoder = new TextEncoder(); return decoder.decode(encoder.encode(str)); } } export const readdirPromise = promisify(readdir); export function readdirSync(path, options) { const result = []; path = getValidatedPath(path); if (options?.encoding) { try { new TextDecoder(options.encoding); } catch { throw new Error(`TypeError [ERR_INVALID_OPT_VALUE_ENCODING]: The value "${options.encoding}" is invalid for option "encoding"`); } } try { for (const file of Deno.readDirSync(path.toString())){ if (options?.withFileTypes) { result.push(toDirent(file)); } else result.push(decode(file.name)); } } catch (e) { throw denoErrorToNodeError(e, { syscall: "readdir" }); } return result; } Qdu ext:deno_node/_fs/_fs_readdir.tsa bD`$M` TL`W$La- T  I`fBUSb1BU".a??Ibh ` L` ]`"R ]`/) ]`d ]` ]`" ]`2],L` "; ` L`"; ; ` L`; < ` L`< ]$L`  D) cX^ Deec DBBc DTTc' DbGbGc D  c D  c!*` ea?Ba?Ta?) a?bGa? a? a?"; a?; a?< a?ob@ T I`".ob@$L` T I`"; b@b T I`g < b@aa    o`Dl h Ƃ%%ei h  00b1  abAopDp"pD`RD]DH QZ0// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { getEncoding } from "ext:deno_node/_fs/_fs_common.ts"; import { Buffer } from "node:buffer"; import { readAll } from "ext:deno_io/12_io.js"; import { FileHandle } from "ext:deno_node/internal/fs/handle.ts"; import { pathFromURL } from "ext:deno_web/00_infra.js"; import { FsFile } from "ext:deno_fs/30_fs.js"; function maybeDecode(data, encoding) { const buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength); if (encoding && encoding !== "binary") return buffer.toString(encoding); return buffer; } export function readFile(path, optOrCallback, callback) { path = path instanceof URL ? pathFromURL(path) : path; let cb; if (typeof optOrCallback === "function") { cb = optOrCallback; } else { cb = callback; } const encoding = getEncoding(optOrCallback); let p; if (path instanceof FileHandle) { const fsFile = new FsFile(path.fd, Symbol.for("Deno.internal.FsFile")); p = readAll(fsFile); } else { p = Deno.readFile(path); } if (cb) { p.then((data)=>{ if (encoding && encoding !== "binary") { const text = maybeDecode(data, encoding); return cb(null, text); } const buffer = maybeDecode(data, encoding); cb(null, buffer); }, (err)=>cb && cb(err)); } } export function readFilePromise(path, options) { return new Promise((resolve, reject)=>{ readFile(path, options, (err, data)=>{ if (err) reject(err); else resolve(data); }); }); } export function readFileSync(path, opt) { path = path instanceof URL ? pathFromURL(path) : path; const data = Deno.readFileSync(path); const encoding = getEncoding(opt); if (encoding && encoding !== "binary") { const text = maybeDecode(data, encoding); return text; } const buffer = maybeDecode(data, encoding); return buffer; } Qe!ext:deno_node/_fs/_fs_readFile.tsa bD`,M`  T@`@La' T  I` "VSb1"V`?Ib` L` B@]`b]`b]`7L]`jn]`E]`],L` ` L`B= ` L`B= ` L`] L`  D"{ "{ c DLLcXb Dc DUUc DbJbJc Dc(/` Ua?"{ a?a?La?bJa?a?a?B= a?a?2pb@,L`  T I`Vpb@a T I`}B= b@a T I`b@aa   Fp`Di h Ƃ%ei h   `bANppDpDpD`RD]DH EQADx// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { TextEncoder } from "ext:deno_web/08_text_encoding.js"; import { intoCallbackAPIWithIntercept, notImplemented } from "ext:deno_node/_utils.ts"; import { pathFromURL } from "ext:deno_web/00_infra.js"; import { promisify } from "ext:deno_node/internal/util.mjs"; function maybeEncode(data, encoding) { if (encoding === "buffer") { return new TextEncoder().encode(data); } return data; } function getEncoding(optOrCallback) { if (!optOrCallback || typeof optOrCallback === "function") { return null; } else { if (optOrCallback.encoding) { if (optOrCallback.encoding === "utf8" || optOrCallback.encoding === "utf-8") { return "utf8"; } else if (optOrCallback.encoding === "buffer") { return "buffer"; } else { notImplemented(`fs.readlink encoding=${optOrCallback.encoding}`); } } return null; } } export function readlink(path, optOrCallback, callback) { path = path instanceof URL ? pathFromURL(path) : path; let cb; if (typeof optOrCallback === "function") { cb = optOrCallback; } else { cb = callback; } const encoding = getEncoding(optOrCallback); intoCallbackAPIWithIntercept(Deno.readLink, (data)=>maybeEncode(data, encoding), cb, path); } export const readlinkPromise = promisify(readlink); export function readlinkSync(path, opt) { path = path instanceof URL ? pathFromURL(path) : path; return maybeEncode(Deno.readLinkSync(path), getEncoding(opt)); } Qe*g!ext:deno_node/_fs/_fs_readlink.tsa bD` M` TL`W$La- T  I`LWSb1WUa??Ibx`L` ]` ]`7n]`n" ]`],L` > ` L`> ? ` L`? ? ` L`? ]L`  DBBc D!!c Db b c!/ DbJbJc[f D  c`Ba?!a?b a?bJa? a?> a?? a?? a?pb@ T I`a*Upb@$L` T I`C> b@b T I`w? b@aa    p`Dl h Ƃ%%ei h  00b1  abAp2q>qDFqD`RD]DH qQm// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { promisify } from "ext:deno_node/internal/util.mjs"; export function realpath(path, options, callback) { if (typeof options === "function") { callback = options; } if (!callback) { throw new Error("No callback function supplied"); } Deno.realPath(path).then((path)=>callback(null, path), (err)=>callback(err)); } realpath.native = realpath; export const realpathPromise = promisify(realpath); export function realpathSync(path) { return Deno.realPathSync(path); } realpathSync.native = realpathSync; Qez~!ext:deno_node/_fs/_fs_realpath.tsa bD`M` TT`b La!$L` T  I` @ XSb1Ib` L` " ]`],L` @ ` L`@ BA ` L`BA A ` L`A ] L`  D  c` a?@ a?BA a?A a?Vqb@b T I`yA ~qb@aa    jq`Dn h ei h  00200b1002  a bAvqDqD`RD]DH QB// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { pathFromURL } from "ext:deno_web/00_infra.js"; import { promisify } from "ext:deno_node/internal/util.mjs"; export function rename(oldPath, newPath, callback) { oldPath = oldPath instanceof URL ? pathFromURL(oldPath) : oldPath; newPath = newPath instanceof URL ? pathFromURL(newPath) : newPath; if (!callback) throw new Error("No callback function supplied"); Deno.rename(oldPath, newPath).then((_)=>callback(), callback); } export const renamePromise = promisify(rename); export function renameSync(oldPath, newPath) { oldPath = oldPath instanceof URL ? pathFromURL(oldPath) : oldPath; newPath = newPath instanceof URL ? pathFromURL(newPath) : newPath; Deno.renameSync(oldPath, newPath); } QdY8!ext:deno_node/_fs/_fs_rename.tsa bD`M` TH`KLa!$L` T  I`EsdSb1Ib`L` n]`" ]` ],L` ` L`"C ` L`"C b` L`b]L`  DbJbJc D  c`bJa? a?a?"C a?ba?qb@b T I`bqb@aa    q`Dk h ei h  00b1  abAqDrD`RD]DH QV;// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { emitRecursiveRmdirWarning, getValidatedPath, validateRmdirOptions, validateRmOptions, validateRmOptionsSync } from "ext:deno_node/internal/fs/utils.mjs"; import { toNamespacedPath } from "node:path"; import { denoErrorToNodeError, ERR_FS_RMDIR_ENOTDIR } from "ext:deno_node/internal/errors.ts"; import { promisify } from "ext:deno_node/internal/util.mjs"; export function rmdir(path, optionsOrCallback, maybeCallback) { path = toNamespacedPath(getValidatedPath(path)); const callback = typeof optionsOrCallback === "function" ? optionsOrCallback : maybeCallback; const options = typeof optionsOrCallback === "object" ? optionsOrCallback : undefined; if (!callback) throw new Error("No callback function supplied"); if (options?.recursive) { emitRecursiveRmdirWarning(); validateRmOptions(path, { ...options, force: false }, true, (err, options)=>{ if (err === false) { return callback(new ERR_FS_RMDIR_ENOTDIR(path.toString())); } if (err) { return callback(err); } Deno.remove(path, { recursive: options?.recursive }).then((_)=>callback(), callback); }); } else { validateRmdirOptions(options); Deno.remove(path, { recursive: options?.recursive }).then((_)=>callback(), (err)=>{ callback(err instanceof Error ? denoErrorToNodeError(err, { syscall: "rmdir" }) : err); }); } } export const rmdirPromise = promisify(rmdir); export function rmdirSync(path, options) { path = getValidatedPath(path); if (options?.recursive) { emitRecursiveRmdirWarning(); const optionsOrFalse = validateRmOptionsSync(path, { ...options, force: false }, true); if (optionsOrFalse === false) { throw new ERR_FS_RMDIR_ENOTDIR(path.toString()); } options = optionsOrFalse; } else { validateRmdirOptions(options); } try { Deno.removeSync(toNamespacedPath(path), { recursive: options?.recursive }); } catch (err) { throw err instanceof Error ? denoErrorToNodeError(err, { syscall: "rmdir" }) : err; } } Qd*$ext:deno_node/_fs/_fs_rmdir.tsa bD`$M` TH`KLa!$L` T  I`<NbD Sb1Ib`L`  ]`6"( ]`~ ]`" ]`],L` bD ` L`bD D ` L`D BE ` L`BE ],L`   D"F"Fc DbGbGc Dc D  c D  c D44cfv D""c Dbbc. DBBc` a? a?Ba?"a?ba?4a?bGa?"Fa? a?bD a?D a?BE a?rb@b T I`BE Frb@aa    2r`Dk h ei h  00b1  abA>rDrD`RD]DH EQA-q// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { validateRmOptions, validateRmOptionsSync } from "ext:deno_node/internal/fs/utils.mjs"; import { denoErrorToNodeError } from "ext:deno_node/internal/errors.ts"; import { promisify } from "ext:deno_node/internal/util.mjs"; export function rm(path, optionsOrCallback, maybeCallback) { const callback = typeof optionsOrCallback === "function" ? optionsOrCallback : maybeCallback; const options = typeof optionsOrCallback === "object" ? optionsOrCallback : undefined; if (!callback) throw new Error("No callback function supplied"); validateRmOptions(path, options, false, (err, options)=>{ if (err) { return callback(err); } Deno.remove(path, { recursive: options?.recursive }).then((_)=>callback(null), (err)=>{ if (options?.force && err instanceof Deno.errors.NotFound) { callback(null); } else { callback(err instanceof Error ? denoErrorToNodeError(err, { syscall: "rm" }) : err); } }); }); } export const rmPromise = promisify(rm); export function rmSync(path, options) { options = validateRmOptionsSync(path, options, false); try { Deno.removeSync(path, { recursive: options?.recursive }); } catch (err) { if (options?.force && err instanceof Deno.errors.NotFound) { return; } if (err instanceof Error) { throw denoErrorToNodeError(err, { syscall: "stat" }); } else { throw err; } } } Qd7ext:deno_node/_fs/_fs_rm.tsa bD` M` TH`KLa!$L` T  I`F |Sb1Ibq`L`  ]` ]`?" ]`}],L` F ` L`F F ` L`F bG ` L`bG ]L`  DbGbGc#7 D  clu D""c Dbbc`"a?ba?bGa? a?F a?F a?bG a?rb @b T I`pbG rb@aa    r`Dk h ei h  00b1  abArDsD`RD]DH QҁnC// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { denoErrorToNodeError } from "ext:deno_node/internal/errors.ts"; import { promisify } from "ext:deno_node/internal/util.mjs"; export function convertFileInfoToStats(origin) { return { dev: origin.dev, ino: origin.ino, mode: origin.mode, nlink: origin.nlink, uid: origin.uid, gid: origin.gid, rdev: origin.rdev, size: origin.size, blksize: origin.blksize, blocks: origin.blocks, mtime: origin.mtime, atime: origin.atime, birthtime: origin.birthtime, mtimeMs: origin.mtime?.getTime() || null, atimeMs: origin.atime?.getTime() || null, birthtimeMs: origin.birthtime?.getTime() || null, isFile: ()=>origin.isFile, isDirectory: ()=>origin.isDirectory, isSymbolicLink: ()=>origin.isSymlink, // not sure about those isBlockDevice: ()=>false, isFIFO: ()=>false, isCharacterDevice: ()=>false, isSocket: ()=>false, ctime: origin.mtime, ctimeMs: origin.mtime?.getTime() || null }; } function toBigInt(number) { if (number === null || number === undefined) return null; return BigInt(number); } export function convertFileInfoToBigIntStats(origin) { return { dev: toBigInt(origin.dev), ino: toBigInt(origin.ino), mode: toBigInt(origin.mode), nlink: toBigInt(origin.nlink), uid: toBigInt(origin.uid), gid: toBigInt(origin.gid), rdev: toBigInt(origin.rdev), size: toBigInt(origin.size) || 0n, blksize: toBigInt(origin.blksize), blocks: toBigInt(origin.blocks), mtime: origin.mtime, atime: origin.atime, birthtime: origin.birthtime, mtimeMs: origin.mtime ? BigInt(origin.mtime.getTime()) : null, atimeMs: origin.atime ? BigInt(origin.atime.getTime()) : null, birthtimeMs: origin.birthtime ? BigInt(origin.birthtime.getTime()) : null, mtimeNs: origin.mtime ? BigInt(origin.mtime.getTime()) * 1000000n : null, atimeNs: origin.atime ? BigInt(origin.atime.getTime()) * 1000000n : null, birthtimeNs: origin.birthtime ? BigInt(origin.birthtime.getTime()) * 1000000n : null, isFile: ()=>origin.isFile, isDirectory: ()=>origin.isDirectory, isSymbolicLink: ()=>origin.isSymlink, // not sure about those isBlockDevice: ()=>false, isFIFO: ()=>false, isCharacterDevice: ()=>false, isSocket: ()=>false, ctime: origin.mtime, ctimeMs: origin.mtime ? BigInt(origin.mtime.getTime()) : null, ctimeNs: origin.mtime ? BigInt(origin.mtime.getTime()) * 1000000n : null }; } // shortcut for Convert File Info to Stats or BigIntStats export function CFISBIS(fileInfo, bigInt) { if (bigInt) return convertFileInfoToBigIntStats(fileInfo); return convertFileInfoToStats(fileInfo); } export function stat(path, optionsOrCallback, maybeCallback) { const callback = typeof optionsOrCallback === "function" ? optionsOrCallback : maybeCallback; const options = typeof optionsOrCallback === "object" ? optionsOrCallback : { bigint: false }; if (!callback) throw new Error("No callback function supplied"); Deno.stat(path).then((stat)=>callback(null, CFISBIS(stat, options.bigint)), (err)=>callback(denoErrorToNodeError(err, { syscall: "stat" }))); } export const statPromise = promisify(stat); export function statSync(path, options = { bigint: false, throwIfNoEntry: true }) { try { const origin = Deno.statSync(path); return CFISBIS(origin, options.bigint); } catch (err) { if (options?.throwIfNoEntry === false && err instanceof Deno.errors.NotFound) { return; } if (err instanceof Error) { throw denoErrorToNodeError(err, { syscall: "stat" }); } else { throw err; } } } Qd4$ext:deno_node/_fs/_fs_stat.tsa bD`dM` TL`Q La' T  I`YSb1Y`?Ib`L`  ]`" ]`]PL`"F` L`"FY` L`YX` L`X` L`H ` L`H b` L`b]L`  DbGbGc D  c `bGa? a?Xa?Ya?"Fa?a?H a?ba?sb@ HL` T I`fXBsb@a T I`5j Yb%@ a T I` : "Fb@a T I`O  b @b T I`d bb@aa    2s`Dl h Ƃ%ei h  00b1  abAsD:ssDssDsD`RD]DH 5Q1LpX// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { pathFromURL } from "ext:deno_web/00_infra.js"; import { promisify } from "ext:deno_node/internal/util.mjs"; export function symlink(target, path, typeOrCallback, maybeCallback) { target = target instanceof URL ? pathFromURL(target) : target; path = path instanceof URL ? pathFromURL(path) : path; const type = typeof typeOrCallback === "string" ? typeOrCallback : "file"; const callback = typeof typeOrCallback === "function" ? typeOrCallback : maybeCallback; if (!callback) throw new Error("No callback function supplied"); Deno.symlink(target, path, { type }).then(()=>callback(null), callback); } export const symlinkPromise = promisify(symlink); export function symlinkSync(target, path, type) { target = target instanceof URL ? pathFromURL(target) : target; path = path instanceof URL ? pathFromURL(path) : path; type = type || "file"; Deno.symlinkSync(target, path, { type }); } Qd ext:deno_node/_fs/_fs_symlink.tsa bD`M` TH`KLa!$L` T  I`F,dSb1IbX`L` n]`" ]` ],L` ` L`I ` L`I ` L`]L`  DbJbJc D  c`bJa? a?a?I a?a?sb@b T I`zWsb@aa    s`Dk h ei h  00b1  abAsD tD`RD]DH QVګ// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { pathFromURL } from "ext:deno_web/00_infra.js"; import { promisify } from "ext:deno_node/internal/util.mjs"; export function truncate(path, lenOrCallback, maybeCallback) { path = path instanceof URL ? pathFromURL(path) : path; const len = typeof lenOrCallback === "number" ? lenOrCallback : undefined; const callback = typeof lenOrCallback === "function" ? lenOrCallback : maybeCallback; if (!callback) throw new Error("No callback function supplied"); Deno.truncate(path, len).then(()=>callback(null), callback); } export const truncatePromise = promisify(truncate); export function truncateSync(path, len) { path = path instanceof URL ? pathFromURL(path) : path; Deno.truncateSync(path, len); } Qe!ext:deno_node/_fs/_fs_truncate.tsa bD`M` TH`KLa!$L` T  I`G¿dSb1Ib`L` n]`" ]` ],L` ¿` L`¿K ` L`K B` L`B]L`  DbJbJc D  c`bJa? a?¿a?K a?Ba?tb@b T I` BBtb@aa    .t`Dk h ei h  00b1  abA:tDrtD`RD]DH  Q  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { promisify } from "ext:deno_node/internal/util.mjs"; export function unlink(path, callback) { if (!callback) throw new Error("No callback function supplied"); Deno.remove(path).then((_)=>callback(), callback); } export const unlinkPromise = promisify(unlink); export function unlinkSync(path) { Deno.removeSync(path); } Qdext:deno_node/_fs/_fs_unlink.tsa bD`M` TH`KLa!$L` T  I` bL XSb1Ib` L` " ]`],L` bL ` L`bL L ` L`L BM ` L`BM ] L`  D  c` a?bL a?L a?BM a?tb@b T I`BM tb@aa    t`Dk h ei h  00b1  abAtDtD`RD]DH qQm]4// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { pathFromURL } from "ext:deno_web/00_infra.js"; import { promisify } from "ext:deno_node/internal/util.mjs"; function getValidTime(time, name) { if (typeof time === "string") { time = Number(time); } if (typeof time === "number" && (Number.isNaN(time) || !Number.isFinite(time))) { throw new Deno.errors.InvalidData(`invalid ${name}, must not be infinity or NaN`); } return time; } export function utimes(path, atime, mtime, callback) { path = path instanceof URL ? pathFromURL(path) : path; if (!callback) { throw new Deno.errors.InvalidData("No callback function supplied"); } atime = getValidTime(atime, "atime"); mtime = getValidTime(mtime, "mtime"); Deno.utime(path, atime, mtime).then(()=>callback(null), callback); } export const utimesPromise = promisify(utimes); export function utimesSync(path, atime, mtime) { path = path instanceof URL ? pathFromURL(path) : path; atime = getValidTime(atime, "atime"); mtime = getValidTime(mtime, "mtime"); Deno.utimeSync(path, atime, mtime); } Qd^"ext:deno_node/_fs/_fs_utimes.tsa bD`M` TL`Q La' T  I`DQGlSb1G`?Ib`L` n]`" ]` ],L` N ` L`N N ` L`N bO ` L`bO ]L`  DbJbJc D  c`bJa? a?N a?N a?bO a?tb@$L` T I`hN ub@b T I`bO b@aa    t`Dl h Ƃ%ei h  00b1  abAt:uDBuD`RD]DH  Q :.// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { basename } from "node:path"; import { EventEmitter } from "node:events"; import { notImplemented } from "ext:deno_node/_utils.ts"; import { promisify } from "node:util"; import { getValidatedPath } from "ext:deno_node/internal/fs/utils.mjs"; import { validateFunction } from "ext:deno_node/internal/validators.mjs"; import { stat } from "ext:deno_node/_fs/_fs_stat.ts"; import { Stats as StatsClass } from "ext:deno_node/internal/fs/utils.mjs"; import { delay } from "ext:deno_node/_util/async.ts"; const statPromisified = promisify(stat); const statAsync = async (filename)=>{ try { return await statPromisified(filename); } catch { return emptyStats; } }; const emptyStats = new StatsClass(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Date.UTC(1970, 0, 1, 0, 0, 0), Date.UTC(1970, 0, 1, 0, 0, 0), Date.UTC(1970, 0, 1, 0, 0, 0), Date.UTC(1970, 0, 1, 0, 0, 0)); export function asyncIterableIteratorToCallback(iterator, callback) { function next() { iterator.next().then((obj)=>{ if (obj.done) { callback(obj.value, true); return; } callback(obj.value); next(); }); } next(); } export function asyncIterableToCallback(iter, callback, errCallback) { const iterator = iter[Symbol.asyncIterator](); function next() { iterator.next().then((obj)=>{ if (obj.done) { callback(obj.value, true); return; } callback(obj.value); next(); }, errCallback); } next(); } export function watch(filename, optionsOrListener, optionsOrListener2) { const listener = typeof optionsOrListener === "function" ? optionsOrListener : typeof optionsOrListener2 === "function" ? optionsOrListener2 : undefined; const options = typeof optionsOrListener === "object" ? optionsOrListener : typeof optionsOrListener2 === "object" ? optionsOrListener2 : undefined; const watchPath = getValidatedPath(filename).toString(); let iterator; // Start the actual watcher a few msec later to avoid race condition // error in test case in compat test case // (parallel/test-fs-watch.js, parallel/test-fs-watchfile.js) const timer = setTimeout(()=>{ iterator = Deno.watchFs(watchPath, { recursive: options?.recursive || false }); asyncIterableToCallback(iterator, (val, done)=>{ if (done) return; fsWatcher.emit("change", convertDenoFsEventToNodeFsEvent(val.kind), basename(val.paths[0])); }, (e)=>{ fsWatcher.emit("error", e); }); }, 5); const fsWatcher = new FSWatcher(()=>{ clearTimeout(timer); try { iterator?.close(); } catch (e) { if (e instanceof Deno.errors.BadResource) { // already closed return; } throw e; } }); if (listener) { fsWatcher.on("change", listener.bind({ _handle: fsWatcher })); } return fsWatcher; } export const watchPromise = promisify(watch); export function watchFile(filename, listenerOrOptions, listener) { const watchPath = getValidatedPath(filename).toString(); const handler = typeof listenerOrOptions === "function" ? listenerOrOptions : listener; validateFunction(handler, "listener"); const { bigint = false, persistent = true, interval = 5007 } = typeof listenerOrOptions === "object" ? listenerOrOptions : {}; let stat = statWatchers.get(watchPath); if (stat === undefined) { stat = new StatWatcher(bigint); stat[kFSStatWatcherStart](watchPath, persistent, interval); statWatchers.set(watchPath, stat); } stat.addListener("change", listener); return stat; } export function unwatchFile(filename, listener) { const watchPath = getValidatedPath(filename).toString(); const stat = statWatchers.get(watchPath); if (!stat) { return; } if (typeof listener === "function") { const beforeListenerCount = stat.listenerCount("change"); stat.removeListener("change", listener); if (stat.listenerCount("change") < beforeListenerCount) { stat[kFSStatWatcherAddOrCleanRef]("clean"); } } else { stat.removeAllListeners("change"); stat[kFSStatWatcherAddOrCleanRef]("cleanAll"); } if (stat.listenerCount("change") === 0) { stat.stop(); statWatchers.delete(watchPath); } } const statWatchers = new Map(); const kFSStatWatcherStart = Symbol("kFSStatWatcherStart"); const kFSStatWatcherAddOrCleanRef = Symbol("kFSStatWatcherAddOrCleanRef"); class StatWatcher extends EventEmitter { #bigint; #refCount = 0; #abortController = new AbortController(); constructor(bigint){ super(); this.#bigint = bigint; } [kFSStatWatcherStart](filename, persistent, interval) { if (persistent) { this.#refCount++; } (async ()=>{ let prev = await statAsync(filename); if (prev === emptyStats) { this.emit("change", prev, prev); } try { while(true){ await delay(interval, { signal: this.#abortController.signal }); const curr = await statAsync(filename); if (curr?.mtime !== prev?.mtime) { this.emit("change", curr, prev); prev = curr; } } } catch (e) { if (e instanceof DOMException && e.name === "AbortError") { return; } this.emit("error", e); } })(); } [kFSStatWatcherAddOrCleanRef](addOrClean) { if (addOrClean === "add") { this.#refCount++; } else if (addOrClean === "clean") { this.#refCount--; } else { this.#refCount = 0; } } stop() { if (this.#abortController.signal.aborted) { return; } this.#abortController.abort(); this.emit("stop"); } ref() { notImplemented("FSWatcher.ref() is not implemented"); } unref() { notImplemented("FSWatcher.unref() is not implemented"); } } class FSWatcher extends EventEmitter { #closer; #closed = false; constructor(closer){ super(); this.#closer = closer; } close() { if (this.#closed) { return; } this.#closed = true; this.emit("close"); this.#closer(); } ref() { notImplemented("FSWatcher.ref() is not implemented"); } unref() { notImplemented("FSWatcher.unref() is not implemented"); } } function convertDenoFsEventToNodeFsEvent(kind) { if (kind === "create" || kind === "remove") { return "rename"; } else { return "change"; } } Qdj; ext:deno_node/_fs/_fs_watch.tsa bD`|M` T5`!La&? T  I`""b%Sb1 "]]"^deBfdb"bh?????????Ib`(L` "( ]`"]` ]`+: ]`` ]`" ]`I ]`b\]`]PL`^` L`^T` L`TP ` L`P W` L`W"Q ` L`"Q Q ` L`Q ],L`   D  c D[V c>C D33c DHHc D  cv Db b c# D  cOX Dc  D  c`3a? a?b a? a? a? a?a?[a?Ha?^a?Ta?Wa?Q a?"Q a?P a?Rub(@HL` T I`P.b  @ ^vub(@a TI`V{b @Tb @a T I` Wb@b T I` "Q b@ a T I`"P b@aa   T ]`b]bLP[i E eBf4Sb @gbgB d???Z  ` T ``/ `/ `?  `  aZD]f6D'a Dha B'aD aDHcDLb gbgB   T  I`G|d"vRub Ճ T I`_`b  T I`7`b  T I`>hb  T I` B'b  T I`X'b  T4`% L`  rv`Kbď \` )f5 5!i5(Sbqqd`DaZ a 4`4b ,Sb @"ic??[vu  `T ``/ `/ `?  `  a[D]< ` ajajB'aj'aj]"i T  I`bvRub Ճ T I`cb T I`iB'b T I`'b T,`]  v`Kb  T d55(Sbqqb`Da a 4b fu`Dh %%%%%%% % % ei h  00b%%0 ! -       \! -       \! -       \ ! -       \  i%00b1! i%!  b%! b%e%e%e%0tte+ 2 % e%  e%0! ‚" # $ e+% 2 % vuc P@@` bAvuDuDvD vv>vFvDNvVv^vfvnvvvvvvnuD`RD]DH }Qy>]// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { Buffer } from "node:buffer"; import { validateEncoding, validateInteger, } from "ext:deno_node/internal/validators.mjs"; import * as io from "ext:deno_io/12_io.js"; import * as fs from "ext:deno_fs/30_fs.js"; import { getValidatedFd, showStringCoercionDeprecation, validateOffsetLengthWrite, validateStringAfterArrayBufferView, } from "ext:deno_node/internal/fs/utils.mjs"; import { isArrayBufferView } from "ext:deno_node/internal/util/types.ts"; import { maybeCallback } from "ext:deno_node/_fs/_fs_common.ts"; export function writeSync(fd, buffer, offset, length, position) { fd = getValidatedFd(fd); const innerWriteSync = (fd, buffer, offset, length, position) => { if (buffer instanceof DataView) { buffer = new Uint8Array(buffer.buffer); } if (typeof position === "number") { fs.seekSync(fd, position, io.SeekMode.Start); } let currentOffset = offset; const end = offset + length; while (currentOffset - offset < length) { currentOffset += io.writeSync(fd, buffer.subarray(currentOffset, end)); } return currentOffset - offset; }; if (isArrayBufferView(buffer)) { if (position === undefined) { position = null; } if (offset == null) { offset = 0; } else { validateInteger(offset, "offset", 0); } if (typeof length !== "number") { length = buffer.byteLength - offset; } validateOffsetLengthWrite(offset, length, buffer.byteLength); return innerWriteSync(fd, buffer, offset, length, position); } validateStringAfterArrayBufferView(buffer, "buffer"); validateEncoding(buffer, length); if (offset === undefined) { offset = null; } buffer = Buffer.from(buffer, length); return innerWriteSync(fd, buffer, 0, buffer.length, position); } /** Writes the buffer to the file of the given descriptor. * https://nodejs.org/api/fs.html#fswritefd-buffer-offset-length-position-callback * https://github.com/nodejs/node/blob/42ad4137aadda69c51e1df48eee9bc2e5cebca5c/lib/fs.js#L797 */ export function write(fd, buffer, offset, length, position, callback) { fd = getValidatedFd(fd); const innerWrite = async (fd, buffer, offset, length, position) => { if (buffer instanceof DataView) { buffer = new Uint8Array(buffer.buffer); } if (typeof position === "number") { await fs.seek(fd, position, io.SeekMode.Start); } let currentOffset = offset; const end = offset + length; while (currentOffset - offset < length) { currentOffset += await io.write( fd, buffer.subarray(currentOffset, end), ); } return currentOffset - offset; }; if (isArrayBufferView(buffer)) { callback = maybeCallback(callback || position || length || offset); if (offset == null || typeof offset === "function") { offset = 0; } else { validateInteger(offset, "offset", 0); } if (typeof length !== "number") { length = buffer.byteLength - offset; } if (typeof position !== "number") { position = null; } validateOffsetLengthWrite(offset, length, buffer.byteLength); innerWrite(fd, buffer, offset, length, position).then( (nwritten) => { callback(null, nwritten, buffer); }, (err) => callback(err), ); return; } // Here the call signature is // `fs.write(fd, string[, position[, encoding]], callback)` validateStringAfterArrayBufferView(buffer, "buffer"); if (typeof buffer !== "string") { showStringCoercionDeprecation(); } if (typeof position !== "function") { if (typeof offset === "function") { position = offset; offset = null; } else { position = length; } length = "utf-8"; } const str = String(buffer); validateEncoding(str, length); callback = maybeCallback(position); buffer = Buffer.from(str, length); innerWrite(fd, buffer, 0, buffer.length, offset, callback).then( (nwritten) => { callback(null, nwritten, buffer); }, (err) => callback(err), ); } Qd!ext:deno_node/_fs/_fs_write.mjsa bD`,M`  TH`NLa5 L` T  I`BSb1Ga??Ib`$L` b]`)" ]`ob]`E]` ]`v" ]`B@]`] L`b` L`b` L`L`  DGDc DDc,L`  D"{ "{ c! Dc  D"3"3c D! ! c Dc * DcCS D"[ "[ cWf Dc.G D²²cKm` "{ a?a?"[ a?a?a?a?²a?"3a?! a?a?ba?vb@a T I`" bwb@aa   v`Dk h ei e% e% h   `bAvDnwDD`RD]DH %Q!i3 // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { Buffer } from "node:buffer"; import { validateBufferArray } from "ext:deno_node/internal/fs/utils.mjs"; import { getValidatedFd } from "ext:deno_node/internal/fs/utils.mjs"; import { maybeCallback } from "ext:deno_node/_fs/_fs_common.ts"; import * as io from "ext:deno_io/12_io.js"; import * as fs from "ext:deno_fs/30_fs.js"; export function writev(fd, buffers, position, callback) { const innerWritev = async (fd, buffers, position) => { const chunks = []; const offset = 0; for (let i = 0; i < buffers.length; i++) { if (Buffer.isBuffer(buffers[i])) { chunks.push(buffers[i]); } else { chunks.push(Buffer.from(buffers[i])); } } if (typeof position === "number") { await fs.seekSync(fd, position, io.SeekMode.Start); } const buffer = Buffer.concat(chunks); let currentOffset = 0; while (currentOffset < buffer.byteLength) { currentOffset += await io.writeSync(fd, buffer.subarray(currentOffset)); } return currentOffset - offset; }; fd = getValidatedFd(fd); validateBufferArray(buffers); callback = maybeCallback(callback || position); if (buffers.length === 0) { process.nextTick(callback, null, 0, buffers); return; } if (typeof position !== "number") position = null; innerWritev(fd, buffers, position).then( (nwritten) => { callback(null, nwritten, buffers); }, (err) => callback(err), ); } export function writevSync(fd, buffers, position) { const innerWritev = (fd, buffers, position) => { const chunks = []; const offset = 0; for (let i = 0; i < buffers.length; i++) { if (Buffer.isBuffer(buffers[i])) { chunks.push(buffers[i]); } else { chunks.push(Buffer.from(buffers[i])); } } if (typeof position === "number") { fs.seekSync(fd, position, io.SeekMode.Start); } const buffer = Buffer.concat(chunks); let currentOffset = 0; while (currentOffset < buffer.byteLength) { currentOffset += io.writeSync(fd, buffer.subarray(currentOffset)); } return currentOffset - offset; }; fd = getValidatedFd(fd); validateBufferArray(buffers); if (buffers.length === 0) { return 0; } if (typeof position !== "number") position = null; return innerWritev(fd, buffers, position); } QdZY ext:deno_node/_fs/_fs_writev.mjsa bD`$M` TH`NLa5 L` T  I`yS Sb1Ga??Ib3 `L` b]`) ]`\B@]`b]`E]`J] L`S ` L`S T ` L`T L`  DGDc DDcBDL` D"{ "{ c! Dc D! ! c DBBcAT`"{ a?Ba?a?! a?S a?T a?~wb@a T I`2 T wb@aa   w`Dk h ei e% e% h   `bAwDwDD`RD]DH Q^S[// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { pathFromURL } from "ext:deno_web/00_infra.js"; import { Buffer } from "node:buffer"; import { checkEncoding, getEncoding, getOpenOptions, isFileOptions } from "ext:deno_node/_fs/_fs_common.ts"; import { isWindows } from "ext:deno_node/_util/os.ts"; import { AbortError, denoErrorToNodeError } from "ext:deno_node/internal/errors.ts"; import { showStringCoercionDeprecation, validateStringAfterArrayBufferView } from "ext:deno_node/internal/fs/utils.mjs"; import { promisify } from "ext:deno_node/internal/util.mjs"; import { FsFile } from "ext:deno_fs/30_fs.js"; export function writeFile(pathOrRid, // deno-lint-ignore ban-types data, optOrCallback, callback) { const callbackFn = optOrCallback instanceof Function ? optOrCallback : callback; const options = optOrCallback instanceof Function ? undefined : optOrCallback; if (!callbackFn) { throw new TypeError("Callback must be a function."); } pathOrRid = pathOrRid instanceof URL ? pathFromURL(pathOrRid) : pathOrRid; const flag = isFileOptions(options) ? options.flag : undefined; const mode = isFileOptions(options) ? options.mode : undefined; const encoding = checkEncoding(getEncoding(options)) || "utf8"; const openOptions = getOpenOptions(flag || "w"); if (!ArrayBuffer.isView(data)) { validateStringAfterArrayBufferView(data, "data"); if (typeof data !== "string") { showStringCoercionDeprecation(); } data = Buffer.from(String(data), encoding); } const isRid = typeof pathOrRid === "number"; let file; let error = null; (async ()=>{ try { file = isRid ? new FsFile(pathOrRid, Symbol.for("Deno.internal.FsFile")) : await Deno.open(pathOrRid, openOptions); // ignore mode because it's not supported on windows // TODO(@bartlomieju): remove `!isWindows` when `Deno.chmod` is supported if (!isRid && mode && !isWindows) { await Deno.chmod(pathOrRid, mode); } const signal = isFileOptions(options) ? options.signal : undefined; await writeAll(file, data, { signal }); } catch (e) { error = e instanceof Error ? denoErrorToNodeError(e, { syscall: "write" }) : new Error("[non-error thrown]"); } finally{ // Make sure to close resource if (!isRid && file) file.close(); callbackFn(error); } })(); } export const writeFilePromise = promisify(writeFile); export function writeFileSync(pathOrRid, // deno-lint-ignore ban-types data, options) { pathOrRid = pathOrRid instanceof URL ? pathFromURL(pathOrRid) : pathOrRid; const flag = isFileOptions(options) ? options.flag : undefined; const mode = isFileOptions(options) ? options.mode : undefined; const encoding = checkEncoding(getEncoding(options)) || "utf8"; const openOptions = getOpenOptions(flag || "w"); if (!ArrayBuffer.isView(data)) { validateStringAfterArrayBufferView(data, "data"); if (typeof data !== "string") { showStringCoercionDeprecation(); } data = Buffer.from(String(data), encoding); } const isRid = typeof pathOrRid === "number"; let file; let error = null; try { file = isRid ? new FsFile(pathOrRid, Symbol.for("Deno.internal.FsFile")) : Deno.openSync(pathOrRid, openOptions); // ignore mode because it's not supported on windows // TODO(@bartlomieju): remove `!isWindows` when `Deno.chmod` is supported if (!isRid && mode && !isWindows) { Deno.chmodSync(pathOrRid, mode); } // TODO(crowlKats): duplicate from runtime/js/13_buffer.js let nwritten = 0; while(nwritten < data.length){ nwritten += file.writeSync(data.subarray(nwritten)); } } catch (e) { error = e instanceof Error ? denoErrorToNodeError(e, { syscall: "write" }) : new Error("[non-error thrown]"); } finally{ // Make sure to close resource if (!isRid && file) file.close(); } if (error) throw error; } async function writeAll(w, arr, options = {}) { const { offset = 0, length = arr.byteLength, signal } = options; checkAborted(signal); const written = await w.write(arr.subarray(offset, offset + length)); if (written === length) { return; } await writeAll(w, arr, { offset: offset + written, length: length - written, signal }); } function checkAborted(signal) { if (signal?.aborted) { throw new AbortError(); } } Qe]"ext:deno_node/_fs/_fs_writeFile.tsa bD` M` TL`W$La- T  I` [Sb1na??Ib`(L` n]`b]` B@]`b" ]` ]` ]`c" ]`E]`],L` b` L`bBU ` L`BU ` L`] { if (er) { callback(er); } else { stream.fd = fd; callback(); stream.emit("open", stream.fd); stream.emit("ready"); } }, ); } } function close(stream, err, cb) { if (!stream.fd) { cb(err); } else { stream[kFs].close(stream.fd, (er) => { cb(er || err); }); stream.fd = null; } } function importFd(stream, options) { if (typeof options.fd === "number") { // When fd is a raw descriptor, we must keep our fingers crossed // that the descriptor won't get closed, or worse, replaced with // another one // https://github.com/nodejs/node/issues/35862 if (stream instanceof ReadStream) { stream[kFs] = options.fs || { read: fsRead, close: fsClose }; } if (stream instanceof WriteStream) { stream[kFs] = options.fs || { write: fsWrite, writev: fsWritev, close: fsClose }; } return options.fd; } throw new ERR_INVALID_ARG_TYPE("options.fd", ["number"], options.fd); } export function ReadStream(path, options) { if (!(this instanceof ReadStream)) { return new ReadStream(path, options); } // A little bit bigger buffer and water marks by default options = copyObject(getOptions(options, kEmptyObject)); if (options.highWaterMark === undefined) { options.highWaterMark = 64 * 1024; } if (options.autoDestroy === undefined) { options.autoDestroy = false; } if (options.fd == null) { this.fd = null; this[kFs] = options.fs || { open: fsOpen, read: fsRead, close: fsClose }; validateFunction(this[kFs].open, "options.fs.open"); // Path will be ignored when fd is specified, so it can be falsy this.path = toPathIfFileURL(path); this.flags = options.flags === undefined ? "r" : options.flags; this.mode = options.mode === undefined ? 0o666 : options.mode; validatePath(this.path); } else { this.fd = getValidatedFd(importFd(this, options)); } options.autoDestroy = options.autoClose === undefined ? true : options.autoClose; validateFunction(this[kFs].read, "options.fs.read"); if (options.autoDestroy) { validateFunction(this[kFs].close, "options.fs.close"); } this.start = options.start; this.end = options.end ?? Infinity; this.pos = undefined; this.bytesRead = 0; this[kIsPerformingIO] = false; if (this.start !== undefined) { validateInteger(this.start, "start", 0); this.pos = this.start; } if (this.end !== Infinity) { validateInteger(this.end, "end", 0); if (this.start !== undefined && this.start > this.end) { throw new ERR_OUT_OF_RANGE( "start", `<= "end" (here: ${this.end})`, this.start, ); } } Reflect.apply(Readable, this, [options]); } Object.setPrototypeOf(ReadStream.prototype, Readable.prototype); Object.setPrototypeOf(ReadStream, Readable); Object.defineProperty(ReadStream.prototype, "autoClose", { get() { return this._readableState.autoDestroy; }, set(val) { this._readableState.autoDestroy = val; }, }); const openReadFs = deprecate( function () { // Noop. }, "ReadStream.prototype.open() is deprecated", "DEP0135", ); ReadStream.prototype.open = openReadFs; ReadStream.prototype._construct = _construct; ReadStream.prototype._read = async function (n) { n = this.pos !== undefined ? Math.min(this.end - this.pos + 1, n) : Math.min(this.end - this.bytesRead + 1, n); if (n <= 0) { this.push(null); return; } const buf = Buffer.allocUnsafeSlow(n); let error = null; let bytesRead = null; let buffer = undefined; this[kIsPerformingIO] = true; await new Promise((resolve) => { this[kFs] .read( this.fd, buf, 0, n, this.pos ?? null, (_er, _bytesRead, _buf) => { error = _er; bytesRead = _bytesRead; buffer = _buf; return resolve(true); }, ); }); this[kIsPerformingIO] = false; // Tell ._destroy() that it's safe to close the fd now. if (this.destroyed) { this.emit(kIoDone, error); return; } if (error) { errorOrDestroy(this, error); } else if ( typeof bytesRead === "number" && bytesRead > 0 ) { if (this.pos !== undefined) { this.pos += bytesRead; } this.bytesRead += bytesRead; if (bytesRead !== buffer.length) { // Slow path. Shrink to fit. // Copy instead of slice so that we don't retain // large backing buffer for small reads. const dst = Buffer.allocUnsafeSlow(bytesRead); buffer.copy(dst, 0, 0, bytesRead); buffer = dst; } this.push(buffer); } else { this.push(null); } }; ReadStream.prototype._destroy = function (err, cb) { // Usually for async IO it is safe to close a file descriptor // even when there are pending operations. However, due to platform // differences file IO is implemented using synchronous operations // running in a thread pool. Therefore, file descriptors are not safe // to close while used in a pending read or write operation. Wait for // any pending IO (kIsPerformingIO) to complete (kIoDone). if (this[kIsPerformingIO]) { this.once(kIoDone, (er) => close(this, err || er, cb)); } else { close(this, err, cb); } }; ReadStream.prototype.close = function (cb) { if (typeof cb === "function") finished(this, cb); this.destroy(); }; Object.defineProperty(ReadStream.prototype, "pending", { get() { return this.fd === null; }, configurable: true, }); export function WriteStream(path, options) { if (!(this instanceof WriteStream)) { return new WriteStream(path, options); } options = copyObject(getOptions(options, kEmptyObject)); // Only buffers are supported. options.decodeStrings = true; if (options.fd == null) { this.fd = null; this[kFs] = options.fs || { open: fsOpen, write: fsWrite, writev: fsWritev, close: fsClose }; validateFunction(this[kFs].open, "options.fs.open"); // Path will be ignored when fd is specified, so it can be falsy this.path = toPathIfFileURL(path); this.flags = options.flags === undefined ? "w" : options.flags; this.mode = options.mode === undefined ? 0o666 : options.mode; validatePath(this.path); } else { this.fd = getValidatedFd(importFd(this, options)); } options.autoDestroy = options.autoClose === undefined ? true : options.autoClose; if (!this[kFs].write && !this[kFs].writev) { throw new ERR_INVALID_ARG_TYPE( "options.fs.write", "function", this[kFs].write, ); } if (this[kFs].write) { validateFunction(this[kFs].write, "options.fs.write"); } if (this[kFs].writev) { validateFunction(this[kFs].writev, "options.fs.writev"); } if (options.autoDestroy) { validateFunction(this[kFs].close, "options.fs.close"); } // It's enough to override either, in which case only one will be used. if (!this[kFs].write) { this._write = null; } if (!this[kFs].writev) { this._writev = null; } this.start = options.start; this.pos = undefined; this.bytesWritten = 0; this[kIsPerformingIO] = false; if (this.start !== undefined) { validateInteger(this.start, "start", 0); this.pos = this.start; } Reflect.apply(Writable, this, [options]); if (options.encoding) { this.setDefaultEncoding(options.encoding); } } Object.setPrototypeOf(WriteStream.prototype, Writable.prototype); Object.setPrototypeOf(WriteStream, Writable); Object.defineProperty(WriteStream.prototype, "autoClose", { get() { return this._writableState.autoDestroy; }, set(val) { this._writableState.autoDestroy = val; }, }); const openWriteFs = deprecate( function () { // Noop. }, "WriteStream.prototype.open() is deprecated", "DEP0135", ); WriteStream.prototype.open = openWriteFs; WriteStream.prototype._construct = _construct; WriteStream.prototype._write = function (data, _encoding, cb) { this[kIsPerformingIO] = true; this[kFs].write(this.fd, data, 0, data.length, this.pos, (er, bytes) => { this[kIsPerformingIO] = false; if (this.destroyed) { // Tell ._destroy() that it's safe to close the fd now. cb(er); return this.emit(kIoDone, er); } if (er) { return cb(er); } this.bytesWritten += bytes; cb(); }); if (this.pos !== undefined) { this.pos += data.length; } }; WriteStream.prototype._writev = function (data, cb) { const len = data.length; const chunks = new Array(len); let size = 0; for (let i = 0; i < len; i++) { const chunk = data[i].chunk; chunks[i] = chunk; size += chunk.length; } this[kIsPerformingIO] = true; this[kFs].writev(this.fd, chunks, this.pos ?? null, (er, bytes) => { this[kIsPerformingIO] = false; if (this.destroyed) { // Tell ._destroy() that it's safe to close the fd now. cb(er); return this.emit(kIoDone, er); } if (er) { return cb(er); } this.bytesWritten += bytes; cb(); }); if (this.pos !== undefined) { this.pos += size; } }; WriteStream.prototype._destroy = function (err, cb) { // Usually for async IO it is safe to close a file descriptor // even when there are pending operations. However, due to platform // differences file IO is implemented using synchronous operations // running in a thread pool. Therefore, file descriptors are not safe // to close while used in a pending read or write operation. Wait for // any pending IO (kIsPerformingIO) to complete (kIoDone). if (this[kIsPerformingIO]) { this.once(kIoDone, (er) => close(this, err || er, cb)); } else { close(this, err, cb); } }; WriteStream.prototype.close = function (cb) { if (cb) { if (this.closed) { nextTick(cb); return; } this.on("close", cb); } // If we are not autoClosing, we should call // destroy on 'finish'. if (!this.autoClose) { this.on("finish", this.destroy); } // We use end() instead of destroy() because of // https://github.com/nodejs/node/issues/2006 this.end(); }; // There is no shutdown() for files. WriteStream.prototype.destroySoon = WriteStream.prototype.end; Object.defineProperty(WriteStream.prototype, "pending", { get() { return this.fd === null; }, configurable: true, }); export function createReadStream(path, options) { return new ReadStream(path, options); } export function createWriteStream(path, options) { return new WriteStream(path, options); } Qej%ext:deno_node/internal/fs/streams.mjsa bD`M`  Tm`La5A T I` b @ rSb1qqbrtsBsf???????Ib$2`DL`  ]`N" ]`: ]`" ]`:]`X7 ]`b: ]`R ]`'T ]`m# ]`b]` ]`H/ ]`] ]`B ]`]8L` "X ` L`"X X ` L`X W ` L`W W ` L`W ]`L`  D"{ "{ c  Db b c1 D" " c5E D  c  D  c  Dc  D  c D!!cBP Dc x D"qc  DoBvc Dpc Dbpbc DpS cSY D‡‡c  Dc !/ D  c{ D± ± c D"r"rc  D  c D"[ "[ c Dœœc 3?`b a?" a? a? a? a?"[ a?!a?oa?pa?bpa?pa?"qa?"{ a?a?‡a?a?œa?a? a? a?"ra?± a?"X a?X a?W a?W a?xb@$ T  I` 4 xb@% T I`G tb@&8L`  T I` "X b@ a T I`%X b@!a T I`11W b@"a T I`1#2W b@#aa  qqbr  bCC T  I`J~xxb' T I`b (  T I`Ib @ )uvBvr T y`"X  Qa._read`8IbMP *  T `"X Qb ._destroy`dIb @+B  T `"X  Qa.close`Ib @, bCG T I`Ejb-  bCC T I`&&b. T I`&&b/ T I`0'E'Ib @0w T `X  Qa._write` ()Ib @1  T `X  Qa._writev` *,Ib @2  T `X Qb ._destroy`,.Ib @3 T `X  Qa.close`/0Ib @4B  bCG T I`'1L1b5  x`DU@h %%%ł%%%% ei h  !b%! b%! b%! - 0- 0- _! - 00_! -0- ~)33\0Â`%0- 20- 2!0- Â2#0- Â2%0-  2!'! -0- "~#))$ 3*\,! - 0- .0%- 0_2! - 00_4! -0- .~&6)' 37( 39\;0Â) *`=% 0- . 2?0- . 2A0- .Â+ 2,C0- .Â-2.E0- .Â/2G0- .Â02!I0- .0- .-1K22M! -0- ."~3O)43P\Rī$gT@P@0``& P@```2@bAxDyDyyyyyyDyDz"zy.z6z>zFzDVzDfzDvzzyyD`RD]DH QVz// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { fileURLToPath } from "node:url"; const searchParams = Symbol("query"); export function toPathIfFileURL(fileURLOrPath) { if (!(fileURLOrPath instanceof URL)) { return fileURLOrPath; } return fileURLToPath(fileURLOrPath); } // Utility function that converts a URL object into an ordinary // options object as expected by the http.request and https.request // APIs. // deno-lint-ignore no-explicit-any export function urlToHttpOptions(url) { // deno-lint-ignore no-explicit-any const options = { protocol: url.protocol, hostname: typeof url.hostname === "string" && url.hostname.startsWith("[") ? url.hostname.slice(1, -1) : url.hostname, hash: url.hash, search: url.search, pathname: url.pathname, path: `${url.pathname || ""}${url.search || ""}`, href: url.href }; if (url.port !== "") { options.port = Number(url.port); } if (url.username || url.password) { options.auth = `${decodeURIComponent(url.username)}:${decodeURIComponent(url.password)}`; } return options; } export { searchParams as searchParamsSymbol }; export default { toPathIfFileURL }; Qdext:deno_node/internal/url.tsa bD`M` TP`Y(La!(La T  I`)"rdSb1Ib` L` 8 ]`]8L` ` L`` L`x"r` L`"r"] ` L`"] ] L`  Da a c`a a?a?"ra?"] a?a?zb@7a T I`|"] zb@8ba  ,b"rC"r  z`Dm h ei h  !b1~)03 1  a0bA6zzD`RD]DH Q`Q1// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // This module ports: // - https://github.com/nodejs/node/blob/master/src/tcp_wrap.cc // - https://github.com/nodejs/node/blob/master/src/tcp_wrap.h // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { notImplemented } from "ext:deno_node/_utils.ts"; import { unreachable } from "ext:deno_node/_util/asserts.ts"; import { ConnectionWrap } from "ext:deno_node/internal_binding/connection_wrap.ts"; import { AsyncWrap, providerType } from "ext:deno_node/internal_binding/async_wrap.ts"; import { LibuvStreamWrap } from "ext:deno_node/internal_binding/stream_wrap.ts"; import { ownerSymbol } from "ext:deno_node/internal_binding/symbols.ts"; import { codeMap } from "ext:deno_node/internal_binding/uv.ts"; import { delay } from "ext:deno_node/_util/async.ts"; import { kStreamBaseField } from "ext:deno_node/internal_binding/stream_wrap.ts"; import { isIP } from "ext:deno_node/internal/net.ts"; import { ceilPowOf2, INITIAL_ACCEPT_BACKOFF_DELAY, MAX_ACCEPT_BACKOFF_DELAY } from "ext:deno_node/internal_binding/_listen.ts"; var socketType; /** The type of TCP socket. */ (function(socketType) { socketType[socketType["SOCKET"] = 0] = "SOCKET"; socketType[socketType["SERVER"] = 1] = "SERVER"; })(socketType || (socketType = {})); export class TCPConnectWrap extends AsyncWrap { oncomplete; address; port; localAddress; localPort; constructor(){ super(providerType.TCPCONNECTWRAP); } } export var constants; (function(constants) { constants[constants["SOCKET"] = socketType.SOCKET] = "SOCKET"; constants[constants["SERVER"] = socketType.SERVER] = "SERVER"; constants[constants["UV_TCP_IPV6ONLY"] = void 0] = "UV_TCP_IPV6ONLY"; })(constants || (constants = {})); export class TCP extends ConnectionWrap { [ownerSymbol] = null; reading = false; #address; #port; #remoteAddress; #remoteFamily; #remotePort; #backlog; #listener; #connections = 0; #closed = false; #acceptBackoffDelay; /** * Creates a new TCP class instance. * @param type The socket type. * @param conn Optional connection object to wrap. */ constructor(type, conn){ let provider; switch(type){ case socketType.SOCKET: { provider = providerType.TCPWRAP; break; } case socketType.SERVER: { provider = providerType.TCPSERVERWRAP; break; } default: { unreachable(); } } super(provider, conn); // TODO(cmorten): the handling of new connections and construction feels // a little off. Suspect duplicating in some fashion. if (conn && provider === providerType.TCPWRAP) { const localAddr = conn.localAddr; this.#address = localAddr.hostname; this.#port = localAddr.port; const remoteAddr = conn.remoteAddr; this.#remoteAddress = remoteAddr.hostname; this.#remotePort = remoteAddr.port; this.#remoteFamily = isIP(remoteAddr.hostname); } } /** * Opens a file descriptor. * @param fd The file descriptor to open. * @return An error status code. */ open(_fd) { // REF: https://github.com/denoland/deno/issues/6529 notImplemented("TCP.prototype.open"); } /** * Bind to an IPv4 address. * @param address The hostname to bind to. * @param port The port to bind to * @return An error status code. */ bind(address, port) { return this.#bind(address, port, 0); } /** * Bind to an IPv6 address. * @param address The hostname to bind to. * @param port The port to bind to * @return An error status code. */ bind6(address, port, flags) { return this.#bind(address, port, flags); } /** * Connect to an IPv4 address. * @param req A TCPConnectWrap instance. * @param address The hostname to connect to. * @param port The port to connect to. * @return An error status code. */ connect(req, address, port) { return this.#connect(req, address, port); } /** * Connect to an IPv6 address. * @param req A TCPConnectWrap instance. * @param address The hostname to connect to. * @param port The port to connect to. * @return An error status code. */ connect6(req, address, port) { return this.#connect(req, address, port); } /** * Listen for new connections. * @param backlog The maximum length of the queue of pending connections. * @return An error status code. */ listen(backlog) { this.#backlog = ceilPowOf2(backlog + 1); const listenOptions = { hostname: this.#address, port: this.#port, transport: "tcp" }; let listener; try { listener = Deno.listen(listenOptions); } catch (e) { if (e instanceof Deno.errors.AddrInUse) { return codeMap.get("EADDRINUSE"); } else if (e instanceof Deno.errors.AddrNotAvailable) { return codeMap.get("EADDRNOTAVAIL"); } else if (e instanceof Deno.errors.PermissionDenied) { throw e; } // TODO(cmorten): map errors to appropriate error codes. return codeMap.get("UNKNOWN"); } const address = listener.addr; this.#address = address.hostname; this.#port = address.port; this.#listener = listener; this.#accept(); return 0; } ref() { if (this.#listener) { this.#listener.ref(); } if (this[kStreamBaseField]) { this[kStreamBaseField].ref(); } } unref() { if (this.#listener) { this.#listener.unref(); } if (this[kStreamBaseField]) { this[kStreamBaseField].unref(); } } /** * Populates the provided object with local address entries. * @param sockname An object to add the local address entries to. * @return An error status code. */ getsockname(sockname) { if (typeof this.#address === "undefined" || typeof this.#port === "undefined") { return codeMap.get("EADDRNOTAVAIL"); } sockname.address = this.#address; sockname.port = this.#port; sockname.family = isIP(this.#address); return 0; } /** * Populates the provided object with remote address entries. * @param peername An object to add the remote address entries to. * @return An error status code. */ getpeername(peername) { if (typeof this.#remoteAddress === "undefined" || typeof this.#remotePort === "undefined") { return codeMap.get("EADDRNOTAVAIL"); } peername.address = this.#remoteAddress; peername.port = this.#remotePort; peername.family = this.#remoteFamily; return 0; } /** * @param noDelay * @return An error status code. */ setNoDelay(_noDelay) { // TODO(bnoordhuis) https://github.com/denoland/deno/pull/13103 return 0; } /** * @param enable * @param initialDelay * @return An error status code. */ setKeepAlive(_enable, _initialDelay) { // TODO(bnoordhuis) https://github.com/denoland/deno/pull/13103 return 0; } /** * Windows only. * * Deprecated by Node. * REF: https://github.com/nodejs/node/blob/master/lib/net.js#L1731 * * @param enable * @return An error status code. * @deprecated */ setSimultaneousAccepts(_enable) { // Low priority to implement owing to it being deprecated in Node. notImplemented("TCP.prototype.setSimultaneousAccepts"); } /** * Bind to an IPv4 or IPv6 address. * @param address The hostname to bind to. * @param port The port to bind to * @param _flags * @return An error status code. */ #bind(address, port, _flags) { // Deno doesn't currently separate bind from connect etc. // REF: // - https://doc.deno.land/deno/stable/~/Deno.connect // - https://doc.deno.land/deno/stable/~/Deno.listen // // This also means we won't be connecting from the specified local address // and port as providing these is not an option in Deno. // REF: // - https://doc.deno.land/deno/stable/~/Deno.ConnectOptions // - https://doc.deno.land/deno/stable/~/Deno.ListenOptions this.#address = address; this.#port = port; return 0; } /** * Connect to an IPv4 or IPv6 address. * @param req A TCPConnectWrap instance. * @param address The hostname to connect to. * @param port The port to connect to. * @return An error status code. */ #connect(req, address, port) { this.#remoteAddress = address; this.#remotePort = port; this.#remoteFamily = isIP(address); const connectOptions = { hostname: address, port, transport: "tcp" }; Deno.connect(connectOptions).then((conn)=>{ // Incorrect / backwards, but correcting the local address and port with // what was actually used given we can't actually specify these in Deno. const localAddr = conn.localAddr; this.#address = req.localAddress = localAddr.hostname; this.#port = req.localPort = localAddr.port; this[kStreamBaseField] = conn; try { this.afterConnect(req, 0); } catch { // swallow callback errors. } }, ()=>{ try { // TODO(cmorten): correct mapping of connection error to status code. this.afterConnect(req, codeMap.get("ECONNREFUSED")); } catch { // swallow callback errors. } }); return 0; } /** Handle backoff delays following an unsuccessful accept. */ async #acceptBackoff() { // Backoff after transient errors to allow time for the system to // recover, and avoid blocking up the event loop with a continuously // running loop. if (!this.#acceptBackoffDelay) { this.#acceptBackoffDelay = INITIAL_ACCEPT_BACKOFF_DELAY; } else { this.#acceptBackoffDelay *= 2; } if (this.#acceptBackoffDelay >= MAX_ACCEPT_BACKOFF_DELAY) { this.#acceptBackoffDelay = MAX_ACCEPT_BACKOFF_DELAY; } await delay(this.#acceptBackoffDelay); this.#accept(); } /** Accept new connections. */ async #accept() { if (this.#closed) { return; } if (this.#connections > this.#backlog) { this.#acceptBackoff(); return; } let connection; try { connection = await this.#listener.accept(); } catch (e) { if (e instanceof Deno.errors.BadResource && this.#closed) { // Listener and server has closed. return; } try { // TODO(cmorten): map errors to appropriate error codes. this.onconnection(codeMap.get("UNKNOWN"), undefined); } catch { // swallow callback errors. } this.#acceptBackoff(); return; } // Reset the backoff delay upon successful accept. this.#acceptBackoffDelay = undefined; const connectionHandle = new TCP(socketType.SOCKET, connection); this.#connections++; try { this.onconnection(0, connectionHandle); } catch { // swallow callback errors. } return this.#accept(); } /** Handle server closure. */ _onClose() { this.#closed = true; this.reading = false; this.#address = undefined; this.#port = undefined; this.#remoteAddress = undefined; this.#remoteFamily = undefined; this.#remotePort = undefined; this.#backlog = undefined; this.#connections = 0; this.#acceptBackoffDelay = undefined; if (this.provider === providerType.TCPSERVERWRAP) { try { this.#listener.close(); } catch { // listener already closed } } return LibuvStreamWrap.prototype._onClose.call(this); } }  Qf}g*ext:deno_node/internal_binding/tcp_wrap.tsa bD`tM` T`La.!Lba  T0`L`~  &{`De 24 24(SbqAI`Da0 Sb1B~`?Ib1`0L`   ]`b ]`Bz]`Sb]`¸ ]`a_]`M ]`b\]` ]`WB}]`],L` b^ ` L`b^ ` L`b` L`b]@L`  Dbbc Dyyc=K D{{c  Dbbc D||c  Db{b{c  D  c DHHc D" " cKO DB B c  Db b c D  c:E Dc DByByc `b a?Bya?ya?ba?a?ba? a? a?Ha?B a?" a?b{a?{a?|a?a?ba?b^ a? a 8{b@:  `T ``/ `/ `?  `  a v D] ` aj]b T  I`E t 6{{b Ճ; T0`L`b "B   {`KbO 8 , @ e33333(Sbqq`Da v  a 0 0b<  T<`2L`~" {`Dh-24-24 2 4(SbqAI`Da o 6{b,, 8{b@=Sb @B¯ Bb^ r????????????????? 1  `T ``/ `/ `?  `  a 1D] ` ajBvaj1ajaj>ajbaj;aj B'aj 'aj aj aj 3aj4ajaj"aj]b^ B¯  T  I`"K$|{b> T I`0%(b? T I`R)Z+bQ@ T I`+@/Bb QAy T I` b^ b ՃB  T I`kBvbC T I`MbD T I`;bE T I`_>b F T I`<bb G T I`'^;b H T I`dB'b I T I`'b J T I`Ncb K T I`#Ob L T I`3b M T I`g4b N T I` O!bO T I`i/1"bP TX`j L`B  |`Kd]P H$0$HD<0p<$ o535555 5 5 5 5 5 5(Sbqqb^ `Da 1b 0 4 4 4bQ {`Dh ei h  %b0e+2  1 01bŃ %% e%e%e%e%e%e%e%e% e% e% e% % %%%0 0t% ! " # $%&'()*+,e+ %-2  1 6{ a,@ bA9"{{{{:|B|J|R|Z|b|j|r|z|||||||"|D*|2|||D`RD]DH UQQ"kt"// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { ownerSymbol } from "ext:deno_node/internal/async_hooks.ts"; import { kArrayBufferOffset, kBytesWritten, kLastWriteWasAsync, streamBaseState, WriteWrap } from "ext:deno_node/internal_binding/stream_wrap.ts"; import { isUint8Array } from "ext:deno_node/internal/util/types.ts"; import { errnoException } from "ext:deno_node/internal/errors.ts"; import { getTimerDuration, kTimeout } from "ext:deno_node/internal/timers.mjs"; import { clearTimeout, setUnrefTimeout } from "node:timers"; import { validateFunction } from "ext:deno_node/internal/validators.mjs"; import { codeMap } from "ext:deno_node/internal_binding/uv.ts"; import { Buffer } from "node:buffer"; export const kMaybeDestroy = Symbol("kMaybeDestroy"); export const kUpdateTimer = Symbol("kUpdateTimer"); export const kAfterAsyncWrite = Symbol("kAfterAsyncWrite"); export const kHandle = Symbol("kHandle"); export const kSession = Symbol("kSession"); export const kBuffer = Symbol("kBuffer"); export const kBufferGen = Symbol("kBufferGen"); export const kBufferCb = Symbol("kBufferCb"); // deno-lint-ignore no-explicit-any function handleWriteReq(req, data, encoding) { const { handle } = req; switch(encoding){ case "buffer": { const ret = handle.writeBuffer(req, data); if (streamBaseState[kLastWriteWasAsync]) { req.buffer = data; } return ret; } case "latin1": case "binary": return handle.writeLatin1String(req, data); case "utf8": case "utf-8": return handle.writeUtf8String(req, data); case "ascii": return handle.writeAsciiString(req, data); case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return handle.writeUcs2String(req, data); default: { const buffer = Buffer.from(data, encoding); const ret = handle.writeBuffer(req, buffer); if (streamBaseState[kLastWriteWasAsync]) { req.buffer = buffer; } return ret; } } } // deno-lint-ignore no-explicit-any function onWriteComplete(status) { let stream = this.handle[ownerSymbol]; if (stream.constructor.name === "ReusedHandle") { stream = stream.handle; } if (stream.destroyed) { if (typeof this.callback === "function") { this.callback(null); } return; } if (status < 0) { const ex = errnoException(status, "write", this.error); if (typeof this.callback === "function") { this.callback(ex); } else { stream.destroy(ex); } return; } stream[kUpdateTimer](); stream[kAfterAsyncWrite](this); if (typeof this.callback === "function") { this.callback(null); } } function createWriteWrap(handle, callback) { const req = new WriteWrap(); req.handle = handle; req.oncomplete = onWriteComplete; req.async = false; req.bytes = 0; req.buffer = null; req.callback = callback; return req; } export function writevGeneric(// deno-lint-ignore no-explicit-any owner, // deno-lint-ignore no-explicit-any data, cb) { const req = createWriteWrap(owner[kHandle], cb); const allBuffers = data.allBuffers; let chunks; if (allBuffers) { chunks = data; for(let i = 0; i < data.length; i++){ data[i] = data[i].chunk; } } else { chunks = new Array(data.length << 1); for(let i = 0; i < data.length; i++){ const entry = data[i]; chunks[i * 2] = entry.chunk; chunks[i * 2 + 1] = entry.encoding; } } const err = req.handle.writev(req, chunks, allBuffers); // Retain chunks if (err === 0) { req._chunks = chunks; } afterWriteDispatched(req, err, cb); return req; } export function writeGeneric(// deno-lint-ignore no-explicit-any owner, // deno-lint-ignore no-explicit-any data, encoding, cb) { const req = createWriteWrap(owner[kHandle], cb); const err = handleWriteReq(req, data, encoding); afterWriteDispatched(req, err, cb); return req; } function afterWriteDispatched(// deno-lint-ignore no-explicit-any req, err, cb) { req.bytes = streamBaseState[kBytesWritten]; req.async = !!streamBaseState[kLastWriteWasAsync]; if (err !== 0) { return cb(errnoException(err, "write", req.error)); } if (!req.async && typeof req.callback === "function") { req.callback(); } } // Here we differ from Node slightly. Node makes use of the `kReadBytesOrError` // entry of the `streamBaseState` array from the `stream_wrap` internal binding. // Here we pass the `nread` value directly to this method as async Deno APIs // don't grant us the ability to rely on some mutable array entry setting. export function onStreamRead(arrayBuffer, nread) { // deno-lint-ignore no-this-alias const handle = this; let stream = this[ownerSymbol]; if (stream.constructor.name === "ReusedHandle") { stream = stream.handle; } stream[kUpdateTimer](); if (nread > 0 && !stream.destroyed) { let ret; let result; const userBuf = stream[kBuffer]; if (userBuf) { result = stream[kBufferCb](nread, userBuf) !== false; const bufGen = stream[kBufferGen]; if (bufGen !== null) { const nextBuf = bufGen(); if (isUint8Array(nextBuf)) { stream[kBuffer] = ret = nextBuf; } } } else { const offset = streamBaseState[kArrayBufferOffset]; // Performance note: Pass ArrayBuffer to Buffer#from to avoid // copy. const buf = Buffer.from(arrayBuffer.buffer, offset, nread); result = stream.push(buf); } if (!result) { handle.reading = false; if (!stream.destroyed) { const err = handle.readStop(); if (err) { stream.destroy(errnoException(err, "read")); } } } return ret; } if (nread === 0) { return; } if (nread !== codeMap.get("EOF")) { // CallJSOnreadMethod expects the return value to be a buffer. // Ref: https://github.com/nodejs/node/pull/34375 stream.destroy(errnoException(nread, "read")); return; } // Defer this until we actually emit end if (stream._readableState.endEmitted) { if (stream[kMaybeDestroy]) { stream[kMaybeDestroy](); } } else { if (stream[kMaybeDestroy]) { stream.on("end", stream[kMaybeDestroy]); } if (handle.readStop) { const err = handle.readStop(); if (err) { // CallJSOnreadMethod expects the return value to be a buffer. // Ref: https://github.com/nodejs/node/pull/34375 stream.destroy(errnoException(err, "read")); return; } } // Push a null to signal the end of data. // Do it before `maybeDestroy` for correct order of events: // `end` -> `close` stream.push(null); stream.read(0); } } export function setStreamTimeout(msecs, callback) { if (this.destroyed) { return this; } this.timeout = msecs; // Type checking identical to timers.enroll() msecs = getTimerDuration(msecs, "msecs"); // Attempt to clear an existing timer in both cases - // even if it will be rescheduled we don't want to leak an existing timer. clearTimeout(this[kTimeout]); if (msecs === 0) { if (callback !== undefined) { validateFunction(callback, "callback"); this.removeListener("timeout", callback); } } else { this[kTimeout] = setUnrefTimeout(this._onTimeout.bind(this), msecs); if (this[kSession]) { this[kSession][kUpdateTimer](); } if (callback !== undefined) { validateFunction(callback, "callback"); this.once("timeout", callback); } } return this; }  Qf*+d-ext:deno_node/internal/stream_base_commons.tsa bD`,M`  T`LLa9 T  I` BSb1BˆBc????Ib"`,L`  ˆ ]`C¸ ]`" ]` ]`cb! ]`5 ]`" ]`5 ]`vb]`]L`$` L`b` L`b` L`B` L`B` L`µ ` L`µ B ` L`B B ` L`B `  L`¶ `  L`¶ B`  L`B`  L`]DL`  D"{ "{ c D‡‡c Dc D  cgn D  cM[ DBb Bb c D  c Dcu Dc Dc D" " c D  c0; Dc DBBc D  c-` a?a?a?a?Ba?‡a? a? a?Bb a?" a?a?a? a? a?"{ a?µ a?B a?a?a?B a?ba?Ba?a?a ?Ba ?a ?¶ a ?|b@W T I`/ ˆ|b@X T I`zBb@Y T I`b@ZXLh T I`Wb@Sa  T I`tuBb@Ta  T I`#Vb@Ua  T I`w"¶ b@Va a  µ B B bB  |`Dz h Ƃ%%%%ei h  ! b1! b1! b1! b1! b 1!b 1!b1!b1 b@@@bAR|}}}}}}}D`RD]DH Qi%// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // This module ports: // - https://github.com/nodejs/node/blob/master/src/stream_base-inl.h // - https://github.com/nodejs/node/blob/master/src/stream_base.h // - https://github.com/nodejs/node/blob/master/src/stream_base.cc // - https://github.com/nodejs/node/blob/master/src/stream_wrap.h // - https://github.com/nodejs/node/blob/master/src/stream_wrap.cc // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { core } from "ext:core/mod.js"; const { internalRidSymbol } = core; import { op_can_write_vectored, op_raw_write_vectored } from "ext:core/ops"; import { TextEncoder } from "ext:deno_web/08_text_encoding.js"; import { Buffer } from "node:buffer"; import { notImplemented } from "ext:deno_node/_utils.ts"; import { HandleWrap } from "ext:deno_node/internal_binding/handle_wrap.ts"; import { AsyncWrap, providerType } from "ext:deno_node/internal_binding/async_wrap.ts"; import { codeMap } from "ext:deno_node/internal_binding/uv.ts"; var StreamBaseStateFields; export const kReadBytesOrError = 0; export const kArrayBufferOffset = 1; export const kBytesWritten = 2; export const kLastWriteWasAsync = 3; export const kNumStreamBaseStateFields = 4; export const streamBaseState = new Uint8Array(5); // This is Deno, it always will be async. streamBaseState[kLastWriteWasAsync] = 1; export class WriteWrap extends AsyncWrap { handle; oncomplete; async; bytes; buffer; callback; _chunks; constructor(){ super(providerType.WRITEWRAP); } } export class ShutdownWrap extends AsyncWrap { handle; oncomplete; callback; constructor(){ super(providerType.SHUTDOWNWRAP); } } export const kStreamBaseField = Symbol("kStreamBaseField"); const SUGGESTED_SIZE = 64 * 1024; export class LibuvStreamWrap extends HandleWrap { [kStreamBaseField]; reading; #reading = false; destroyed = false; writeQueueSize = 0; bytesRead = 0; bytesWritten = 0; #buf = new Uint8Array(SUGGESTED_SIZE); onread; constructor(provider, stream){ super(provider); this.#attachToObject(stream); } /** * Start the reading of the stream. * @return An error status code. */ readStart() { if (!this.#reading) { this.#reading = true; this.#read(); } return 0; } /** * Stop the reading of the stream. * @return An error status code. */ readStop() { this.#reading = false; return 0; } /** * Shutdown the stream. * @param req A shutdown request wrapper. * @return An error status code. */ shutdown(req) { const status = this._onClose(); try { req.oncomplete(status); } catch { // swallow callback error. } return 0; } /** * @param userBuf * @return An error status code. */ useUserBuffer(_userBuf) { // TODO(cmorten) notImplemented("LibuvStreamWrap.prototype.useUserBuffer"); } /** * Write a buffer to the stream. * @param req A write request wrapper. * @param data The Uint8Array buffer to write to the stream. * @return An error status code. */ writeBuffer(req, data) { this.#write(req, data); return 0; } /** * Write multiple chunks at once. * @param req A write request wrapper. * @param chunks * @param allBuffers * @return An error status code. */ writev(req, chunks, allBuffers) { const supportsWritev = this.provider === providerType.TCPSERVERWRAP; const rid = this[kStreamBaseField][internalRidSymbol]; // Fast case optimization: two chunks, and all buffers. if (chunks.length === 2 && allBuffers && supportsWritev && op_can_write_vectored(rid)) { // String chunks. if (typeof chunks[0] === "string") chunks[0] = Buffer.from(chunks[0]); if (typeof chunks[1] === "string") chunks[1] = Buffer.from(chunks[1]); op_raw_write_vectored(rid, chunks[0], chunks[1]).then((nwritten)=>{ try { req.oncomplete(0); } catch { // swallow callback errors. } streamBaseState[kBytesWritten] = nwritten; this.bytesWritten += nwritten; }); return 0; } const count = allBuffers ? chunks.length : chunks.length >> 1; const buffers = new Array(count); if (!allBuffers) { for(let i = 0; i < count; i++){ const chunk = chunks[i * 2]; if (Buffer.isBuffer(chunk)) { buffers[i] = chunk; } // String chunk const encoding = chunks[i * 2 + 1]; buffers[i] = Buffer.from(chunk, encoding); } } else { for(let i = 0; i < count; i++){ buffers[i] = chunks[i]; } } return this.writeBuffer(req, Buffer.concat(buffers)); } /** * Write an ASCII string to the stream. * @return An error status code. */ writeAsciiString(req, data) { const buffer = new TextEncoder().encode(data); return this.writeBuffer(req, buffer); } /** * Write an UTF8 string to the stream. * @return An error status code. */ writeUtf8String(req, data) { const buffer = new TextEncoder().encode(data); return this.writeBuffer(req, buffer); } /** * Write an UCS2 string to the stream. * @return An error status code. */ writeUcs2String(_req, _data) { notImplemented("LibuvStreamWrap.prototype.writeUcs2String"); } /** * Write an LATIN1 string to the stream. * @return An error status code. */ writeLatin1String(req, data) { const buffer = Buffer.from(data, "latin1"); return this.writeBuffer(req, buffer); } _onClose() { let status = 0; this.#reading = false; try { this[kStreamBaseField]?.close(); } catch { status = codeMap.get("ENOTCONN"); } return status; } /** * Attaches the class to the underlying stream. * @param stream The stream to attach to. */ #attachToObject(stream) { this[kStreamBaseField] = stream; } /** Internal method for reading from the attached stream. */ async #read() { let buf = this.#buf; let nread; const ridBefore = this[kStreamBaseField][internalRidSymbol]; try { nread = await this[kStreamBaseField].read(buf); } catch (e) { // Try to read again if the underlying stream resource // changed. This can happen during TLS upgrades (eg. STARTTLS) if (ridBefore != this[kStreamBaseField][internalRidSymbol]) { return this.#read(); } if (e instanceof Deno.errors.Interrupted || e instanceof Deno.errors.BadResource) { nread = codeMap.get("EOF"); } else if (e instanceof Deno.errors.ConnectionReset || e instanceof Deno.errors.ConnectionAborted) { nread = codeMap.get("ECONNRESET"); } else { nread = codeMap.get("UNKNOWN"); } } nread ??= codeMap.get("EOF"); streamBaseState[kReadBytesOrError] = nread; if (nread > 0) { this.bytesRead += nread; } buf = buf.slice(0, nread); streamBaseState[kArrayBufferOffset] = 0; try { this.onread(buf, nread); } catch { // swallow callback errors. } if (nread >= 0 && this.#reading) { this.#read(); } } /** * Internal method for writing to the attached stream. * @param req A write request wrapper. * @param data The Uint8Array buffer to write to the stream. */ async #write(req, data) { const { byteLength } = data; const ridBefore = this[kStreamBaseField][internalRidSymbol]; let nwritten = 0; try { // TODO(crowlKats): duplicate from runtime/js/13_buffer.js while(nwritten < data.length){ nwritten += await this[kStreamBaseField].write(data.subarray(nwritten)); } } catch (e) { // Try to read again if the underlying stream resource // changed. This can happen during TLS upgrades (eg. STARTTLS) if (ridBefore != this[kStreamBaseField][internalRidSymbol]) { return this.#write(req, data.subarray(nwritten)); } let status; // TODO(cmorten): map err to status codes if (e instanceof Deno.errors.BadResource || e instanceof Deno.errors.BrokenPipe) { status = codeMap.get("EBADF"); } else { status = codeMap.get("UNKNOWN"); } try { req.oncomplete(status); } catch { // swallow callback errors. } return; } streamBaseState[kBytesWritten] = byteLength; this.bytesWritten += byteLength; try { req.oncomplete(0); } catch { // swallow callback errors. } return; } }  QfZ]-ext:deno_node/internal_binding/stream_wrap.tsa bD``M` T`La''0Lj   a  &I   `T ``/ `/ `?  `  a D] ` aj]b T  I` ‡)Sb1&a??Ib%`(L` bS]`B]`]`Bb]`} ]`b]`b]`: ]`]L`b` L`b` L`‡` L`‡` L`` L`` L`` L`B` L`BB `  L`B B`  L`B]0L`   Dbbc$ D"{ "{ cou Dc DBBc/: D  csz D  c Db b c D  c D  c Dc&2` a? a? a?Ba?"{ a?b a?a?ba?a? a?Ba?a?a?a?a?Ba ?‡a?a?B a ?ba?}b Ճ\ T4`%$L` Ib   ~`KcQ ( 8 $ $ ( 0 f333333 3 (Sbqq‡`Da- ~b 0 0 }b]   `T ``/ `/ `?  `  a B D] ` aj] T  I` @ ~}b Ճ^ T,`L`  ~`Kb W ( 8 d333(Sbqq`Da B  a 0b_ B TSb @""g"h??????? %~  `T ``/ `/ `?  `  a %D] `  ajajajajBaj ajS aj aj aj aj aj "aj]b""g T  I`~}b` T I`~ b Qa T I`8!%"b Qb T I` bb Ճc T I`E b d T I`9be T I`Pbf T I`Bb  g T I`b  h T I`S b i T I`nb j T I`Dbk T I`nbl T I`Ebm T I`P"bn TH`L(L`BB  bI b  ~`Kd^  TX T h D P0< ; k5353 3 3 3 ! i53(Sbqqb`Da %b 0 0 @ 0bo }`D̠h %%ei h  0-% 1 1 1 1 1!  i1 0 0 40 e+ 2  10  e+2 1! b1  %%e%e%e%%%%00 t%    !"#$%e+&2  1 ~b@,}bA[~~~~"*2:BJDRZbjr zD`RD]DH UQQ"// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { primordials } from "ext:core/mod.js"; const { Error } = primordials; /** Assertion error class for node compat layer's internal code. */ export class NodeCompatAssertionError extends Error { constructor(message){ super(message); this.name = "NodeCompatAssertionError"; } } /** Make an assertion, if not `true`, then throw. */ export function assert(expr, msg = "") { if (!expr) { throw new NodeCompatAssertionError(msg); } } /** Use this to assert unreachable code. */ export function unreachable() { throw new NodeCompatAssertionError("unreachable"); } QdVmext:deno_node/_util/asserts.tsa bD`M` TP`](La!$La T4`"L`I  `Df   0 i(Sbq@ `DaXSb1Ib` L` bS]`g],L` ` L`` L`By` L`By] L`  DcT_`a?a?a?Bya? ab@qa T  I`XByb@raa    `T ``/ `/ `?  `  apD] ` aj] T  I` nb s  `Dm8h ei h  0-łe+ 1  abApD`RD]DH Q// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { op_node_build_os } from "ext:core/ops"; export const osType = op_node_build_os(); export const isWindows = osType === "windows"; export const isLinux = osType === "linux" || osType === "android"; Qdeext:deno_node/_util/os.tsa bD` M` TX`i(La!Lca  B--  :`Do h ei h  0a10m10m 0m1 XSb1Ib` L` B]`l],L` b` L`bt` L`t"` L`"] L`  D  cTd` a?"a?ta?ba? a&bAtD`RD]DH FQF0!// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // This module ports: // - https://github.com/nodejs/node/blob/master/src/uv.cc // - https://github.com/nodejs/node/blob/master/deps/uv // // See also: http://docs.libuv.org/en/v1.x/errors.html#error-constants // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { unreachable } from "ext:deno_node/_util/asserts.ts"; import { osType } from "ext:deno_node/_util/os.ts"; import { uvTranslateSysError } from "ext:deno_node/internal_binding/_libuv_winerror.ts"; const codeToErrorWindows = [ [ -4093, [ "E2BIG", "argument list too long" ] ], [ -4092, [ "EACCES", "permission denied" ] ], [ -4091, [ "EADDRINUSE", "address already in use" ] ], [ -4090, [ "EADDRNOTAVAIL", "address not available" ] ], [ -4089, [ "EAFNOSUPPORT", "address family not supported" ] ], [ -4088, [ "EAGAIN", "resource temporarily unavailable" ] ], [ -3000, [ "EAI_ADDRFAMILY", "address family not supported" ] ], [ -3001, [ "EAI_AGAIN", "temporary failure" ] ], [ -3002, [ "EAI_BADFLAGS", "bad ai_flags value" ] ], [ -3013, [ "EAI_BADHINTS", "invalid value for hints" ] ], [ -3003, [ "EAI_CANCELED", "request canceled" ] ], [ -3004, [ "EAI_FAIL", "permanent failure" ] ], [ -3005, [ "EAI_FAMILY", "ai_family not supported" ] ], [ -3006, [ "EAI_MEMORY", "out of memory" ] ], [ -3007, [ "EAI_NODATA", "no address" ] ], [ -3008, [ "EAI_NONAME", "unknown node or service" ] ], [ -3009, [ "EAI_OVERFLOW", "argument buffer overflow" ] ], [ -3014, [ "EAI_PROTOCOL", "resolved protocol is unknown" ] ], [ -3010, [ "EAI_SERVICE", "service not available for socket type" ] ], [ -3011, [ "EAI_SOCKTYPE", "socket type not supported" ] ], [ -4084, [ "EALREADY", "connection already in progress" ] ], [ -4083, [ "EBADF", "bad file descriptor" ] ], [ -4082, [ "EBUSY", "resource busy or locked" ] ], [ -4081, [ "ECANCELED", "operation canceled" ] ], [ -4080, [ "ECHARSET", "invalid Unicode character" ] ], [ -4079, [ "ECONNABORTED", "software caused connection abort" ] ], [ -4078, [ "ECONNREFUSED", "connection refused" ] ], [ -4077, [ "ECONNRESET", "connection reset by peer" ] ], [ -4076, [ "EDESTADDRREQ", "destination address required" ] ], [ -4075, [ "EEXIST", "file already exists" ] ], [ -4074, [ "EFAULT", "bad address in system call argument" ] ], [ -4036, [ "EFBIG", "file too large" ] ], [ -4073, [ "EHOSTUNREACH", "host is unreachable" ] ], [ -4072, [ "EINTR", "interrupted system call" ] ], [ -4071, [ "EINVAL", "invalid argument" ] ], [ -4070, [ "EIO", "i/o error" ] ], [ -4069, [ "EISCONN", "socket is already connected" ] ], [ -4068, [ "EISDIR", "illegal operation on a directory" ] ], [ -4067, [ "ELOOP", "too many symbolic links encountered" ] ], [ -4066, [ "EMFILE", "too many open files" ] ], [ -4065, [ "EMSGSIZE", "message too long" ] ], [ -4064, [ "ENAMETOOLONG", "name too long" ] ], [ -4063, [ "ENETDOWN", "network is down" ] ], [ -4062, [ "ENETUNREACH", "network is unreachable" ] ], [ -4061, [ "ENFILE", "file table overflow" ] ], [ -4060, [ "ENOBUFS", "no buffer space available" ] ], [ -4059, [ "ENODEV", "no such device" ] ], [ -4058, [ "ENOENT", "no such file or directory" ] ], [ -4057, [ "ENOMEM", "not enough memory" ] ], [ -4056, [ "ENONET", "machine is not on the network" ] ], [ -4035, [ "ENOPROTOOPT", "protocol not available" ] ], [ -4055, [ "ENOSPC", "no space left on device" ] ], [ -4054, [ "ENOSYS", "function not implemented" ] ], [ -4053, [ "ENOTCONN", "socket is not connected" ] ], [ -4052, [ "ENOTDIR", "not a directory" ] ], [ -4051, [ "ENOTEMPTY", "directory not empty" ] ], [ -4050, [ "ENOTSOCK", "socket operation on non-socket" ] ], [ -4049, [ "ENOTSUP", "operation not supported on socket" ] ], [ -4048, [ "EPERM", "operation not permitted" ] ], [ -4047, [ "EPIPE", "broken pipe" ] ], [ -4046, [ "EPROTO", "protocol error" ] ], [ -4045, [ "EPROTONOSUPPORT", "protocol not supported" ] ], [ -4044, [ "EPROTOTYPE", "protocol wrong type for socket" ] ], [ -4034, [ "ERANGE", "result too large" ] ], [ -4043, [ "EROFS", "read-only file system" ] ], [ -4042, [ "ESHUTDOWN", "cannot send after transport endpoint shutdown" ] ], [ -4041, [ "ESPIPE", "invalid seek" ] ], [ -4040, [ "ESRCH", "no such process" ] ], [ -4039, [ "ETIMEDOUT", "connection timed out" ] ], [ -4038, [ "ETXTBSY", "text file is busy" ] ], [ -4037, [ "EXDEV", "cross-device link not permitted" ] ], [ -4094, [ "UNKNOWN", "unknown error" ] ], [ -4095, [ "EOF", "end of file" ] ], [ -4033, [ "ENXIO", "no such device or address" ] ], [ -4032, [ "EMLINK", "too many links" ] ], [ -4031, [ "EHOSTDOWN", "host is down" ] ], [ -4030, [ "EREMOTEIO", "remote I/O error" ] ], [ -4029, [ "ENOTTY", "inappropriate ioctl for device" ] ], [ -4028, [ "EFTYPE", "inappropriate file type or format" ] ], [ -4027, [ "EILSEQ", "illegal byte sequence" ] ] ]; const errorToCodeWindows = codeToErrorWindows.map(([status, [error]])=>[ error, status ]); const codeToErrorDarwin = [ [ -7, [ "E2BIG", "argument list too long" ] ], [ -13, [ "EACCES", "permission denied" ] ], [ -48, [ "EADDRINUSE", "address already in use" ] ], [ -49, [ "EADDRNOTAVAIL", "address not available" ] ], [ -47, [ "EAFNOSUPPORT", "address family not supported" ] ], [ -35, [ "EAGAIN", "resource temporarily unavailable" ] ], [ -3000, [ "EAI_ADDRFAMILY", "address family not supported" ] ], [ -3001, [ "EAI_AGAIN", "temporary failure" ] ], [ -3002, [ "EAI_BADFLAGS", "bad ai_flags value" ] ], [ -3013, [ "EAI_BADHINTS", "invalid value for hints" ] ], [ -3003, [ "EAI_CANCELED", "request canceled" ] ], [ -3004, [ "EAI_FAIL", "permanent failure" ] ], [ -3005, [ "EAI_FAMILY", "ai_family not supported" ] ], [ -3006, [ "EAI_MEMORY", "out of memory" ] ], [ -3007, [ "EAI_NODATA", "no address" ] ], [ -3008, [ "EAI_NONAME", "unknown node or service" ] ], [ -3009, [ "EAI_OVERFLOW", "argument buffer overflow" ] ], [ -3014, [ "EAI_PROTOCOL", "resolved protocol is unknown" ] ], [ -3010, [ "EAI_SERVICE", "service not available for socket type" ] ], [ -3011, [ "EAI_SOCKTYPE", "socket type not supported" ] ], [ -37, [ "EALREADY", "connection already in progress" ] ], [ -9, [ "EBADF", "bad file descriptor" ] ], [ -16, [ "EBUSY", "resource busy or locked" ] ], [ -89, [ "ECANCELED", "operation canceled" ] ], [ -4080, [ "ECHARSET", "invalid Unicode character" ] ], [ -53, [ "ECONNABORTED", "software caused connection abort" ] ], [ -61, [ "ECONNREFUSED", "connection refused" ] ], [ -54, [ "ECONNRESET", "connection reset by peer" ] ], [ -39, [ "EDESTADDRREQ", "destination address required" ] ], [ -17, [ "EEXIST", "file already exists" ] ], [ -14, [ "EFAULT", "bad address in system call argument" ] ], [ -27, [ "EFBIG", "file too large" ] ], [ -65, [ "EHOSTUNREACH", "host is unreachable" ] ], [ -4, [ "EINTR", "interrupted system call" ] ], [ -22, [ "EINVAL", "invalid argument" ] ], [ -5, [ "EIO", "i/o error" ] ], [ -56, [ "EISCONN", "socket is already connected" ] ], [ -21, [ "EISDIR", "illegal operation on a directory" ] ], [ -62, [ "ELOOP", "too many symbolic links encountered" ] ], [ -24, [ "EMFILE", "too many open files" ] ], [ -40, [ "EMSGSIZE", "message too long" ] ], [ -63, [ "ENAMETOOLONG", "name too long" ] ], [ -50, [ "ENETDOWN", "network is down" ] ], [ -51, [ "ENETUNREACH", "network is unreachable" ] ], [ -23, [ "ENFILE", "file table overflow" ] ], [ -55, [ "ENOBUFS", "no buffer space available" ] ], [ -19, [ "ENODEV", "no such device" ] ], [ -2, [ "ENOENT", "no such file or directory" ] ], [ -12, [ "ENOMEM", "not enough memory" ] ], [ -4056, [ "ENONET", "machine is not on the network" ] ], [ -42, [ "ENOPROTOOPT", "protocol not available" ] ], [ -28, [ "ENOSPC", "no space left on device" ] ], [ -78, [ "ENOSYS", "function not implemented" ] ], [ -57, [ "ENOTCONN", "socket is not connected" ] ], [ -20, [ "ENOTDIR", "not a directory" ] ], [ -66, [ "ENOTEMPTY", "directory not empty" ] ], [ -38, [ "ENOTSOCK", "socket operation on non-socket" ] ], [ -45, [ "ENOTSUP", "operation not supported on socket" ] ], [ -1, [ "EPERM", "operation not permitted" ] ], [ -32, [ "EPIPE", "broken pipe" ] ], [ -100, [ "EPROTO", "protocol error" ] ], [ -43, [ "EPROTONOSUPPORT", "protocol not supported" ] ], [ -41, [ "EPROTOTYPE", "protocol wrong type for socket" ] ], [ -34, [ "ERANGE", "result too large" ] ], [ -30, [ "EROFS", "read-only file system" ] ], [ -58, [ "ESHUTDOWN", "cannot send after transport endpoint shutdown" ] ], [ -29, [ "ESPIPE", "invalid seek" ] ], [ -3, [ "ESRCH", "no such process" ] ], [ -60, [ "ETIMEDOUT", "connection timed out" ] ], [ -26, [ "ETXTBSY", "text file is busy" ] ], [ -18, [ "EXDEV", "cross-device link not permitted" ] ], [ -4094, [ "UNKNOWN", "unknown error" ] ], [ -4095, [ "EOF", "end of file" ] ], [ -6, [ "ENXIO", "no such device or address" ] ], [ -31, [ "EMLINK", "too many links" ] ], [ -64, [ "EHOSTDOWN", "host is down" ] ], [ -4030, [ "EREMOTEIO", "remote I/O error" ] ], [ -25, [ "ENOTTY", "inappropriate ioctl for device" ] ], [ -79, [ "EFTYPE", "inappropriate file type or format" ] ], [ -92, [ "EILSEQ", "illegal byte sequence" ] ] ]; const errorToCodeDarwin = codeToErrorDarwin.map(([status, [code]])=>[ code, status ]); const codeToErrorLinux = [ [ -7, [ "E2BIG", "argument list too long" ] ], [ -13, [ "EACCES", "permission denied" ] ], [ -98, [ "EADDRINUSE", "address already in use" ] ], [ -99, [ "EADDRNOTAVAIL", "address not available" ] ], [ -97, [ "EAFNOSUPPORT", "address family not supported" ] ], [ -11, [ "EAGAIN", "resource temporarily unavailable" ] ], [ -3000, [ "EAI_ADDRFAMILY", "address family not supported" ] ], [ -3001, [ "EAI_AGAIN", "temporary failure" ] ], [ -3002, [ "EAI_BADFLAGS", "bad ai_flags value" ] ], [ -3013, [ "EAI_BADHINTS", "invalid value for hints" ] ], [ -3003, [ "EAI_CANCELED", "request canceled" ] ], [ -3004, [ "EAI_FAIL", "permanent failure" ] ], [ -3005, [ "EAI_FAMILY", "ai_family not supported" ] ], [ -3006, [ "EAI_MEMORY", "out of memory" ] ], [ -3007, [ "EAI_NODATA", "no address" ] ], [ -3008, [ "EAI_NONAME", "unknown node or service" ] ], [ -3009, [ "EAI_OVERFLOW", "argument buffer overflow" ] ], [ -3014, [ "EAI_PROTOCOL", "resolved protocol is unknown" ] ], [ -3010, [ "EAI_SERVICE", "service not available for socket type" ] ], [ -3011, [ "EAI_SOCKTYPE", "socket type not supported" ] ], [ -114, [ "EALREADY", "connection already in progress" ] ], [ -9, [ "EBADF", "bad file descriptor" ] ], [ -16, [ "EBUSY", "resource busy or locked" ] ], [ -125, [ "ECANCELED", "operation canceled" ] ], [ -4080, [ "ECHARSET", "invalid Unicode character" ] ], [ -103, [ "ECONNABORTED", "software caused connection abort" ] ], [ -111, [ "ECONNREFUSED", "connection refused" ] ], [ -104, [ "ECONNRESET", "connection reset by peer" ] ], [ -89, [ "EDESTADDRREQ", "destination address required" ] ], [ -17, [ "EEXIST", "file already exists" ] ], [ -14, [ "EFAULT", "bad address in system call argument" ] ], [ -27, [ "EFBIG", "file too large" ] ], [ -113, [ "EHOSTUNREACH", "host is unreachable" ] ], [ -4, [ "EINTR", "interrupted system call" ] ], [ -22, [ "EINVAL", "invalid argument" ] ], [ -5, [ "EIO", "i/o error" ] ], [ -106, [ "EISCONN", "socket is already connected" ] ], [ -21, [ "EISDIR", "illegal operation on a directory" ] ], [ -40, [ "ELOOP", "too many symbolic links encountered" ] ], [ -24, [ "EMFILE", "too many open files" ] ], [ -90, [ "EMSGSIZE", "message too long" ] ], [ -36, [ "ENAMETOOLONG", "name too long" ] ], [ -100, [ "ENETDOWN", "network is down" ] ], [ -101, [ "ENETUNREACH", "network is unreachable" ] ], [ -23, [ "ENFILE", "file table overflow" ] ], [ -105, [ "ENOBUFS", "no buffer space available" ] ], [ -19, [ "ENODEV", "no such device" ] ], [ -2, [ "ENOENT", "no such file or directory" ] ], [ -12, [ "ENOMEM", "not enough memory" ] ], [ -64, [ "ENONET", "machine is not on the network" ] ], [ -92, [ "ENOPROTOOPT", "protocol not available" ] ], [ -28, [ "ENOSPC", "no space left on device" ] ], [ -38, [ "ENOSYS", "function not implemented" ] ], [ -107, [ "ENOTCONN", "socket is not connected" ] ], [ -20, [ "ENOTDIR", "not a directory" ] ], [ -39, [ "ENOTEMPTY", "directory not empty" ] ], [ -88, [ "ENOTSOCK", "socket operation on non-socket" ] ], [ -95, [ "ENOTSUP", "operation not supported on socket" ] ], [ -1, [ "EPERM", "operation not permitted" ] ], [ -32, [ "EPIPE", "broken pipe" ] ], [ -71, [ "EPROTO", "protocol error" ] ], [ -93, [ "EPROTONOSUPPORT", "protocol not supported" ] ], [ -91, [ "EPROTOTYPE", "protocol wrong type for socket" ] ], [ -34, [ "ERANGE", "result too large" ] ], [ -30, [ "EROFS", "read-only file system" ] ], [ -108, [ "ESHUTDOWN", "cannot send after transport endpoint shutdown" ] ], [ -29, [ "ESPIPE", "invalid seek" ] ], [ -3, [ "ESRCH", "no such process" ] ], [ -110, [ "ETIMEDOUT", "connection timed out" ] ], [ -26, [ "ETXTBSY", "text file is busy" ] ], [ -18, [ "EXDEV", "cross-device link not permitted" ] ], [ -4094, [ "UNKNOWN", "unknown error" ] ], [ -4095, [ "EOF", "end of file" ] ], [ -6, [ "ENXIO", "no such device or address" ] ], [ -31, [ "EMLINK", "too many links" ] ], [ -112, [ "EHOSTDOWN", "host is down" ] ], [ -121, [ "EREMOTEIO", "remote I/O error" ] ], [ -25, [ "ENOTTY", "inappropriate ioctl for device" ] ], [ -4028, [ "EFTYPE", "inappropriate file type or format" ] ], [ -84, [ "EILSEQ", "illegal byte sequence" ] ] ]; const errorToCodeLinux = codeToErrorLinux.map(([status, [code]])=>[ code, status ]); const codeToErrorFreebsd = [ [ -7, [ "E2BIG", "argument list too long" ] ], [ -13, [ "EACCES", "permission denied" ] ], [ -48, [ "EADDRINUSE", "address already in use" ] ], [ -49, [ "EADDRNOTAVAIL", "address not available" ] ], [ -47, [ "EAFNOSUPPORT", "address family not supported" ] ], [ -35, [ "EAGAIN", "resource temporarily unavailable" ] ], [ -3000, [ "EAI_ADDRFAMILY", "address family not supported" ] ], [ -3001, [ "EAI_AGAIN", "temporary failure" ] ], [ -3002, [ "EAI_BADFLAGS", "bad ai_flags value" ] ], [ -3013, [ "EAI_BADHINTS", "invalid value for hints" ] ], [ -3003, [ "EAI_CANCELED", "request canceled" ] ], [ -3004, [ "EAI_FAIL", "permanent failure" ] ], [ -3005, [ "EAI_FAMILY", "ai_family not supported" ] ], [ -3006, [ "EAI_MEMORY", "out of memory" ] ], [ -3007, [ "EAI_NODATA", "no address" ] ], [ -3008, [ "EAI_NONAME", "unknown node or service" ] ], [ -3009, [ "EAI_OVERFLOW", "argument buffer overflow" ] ], [ -3014, [ "EAI_PROTOCOL", "resolved protocol is unknown" ] ], [ -3010, [ "EAI_SERVICE", "service not available for socket type" ] ], [ -3011, [ "EAI_SOCKTYPE", "socket type not supported" ] ], [ -37, [ "EALREADY", "connection already in progress" ] ], [ -9, [ "EBADF", "bad file descriptor" ] ], [ -16, [ "EBUSY", "resource busy or locked" ] ], [ -85, [ "ECANCELED", "operation canceled" ] ], [ -4080, [ "ECHARSET", "invalid Unicode character" ] ], [ -53, [ "ECONNABORTED", "software caused connection abort" ] ], [ -61, [ "ECONNREFUSED", "connection refused" ] ], [ -54, [ "ECONNRESET", "connection reset by peer" ] ], [ -39, [ "EDESTADDRREQ", "destination address required" ] ], [ -17, [ "EEXIST", "file already exists" ] ], [ -14, [ "EFAULT", "bad address in system call argument" ] ], [ -27, [ "EFBIG", "file too large" ] ], [ -65, [ "EHOSTUNREACH", "host is unreachable" ] ], [ -4, [ "EINTR", "interrupted system call" ] ], [ -22, [ "EINVAL", "invalid argument" ] ], [ -5, [ "EIO", "i/o error" ] ], [ -56, [ "EISCONN", "socket is already connected" ] ], [ -21, [ "EISDIR", "illegal operation on a directory" ] ], [ -62, [ "ELOOP", "too many symbolic links encountered" ] ], [ -24, [ "EMFILE", "too many open files" ] ], [ -40, [ "EMSGSIZE", "message too long" ] ], [ -63, [ "ENAMETOOLONG", "name too long" ] ], [ -50, [ "ENETDOWN", "network is down" ] ], [ -51, [ "ENETUNREACH", "network is unreachable" ] ], [ -23, [ "ENFILE", "file table overflow" ] ], [ -55, [ "ENOBUFS", "no buffer space available" ] ], [ -19, [ "ENODEV", "no such device" ] ], [ -2, [ "ENOENT", "no such file or directory" ] ], [ -12, [ "ENOMEM", "not enough memory" ] ], [ -4056, [ "ENONET", "machine is not on the network" ] ], [ -42, [ "ENOPROTOOPT", "protocol not available" ] ], [ -28, [ "ENOSPC", "no space left on device" ] ], [ -78, [ "ENOSYS", "function not implemented" ] ], [ -57, [ "ENOTCONN", "socket is not connected" ] ], [ -20, [ "ENOTDIR", "not a directory" ] ], [ -66, [ "ENOTEMPTY", "directory not empty" ] ], [ -38, [ "ENOTSOCK", "socket operation on non-socket" ] ], [ -45, [ "ENOTSUP", "operation not supported on socket" ] ], [ -84, [ "EOVERFLOW", "value too large for defined data type" ] ], [ -1, [ "EPERM", "operation not permitted" ] ], [ -32, [ "EPIPE", "broken pipe" ] ], [ -92, [ "EPROTO", "protocol error" ] ], [ -43, [ "EPROTONOSUPPORT", "protocol not supported" ] ], [ -41, [ "EPROTOTYPE", "protocol wrong type for socket" ] ], [ -34, [ "ERANGE", "result too large" ] ], [ -30, [ "EROFS", "read-only file system" ] ], [ -58, [ "ESHUTDOWN", "cannot send after transport endpoint shutdown" ] ], [ -29, [ "ESPIPE", "invalid seek" ] ], [ -3, [ "ESRCH", "no such process" ] ], [ -60, [ "ETIMEDOUT", "connection timed out" ] ], [ -26, [ "ETXTBSY", "text file is busy" ] ], [ -18, [ "EXDEV", "cross-device link not permitted" ] ], [ -4094, [ "UNKNOWN", "unknown error" ] ], [ -4095, [ "EOF", "end of file" ] ], [ -6, [ "ENXIO", "no such device or address" ] ], [ -31, [ "EMLINK", "too many links" ] ], [ -64, [ "EHOSTDOWN", "host is down" ] ], [ -4030, [ "EREMOTEIO", "remote I/O error" ] ], [ -25, [ "ENOTTY", "inappropriate ioctl for device" ] ], [ -79, [ "EFTYPE", "inappropriate file type or format" ] ], [ -86, [ "EILSEQ", "illegal byte sequence" ] ], [ -44, [ "ESOCKTNOSUPPORT", "socket type not supported" ] ] ]; const errorToCodeFreebsd = codeToErrorFreebsd.map(([status, [code]])=>[ code, status ]); const codeToErrorOpenBSD = [ [ -7, [ "E2BIG", "argument list too long" ] ], [ -13, [ "EACCES", "permission denied" ] ], [ -48, [ "EADDRINUSE", "address already in use" ] ], [ -49, [ "EADDRNOTAVAIL", "address not available" ] ], [ -47, [ "EAFNOSUPPORT", "address family not supported" ] ], [ -35, [ "EAGAIN", "resource temporarily unavailable" ] ], [ -3000, [ "EAI_ADDRFAMILY", "address family not supported" ] ], [ -3001, [ "EAI_AGAIN", "temporary failure" ] ], [ -3002, [ "EAI_BADFLAGS", "bad ai_flags value" ] ], [ -3013, [ "EAI_BADHINTS", "invalid value for hints" ] ], [ -3003, [ "EAI_CANCELED", "request canceled" ] ], [ -3004, [ "EAI_FAIL", "permanent failure" ] ], [ -3005, [ "EAI_FAMILY", "ai_family not supported" ] ], [ -3006, [ "EAI_MEMORY", "out of memory" ] ], [ -3007, [ "EAI_NODATA", "no address" ] ], [ -3008, [ "EAI_NONAME", "unknown node or service" ] ], [ -3009, [ "EAI_OVERFLOW", "argument buffer overflow" ] ], [ -3014, [ "EAI_PROTOCOL", "resolved protocol is unknown" ] ], [ -3010, [ "EAI_SERVICE", "service not available for socket type" ] ], [ -3011, [ "EAI_SOCKTYPE", "socket type not supported" ] ], [ -37, [ "EALREADY", "connection already in progress" ] ], [ -9, [ "EBADF", "bad file descriptor" ] ], [ -16, [ "EBUSY", "resource busy or locked" ] ], [ -88, [ "ECANCELED", "operation canceled" ] ], [ -4080, [ "ECHARSET", "invalid Unicode character" ] ], [ -53, [ "ECONNABORTED", "software caused connection abort" ] ], [ -61, [ "ECONNREFUSED", "connection refused" ] ], [ -54, [ "ECONNRESET", "connection reset by peer" ] ], [ -39, [ "EDESTADDRREQ", "destination address required" ] ], [ -17, [ "EEXIST", "file already exists" ] ], [ -14, [ "EFAULT", "bad address in system call argument" ] ], [ -27, [ "EFBIG", "file too large" ] ], [ -65, [ "EHOSTUNREACH", "host is unreachable" ] ], [ -4, [ "EINTR", "interrupted system call" ] ], [ -22, [ "EINVAL", "invalid argument" ] ], [ -5, [ "EIO", "i/o error" ] ], [ -56, [ "EISCONN", "socket is already connected" ] ], [ -21, [ "EISDIR", "illegal operation on a directory" ] ], [ -62, [ "ELOOP", "too many symbolic links encountered" ] ], [ -24, [ "EMFILE", "too many open files" ] ], [ -40, [ "EMSGSIZE", "message too long" ] ], [ -63, [ "ENAMETOOLONG", "name too long" ] ], [ -50, [ "ENETDOWN", "network is down" ] ], [ -51, [ "ENETUNREACH", "network is unreachable" ] ], [ -23, [ "ENFILE", "file table overflow" ] ], [ -55, [ "ENOBUFS", "no buffer space available" ] ], [ -19, [ "ENODEV", "no such device" ] ], [ -2, [ "ENOENT", "no such file or directory" ] ], [ -12, [ "ENOMEM", "not enough memory" ] ], [ -4056, [ "ENONET", "machine is not on the network" ] ], [ -42, [ "ENOPROTOOPT", "protocol not available" ] ], [ -28, [ "ENOSPC", "no space left on device" ] ], [ -78, [ "ENOSYS", "function not implemented" ] ], [ -57, [ "ENOTCONN", "socket is not connected" ] ], [ -20, [ "ENOTDIR", "not a directory" ] ], [ -66, [ "ENOTEMPTY", "directory not empty" ] ], [ -38, [ "ENOTSOCK", "socket operation on non-socket" ] ], [ -45, [ "ENOTSUP", "operation not supported on socket" ] ], [ -87, [ "EOVERFLOW", "value too large for defined data type" ] ], [ -1, [ "EPERM", "operation not permitted" ] ], [ -32, [ "EPIPE", "broken pipe" ] ], [ -95, [ "EPROTO", "protocol error" ] ], [ -43, [ "EPROTONOSUPPORT", "protocol not supported" ] ], [ -41, [ "EPROTOTYPE", "protocol wrong type for socket" ] ], [ -34, [ "ERANGE", "result too large" ] ], [ -30, [ "EROFS", "read-only file system" ] ], [ -58, [ "ESHUTDOWN", "cannot send after transport endpoint shutdown" ] ], [ -29, [ "ESPIPE", "invalid seek" ] ], [ -3, [ "ESRCH", "no such process" ] ], [ -60, [ "ETIMEDOUT", "connection timed out" ] ], [ -26, [ "ETXTBSY", "text file is busy" ] ], [ -18, [ "EXDEV", "cross-device link not permitted" ] ], [ -4094, [ "UNKNOWN", "unknown error" ] ], [ -4095, [ "EOF", "end of file" ] ], [ -6, [ "ENXIO", "no such device or address" ] ], [ -31, [ "EMLINK", "too many links" ] ], [ -64, [ "EHOSTDOWN", "host is down" ] ], [ -4030, [ "EREMOTEIO", "remote I/O error" ] ], [ -25, [ "ENOTTY", "inappropriate ioctl for device" ] ], [ -79, [ "EFTYPE", "inappropriate file type or format" ] ], [ -84, [ "EILSEQ", "illegal byte sequence" ] ], [ -44, [ "ESOCKTNOSUPPORT", "socket type not supported" ] ] ]; const errorToCodeOpenBSD = codeToErrorOpenBSD.map(([status, [code]])=>[ code, status ]); export const errorMap = new Map(osType === "windows" ? codeToErrorWindows : osType === "darwin" ? codeToErrorDarwin : osType === "linux" ? codeToErrorLinux : osType === "android" ? codeToErrorLinux : osType === "freebsd" ? codeToErrorFreebsd : osType === "openbsd" ? codeToErrorOpenBSD : unreachable()); export const codeMap = new Map(osType === "windows" ? errorToCodeWindows : osType === "darwin" ? errorToCodeDarwin : osType === "linux" ? errorToCodeLinux : osType === "android" ? errorToCodeLinux : osType === "freebsd" ? errorToCodeFreebsd : osType === "openbsd" ? errorToCodeOpenBSD : unreachable()); export function mapSysErrnoToUvErrno(sysErrno) { if (osType === "windows") { const code = uvTranslateSysError(sysErrno); return codeMap.get(code) ?? -sysErrno; } else { return -sysErrno; } } export const UV_EAI_MEMORY = codeMap.get("EAI_MEMORY"); export const UV_EBADF = codeMap.get("EBADF"); export const UV_EEXIST = codeMap.get("EEXIST"); export const UV_EINVAL = codeMap.get("EINVAL"); export const UV_ENOENT = codeMap.get("ENOENT"); export const UV_ENOTSOCK = codeMap.get("ENOTSOCK"); export const UV_UNKNOWN = codeMap.get("UNKNOWN"); export function errname(errno) { const err = errorMap.get(errno); if (err) { return err[0]; } return `UNKNOWN (${errno})`; } Qe6n#L$ext:deno_node/internal_binding/uv.tsa bD`(M` T-`La !DLb  T  I`;b Sb1Ib!`L` b ]`" ]`NB]`]L`!` L`` L`b` L`b` L`b` L`b` L`b` L`b ` L` `  L``  L`b `  L`b ]L`  D""c@F DByByc  Dct`Bya?"a?a?a ? a?b a ?a?a?ba?a?ba?a?ba?a ?vb@vh  T I` b@wa a   `IL`P `La `M`K  `La `M`"L  `La `M`L B `La `M`M  `La `M`M  `La `M`N B `LaH `M` `LaG `M` `LaF `M`" `La; `M`žB `LaE `M`b `LaD `M`B `LaC `M`b `LaB `M` `LaA `M` `La@ `M` `La? `M`" `La: `M`B§ `La> `M` `La= `M`b `La  `M`bN " `La  `M`N  `La `M`O  `La `M`O " `La `M`­" `La `M`P  `La `M`BQ  `La `M`Q B `La `M`R  `La `M`S  `La `M`BT B `La< `M`T " `La `M`U  `La `M`V B `La `M`"W  `La `M`W b `La `M`W  `La `M`BX  `La `M`X b `La `M`Y B `La `M`Y  `La  `M`Z b `La! `M`"[  `La" `M`\ b `La# `M`\  `La$ `M`\  `La% `M`] b `La& `M`^  `La' `M`_  `La( `M`B `La= `M`B` b `La) `M``  `La* `M`a  `La+ `M`Bb B `La, `M`b  `La- `M`c b `La. `M`c  `La/ `M`c  `La0 `M`f  `La1 `M`bf B `La2 `M`f  `La3 `M`"g B `La4 `M`g  `La> `M`"h  `La5 `M`h " `La6 `M`B `La7 `M`h B `La8 `M`Bi  `La9 `M`bj B `La: `M`j  `La; `M`k  `La `M`   `La `M` B `La? `M`d  `La@ `M`bY  `LaA `M` `LaB `M` `LaC `M`Bd  `LaD `M`" `LaE `M`U < T`+L` i `Lb(Kh@k    `D- !] e- -  !] e- - - #]e--    &-]e       #-] e   {"% 6#  6# (SbbpVI`DaX d%P@@P@0vbKx  `IL`P `La `M`K  `La `M`"L  `La `M`L B `La `M`M  `La `M`M  `La `M`N B `LaH `M` `LaG `M` `LaF `M`" `La; `M`žB `LaE `M`b `LaD `M`B `LaC `M`b `LaB `M` `LaA `M` `La@ `M` `La? `M`" `La: `M`B§ `La> `M` `La= `M`b `La `M`bN " `La `M`N  `La `M`O  `La `M`O " `La `M`­" `La `M`P  `La `M`BQ  `La `M`Q B `La `M`R  `La `M`S  `La `M`BT B `La `M`T " `La `M`U  `La `M`V B `La `M`"W  `La `M`W b `La `M`W  `La `M`BX  `La `M`X b `La `M`Y B `La `M`Y  `La `M`Z b `La `M`"[  `La `M`\ b `La `M`\  `La `M`\  `La `M`] b `La `M`^  `La `M`_  `La( `M`B `La `M`B` b `La `M``  `La `M`a  `La `M`Bb B `La `M`b  `La `M`c b `La `M`c  `La `M`c  `La `M`f  `La `M`bf B `La `M`f  `La `M`"g B `La `M`g  `La `M`"h  `La `M`h " `La `M`B `La `M`h B `La `M`Bi  `La `M`bj B `La `M`j  `La `M`k  `La `M`   `La `M` B `La `M`d  `La `M`bY  `La `M` `LaB `M` `La `M`Bd  `La `M`" `La `M`U  T`+L` i `Lb(Kh@k   6`D- !] e- -  !] e- - - #]e--    &-]e       #-] e   {"% 6#  6# (SbbpVI`Da99d%P@@P@0vbKy  `IL`P `La `M`K  `La `M`"L  `La `M`L B `La `M`M  `La `M`M  `La `M`N B `LaH `M` `LaG `M` `LaF `M`" `La; `M`žB `LaE `M`b `LaD `M`B `LaC `M`b `LaB `M` `LaA `M` `La@ `M` `La? `M`" `La: `M`B§ `La> `M` `La= `M`b `La `M`bN " `La `M`N  `La `M`O  `La `M`O " `La `M`­" `La `M`P  `La `M`BQ  `La `M`Q B `La `M`R  `La `M`S  `La `M`BT B `La `M`T " `La `M`U  `La `M`V B `La `M`"W  `La `M`W b `La `M`W  `La `M`BX  `La `M`X b `La `M`Y B `La `M`Y  `La `M`Z b `La `M`"[  `La `M`\ b `La `M`\  `La `M`\  `La `M`] b `La `M`^  `La `M`_  `La `M`B `La `M`B` b `La `M``  `La `M`a  `La `M`Bb B `La `M`b  `La `M`c b `La `M`c  `La `M`c  `La `M`f  `La `M`bf B `La `M`f  `La `M`"g B `La `M`g  `La `M`"h  `La `M`h " `La `M`B `La `M`h B `La `M`Bi  `La `M`bj B `La `M`j  `La `M`k  `La `M`   `La `M` B `La `M`d  `La `M`bY  `La `M` `La `M` `La `M`Bd  `LaD `M`" `La `M`U  T`+L` i `Lb(Kh@k   b`D- !] e- -  !] e- - - #]e--    &-]e       #-] e   {"% 6#  6# (SbbpVI`DaRSd%P@@P@0vbKz  `QL`R `La `M`K  `La `M`"L  `La `M`L B `La `M`M  `La `M`M  `La `M`N B `LaH `M` `LaG `M` `LaF `M`" `La; `M`žB `LaE `M`b `LaD `M`B `LaC `M`b `LaB `M` `LaA `M` `La@ `M` `La? `M`" `La: `M`B§ `La> `M` `La= `M`b `La `M`bN " `La `M`N  `La `M`O  `La `M`O " `La `M`­" `La `M`P  `La `M`BQ  `La `M`Q B `La `M`R  `La `M`S  `La `M`BT B `La `M`T " `La `M`U  `La `M`V B `La `M`"W  `La `M`W b `La `M`W  `La `M`BX  `La `M`X b `La `M`Y B `La `M`Y  `La `M`Z b `La `M`"[  `La `M`\ b `La `M`\  `La `M`\  `La `M`] b `La `M`^  `La `M`_  `La( `M`B `La `M`B` b `La `M``  `La `M`a  `La `M`Bb B `La `M`b  `La `M`c b `La `M`c  `La `M`c  `La `M`e " `La `M`f  `La `M`bf B `La `M`f  `La `M`"g B `La `M`g  `La `M`"h  `La `M`h " `La `M`B `La `M`h B `La `M`Bi  `La `M`bj B `La `M`j  `La `M`k  `La `M`   `La `M` B `La `M`d  `La `M`bY  `La `M` `LaB `M` `La `M`Bd  `La `M`" `La `M`U  `La `M`b T`+L` i `Lb(Kh@k   `D- !] e- -  !] e- - - #]e--    &-]e       #-] e   {"% 6#  6# (SbbpVI`Dalmd%P@@P@0vbK{  `QL`R `La `M`K  `La `M`"L  `La `M`L B `La `M`M  `La `M`M  `La `M`N B `LaH `M` `LaG `M` `LaF `M`" `La; `M`žB `LaE `M`b `LaD `M`B `LaC `M`b `LaB `M` `LaA `M` `La@ `M` `La? `M`" `La: `M`B§ `La> `M` `La= `M`b `La `M`bN " `La `M`N  `La `M`O  `La `M`O " `La `M`­" `La `M`P  `La `M`BQ  `La `M`Q B `La `M`R  `La `M`S  `La `M`BT B `La `M`T " `La `M`U  `La `M`V B `La `M`"W  `La `M`W b `La `M`W  `La `M`BX  `La `M`X b `La `M`Y B `La `M`Y  `La `M`Z b `La `M`"[  `La `M`\ b `La `M`\  `La `M`\  `La `M`] b `La `M`^  `La `M`_  `La( `M`B `La `M`B` b `La `M``  `La `M`a  `La `M`Bb B `La `M`b  `La `M`c b `La `M`c  `La `M`c  `La `M`e " `La `M`f  `La `M`bf B `La `M`f  `La `M`"g B `La `M`g  `La `M`"h  `La `M`h " `La `M`B `La `M`h B `La `M`Bi  `La `M`bj B `La `M`j  `La `M`k  `La `M`   `La `M` B `La `M`d  `La `M`bY  `La `M` `LaB `M` `La `M`Bd  `La `M`" `La `M`U  `La `M`b T`+L` i `Lb(Kh@k   `D- !] e- -  !] e- - - #]e--    &-]e       #-] e   {"% 6#  6# (SbbpVI`Daۆ d%P@@P@0vbK|E"B,--bByN S "W ^ c   `Dxh ei h  {-^{-^{ - ^ { - ^{ -^!0m V0m G0m 80m )0m 0m  0a! i#1 !0m% V0m& G0m' 80m( )0m) 0m* 0a+ i-10-/^110-/^310-/^510-/^710-/^910-/^;10-/^=1  f?&0 Y#1F # bAu2^D`RD]DH Qf j// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials export const kHandle = Symbol("kHandle"); export const kKeyObject = Symbol("kKeyObject");  Qf_*ext:deno_node/internal/crypto/constants.tsa bD` M` TL`V$La!Lba  d   6`Dl h ei h  !b1!b1 @Sb1Ibj`] L`` L`d ` L`d ]`a?d a? a@"bA}D`RD]DH Q@T// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { kKeyObject } from "ext:deno_node/internal/crypto/constants.ts"; export const kKeyType = Symbol("kKeyType"); export function isKeyObject(obj) { return obj != null && obj[kKeyType] !== undefined; } export function isCryptoKey(obj) { return obj != null && obj[kKeyObject] !== undefined; } Qe ~&ext:deno_node/internal/crypto/_keys.tsa bD`M` TD`H La!$La T  I`JX XSb1Ib` L` "e ]`],L` g ` L`g X ` L`X h ` L`h ] L`  Dd d c`d a?h a?X a?g a?^b@a T I`g b@aa  h   r`Dj h ei h  !b1  abA~~D`RD]DH Qy// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { Buffer } from "node:buffer"; export const MAX_RANDOM_VALUES = 65536; export const MAX_SIZE = 4294967295; function generateRandomBytes(size) { if (size > MAX_SIZE) { throw new RangeError(`The value of "size" is out of range. It must be >= 0 && <= ${MAX_SIZE}. Received ${size}`); } const bytes = Buffer.allocUnsafe(size); //Work around for getRandomValues max generation if (size > MAX_RANDOM_VALUES) { for(let generated = 0; generated < size; generated += MAX_RANDOM_VALUES){ globalThis.crypto.getRandomValues(bytes.slice(generated, generated + MAX_RANDOM_VALUES)); } } else { globalThis.crypto.getRandomValues(bytes); } return bytes; } export default function randomBytes(size, cb) { if (typeof cb === "function") { let err = null, bytes; try { bytes = generateRandomBytes(size); } catch (e) { //NodeJS nonsense //If the size is out of range it will throw sync, otherwise throw async if (e instanceof RangeError && e.message.includes('The value of "size" is out of range')) { throw e; } else if (e instanceof Error) { err = e; } else { err = new Error("[non-error thrown]"); } } setTimeout(()=>{ if (err) { cb(err); } else { cb(null, bytes); } }, 0); } else { return generateRandomBytes(size); } }  Qf.V-ext:deno_node/internal/crypto/_randomBytes.tsa bD`M` TH`N La' T  I`HeB`Sb1B`?Ib` L` b]`],L` B` L`B` L` ` L`] L`  D"{ "{ c`"{ a?Ba?a? a?b@Lb T I` b@aa Y`A  қ`Dk h Ƃ%ei h   11 `bAڛDD`RD]DH iQeC#// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { op_node_generate_secret, op_node_generate_secret_async, } from "ext:core/ops"; import { MAX_SIZE as kMaxUint32, } from "ext:deno_node/internal/crypto/_randomBytes.ts"; import { Buffer } from "node:buffer"; import { isAnyArrayBuffer, isArrayBufferView } from "node:util/types"; import { ERR_INVALID_ARG_TYPE } from "ext:deno_node/internal/errors.ts"; const kBufferMaxLength = 0x7fffffff; function assertOffset(offset, length) { if (offset > kMaxUint32 || offset < 0) { throw new TypeError("offset must be a uint32"); } if (offset > kBufferMaxLength || offset > length) { throw new RangeError("offset out of range"); } } function assertSize(size, offset, length) { if (size > kMaxUint32 || size < 0) { throw new TypeError("size must be a uint32"); } if (size + offset > length || size > kBufferMaxLength) { throw new RangeError("buffer too small"); } } export default function randomFill( buf, offset, size, cb, ) { if (typeof offset === "function") { cb = offset; offset = 0; size = buf.length; } else if (typeof size === "function") { cb = size; size = buf.length - Number(offset); } assertOffset(offset, buf.length); assertSize(size, offset, buf.length); op_node_generate_secret_async(Math.floor(size)) .then( (randomData) => { const randomBuf = Buffer.from(randomData.buffer); randomBuf.copy(buf, offset, 0, size); cb(null, buf); }, ); } export function randomFillSync(buf, offset = 0, size) { if (!isAnyArrayBuffer(buf) && !isArrayBufferView(buf)) { throw new ERR_INVALID_ARG_TYPE( "buf", ["ArrayBuffer", "ArrayBufferView"], buf, ); } assertOffset(offset, buf.byteLength); if (size === undefined) { size = buf.byteLength - offset; } else { assertSize(size, offset, buf.byteLength); } if (size === 0) { return buf; } const bytes = new Uint8Array(buf.buffer ? buf.buffer : buf, offset, size); op_node_generate_secret(bytes); return buf; }  Qf-ext:deno_node/internal/crypto/_randomFill.mjsa bD` M` TL`Q La0 T  I`fIbSb1bbb???Ib`L` B]`r ]`Cb]`9 ]` ]`] L` ` L` ` L` ]$L`  D"{ "{ c} Db b c D11c D"3"3c Dbc$, D  c D  c` a? a?ba?"{ a?1a?"3a?b a? a? a?"b@ T I`^CbFb@ L` T I`g b@a T I` b@aa   6`Dl h %%%ei h   % `bA>DD`RD]DH QVl// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { op_node_random_int } from "ext:core/ops"; export default function randomInt(max, min, cb) { if (typeof max === "number" && typeof min === "number") { [max, min] = [ min, max ]; } if (min === undefined) min = 0; else if (typeof min === "function") { cb = min; min = 0; } if (!Number.isSafeInteger(min) || typeof max === "number" && !Number.isSafeInteger(max)) { throw new Error("max or min is not a Safe Number"); } if (max - min > Math.pow(2, 48)) { throw new RangeError("max - min should be less than 2^48!"); } if (min >= max) { throw new Error("Min is bigger than Max!"); } min = Math.ceil(min); max = Math.floor(max); const result = op_node_random_int(min, max); if (cb) { cb(null, result); return; } return result; }  Qfέi+ext:deno_node/internal/crypto/_randomInt.tsa bD`M` T@`:La!L` T  I` @Sb1Ib` L` B]`]L` ` L`] L`  D  c` a? a?b@aa   ʜ`Di h ei h   ޜ`bA֜D`RD]DH QN*{,// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Lazily initializes the error classes in this object. // This trick is necessary for avoiding circular dendencies between // `internal/errors` and other modules. // deno-lint-ignore no-explicit-any export const codes = {}; QeV< %ext:deno_node/internal/error_codes.tsa bD` M` T@`>La! Laa   `Di h ei h  1 4Sb1Ib,`]L`" ` L`" ]`" a? bAD`RD]DH !Q^0// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials // deno-lint-ignore no-explicit-any /** This function removes unnecessary frames from Node.js core errors. */ export function hideStackFrames(fn) { // We rename the functions that will be hidden to cut off the stacktrace // at the outermost one. const hidden = "__node_internal_" + fn.name; Object.defineProperty(fn, "name", { value: hidden }); return fn; }  Qfrr+ext:deno_node/internal/hide_stack_frames.tsa bD`M` T@`:La!L` T8`- L`bC  ^`Dg0-8!-~) 3\ (SbqA" `DaG/4Sb1Ib0`]L`" ` L`" ]`" a? a  `2@:b@aa  N`Di h ei h   r`bAZD`RD]DH Qv=o// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file import { AbortError, ERR_STREAM_PREMATURE_CLOSE, } from "ext:deno_node/internal/errors.ts"; import { once } from "ext:deno_node/internal/util.mjs"; import { validateAbortSignal, validateFunction, validateObject, } from "ext:deno_node/internal/validators.mjs"; import * as process from "ext:deno_node/_process/process.ts"; function isRequest(stream) { return stream.setHeader && typeof stream.abort === "function"; } function isServerResponse(stream) { return ( typeof stream._sent100 === "boolean" && typeof stream._removedConnection === "boolean" && typeof stream._removedContLen === "boolean" && typeof stream._removedTE === "boolean" && typeof stream._closed === "boolean" ); } function isReadable(stream) { return typeof stream.readable === "boolean" || typeof stream.readableEnded === "boolean" || !!stream._readableState; } function isWritable(stream) { return typeof stream.writable === "boolean" || typeof stream.writableEnded === "boolean" || !!stream._writableState; } function isWritableFinished(stream) { if (stream.writableFinished) return true; const wState = stream._writableState; if (!wState || wState.errored) return false; return wState.finished || (wState.ended && wState.length === 0); } const nop = () => {}; function isReadableEnded(stream) { if (stream.readableEnded) return true; const rState = stream._readableState; if (!rState || rState.errored) return false; return rState.endEmitted || (rState.ended && rState.length === 0); } function eos(stream, options, callback) { if (arguments.length === 2) { callback = options; options = {}; } else if (options == null) { options = {}; } else { validateObject(options, "options"); } validateFunction(callback, "callback"); validateAbortSignal(options.signal, "options.signal"); callback = once(callback); const readable = options.readable || (options.readable !== false && isReadable(stream)); const writable = options.writable || (options.writable !== false && isWritable(stream)); const wState = stream._writableState; const rState = stream._readableState; const state = wState || rState; const onlegacyfinish = () => { if (!stream.writable) onfinish(); }; // TODO (ronag): Improve soft detection to include core modules and // common ecosystem modules that do properly emit 'close' but fail // this generic check. let willEmitClose = isServerResponse(stream) || ( state && state.autoDestroy && state.emitClose && state.closed === false && isReadable(stream) === readable && isWritable(stream) === writable ); let writableFinished = stream.writableFinished || (wState && wState.finished); const onfinish = () => { writableFinished = true; // Stream should not be destroyed here. If it is that // means that user space is doing something differently and // we cannot trust willEmitClose. if (stream.destroyed) willEmitClose = false; if (willEmitClose && (!stream.readable || readable)) return; if (!readable || readableEnded) callback.call(stream); }; let readableEnded = stream.readableEnded || (rState && rState.endEmitted); const onend = () => { readableEnded = true; // Stream should not be destroyed here. If it is that // means that user space is doing something differently and // we cannot trust willEmitClose. if (stream.destroyed) willEmitClose = false; if (willEmitClose && (!stream.writable || writable)) return; if (!writable || writableFinished) callback.call(stream); }; const onerror = (err) => { callback.call(stream, err); }; const onclose = () => { if (readable && !readableEnded) { if (!isReadableEnded(stream)) { return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE()); } } if (writable && !writableFinished) { if (!isWritableFinished(stream)) { return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE()); } } callback.call(stream); }; const onrequest = () => { stream.req.on("finish", onfinish); }; if (isRequest(stream)) { stream.on("complete", onfinish); if (!willEmitClose) { stream.on("abort", onclose); } if (stream.req) onrequest(); else stream.on("request", onrequest); } else if (writable && !wState) { // legacy streams stream.on("end", onlegacyfinish); stream.on("close", onlegacyfinish); } // Not all streams will emit 'close' after 'aborted'. if (!willEmitClose && typeof stream.aborted === "boolean") { stream.on("aborted", onclose); } stream.on("end", onend); stream.on("finish", onfinish); if (options.error !== false) stream.on("error", onerror); stream.on("close", onclose); // _closed is for OutgoingMessage which is not a proper Writable. const closed = (!wState && !rState && stream._closed === true) || ( (wState && wState.closed) || (rState && rState.closed) || (wState && wState.errorEmitted) || (rState && rState.errorEmitted) || (rState && stream.req && stream.aborted) || ( (!wState || !willEmitClose || typeof wState.closed !== "boolean") && (!rState || !willEmitClose || typeof rState.closed !== "boolean") && (!writable || (wState && wState.finished)) && (!readable || (rState && rState.endEmitted)) ) ); if (closed) { // TODO(ronag): Re-throw error if errorEmitted? // TODO(ronag): Throw premature close as if finished was called? // before being closed? i.e. if closed but not errored, ended or finished. // TODO(ronag): Throw some kind of error? Does it make sense // to call finished() on a "finished" stream? // TODO(ronag): willEmitClose? process.nextTick(() => { callback(); }); } const cleanup = () => { callback = nop; stream.removeListener("aborted", onclose); stream.removeListener("complete", onfinish); stream.removeListener("abort", onclose); stream.removeListener("request", onrequest); if (stream.req) stream.req.removeListener("finish", onfinish); stream.removeListener("end", onlegacyfinish); stream.removeListener("close", onlegacyfinish); stream.removeListener("finish", onfinish); stream.removeListener("end", onend); stream.removeListener("error", onerror); stream.removeListener("close", onclose); }; if (options.signal && !closed) { const abort = () => { // Keep it because cleanup removes it. const endCallback = callback; cleanup(); endCallback.call(stream, new AbortError()); }; if (options.signal.aborted) { process.nextTick(abort); } else { const originalCallback = callback; callback = once((...args) => { options.signal.removeEventListener("abort", abort); originalCallback.apply(stream, args); }); options.signal.addEventListener("abort", abort); } } return cleanup; } export default eos;  QfZ{0ext:deno_node/internal/streams/end-of-stream.mjsa bD`TM` T``{8La W T  I`^Sb1* AB g????????Ib`L`  ]`" ]`'" ]`A]`]L`` L` L`  D* Dc L` DBiBic D""c DBBc DB B cUh D  cl| D  c`Bia?"a?Ba?B a? a? a?a?b@ T I`yb@ T I` b@ T I`5Ab@ T I`b@ T I`b@ T I`b @ Laa  T B `B bK  `Dq(h Ƃ%%%%%% % ei e% h    % 1 `bA ."DD`RD]DH AQ=vۙn// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import * as asyncWrap from "ext:deno_node/internal_binding/async_wrap.ts"; import * as buffer from "ext:deno_node/internal_binding/buffer.ts"; import * as caresWrap from "ext:deno_node/internal_binding/cares_wrap.ts"; import * as constants from "ext:deno_node/internal_binding/constants.ts"; import * as crypto from "ext:deno_node/internal_binding/crypto.ts"; import * as pipeWrap from "ext:deno_node/internal_binding/pipe_wrap.ts"; import * as streamWrap from "ext:deno_node/internal_binding/stream_wrap.ts"; import * as stringDecoder from "ext:deno_node/internal_binding/string_decoder.ts"; import * as symbols from "ext:deno_node/internal_binding/symbols.ts"; import * as tcpWrap from "ext:deno_node/internal_binding/tcp_wrap.ts"; import * as types from "ext:deno_node/internal_binding/types.ts"; import * as udpWrap from "ext:deno_node/internal_binding/udp_wrap.ts"; import * as util from "ext:deno_node/internal_binding/util.ts"; import * as uv from "ext:deno_node/internal_binding/uv.ts"; const modules = { "async_wrap": asyncWrap, buffer, "cares_wrap": caresWrap, config: {}, constants, contextify: {}, credentials: {}, crypto, errors: {}, fs: {}, "fs_dir": {}, "fs_event_wrap": {}, "heap_utils": {}, "http_parser": {}, icu: {}, inspector: {}, "js_stream": {}, messaging: {}, "module_wrap": {}, "native_module": {}, natives: {}, options: {}, os: {}, performance: {}, "pipe_wrap": pipeWrap, "process_methods": {}, report: {}, serdes: {}, "signal_wrap": {}, "spawn_sync": {}, "stream_wrap": streamWrap, "string_decoder": stringDecoder, symbols, "task_queue": {}, "tcp_wrap": tcpWrap, timers: {}, "tls_wrap": {}, "trace_events": {}, "tty_wrap": {}, types, "udp_wrap": udpWrap, url: {}, util, uv, v8: {}, worker: {}, zlib: {} }; export function getBinding(name) { const mod = modules[name]; if (!mod) { throw new Error(`No such module: ${name}`); } return mod; } QeBB%ext:deno_node/internal_binding/mod.tsa bD`M` T`(TLaL` T  I`mBb@aa b^/^CCbCWbbCbbbC5bbbBbbBbbb"bb"bb"b/bbbCb"?bbbbbCC"CbbCbBb"bbCCb": CJC; b6 b> b^bb"": J  R`Dh %ei e e e e e e e e e e e e e e h  ~ 3 3 3 3 3 3 3 3  3  3 3 3 3 3 % fcbA^D`RD]DH QQMJI// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials export function normalizeEncoding(enc) { if (enc == null || enc === "utf8" || enc === "utf-8") return "utf8"; return slowCases(enc); } export function slowCases(enc) { switch (enc.length) { case 4: if (enc === "UTF8") return "utf8"; if (enc === "ucs2" || enc === "UCS2") return "utf16le"; enc = `${enc}`.toLowerCase(); if (enc === "utf8") return "utf8"; if (enc === "ucs2") return "utf16le"; break; case 3: if ( enc === "hex" || enc === "HEX" || `${enc}`.toLowerCase() === "hex" ) { return "hex"; } break; case 5: if (enc === "ascii") return "ascii"; if (enc === "ucs-2") return "utf16le"; if (enc === "UTF-8") return "utf8"; if (enc === "ASCII") return "ascii"; if (enc === "UCS-2") return "utf16le"; enc = `${enc}`.toLowerCase(); if (enc === "utf-8") return "utf8"; if (enc === "ascii") return "ascii"; if (enc === "ucs-2") return "utf16le"; break; case 6: if (enc === "base64") return "base64"; if (enc === "latin1" || enc === "binary") return "latin1"; if (enc === "BASE64") return "base64"; if (enc === "LATIN1" || enc === "BINARY") return "latin1"; enc = `${enc}`.toLowerCase(); if (enc === "base64") return "base64"; if (enc === "latin1" || enc === "binary") return "latin1"; break; case 7: if ( enc === "utf16le" || enc === "UTF16LE" || `${enc}`.toLowerCase() === "utf16le" ) { return "utf16le"; } break; case 8: if ( enc === "utf-16le" || enc === "UTF-16LE" || `${enc}`.toLowerCase() === "utf-16le" ) { return "utf16le"; } break; case 9: if ( enc === "base64url" || enc === "BASE64URL" || `${enc}`.toLowerCase() === "base64url" ) { return "base64url"; } break; default: if (enc === "") return "utf8"; } }  Qf,-ext:deno_node/internal/normalize_encoding.mjsa bD`M` T@`:La! L` T0`L` "  `De m m0b(SbqAB`DaF@Sb1Ib`] L`B` L`B` L`]`Ba?a? a1~b@a T  I`ab@aa  `Di h ei h   `bAʟD`RD]DH YQUN.// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // deno-lint-ignore-file const { DTRACE_HTTP_CLIENT_REQUEST = (..._args)=>{}, DTRACE_HTTP_CLIENT_RESPONSE = (..._args)=>{}, DTRACE_HTTP_SERVER_REQUEST = (..._args)=>{}, DTRACE_HTTP_SERVER_RESPONSE = (..._args)=>{}, DTRACE_NET_SERVER_CONNECTION = (..._args)=>{}, DTRACE_NET_STREAM_END = (..._args)=>{} } = {}; export { DTRACE_HTTP_CLIENT_REQUEST, DTRACE_HTTP_CLIENT_RESPONSE, DTRACE_HTTP_SERVER_REQUEST, DTRACE_HTTP_SERVER_RESPONSE, DTRACE_NET_SERVER_CONNECTION, DTRACE_NET_STREAM_END }; QdE ext:deno_node/internal/dtrace.tsa bD`$M` Th`HLa! Lfa b T  y`5b`b`bpSb1Ib`]PL`b` L`b"` L`"` L`` L`B` L`B` L`]`ba?"a?a?a?Ba?a?ڟbK" T `7"`"`$2" bK T `5``Q_bK T `7``bKB T `9B`B`BbK T `+``bK  `Ds h ei h  -1-1- 1-  1-  1- 1  a PPbA.>N^nD`RD]DH Qڱ 3)// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // This module ports: // - https://github.com/nodejs/node/blob/master/src/pipe_wrap.cc // - https://github.com/nodejs/node/blob/master/src/pipe_wrap.h // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { notImplemented } from "ext:deno_node/_utils.ts"; import { unreachable } from "ext:deno_node/_util/asserts.ts"; import { ConnectionWrap } from "ext:deno_node/internal_binding/connection_wrap.ts"; import { AsyncWrap, providerType } from "ext:deno_node/internal_binding/async_wrap.ts"; import { LibuvStreamWrap } from "ext:deno_node/internal_binding/stream_wrap.ts"; import { codeMap } from "ext:deno_node/internal_binding/uv.ts"; import { delay } from "ext:deno_node/_util/async.ts"; import { kStreamBaseField } from "ext:deno_node/internal_binding/stream_wrap.ts"; import { ceilPowOf2, INITIAL_ACCEPT_BACKOFF_DELAY, MAX_ACCEPT_BACKOFF_DELAY } from "ext:deno_node/internal_binding/_listen.ts"; import { isWindows } from "ext:deno_node/_util/os.ts"; import { fs } from "ext:deno_node/internal_binding/constants.ts"; export var socketType; (function(socketType) { socketType[socketType["SOCKET"] = 0] = "SOCKET"; socketType[socketType["SERVER"] = 1] = "SERVER"; socketType[socketType["IPC"] = 2] = "IPC"; })(socketType || (socketType = {})); export class Pipe extends ConnectionWrap { reading = false; ipc; // REF: https://github.com/nodejs/node/blob/master/deps/uv/src/win/pipe.c#L48 #pendingInstances = 4; #address; #backlog; #listener; #connections = 0; #closed = false; #acceptBackoffDelay; constructor(type, conn){ let provider; let ipc; switch(type){ case socketType.SOCKET: { provider = providerType.PIPEWRAP; ipc = false; break; } case socketType.SERVER: { provider = providerType.PIPESERVERWRAP; ipc = false; break; } case socketType.IPC: { provider = providerType.PIPEWRAP; ipc = true; break; } default: { unreachable(); } } super(provider, conn); this.ipc = ipc; if (conn && provider === providerType.PIPEWRAP) { const localAddr = conn.localAddr; this.#address = localAddr.path; } } open(_fd) { // REF: https://github.com/denoland/deno/issues/6529 notImplemented("Pipe.prototype.open"); } /** * Bind to a Unix domain or Windows named pipe. * @param name Unix domain or Windows named pipe the server should listen to. * @return An error status code. */ bind(name) { // Deno doesn't currently separate bind from connect. For now we noop under // the assumption we will connect shortly. // REF: https://doc.deno.land/deno/unstable/~/Deno.connect this.#address = name; return 0; } /** * Connect to a Unix domain or Windows named pipe. * @param req A PipeConnectWrap instance. * @param address Unix domain or Windows named pipe the server should connect to. * @return An error status code. */ connect(req, address) { if (isWindows) { // REF: https://github.com/denoland/deno/issues/10244 notImplemented("Pipe.prototype.connect - Windows"); } const connectOptions = { path: address, transport: "unix" }; Deno.connect(connectOptions).then((conn)=>{ const localAddr = conn.localAddr; this.#address = req.address = localAddr.path; this[kStreamBaseField] = conn; try { this.afterConnect(req, 0); } catch { // swallow callback errors. } }, (e)=>{ // TODO(cmorten): correct mapping of connection error to status code. let code; if (e instanceof Deno.errors.NotFound) { code = codeMap.get("ENOENT"); } else if (e instanceof Deno.errors.PermissionDenied) { code = codeMap.get("EACCES"); } else { code = codeMap.get("ECONNREFUSED"); } try { this.afterConnect(req, code); } catch { // swallow callback errors. } }); return 0; } /** * Listen for new connections. * @param backlog The maximum length of the queue of pending connections. * @return An error status code. */ listen(backlog) { if (isWindows) { // REF: https://github.com/denoland/deno/issues/10244 notImplemented("Pipe.prototype.listen - Windows"); } this.#backlog = isWindows ? this.#pendingInstances : ceilPowOf2(backlog + 1); const listenOptions = { path: this.#address, transport: "unix" }; let listener; try { listener = Deno.listen(listenOptions); } catch (e) { if (e instanceof Deno.errors.AddrInUse) { return codeMap.get("EADDRINUSE"); } else if (e instanceof Deno.errors.AddrNotAvailable) { return codeMap.get("EADDRNOTAVAIL"); } else if (e instanceof Deno.errors.PermissionDenied) { throw e; } // TODO(cmorten): map errors to appropriate error codes. return codeMap.get("UNKNOWN"); } const address = listener.addr; this.#address = address.path; this.#listener = listener; this.#accept(); return 0; } ref() { if (this.#listener) { this.#listener.ref(); } } unref() { if (this.#listener) { this.#listener.unref(); } } /** * Set the number of pending pipe instance handles when the pipe server is * waiting for connections. This setting applies to Windows only. * @param instances Number of pending pipe instances. */ setPendingInstances(instances) { this.#pendingInstances = instances; } /** * Alters pipe permissions, allowing it to be accessed from processes run by * different users. Makes the pipe writable or readable by all users. Mode * can be `UV_WRITABLE`, `UV_READABLE` or `UV_WRITABLE | UV_READABLE`. This * function is blocking. * @param mode Pipe permissions mode. * @return An error status code. */ fchmod(mode) { if (mode != constants.UV_READABLE && mode != constants.UV_WRITABLE && mode != (constants.UV_WRITABLE | constants.UV_READABLE)) { return codeMap.get("EINVAL"); } let desiredMode = 0; if (mode & constants.UV_READABLE) { desiredMode |= fs.S_IRUSR | fs.S_IRGRP | fs.S_IROTH; } if (mode & constants.UV_WRITABLE) { desiredMode |= fs.S_IWUSR | fs.S_IWGRP | fs.S_IWOTH; } // TODO(cmorten): this will incorrectly throw on Windows // REF: https://github.com/denoland/deno/issues/4357 try { Deno.chmodSync(this.#address, desiredMode); } catch { // TODO(cmorten): map errors to appropriate error codes. return codeMap.get("UNKNOWN"); } return 0; } /** Handle backoff delays following an unsuccessful accept. */ async #acceptBackoff() { // Backoff after transient errors to allow time for the system to // recover, and avoid blocking up the event loop with a continuously // running loop. if (!this.#acceptBackoffDelay) { this.#acceptBackoffDelay = INITIAL_ACCEPT_BACKOFF_DELAY; } else { this.#acceptBackoffDelay *= 2; } if (this.#acceptBackoffDelay >= MAX_ACCEPT_BACKOFF_DELAY) { this.#acceptBackoffDelay = MAX_ACCEPT_BACKOFF_DELAY; } await delay(this.#acceptBackoffDelay); this.#accept(); } /** Accept new connections. */ async #accept() { if (this.#closed) { return; } if (this.#connections > this.#backlog) { this.#acceptBackoff(); return; } let connection; try { connection = await this.#listener.accept(); } catch (e) { if (e instanceof Deno.errors.BadResource && this.#closed) { // Listener and server has closed. return; } try { // TODO(cmorten): map errors to appropriate error codes. this.onconnection(codeMap.get("UNKNOWN"), undefined); } catch { // swallow callback errors. } this.#acceptBackoff(); return; } // Reset the backoff delay upon successful accept. this.#acceptBackoffDelay = undefined; const connectionHandle = new Pipe(socketType.SOCKET, connection); this.#connections++; try { this.onconnection(0, connectionHandle); } catch { // swallow callback errors. } return this.#accept(); } /** Handle server closure. */ _onClose() { this.#closed = true; this.reading = false; this.#address = undefined; this.#backlog = undefined; this.#connections = 0; this.#acceptBackoffDelay = undefined; if (this.provider === providerType.PIPESERVERWRAP) { try { this.#listener.close(); } catch { // listener already closed } } return LibuvStreamWrap.prototype._onClose.call(this); } } export class PipeConnectWrap extends AsyncWrap { oncomplete; address; constructor(){ super(providerType.PIPECONNECTWRAP); } } export var constants; (function(constants) { constants[constants["SOCKET"] = socketType.SOCKET] = "SOCKET"; constants[constants["SERVER"] = socketType.SERVER] = "SERVER"; constants[constants["IPC"] = socketType.IPC] = "IPC"; constants[constants["UV_READABLE"] = 1] = "UV_READABLE"; constants[constants["UV_WRITABLE"] = 2] = "UV_WRITABLE"; })(constants || (constants = {}));  Qfގ+ext:deno_node/internal_binding/pipe_wrap.tsa bD`XM` T`MLa#!Lba  T4`(L`~b  `Df 24 24 24 (SbqAI`Da Sb1Ib3)`0L`   ]`b ]`Bz]`Ub]`¸ ]` ]`Kb\]`B}]`N" ]`"} ]`]8L` ` L`B` L`Bb` L`bB~` L`B~]@L`  Dbbc Dyyc?M D{{c, Dbbc D||c.F Db{b{c D  c<C DHHc| Dc  Dttc DB B c Db b c Dc DByByc `b a?Bya?ya?ba?a?ba? a?Ha?B a?b{a?{a?|a?ta?a?B~a?a?Ba?ba? a 8,b@tSb @ B¯ Bl??????????? ('  ` T ``/ `/ `?  `  a ('D] `  ajBvaj1aj >aj ;ajB'aj'ajbaj aj "aj ]B¯  T  I`qy!BbQ  T I`!`%Bb Qy T I` b Ճ T I` @Bvb T I`b T I`>b T I`q;b T I`%iB'b  T I`q'b  T I`bb  T I`<b  T I`%&'"b TH`LL`B   `KdP8 $00p<$ k33 5555  5 55(Sbqq`Da ('b 0 4 4b   `T ``/ `/ `?  `  a0''D] ` aj]b T  I`''Bb Ճ T(` L`b   `Kb  8 c33(SbqqB`DaX'' a 0b TL`UL`~bb  `Dl0-240-24 0- 24 24 24(SbqAI`Da')c,,, 8b@ `Dh ei h  01b% e% e%  e%  e%  e%  e%  e%e%% % 0‚    e+ %  2 10 e+!2 1"01bū a,bAfnv~DV^D`RD]DH QZ[M // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { primordials } from "ext:core/mod.js"; import { op_delete_env, op_env, op_exec_path, op_exit, op_get_env, op_gid, op_hostname, op_loadavg, op_network_interfaces, op_os_release, op_os_uptime, op_set_env, op_set_exit_code, op_system_memory_info, op_uid, } from "ext:core/ops"; const { Error, FunctionPrototypeBind, SymbolFor, } = primordials; import { Event, EventTarget } from "ext:deno_web/02_event.js"; const windowDispatchEvent = FunctionPrototypeBind( EventTarget.prototype.dispatchEvent, globalThis, ); function loadavg() { return op_loadavg(); } function hostname() { return op_hostname(); } function osRelease() { return op_os_release(); } function osUptime() { return op_os_uptime(); } function systemMemoryInfo() { return op_system_memory_info(); } function networkInterfaces() { return op_network_interfaces(); } function gid() { return op_gid(); } function uid() { return op_uid(); } // This is an internal only method used by the test harness to override the // behavior of exit when the exit sanitizer is enabled. let exitHandler = null; function setExitHandler(fn) { exitHandler = fn; } function exit(code) { // Set exit code first so unload event listeners can override it. if (typeof code === "number") { op_set_exit_code(code); } else { code = 0; } // Dispatches `unload` only when it's not dispatched yet. if (!globalThis[SymbolFor("Deno.isUnloadDispatched")]) { // Invokes the `unload` hooks before exiting // ref: https://github.com/denoland/deno/issues/3603 windowDispatchEvent(new Event("unload")); } if (exitHandler) { exitHandler(code); return; } op_exit(); throw new Error("Code not reachable"); } function setEnv(key, value) { op_set_env(key, value); } function getEnv(key) { return op_get_env(key) ?? undefined; } function deleteEnv(key) { op_delete_env(key); } const env = { get: getEnv, toObject() { return op_env(); }, set: setEnv, has(key) { return getEnv(key) !== undefined; }, delete: deleteEnv, }; function execPath() { return op_exec_path(); } export { env, execPath, exit, gid, hostname, loadavg, networkInterfaces, osRelease, osUptime, setExitHandler, systemMemoryInfo, uid, }; QcKext:runtime/30_os.jsa bD`LM` T|`dLa= T  I`5_Sb1 Brd?????IbM `L` bS]`hB]`u]`]L`$` L`V` L`V" ` L`" ¤` L`¤` L`b(` L`b((` L`(` L`b"`  L`b"`  L``  L`b`  L`b]PL`  D""c Dc D  c D  c D  c D  c D  c D  c D  c D  c D  c D  c  D  c' D  c+5 D  c9I D  cMb D  cfl DcU``a? a? a? a? a? a? a? a? a? a? a? a? a? a? a? a?"a?a?b(a?a?a?b"a ?a ?(a?¤a?ba ?a ?" a?a?Va?&b@  T I`pJb@  T I`Bb@ L`" T I`b(b@a T I`b@a T I` b@a T I`>b"b@a  T I`Yb@a  T I`(b@a  T I`¤b @a  T I`bb @a  T I`b@ a  T I`$" b @ b T I`Vb@aa Br8b CCCCC T  I`&b T I`/`Jb  :`Dx@h %%%%Ă%ei h  0-%- - %0 - - ! c %%~)33 33 3 1 cP`LbA&.6>BRZFD`RD]DH Q)_// Copyright the Browserify authors. MIT License. // Ported mostly from https://github.com/browserify/path-browserify/ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { isWindows } from "ext:deno_node/_util/os.ts"; import _win32 from "ext:deno_node/path/_win32.ts"; import _posix from "ext:deno_node/path/_posix.ts"; export const win32 = { ..._win32, win32: null, posix: null }; export const posix = { ..._posix, win32: null, posix: null }; posix.win32 = win32.win32 = win32; posix.posix = win32.posix = posix; const path = isWindows ? win32 : posix; export const { basename, delimiter, dirname, extname, format, isAbsolute, join, normalize, parse, relative, resolve, sep, toNamespacedPath } = path; export default path; export * from "ext:deno_node/path/common.ts"; export * from "ext:deno_node/path/_interface.ts"; Qdnxext:deno_node/path/mod.tsa bD` M` T` `La!HLp  a "5"5Bt3b3y 3-b "OB`B4 a4  ~`D0h ei h  0€)33 10€)33 1 0 002 20 00 2 2000 - 1- 1- 1- 1- 1-1- 1-"1 -$1 -&1 -(1 -*1-,1 1  Sb1Ib_`L` " ]`]` ]`?b]` "]`;L`  Dc Dc45L`0` L`3` L`3b3` L`b3y ` L`y 3` L`3-` L`b ` L`b ` L`"O`  L`"OB``  L`B`"5`  L`"5B4`  L`B4 `  L`a` L`4` L`45` L`5]L` DBc39 D"c Dttc`ta?"a?Ba?5a?"5a ?3a?b3a?y a?3a?a?b a?a?"Oa ?B`a ?B4a ?a ?a?4a?a?d.00 , PPPPjbAD`RD]DH =Q9U d// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // Copyright Mathias Bynens // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // Adapted from https://github.com/mathiasbynens/punycode.js // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials // TODO(cmorten): migrate punycode logic to "icu" internal binding and/or "url" // internal module so there can be re-use within the "url" module etc. "use strict"; /** * Creates an array containing the numeric code points of each Unicode * character in the string. While JavaScript uses UCS-2 internally, * this function will convert a pair of surrogate halves (each of which * UCS-2 exposes as separate characters) into a single code point, * matching UTF-16. * * @param str The Unicode input string (UCS-2). * @return The new array of code points. */ function ucs2decode(str) { const output = []; let counter = 0; const length = str.length; while(counter < length){ const value = str.charCodeAt(counter++); if (value >= 0xD800 && value <= 0xDBFF && counter < length) { // It's a high surrogate, and there is a next character. const extra = str.charCodeAt(counter++); if ((extra & 0xFC00) == 0xDC00) { output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); } else { // It's an unmatched surrogate; only append this code unit, in case the // next code unit is the high surrogate of a surrogate pair. output.push(value); counter--; } } else { output.push(value); } } return output; } /** * Creates a string based on an array of numeric code points. * @see `punycode.ucs2.decode` * @memberOf punycode.ucs2 * @name encode * @param codePoints The array of numeric code points. * @returns The new Unicode string (UCS-2). */ function ucs2encode(array) { return String.fromCodePoint(...array); } export const ucs2 = { decode: ucs2decode, encode: ucs2encode }; Qd`?ext:deno_node/internal/idna.tsa bD`M` TP`Z0La + T  I` 4Sb1Ibd`]L`=` L`=]`=a?b@ T I`b6b@ Laa  b".C,C".,  &`Dm0h Ƃłei h  ~) 3 3  1  abA.FD`RD]DH mQi0// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { primordials } from "ext:core/mod.js"; const { Error, StringPrototypeToUpperCase, StringPrototypeCharAt, StringPrototypeSlice, Date, DatePrototypeGetTime } = primordials; import { arch, versions } from "ext:deno_node/_process/process.ts"; import { cpus, hostname, networkInterfaces } from "node:os"; function writeReport(_filename, _err) { return ""; } const todoUndefined = undefined; function getReport(_err) { const dumpEventTime = new Date(); return { header: { reportVersion: 3, event: "JavaScript API", trigger: "GetReport", filename: report.filename, dumpEventTime, dumpEventTimeStamp: DatePrototypeGetTime(dumpEventTime), processId: Deno.pid, threadId: 0, cwd: Deno.cwd(), commandLine: [ "node" ], nodejsVersion: `v${versions.node}`, glibcVersionRuntime: "2.38", glibcVersionCompiler: "2.38", wordSize: 64, arch: arch(), platform: Deno.build.os, componentVersions: versions, release: { name: "node", headersUrl: "https://nodejs.org/download/release/v21.2.0/node-v21.2.0-headers.tar.gz", sourceUrl: "https://nodejs.org/download/release/v21.2.0/node-v21.2.0.tar.gz" }, osName: StringPrototypeToUpperCase(StringPrototypeCharAt(Deno.build.os, 0)) + StringPrototypeSlice(Deno.build.os, 1), osRelease: todoUndefined, osVersion: todoUndefined, osMachine: Deno.build.arch, cpus: cpus(), networkInterfaces: networkInterfaces(), host: hostname() }, javascriptStack: todoUndefined, javascriptHeap: todoUndefined, nativeStack: todoUndefined, resourceUsage: todoUndefined, uvthreadResourceUsage: todoUndefined, libuv: todoUndefined, workers: [], environmentVariables: todoUndefined, userLimits: todoUndefined, sharedObjects: todoUndefined }; } // https://nodejs.org/api/process.html#processreport export const report = { compact: false, directory: "", filename: "", getReport, reportOnFatalError: false, reportOnSignal: false, reportOnUncaughtException: false, signal: "SIGUSR2", writeReport }; QeRX(ext:deno_node/internal/process/report.tsa bD`M` Tl`HLa= T  I`Sb1boSbe??????Ib`L` bS]`gA]`% ]`t]L`"?` L`"?] L`  Dc  D''cKO DcQY D((c[l DcT_ DBABAc `a?a?BAa?'a?a?(a?"?a?^b@ T I`bb@ Laa  boSbXb HIIbCbHHHz Cb  r`Dt8h %%%%%%ei h  0--%- %- %- %- %%~ ) 3 3 1 bPP^bAzD`RD]DH QJ{ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials // The following are all the process APIs that don't depend on the stream module // They have to be split this way to prevent a circular dependency import { core } from "ext:core/mod.js"; import { nextTick as _nextTick } from "ext:deno_node/_next_tick.ts"; import * as fs from "ext:deno_fs/30_fs.js"; /** Returns the operating system CPU architecture for which the Deno binary was compiled */ export function arch() { if (core.build.arch == "x86_64") { return "x64"; } else if (core.build.arch == "aarch64") { return "arm64"; } else { throw Error("unreachable"); } } /** https://nodejs.org/api/process.html#process_process_chdir_directory */ export const chdir = fs.chdir; /** https://nodejs.org/api/process.html#process_process_cwd */ export const cwd = fs.cwd; /** https://nodejs.org/api/process.html#process_process_nexttick_callback_args */ export const nextTick = _nextTick; /** Wrapper of Deno.env.get, which doesn't throw type error when * the env name has "=" or "\0" in it. */ function denoEnvGet(name) { try { return Deno.env.get(name); } catch (e) { if (e instanceof TypeError || e instanceof Deno.errors.PermissionDenied) { return undefined; } throw e; } } const OBJECT_PROTO_PROP_NAMES = Object.getOwnPropertyNames(Object.prototype); /** * https://nodejs.org/api/process.html#process_process_env * Requires env permissions */ export const env = new Proxy(Object(), { get: (target, prop)=>{ if (typeof prop === "symbol") { return target[prop]; } const envValue = denoEnvGet(prop); if (envValue) { return envValue; } if (OBJECT_PROTO_PROP_NAMES.includes(prop)) { return target[prop]; } return envValue; }, ownKeys: ()=>Reflect.ownKeys(Deno.env.toObject()), getOwnPropertyDescriptor: (_target, name)=>{ const value = denoEnvGet(String(name)); if (value) { return { enumerable: true, configurable: true, value }; } }, set (_target, prop, value) { Deno.env.set(String(prop), String(value)); return true; // success }, has: (_target, prop)=>typeof denoEnvGet(String(prop)) === "string" }); /** * https://nodejs.org/api/process.html#process_process_version * * This value is hard coded to latest stable release of Node, as * some packages are checking it for compatibility. Previously * it pointed to Deno version, but that led to incompability * with some packages. */ export const version = "v18.18.0"; /** * https://nodejs.org/api/process.html#process_process_versions * * This value is hard coded to latest stable release of Node, as * some packages are checking it for compatibility. Previously * it contained only output of `Deno.version`, but that led to incompability * with some packages. Value of `v8` field is still taken from `Deno.version`. */ export const versions = { node: "18.17.1", uv: "1.43.0", zlib: "1.2.11", brotli: "1.0.9", ares: "1.18.1", modules: "108", nghttp2: "1.47.0", napi: "8", llhttp: "6.0.10", openssl: "3.0.7+quic", cldr: "41.0", icu: "71.1", tz: "2022b", unicode: "14.0", ngtcp2: "0.8.1", nghttp3: "0.7.0", // Will be filled when calling "__bootstrapNodeProcess()", deno: "", v8: "", typescript: "" }; Qe673!ext:deno_node/_process/process.tsa bD`(M` T`lLa3 T  I`BSb1Ba??Ib `L` bS]`B ]`E]`%]\L`` L`` L`"` L`"` L`± ` L`± &` L`&BA` L`BA L`  DDcL` D@± c D  c` a?@a?a?a?"a?± a?a?&a?BAa?֤b@,L`  T I`Zb @ga "@'18b CCCCC T  Qb Proxy.get`֤bK T y` 1 Qa.ownKeys`bK T ```bK T I`@ b T  Qb Proxy.has`I ֤bKb&"J> B   b  "   bB   b  BbY "BII; II  `D{0h Ƃ%%ei e h  -1-101!- !- ^ %! !a~ ) 33333 i11~)1 c`@0&bAJVbrD`RD]DH PQrzF// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // deno-lint-ignore prefer-const export let _exiting = false; QeV!ext:deno_node/_process/exiting.tsa bD` M` T@`>La! Laa   `Di h ei h  1 4Sb1Ib`]L`B` L`B]`Ba? bAD`RD]DH  Q #*// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { Buffer } from "node:buffer"; import { clearLine, clearScreenDown, cursorTo, moveCursor, } from "ext:deno_node/internal/readline/callbacks.mjs"; import { Duplex, Readable, Writable } from "node:stream"; import * as io from "ext:deno_io/12_io.js"; import { guessHandleType } from "ext:deno_node/internal_binding/util.ts"; // https://github.com/nodejs/node/blob/00738314828074243c9a52a228ab4c68b04259ef/lib/internal/bootstrap/switches/is_main_thread.js#L41 export function createWritableStdioStream(writer, name) { const stream = new Writable({ emitClose: false, write(buf, enc, cb) { if (!writer) { this.destroy( new Error(`Deno.${name} is not available in this environment`), ); return; } writer.writeSync(buf instanceof Uint8Array ? buf : Buffer.from(buf, enc)); cb(); }, destroy(err, cb) { cb(err); this._undestroy(); if (!this._writableState.emitClose) { nextTick(() => this.emit("close")); } }, }); let fd = -1; if (writer instanceof io.Stdout) { fd = io.STDOUT_RID; } else if (writer instanceof io.Stderr) { fd = io.STDERR_RID; } stream.fd = fd; stream.destroySoon = stream.destroy; stream._isStdio = true; stream.once("close", () => writer?.close()); Object.defineProperties(stream, { columns: { enumerable: true, configurable: true, get: () => writer?.isTerminal() ? Deno.consoleSize?.().columns : undefined, }, rows: { enumerable: true, configurable: true, get: () => writer?.isTerminal() ? Deno.consoleSize?.().rows : undefined, }, isTTY: { enumerable: true, configurable: true, get: () => writer?.isTerminal(), }, getWindowSize: { enumerable: true, configurable: true, value: () => writer?.isTerminal() ? Object.values(Deno.consoleSize?.()) : undefined, }, }); if (writer?.isTerminal()) { // These belong on tty.WriteStream(), but the TTY streams currently have // following problems: // 1. Using them here introduces a circular dependency. // 2. Creating a net.Socket() from a fd is not currently supported. stream.cursorTo = function (x, y, callback) { return cursorTo(this, x, y, callback); }; stream.moveCursor = function (dx, dy, callback) { return moveCursor(this, dx, dy, callback); }; stream.clearLine = function (dir, callback) { return clearLine(this, dir, callback); }; stream.clearScreenDown = function (callback) { return clearScreenDown(this, callback); }; } return stream; } function _guessStdinType(fd) { if (typeof fd !== "number" || fd < 0) return "UNKNOWN"; return guessHandleType(fd); } const _read = function (size) { const p = Buffer.alloc(size || 16 * 1024); io.stdin?.read(p).then( (length) => { this.push(length === null ? null : p.slice(0, length)); }, (error) => { this.destroy(error); }, ); }; let readStream; export function setReadStream(s) { readStream = s; } /** https://nodejs.org/api/process.html#process_process_stdin */ // https://github.com/nodejs/node/blob/v18.12.1/lib/internal/bootstrap/switches/is_main_thread.js#L189 /** Create process.stdin */ export const initStdin = () => { const fd = io.stdin ? io.STDIN_RID : undefined; let stdin; const stdinType = _guessStdinType(fd); switch (stdinType) { case "FILE": { // Since `fs.ReadStream` cannot be imported before process initialization, // use `Readable` instead. // https://github.com/nodejs/node/blob/v18.12.1/lib/internal/bootstrap/switches/is_main_thread.js#L200 // https://github.com/nodejs/node/blob/v18.12.1/lib/internal/fs/streams.js#L148 stdin = new Readable({ highWaterMark: 64 * 1024, autoDestroy: false, read: _read, }); break; } case "TTY": { stdin = new readStream(fd); break; } case "PIPE": case "TCP": { // For PIPE and TCP, `new Duplex()` should be replaced `new net.Socket()` if possible. // There are two problems that need to be resolved. // 1. Using them here introduces a circular dependency. // 2. Creating a net.Socket() from a fd is not currently supported. // https://github.com/nodejs/node/blob/v18.12.1/lib/internal/bootstrap/switches/is_main_thread.js#L206 // https://github.com/nodejs/node/blob/v18.12.1/lib/net.js#L329 stdin = new Duplex({ readable: stdinType === "TTY" ? undefined : true, writable: stdinType === "TTY" ? undefined : false, readableHighWaterMark: stdinType === "TTY" ? 0 : undefined, allowHalfOpen: false, emitClose: false, autoDestroy: true, decodeStrings: false, read: _read, }); if (stdinType !== "TTY") { // Make sure the stdin can't be `.end()`-ed stdin._writableState.ended = true; } break; } default: { // Provide a dummy contentless input for e.g. non-console // Windows applications. stdin = new Readable({ read() {} }); stdin.push(null); } } stdin.on("close", () => io.stdin?.close()); stdin.fd = io.stdin ? io.STDIN_RID : -1; Object.defineProperty(stdin, "isTTY", { enumerable: true, configurable: true, get() { return io.stdin.isTerminal(); }, }); stdin._isRawMode = false; stdin.setRawMode = (enable) => { io.stdin?.setRaw?.(enable); stdin._isRawMode = enable; return stdin; }; Object.defineProperty(stdin, "isRaw", { enumerable: true, configurable: true, get() { return stdin._isRawMode; }, }); return stdin; }; Qe75"ext:deno_node/_process/streams.mjsa bD`lM` TP``$La7 T  I` Sb1G bc????Ib`L` b]`)B]`/ ]`b]` ]`9],L` C` L`CD` L`Db` L`b L`  DGDc,L`  D"{ "{ c! DB B c D  c D  c DzzcCL DB{B{cP_ DB|B|cck Db b c"1 D}}coy` "{ a?za?B{a?B|a?}a?B a? a? a?b a?Ca?ba?Da?֥b@$L` T I`x $g2@ @@@ @@ Cb"@a T(`  L`b  n`Dc %(SbqAb`Da 4  b@ba  T   `  ֥b @ T D`DbK `Dm h Ƃ%%%ei e% h  %%1 `bA^D~DjDD`RD]DH QbN!&'// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { core, internals, primordials } from "ext:core/mod.js"; import { op_kill, op_run, op_run_status, op_spawn_child, op_spawn_kill, op_spawn_sync, op_spawn_wait, } from "ext:core/ops"; const { ArrayPrototypeMap, ArrayPrototypeSlice, TypeError, ObjectEntries, SafeArrayIterator, String, ObjectPrototypeIsPrototypeOf, PromisePrototypeThen, SafePromiseAll, Symbol, SymbolFor, } = primordials; import { FsFile } from "ext:deno_fs/30_fs.js"; import { readAll } from "ext:deno_io/12_io.js"; import { assert, pathFromURL, SymbolAsyncDispose, } from "ext:deno_web/00_infra.js"; import * as abortSignal from "ext:deno_web/03_abort_signal.js"; import { readableStreamCollectIntoUint8Array, readableStreamForRidUnrefable, readableStreamForRidUnrefableRef, readableStreamForRidUnrefableUnref, ReadableStreamPrototype, writableStreamForRid, } from "ext:deno_web/06_streams.js"; function opKill(pid, signo, apiName) { op_kill(pid, signo, apiName); } function kill(pid, signo = "SIGTERM") { opKill(pid, signo, "Deno.kill()"); } function opRunStatus(rid) { return op_run_status(rid); } function opRun(request) { assert(request.cmd.length > 0); return op_run(request); } async function runStatus(rid) { const res = await opRunStatus(rid); if (res.gotSignal) { const signal = res.exitSignal; return { success: false, code: 128 + signal, signal }; } else if (res.exitCode != 0) { return { success: false, code: res.exitCode }; } else { return { success: true, code: 0 }; } } class Process { constructor(res) { this.rid = res.rid; this.pid = res.pid; if (res.stdinRid && res.stdinRid > 0) { this.stdin = new FsFile(res.stdinRid, SymbolFor("Deno.internal.FsFile")); } if (res.stdoutRid && res.stdoutRid > 0) { this.stdout = new FsFile( res.stdoutRid, SymbolFor("Deno.internal.FsFile"), ); } if (res.stderrRid && res.stderrRid > 0) { this.stderr = new FsFile( res.stderrRid, SymbolFor("Deno.internal.FsFile"), ); } } status() { return runStatus(this.rid); } async output() { if (!this.stdout) { throw new TypeError("stdout was not piped"); } try { return await readAll(this.stdout); } finally { this.stdout.close(); } } async stderrOutput() { if (!this.stderr) { throw new TypeError("stderr was not piped"); } try { return await readAll(this.stderr); } finally { this.stderr.close(); } } close() { core.close(this.rid); } kill(signo = "SIGTERM") { opKill(this.pid, signo, "Deno.Process.kill()"); } } function run({ cmd, cwd = undefined, clearEnv = false, env = {}, gid = undefined, uid = undefined, stdout = "inherit", stderr = "inherit", stdin = "inherit", }) { if (cmd[0] != null) { cmd = [ pathFromURL(cmd[0]), ...new SafeArrayIterator(ArrayPrototypeSlice(cmd, 1)), ]; } internals.warnOnDeprecatedApi( "Deno.run()", (new Error()).stack, `Use "Deno.Command()" API instead.`, ); const res = opRun({ cmd: ArrayPrototypeMap(cmd, String), cwd, clearEnv, env: ObjectEntries(env), gid, uid, stdin, stdout, stderr, }); return new Process(res); } const illegalConstructorKey = Symbol("illegalConstructorKey"); function spawnChildInner(opFn, command, apiName, { args = [], cwd = undefined, clearEnv = false, env = {}, uid = undefined, gid = undefined, stdin = "null", stdout = "piped", stderr = "piped", signal = undefined, windowsRawArguments = false, ipc = -1, } = {}) { const child = opFn({ cmd: pathFromURL(command), args: ArrayPrototypeMap(args, String), cwd: pathFromURL(cwd), clearEnv, env: ObjectEntries(env), uid, gid, stdin, stdout, stderr, windowsRawArguments, ipc, }, apiName); return new ChildProcess(illegalConstructorKey, { ...child, signal, }); } function spawnChild(command, options = {}) { return spawnChildInner( op_spawn_child, command, "Deno.Command().spawn()", options, ); } function collectOutput(readableStream) { if ( !(ObjectPrototypeIsPrototypeOf(ReadableStreamPrototype, readableStream)) ) { return null; } return readableStreamCollectIntoUint8Array(readableStream); } const _pipeFd = Symbol("[[pipeFd]]"); internals.getPipeFd = (process) => process[_pipeFd]; class ChildProcess { #rid; #waitPromise; #waitComplete = false; [_pipeFd]; #pid; get pid() { return this.#pid; } #stdin = null; get stdin() { if (this.#stdin == null) { throw new TypeError("stdin is not piped"); } return this.#stdin; } #stdout = null; get stdout() { if (this.#stdout == null) { throw new TypeError("stdout is not piped"); } return this.#stdout; } #stderr = null; get stderr() { if (this.#stderr == null) { throw new TypeError("stderr is not piped"); } return this.#stderr; } constructor(key = null, { signal, rid, pid, stdinRid, stdoutRid, stderrRid, pipeFd, // internal } = null) { if (key !== illegalConstructorKey) { throw new TypeError("Illegal constructor."); } this.#rid = rid; this.#pid = pid; this[_pipeFd] = pipeFd; if (stdinRid !== null) { this.#stdin = writableStreamForRid(stdinRid); } if (stdoutRid !== null) { this.#stdout = readableStreamForRidUnrefable(stdoutRid); } if (stderrRid !== null) { this.#stderr = readableStreamForRidUnrefable(stderrRid); } const onAbort = () => this.kill("SIGTERM"); signal?.[abortSignal.add](onAbort); const waitPromise = op_spawn_wait(this.#rid); this.#waitPromise = waitPromise; this.#status = PromisePrototypeThen(waitPromise, (res) => { signal?.[abortSignal.remove](onAbort); this.#waitComplete = true; return res; }); } #status; get status() { return this.#status; } async output() { if (this.#stdout?.locked) { throw new TypeError( "Can't collect output because stdout is locked", ); } if (this.#stderr?.locked) { throw new TypeError( "Can't collect output because stderr is locked", ); } const { 0: status, 1: stdout, 2: stderr } = await SafePromiseAll([ this.#status, collectOutput(this.#stdout), collectOutput(this.#stderr), ]); return { success: status.success, code: status.code, signal: status.signal, get stdout() { if (stdout == null) { throw new TypeError("stdout is not piped"); } return stdout; }, get stderr() { if (stderr == null) { throw new TypeError("stderr is not piped"); } return stderr; }, }; } kill(signo = "SIGTERM") { if (this.#waitComplete) { throw new TypeError("Child process has already terminated."); } op_spawn_kill(this.#rid, signo); } async [SymbolAsyncDispose]() { try { op_spawn_kill(this.#rid, "SIGTERM"); } catch { // ignore errors from killing the process (such as ESRCH or BadResource) } await this.#status; } ref() { core.refOpPromise(this.#waitPromise); if (this.#stdout) readableStreamForRidUnrefableRef(this.#stdout); if (this.#stderr) readableStreamForRidUnrefableRef(this.#stderr); } unref() { core.unrefOpPromise(this.#waitPromise); if (this.#stdout) readableStreamForRidUnrefableUnref(this.#stdout); if (this.#stderr) readableStreamForRidUnrefableUnref(this.#stderr); } } function spawn(command, options) { if (options?.stdin === "piped") { throw new TypeError( "Piped stdin is not supported for this function, use 'Deno.Command().spawn()' instead", ); } return spawnChildInner( op_spawn_child, command, "Deno.Command().output()", options, ) .output(); } function spawnSync(command, { args = [], cwd = undefined, clearEnv = false, env = {}, uid = undefined, gid = undefined, stdin = "null", stdout = "piped", stderr = "piped", windowsRawArguments = false, } = {}) { if (stdin === "piped") { throw new TypeError( "Piped stdin is not supported for this function, use 'Deno.Command().spawn()' instead", ); } const result = op_spawn_sync({ cmd: pathFromURL(command), args: ArrayPrototypeMap(args, String), cwd: pathFromURL(cwd), clearEnv, env: ObjectEntries(env), uid, gid, stdin, stdout, stderr, windowsRawArguments, }); return { success: result.status.success, code: result.status.code, signal: result.status.signal, get stdout() { if (result.stdout == null) { throw new TypeError("stdout is not piped"); } return result.stdout; }, get stderr() { if (result.stderr == null) { throw new TypeError("stderr is not piped"); } return result.stderr; }, }; } class Command { #command; #options; constructor(command, options) { this.#command = command; this.#options = options; } output() { if (this.#options?.stdin === "piped") { throw new TypeError( "Piped stdin is not supported for this function, use 'Deno.Command.spawn()' instead", ); } return spawn(this.#command, this.#options); } outputSync() { if (this.#options?.stdin === "piped") { throw new TypeError( "Piped stdin is not supported for this function, use 'Deno.Command.spawn()' instead", ); } return spawnSync(this.#command, this.#options); } spawn() { const options = { ...(this.#options ?? {}), stdout: this.#options?.stdout ?? "inherit", stderr: this.#options?.stderr ?? "inherit", stdin: this.#options?.stdin ?? "inherit", }; return spawnChild(this.#command, options); } } export { ChildProcess, Command, kill, Process, run }; Qd~<ext:runtime/40_process.jsa bD`M`* TQ`Y!LaF T  I`1Sb1a=  !-Br-B  u??????????????????????Ib'`$L` bS]`yB]`E]`b]`Bn]`]`"t]`]DL` ` L` H` L`HbV` L`bV* ` L`*  ` L`  L`  D-Dc\L` Dc  D"H"Hc DLLc~ D cek D  cUY DBKBKc[d D  c D  c D  c D  c D  c D  c D  c DbJbJcoz Dcfq Dc3: DBBc# Dc'D DcHh Dcl D""c` a?BKa?a? a? a? a? a? a? a? a?a?a?a?bJa?La?Ba?a?a?a?"Ha?"a?* a?bVa? a? a?Ha?b@ T I`b@ T  I`Bb@ T I`0`bMQ T I` b@  T I`)b@ T I`b@ T I` b@! T I`#cEF@FG@ b@",L`  T I`@* b @b! T I` S  b @ c"a a=  !- Br  `T ``/ `/ `?  `  ab D]T ` ajaj"aj"aj aj* aj] T  I`}bVb  T I`b T I`| "b Q T I` O "bQ  T I`X z b  T I` * b BK T y`BKQb .getPipeFd`IbKbdSb @ BhbBB!j?????????  `T``/ `/ `?  `  aD]f6 D"a  } `F` b  `F` B `F` D `F` B'a 'a a* a D `F` HcD La,BhbBB! T  I`A b Ճ T I`Nl Qaget pidb T I`Qb get stdinb  T I` Qb get stdoutb  T I`2Qb get stderrb  T I`Qb get statusb  T I`/wc45@56@"b Q T I`%* bL T I`C`bΑ T I`B'b T I`'b TL`S]  `Kd  ,4" 5l555555 5  5 5(Sbqq `Dab 4 4 4b  ,Sb @! c??$'  `T ``/ `/ `?  `  a$'D]< ` aj"aj"aj aj]!  T  I`7$$Hb Ճ% T I`$%"b& T I`%}&"b ' T I`&' b( T,`]  `Kb  0 d55(SbqqH`Da$' a 4b) `D9h %%%%%%% % % % %%%%%%%%%% % ei e% h   0 -%-%-%-%-%- %- % -% -% --%  ‚    e+ 1 b%!b%0"Â#2$%%''e%((e%))e%**e%++e%,,e%--e% ..e% /&t%012345607t89:e+;2< 1=??e%@@e%A>BCDe+E 2< 1 c #PPP@, bAZbj§ʧҧڧrz:FR^2DjvDDΨ֨ިD`RD]DH eQa D// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials const kInternal = Symbol("internal properties"); const replaceUnderscoresRegex = /_/g; const leadingDashesRegex = /^--?/; const trailingValuesRegex = /=.*$/; // This builds the initial process.allowedNodeEnvironmentFlags // from data in the config binding. export function buildAllowedFlags() { const allowedNodeEnvironmentFlags = [ "--track-heap-objects", "--no-track-heap-objects", "--node-snapshot", "--no-node-snapshot", "--require", "--max-old-space-size", "--trace-exit", "--no-trace-exit", "--disallow-code-generation-from-strings", "--experimental-json-modules", "--no-experimental-json-modules", "--interpreted-frames-native-stack", "--inspect-brk", "--no-inspect-brk", "--trace-tls", "--no-trace-tls", "--stack-trace-limit", "--experimental-repl-await", "--no-experimental-repl-await", "--preserve-symlinks", "--no-preserve-symlinks", "--report-uncaught-exception", "--no-report-uncaught-exception", "--experimental-modules", "--no-experimental-modules", "--report-signal", "--jitless", "--inspect-port", "--heapsnapshot-near-heap-limit", "--tls-keylog", "--force-context-aware", "--no-force-context-aware", "--napi-modules", "--abort-on-uncaught-exception", "--diagnostic-dir", "--verify-base-objects", "--no-verify-base-objects", "--unhandled-rejections", "--perf-basic-prof", "--trace-atomics-wait", "--no-trace-atomics-wait", "--deprecation", "--no-deprecation", "--perf-basic-prof-only-functions", "--perf-prof", "--max-http-header-size", "--report-on-signal", "--no-report-on-signal", "--throw-deprecation", "--no-throw-deprecation", "--warnings", "--no-warnings", "--force-fips", "--no-force-fips", "--pending-deprecation", "--no-pending-deprecation", "--input-type", "--tls-max-v1.3", "--no-tls-max-v1.3", "--tls-min-v1.2", "--no-tls-min-v1.2", "--inspect", "--no-inspect", "--heapsnapshot-signal", "--trace-warnings", "--no-trace-warnings", "--trace-event-categories", "--experimental-worker", "--tls-max-v1.2", "--no-tls-max-v1.2", "--perf-prof-unwinding-info", "--preserve-symlinks-main", "--no-preserve-symlinks-main", "--policy-integrity", "--experimental-wasm-modules", "--no-experimental-wasm-modules", "--node-memory-debug", "--inspect-publish-uid", "--tls-min-v1.3", "--no-tls-min-v1.3", "--experimental-specifier-resolution", "--secure-heap", "--tls-min-v1.0", "--no-tls-min-v1.0", "--redirect-warnings", "--experimental-report", "--trace-event-file-pattern", "--trace-uncaught", "--no-trace-uncaught", "--experimental-loader", "--http-parser", "--dns-result-order", "--trace-sigint", "--no-trace-sigint", "--secure-heap-min", "--enable-fips", "--no-enable-fips", "--enable-source-maps", "--no-enable-source-maps", "--insecure-http-parser", "--no-insecure-http-parser", "--use-openssl-ca", "--no-use-openssl-ca", "--tls-cipher-list", "--experimental-top-level-await", "--no-experimental-top-level-await", "--openssl-config", "--icu-data-dir", "--v8-pool-size", "--report-on-fatalerror", "--no-report-on-fatalerror", "--title", "--tls-min-v1.1", "--no-tls-min-v1.1", "--report-filename", "--trace-deprecation", "--no-trace-deprecation", "--report-compact", "--no-report-compact", "--experimental-policy", "--experimental-import-meta-resolve", "--no-experimental-import-meta-resolve", "--zero-fill-buffers", "--no-zero-fill-buffers", "--report-dir", "--use-bundled-ca", "--no-use-bundled-ca", "--experimental-vm-modules", "--no-experimental-vm-modules", "--force-async-hooks-checks", "--no-force-async-hooks-checks", "--frozen-intrinsics", "--no-frozen-intrinsics", "--huge-max-old-generation-size", "--disable-proto", "--debug-arraybuffer-allocations", "--no-debug-arraybuffer-allocations", "--conditions", "--experimental-wasi-unstable-preview1", "--no-experimental-wasi-unstable-preview1", "--trace-sync-io", "--no-trace-sync-io", "--use-largepages", "--experimental-abortcontroller", "--debug-port", "--es-module-specifier-resolution", "--prof-process", "-C", "--loader", "--report-directory", "-r", "--trace-events-enabled", ]; /* function isAccepted(to) { if (!to.startsWith("-") || to === "--") return true; const recursiveExpansion = aliases.get(to); if (recursiveExpansion) { if (recursiveExpansion[0] === to) { recursiveExpansion.splice(0, 1); } return recursiveExpansion.every(isAccepted); } return options.get(to).envVarSettings === kAllowedInEnvironment; } for (const { 0: from, 1: expansion } of aliases) { if (expansion.every(isAccepted)) { let canonical = from; if (canonical.endsWith("=")) { canonical = canonical.slice(0, canonical.length - 1); } if (canonical.endsWith(" ")) { canonical = canonical.slice(0, canonical.length - 4); } allowedNodeEnvironmentFlags.push(canonical); } } */ const trimLeadingDashes = (flag) => flag.replace(leadingDashesRegex, ""); // Save these for comparison against flags provided to // process.allowedNodeEnvironmentFlags.has() which lack leading dashes. const nodeFlags = allowedNodeEnvironmentFlags.map(trimLeadingDashes); class NodeEnvironmentFlagsSet extends Set { constructor(array) { super(); this[kInternal] = { array }; } add() { // No-op, `Set` API compatible return this; } delete() { // No-op, `Set` API compatible return false; } clear() { // No-op, `Set` API compatible } has(key) { // This will return `true` based on various possible // permutations of a flag, including present/missing leading // dash(es) and/or underscores-for-dashes. // Strips any values after `=`, inclusive. // TODO(addaleax): It might be more flexible to run the option parser // on a dummy option set and see whether it rejects the argument or // not. if (typeof key === "string") { key = key.replace(replaceUnderscoresRegex, "-"); if (leadingDashesRegex.test(key)) { key = key.replace(trailingValuesRegex, ""); return this[kInternal].array.includes(key); } return nodeFlags.includes(key); } return false; } entries() { this[kInternal].set ??= new Set(this[kInternal].array); return this[kInternal].set.entries(); } forEach(callback, thisArg = undefined) { this[kInternal].array.forEach((v) => Reflect.apply(callback, thisArg, [v, v, this]) ); } get size() { return this[kInternal].array.length; } values() { this[kInternal].set ??= new Set(this[kInternal].array); return this[kInternal].set.values(); } } NodeEnvironmentFlagsSet.prototype.keys = NodeEnvironmentFlagsSet .prototype[Symbol.iterator] = NodeEnvironmentFlagsSet.prototype.values; Object.freeze(NodeEnvironmentFlagsSet.prototype.constructor); Object.freeze(NodeEnvironmentFlagsSet.prototype); return Object.freeze( new NodeEnvironmentFlagsSet( allowedNodeEnvironmentFlags, ), ); }  Qf`S-ext:deno_node/internal/process/per_thread.mjsa bD`<M`  TT`h,La -L` T`dL`0SbqA&`?bJ`Da6TSb1"#B$B%c????Ib`]L`bJ` L`bJ]`bJa?  `iM`Bb "BbbBBb " b" "b B" "B^B "B_bb b "Bb b"BB  "" b B bB    b      "  b" BB  $ " BB b" "" Bb""  b !b"B### b$"%%"  b&  & T,`L`PB$I  Z`Dd -_(SbbpWB&`B&a'U: abK<  ` T ``/ `/ `?  `  a&:D]x `  ajajajajaj +ajb;aj`+ } ` F,aj ] T@`?L`"b-C-  `Di8Z  i ~) 3 4 (SbxMb'`Daa: aLb  T  I`b T I`<b T I`Gvb T I`Tb T I`a+b T I`tb;b  T I` Qaget sizeb  T I`6,b  \,%*   2`Dz%{%Ƃ-^%!      e+ --! - -- 4 2!---^!--^!- i^:c!    b@aa  #'$% "`Dn h %%%%ei h  !b%z%z%z% > a0'bA.VƩDΩکD`RD]DH QQM#" // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { ERR_INVALID_URI } from "ext:deno_node/internal/errors.ts"; export const hexTable = new Array(256); for(let i = 0; i < 256; ++i){ hexTable[i] = "%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase(); } // deno-fmt-ignore export const isHexTable = new Int8Array([ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]); export function encodeStr(str, noEscapeTable, hexTable) { const len = str.length; if (len === 0) return ""; let out = ""; let lastPos = 0; for(let i = 0; i < len; i++){ let c = str.charCodeAt(i); // ASCII if (c < 0x80) { if (noEscapeTable[c] === 1) continue; if (lastPos < i) out += str.slice(lastPos, i); lastPos = i + 1; out += hexTable[c]; continue; } if (lastPos < i) out += str.slice(lastPos, i); // Multi-byte characters ... if (c < 0x800) { lastPos = i + 1; out += hexTable[0xc0 | c >> 6] + hexTable[0x80 | c & 0x3f]; continue; } if (c < 0xd800 || c >= 0xe000) { lastPos = i + 1; out += hexTable[0xe0 | c >> 12] + hexTable[0x80 | c >> 6 & 0x3f] + hexTable[0x80 | c & 0x3f]; continue; } // Surrogate pair ++i; // This branch should never happen because all URLSearchParams entries // should already be converted to USVString. But, included for // completion's sake anyway. if (i >= len) throw new ERR_INVALID_URI(); const c2 = str.charCodeAt(i) & 0x3ff; lastPos = i + 1; c = 0x10000 + ((c & 0x3ff) << 10 | c2); out += hexTable[0xf0 | c >> 18] + hexTable[0x80 | c >> 12 & 0x3f] + hexTable[0x80 | c >> 6 & 0x3f] + hexTable[0x80 | c & 0x3f]; } if (lastPos === 0) return str; if (lastPos < len) return out + str.slice(lastPos); return out; } export default { hexTable, encodeStr, isHexTable }; Qer| %ext:deno_node/internal/querystring.tsa bD`M` T`HLa! Lb T  I`Q idSb1Ib ` L`  ]`]8L` ` L`i` L`ibj` L`bjbl` L`bl] L`  D  c` a?bja?bla?ia?a?b@ba B I1 "X  ` M(bbjCiCblCbjibl  `D{Xh ei h  !  i1  nH0 n- ^ 8- ]84 PċK! { % i1~ )03 0303 1 c !0@0 `2 bAD`RD]DH Qfg/// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials // deno-lint-ignore-file camelcase import { clearLine, clearScreenDown, cursorTo, moveCursor, } from "ext:deno_node/internal/readline/callbacks.mjs"; import { emitKeypressEvents } from "ext:deno_node/internal/readline/emitKeypressEvents.mjs"; import promises from "ext:deno_node/readline/promises.ts"; import { validateAbortSignal } from "ext:deno_node/internal/validators.mjs"; import { promisify } from "ext:deno_node/internal/util.mjs"; import { AbortError } from "ext:deno_node/internal/errors.ts"; import process from "node:process"; import { Interface as _Interface, InterfaceConstructor, kAddHistory, kDecoder, kDeleteLeft, kDeleteLineLeft, kDeleteLineRight, kDeleteRight, kDeleteWordLeft, kDeleteWordRight, kGetDisplayPos, kHistoryNext, kHistoryPrev, kInsertString, kLine, kLine_buffer, kMoveCursor, kNormalWrite, kOldPrompt, kOnLine, kPreviousKey, kPrompt, kQuestion, kQuestionCallback, kQuestionCancel, kRefreshLine, kSawKeyPress, kSawReturnAt, kSetRawMode, kTabComplete, kTabCompleter, kTtyWrite, kWordLeft, kWordRight, kWriteToOutput, } from "ext:deno_node/internal/readline/interface.mjs"; function Interface(input, output, completer, terminal) { if (!(this instanceof Interface)) { return new Interface(input, output, completer, terminal); } if ( input?.input && typeof input.completer === "function" && input.completer.length !== 2 ) { const { completer } = input; input.completer = (v, cb) => cb(null, completer(v)); } else if (typeof completer === "function" && completer.length !== 2) { const realCompleter = completer; completer = (v, cb) => cb(null, realCompleter(v)); } // NOTE(bartlomieju): in Node this is `FunctionPrototypeCall(...)`, // but trying to do `Function.prototype.call()` somehow doesn't work here // /shrug InterfaceConstructor.bind( this, )( input, output, completer, terminal, ); if (process.env.TERM === "dumb") { this._ttyWrite = _ttyWriteDumb.bind(this); } } Object.setPrototypeOf(Interface.prototype, _Interface.prototype); Object.setPrototypeOf(Interface, _Interface); /** * Displays `query` by writing it to the `output`. * @param {string} query * @param {{ signal?: AbortSignal; }} [options] * @param {Function} cb * @returns {void} */ Interface.prototype.question = function question(query, options, cb) { cb = typeof options === "function" ? options : cb; options = typeof options === "object" && options !== null ? options : {}; if (options.signal) { validateAbortSignal(options.signal, "options.signal"); if (options.signal.aborted) { return; } const onAbort = () => { this[kQuestionCancel](); }; options.signal.addEventListener("abort", onAbort, { once: true }); const cleanup = () => { options.signal.removeEventListener(onAbort); }; cb = typeof cb === "function" ? (answer) => { cleanup(); return cb(answer); } : cleanup; } if (typeof cb === "function") { this[kQuestion](query, cb); } }; Interface.prototype.question[promisify.custom] = function question( query, options, ) { options = typeof options === "object" && options !== null ? options : {}; if (options.signal && options.signal.aborted) { return Promise.reject( new AbortError(undefined, { cause: options.signal.reason }), ); } return new Promise((resolve, reject) => { let cb = resolve; if (options.signal) { const onAbort = () => { reject(new AbortError(undefined, { cause: options.signal.reason })); }; options.signal.addEventListener("abort", onAbort, { once: true }); cb = (answer) => { options.signal.removeEventListener("abort", onAbort); resolve(answer); }; } this.question(query, options, cb); }); }; /** * Creates a new `readline.Interface` instance. * @param {Readable | { * input: Readable; * output: Writable; * completer?: Function; * terminal?: boolean; * history?: string[]; * historySize?: number; * removeHistoryDuplicates?: boolean; * prompt?: string; * crlfDelay?: number; * escapeCodeTimeout?: number; * tabSize?: number; * signal?: AbortSignal; * }} input * @param {Writable} [output] * @param {Function} [completer] * @param {boolean} [terminal] * @returns {Interface} */ function createInterface(input, output, completer, terminal) { return new Interface(input, output, completer, terminal); } Object.defineProperties(Interface.prototype, { // Redirect internal prototype methods to the underscore notation for backward // compatibility. [kSetRawMode]: { get() { return this._setRawMode; }, }, [kOnLine]: { get() { return this._onLine; }, }, [kWriteToOutput]: { get() { return this._writeToOutput; }, }, [kAddHistory]: { get() { return this._addHistory; }, }, [kRefreshLine]: { get() { return this._refreshLine; }, }, [kNormalWrite]: { get() { return this._normalWrite; }, }, [kInsertString]: { get() { return this._insertString; }, }, [kTabComplete]: { get() { return this._tabComplete; }, }, [kWordLeft]: { get() { return this._wordLeft; }, }, [kWordRight]: { get() { return this._wordRight; }, }, [kDeleteLeft]: { get() { return this._deleteLeft; }, }, [kDeleteRight]: { get() { return this._deleteRight; }, }, [kDeleteWordLeft]: { get() { return this._deleteWordLeft; }, }, [kDeleteWordRight]: { get() { return this._deleteWordRight; }, }, [kDeleteLineLeft]: { get() { return this._deleteLineLeft; }, }, [kDeleteLineRight]: { get() { return this._deleteLineRight; }, }, [kLine]: { get() { return this._line; }, }, [kHistoryNext]: { get() { return this._historyNext; }, }, [kHistoryPrev]: { get() { return this._historyPrev; }, }, [kGetDisplayPos]: { get() { return this._getDisplayPos; }, }, [kMoveCursor]: { get() { return this._moveCursor; }, }, [kTtyWrite]: { get() { return this._ttyWrite; }, }, // Defining proxies for the internal instance properties for backward // compatibility. _decoder: { get() { return this[kDecoder]; }, set(value) { this[kDecoder] = value; }, }, _line_buffer: { get() { return this[kLine_buffer]; }, set(value) { this[kLine_buffer] = value; }, }, _oldPrompt: { get() { return this[kOldPrompt]; }, set(value) { this[kOldPrompt] = value; }, }, _previousKey: { get() { return this[kPreviousKey]; }, set(value) { this[kPreviousKey] = value; }, }, _prompt: { get() { return this[kPrompt]; }, set(value) { this[kPrompt] = value; }, }, _questionCallback: { get() { return this[kQuestionCallback]; }, set(value) { this[kQuestionCallback] = value; }, }, _sawKeyPress: { get() { return this[kSawKeyPress]; }, set(value) { this[kSawKeyPress] = value; }, }, _sawReturnAt: { get() { return this[kSawReturnAt]; }, set(value) { this[kSawReturnAt] = value; }, }, }); // Make internal methods public for backward compatibility. Interface.prototype._setRawMode = _Interface.prototype[kSetRawMode]; Interface.prototype._onLine = _Interface.prototype[kOnLine]; Interface.prototype._writeToOutput = _Interface.prototype[kWriteToOutput]; Interface.prototype._addHistory = _Interface.prototype[kAddHistory]; Interface.prototype._refreshLine = _Interface.prototype[kRefreshLine]; Interface.prototype._normalWrite = _Interface.prototype[kNormalWrite]; Interface.prototype._insertString = _Interface.prototype[kInsertString]; Interface.prototype._tabComplete = function (lastKeypressWasTab) { // Overriding parent method because `this.completer` in the legacy // implementation takes a callback instead of being an async function. this.pause(); const string = this.line.slice(0, this.cursor); this.completer(string, (err, value) => { this.resume(); if (err) { // TODO(bartlomieju): inspect is not ported yet // this._writeToOutput(`Tab completion error: ${inspect(err)}`); this._writeToOutput(`Tab completion error: ${err}`); return; } this[kTabCompleter](lastKeypressWasTab, value); }); }; Interface.prototype._wordLeft = _Interface.prototype[kWordLeft]; Interface.prototype._wordRight = _Interface.prototype[kWordRight]; Interface.prototype._deleteLeft = _Interface.prototype[kDeleteLeft]; Interface.prototype._deleteRight = _Interface.prototype[kDeleteRight]; Interface.prototype._deleteWordLeft = _Interface.prototype[kDeleteWordLeft]; Interface.prototype._deleteWordRight = _Interface.prototype[kDeleteWordRight]; Interface.prototype._deleteLineLeft = _Interface.prototype[kDeleteLineLeft]; Interface.prototype._deleteLineRight = _Interface.prototype[kDeleteLineRight]; Interface.prototype._line = _Interface.prototype[kLine]; Interface.prototype._historyNext = _Interface.prototype[kHistoryNext]; Interface.prototype._historyPrev = _Interface.prototype[kHistoryPrev]; Interface.prototype._getDisplayPos = _Interface.prototype[kGetDisplayPos]; Interface.prototype._getCursorPos = _Interface.prototype.getCursorPos; Interface.prototype._moveCursor = _Interface.prototype[kMoveCursor]; Interface.prototype._ttyWrite = _Interface.prototype[kTtyWrite]; function _ttyWriteDumb(s, key) { key = key || {}; if (key.name === "escape") return; if (this[kSawReturnAt] && key.name !== "enter") { this[kSawReturnAt] = 0; } if (key.ctrl) { if (key.name === "c") { if (this.listenerCount("SIGINT") > 0) { this.emit("SIGINT"); } else { // This readline instance is finished this.close(); } return; } else if (key.name === "d") { this.close(); return; } } switch (key.name) { case "return": // Carriage return, i.e. \r this[kSawReturnAt] = Date.now(); this._line(); break; case "enter": // When key interval > crlfDelay if ( this[kSawReturnAt] === 0 || Date.now() - this[kSawReturnAt] > this.crlfDelay ) { this._line(); } this[kSawReturnAt] = 0; break; default: if (typeof s === "string" && s) { this.line += s; this.cursor += s.length; this._writeToOutput(s); } } } export { clearLine, clearScreenDown, createInterface, cursorTo, emitKeypressEvents, Interface, moveCursor, promises, }; QdֹJext:deno_node/_readline.mjsa bD`M`6 T}`=La' T  I`P+;/B:eSb1B:`?Ib/`(L` B]`(]`- ]`9" ]`" ]` ]`* ]`<]`  L`  zDzcW` B{DB{cds B|DB|cw |D|c }D}c  Dc+3 L`B}` L`B}{` L`{]L`- DBiBic D**cs DbB}cXa DzzcW` DB{B{cds DB|B|cw D||c D**c D"+"+c D++c D,,c D,,c D--c D--c D..c D..c! D//c%1 D//c5A D00cER D00cV[ D00c_k Db1b1coz D11c~ Db2b2c D22c DB3B3c D33c Dc D"4"4c Dbbc D44c  DB5B5c   D55c #  DB6B6c' 2  D66c6 B  DB7B7cF S  D77cW `  DB8B8cd m  D88cq {  DB9B9c  D}}c D* c/6 D c+3 D  c DB B ch{`/za?B{a?B|a?}a?|a? a?B a? a?Bia?* a?ba?*a?*a?"+a?+a?,a?,a?-a?-a?.a?.a?/a?/a?0a?0a?0a?b1a?1a?b2a?2a?B3a?3a?a?"4a?ba?4a?B5a?5a?B6a?6a?B7a?7a?B8a?8a?B9a?B}a?{a?Zb@5 L` T I` 6 B}~b@a* T I`{b@ a+a b T  I`Uƒbƒ #  T I`dƒb B*B6bC T I`Zb 2bC T I`~b B9bC T I`5ab *bC T I`b 4bC T I`b1bC T I`Cb0bC T I`fb6bC T I`bB8bC T I`#b8bC T I`Ckb+bC T I`b-bC T I`b-bC T I`&Sb.bC T I`yb,bC T I`b,bC T I`Mb0bC T I`hb/bC T I`b/bC T I`#b.bC T I`Gsb b1bC T I`b!7bC T I`b": bCC T I`|b#  T I`b$!"; bCC T I`$b%" T I`-^b&#; bCC T I`|b'$ T I`b(%"< bCC T I`( b)& T I`1 b b*'< bCC T I`} b+( T I` b,)= bCC T I` -!b-* T I`6!l!b.+= bCC T I`!!b/, T I`!!b0-"> bCC T I`"<"b1. T I`E"v"b2/>"??@@AA T y`B}` B`$'Ib @30B"CC"DD"EE"FF"GGHHIIJJ  n`De@h Ƃ%ei h  !-0-0-_!-00_ 0-Ă 2 0-- 0 -  4!-0-~)0t~)3 70t~)3 70t~!)3" 7$0t~&)3' 7)0t~+)3, 7.0 t~!0)"31 730#t~$5)% 36 780&t~':)( 3; 7=0)t~*?)+ 3@ 7B0,t~-D). 3E 7G0/t~0I)1 3J 7L02t~3N)43O 7Q05t~6S)73T 7V08t~9X):3Y 7[0;t~<])=3^ 7`0>t~?b)@3c 7e0At~Bg)C3h 7j0Dt~El)F3m 7o0Gt~Hq)I3r 7t0Jt~Kv)L3w 7y0Mt~N{)O3| 7~0Pt~Q)R3 7S~T)U3V3W 7X~Y)Z3[3W 7\~])^3_3W 7`~a)b3c 3W 7d~e)f!3g"3W 7h~i)j#3k$3W 7l~m)n%3o&3W 7p~q)r'3s(3W 7_0-0-0/2t0-0-0/2u0-0-0/2v0-0-0/2w0-0-0/2x0-0-0/2y0-0-0/2z0-Ă{)2|0-0-0/2}0-0-0/2~0-0-0/20-0-0/20-0-0/20-0-0/20-0-0/20-0-0/20-0-0/20-0-0/20-0-0/20-0-0/ 2 0-0-- 20-0-0/20-0-0/2 hx,P@ P0' H0@L$`2  & H0@L$`2  & H0@L$`2  & H0@L$`2L@ H0 & 0 $`2L@``````` `ZbADDDʫ֫*6BNZfr~¬ά֬ &2:FNVDvD`RD]DH }QyV,// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { ArrayPrototypeJoin, ArrayPrototypePush, } from "ext:deno_node/internal/primordials.mjs"; import { CSI } from "ext:deno_node/internal/readline/utils.mjs"; import { validateBoolean, validateInteger, } from "ext:deno_node/internal/validators.mjs"; import { isWritable } from "ext:deno_node/internal/streams/utils.mjs"; import { ERR_INVALID_ARG_TYPE } from "ext:deno_node/internal/errors.ts"; const { kClearToLineBeginning, kClearToLineEnd, kClearLine, kClearScreenDown, } = CSI; export class Readline { #autoCommit = false; #stream; #todo = []; constructor(stream, options = undefined) { if (!isWritable(stream)) { throw new ERR_INVALID_ARG_TYPE("stream", "Writable", stream); } this.#stream = stream; if (options?.autoCommit != null) { validateBoolean(options.autoCommit, "options.autoCommit"); this.#autoCommit = options.autoCommit; } } /** * Moves the cursor to the x and y coordinate on the given stream. * @param {integer} x * @param {integer} [y] * @returns {Readline} this */ cursorTo(x, y = undefined) { validateInteger(x, "x"); if (y != null) validateInteger(y, "y"); const data = y == null ? CSI`${x + 1}G` : CSI`${y + 1};${x + 1}H`; if (this.#autoCommit) process.nextTick(() => this.#stream.write(data)); else ArrayPrototypePush(this.#todo, data); return this; } /** * Moves the cursor relative to its current location. * @param {integer} dx * @param {integer} dy * @returns {Readline} this */ moveCursor(dx, dy) { if (dx || dy) { validateInteger(dx, "dx"); validateInteger(dy, "dy"); let data = ""; if (dx < 0) { data += CSI`${-dx}D`; } else if (dx > 0) { data += CSI`${dx}C`; } if (dy < 0) { data += CSI`${-dy}A`; } else if (dy > 0) { data += CSI`${dy}B`; } if (this.#autoCommit) process.nextTick(() => this.#stream.write(data)); else ArrayPrototypePush(this.#todo, data); } return this; } /** * Clears the current line the cursor is on. * @param {-1|0|1} dir Direction to clear: * -1 for left of the cursor * +1 for right of the cursor * 0 for the entire line * @returns {Readline} this */ clearLine(dir) { validateInteger(dir, "dir", -1, 1); const data = dir < 0 ? kClearToLineBeginning : dir > 0 ? kClearToLineEnd : kClearLine; if (this.#autoCommit) process.nextTick(() => this.#stream.write(data)); else ArrayPrototypePush(this.#todo, data); return this; } /** * Clears the screen from the current position of the cursor down. * @returns {Readline} this */ clearScreenDown() { if (this.#autoCommit) { process.nextTick(() => this.#stream.write(kClearScreenDown)); } else { ArrayPrototypePush(this.#todo, kClearScreenDown); } return this; } /** * Sends all the pending actions to the associated `stream` and clears the * internal list of pending actions. * @returns {Promise} Resolves when all pending actions have been * flushed to the associated `stream`. */ commit() { return new Promise((resolve) => { this.#stream.write(ArrayPrototypeJoin(this.#todo, ""), resolve); this.#todo = []; }); } /** * Clears the internal list of pending actions without sending it to the * associated `stream`. * @returns {Readline} this */ rollback() { this.#todo = []; return this; } } export default Readline;  Qfr ,ext:deno_node/internal/readline/promises.mjsa bD`@M` T`dLa-Lba L»¼M4Sb @KKKd???Sb1»¼Mc????Ib`L`  ]`/b ]`n" ]`;]` ]`f] L`` L`` L`]$L`  D!!c DAAc& DLLccf Db b cJ^ DAAc  D  c D"[ "[ c` !a?Aa?La? a?"[ a?Aa?b a?a?a?  ` T ``/ `/ `?  `  aD]` ` aj B|aj }ajzajB{aj]ajBLaj]KKK T  I`Anb Ճ2 T I`0fB|b3 T I`}b 4 T I` % zb 5 T I` k B{b6 T I`h ]b 7 T I`BLb 8 T0`]  *`Kb H$L\e55}5(Sbqq`Da a 40b 9  `D|hh %%%%ei h  0-%-%-%-%   e%  e%  e% ‚e+ 2 101  a P,nbA1DDDDD&D`RD]DH @Q@V// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials // deno-lint-ignore-file camelcase no-inner-declarations no-this-alias import { ERR_INVALID_ARG_VALUE, ERR_USE_AFTER_CLOSE, } from "ext:deno_node/internal/errors.ts"; import { validateAbortSignal, validateArray, validateString, validateUint32, } from "ext:deno_node/internal/validators.mjs"; import { // inspect, getStringWidth, stripVTControlCharacters, } from "ext:deno_node/internal/util/inspect.mjs"; import EventEmitter from "node:events"; import { emitKeypressEvents } from "ext:deno_node/internal/readline/emitKeypressEvents.mjs"; import { charLengthAt, charLengthLeft, commonPrefix, kSubstringSearch, } from "ext:deno_node/internal/readline/utils.mjs"; import { clearScreenDown, cursorTo, moveCursor, } from "ext:deno_node/internal/readline/callbacks.mjs"; import { Readable } from "ext:deno_node/_stream.mjs"; import process from "node:process"; import { StringDecoder } from "node:string_decoder"; import { kAddHistory, kDecoder, kDeleteLeft, kDeleteLineLeft, kDeleteLineRight, kDeleteRight, kDeleteWordLeft, kDeleteWordRight, kGetDisplayPos, kHistoryNext, kHistoryPrev, kInsertString, kLine, kLine_buffer, kMoveCursor, kNormalWrite, kOldPrompt, kOnLine, kPreviousKey, kPrompt, kQuestionCallback, kRefreshLine, kSawKeyPress, kSawReturnAt, kSetRawMode, kTabComplete, kTabCompleter, kTtyWrite, kWordLeft, kWordRight, kWriteToOutput, } from "ext:deno_node/internal/readline/symbols.mjs"; const kHistorySize = 30; const kMincrlfDelay = 100; // \r\n, \n, or \r followed by something other than \n const lineEnding = /\r?\n|\r(?!\n)/; const kLineObjectStream = Symbol("line object stream"); export const kQuestionCancel = Symbol("kQuestionCancel"); export const kQuestion = Symbol("kQuestion"); // GNU readline library - keyseq-timeout is 500ms (default) const ESCAPE_CODE_TIMEOUT = 500; export { kAddHistory, kDecoder, kDeleteLeft, kDeleteLineLeft, kDeleteLineRight, kDeleteRight, kDeleteWordLeft, kDeleteWordRight, kGetDisplayPos, kHistoryNext, kHistoryPrev, kInsertString, kLine, kLine_buffer, kMoveCursor, kNormalWrite, kOldPrompt, kOnLine, kPreviousKey, kPrompt, kQuestionCallback, kRefreshLine, kSawKeyPress, kSawReturnAt, kSetRawMode, kTabComplete, kTabCompleter, kTtyWrite, kWordLeft, kWordRight, kWriteToOutput, }; export function InterfaceConstructor(input, output, completer, terminal) { this[kSawReturnAt] = 0; // TODO(BridgeAR): Document this property. The name is not ideal, so we // might want to expose an alias and document that instead. this.isCompletionEnabled = true; this[kSawKeyPress] = false; this[kPreviousKey] = null; this.escapeCodeTimeout = ESCAPE_CODE_TIMEOUT; this.tabSize = 8; Function.prototype.call(EventEmitter, this); let history; let historySize; let removeHistoryDuplicates = false; let crlfDelay; let prompt = "> "; let signal; if (input?.input) { // An options object was given output = input.output; completer = input.completer; terminal = input.terminal; history = input.history; historySize = input.historySize; signal = input.signal; if (input.tabSize !== undefined) { validateUint32(input.tabSize, "tabSize", true); this.tabSize = input.tabSize; } removeHistoryDuplicates = input.removeHistoryDuplicates; if (input.prompt !== undefined) { prompt = input.prompt; } if (input.escapeCodeTimeout !== undefined) { if (Number.isFinite(input.escapeCodeTimeout)) { this.escapeCodeTimeout = input.escapeCodeTimeout; } else { throw new ERR_INVALID_ARG_VALUE( "input.escapeCodeTimeout", this.escapeCodeTimeout, ); } } if (signal) { validateAbortSignal(signal, "options.signal"); } crlfDelay = input.crlfDelay; input = input.input; } if (completer !== undefined && typeof completer !== "function") { throw new ERR_INVALID_ARG_VALUE("completer", completer); } if (history === undefined) { history = []; } else { validateArray(history, "history"); } if (historySize === undefined) { historySize = kHistorySize; } if ( typeof historySize !== "number" || Number.isNaN(historySize) || historySize < 0 ) { throw new ERR_INVALID_ARG_VALUE.RangeError("historySize", historySize); } // Backwards compat; check the isTTY prop of the output stream // when `terminal` was not specified if (terminal === undefined && !(output === null || output === undefined)) { terminal = !!output.isTTY; } const self = this; this.line = ""; this[kSubstringSearch] = null; this.output = output; this.input = input; this.history = history; this.historySize = historySize; this.removeHistoryDuplicates = !!removeHistoryDuplicates; this.crlfDelay = crlfDelay ? Math.max(kMincrlfDelay, crlfDelay) : kMincrlfDelay; this.completer = completer; this.setPrompt(prompt); this.terminal = !!terminal; function onerror(err) { self.emit("error", err); } function ondata(data) { self[kNormalWrite](data); } function onend() { if ( typeof self[kLine_buffer] === "string" && self[kLine_buffer].length > 0 ) { self.emit("line", self[kLine_buffer]); } self.close(); } function ontermend() { if (typeof self.line === "string" && self.line.length > 0) { self.emit("line", self.line); } self.close(); } function onkeypress(s, key) { self[kTtyWrite](s, key); if (key && key.sequence) { // If the key.sequence is half of a surrogate pair // (>= 0xd800 and <= 0xdfff), refresh the line so // the character is displayed appropriately. const ch = key.sequence.codePointAt(0); if (ch >= 0xd800 && ch <= 0xdfff) self[kRefreshLine](); } } function onresize() { self[kRefreshLine](); } this[kLineObjectStream] = undefined; input.on("error", onerror); if (!this.terminal) { function onSelfCloseWithoutTerminal() { input.removeListener("data", ondata); input.removeListener("error", onerror); input.removeListener("end", onend); } input.on("data", ondata); input.on("end", onend); self.once("close", onSelfCloseWithoutTerminal); this[kDecoder] = new StringDecoder("utf8"); } else { function onSelfCloseWithTerminal() { input.removeListener("keypress", onkeypress); input.removeListener("error", onerror); input.removeListener("end", ontermend); if (output !== null && output !== undefined) { output.removeListener("resize", onresize); } } emitKeypressEvents(input, this); // `input` usually refers to stdin input.on("keypress", onkeypress); input.on("end", ontermend); this[kSetRawMode](true); this.terminal = true; // Cursor position on the line. this.cursor = 0; this.historyIndex = -1; if (output !== null && output !== undefined) { output.on("resize", onresize); } self.once("close", onSelfCloseWithTerminal); } if (signal) { const onAborted = () => self.close(); if (signal.aborted) { process.nextTick(onAborted); } else { signal.addEventListener("abort", onAborted, { once: true }); self.once("close", () => signal.removeEventListener("abort", onAborted)); } } // Current line this.line = ""; input.resume(); } Object.setPrototypeOf(InterfaceConstructor.prototype, EventEmitter.prototype); Object.setPrototypeOf(InterfaceConstructor, EventEmitter); export class Interface extends InterfaceConstructor { // eslint-disable-next-line no-useless-constructor constructor(input, output, completer, terminal) { super(input, output, completer, terminal); } get columns() { if (this.output && this.output.columns) return this.output.columns; return Infinity; } /** * Sets the prompt written to the output. * @param {string} prompt * @returns {void} */ setPrompt(prompt) { this[kPrompt] = prompt; } /** * Returns the current prompt used by `rl.prompt()`. * @returns {string} */ getPrompt() { return this[kPrompt]; } [kSetRawMode](mode) { const wasInRawMode = this.input.isRaw; if (typeof this.input.setRawMode === "function") { this.input.setRawMode(mode); } return wasInRawMode; } /** * Writes the configured `prompt` to a new line in `output`. * @param {boolean} [preserveCursor] * @returns {void} */ prompt(preserveCursor) { if (this.paused) this.resume(); if (this.terminal && process.env.TERM !== "dumb") { if (!preserveCursor) this.cursor = 0; this[kRefreshLine](); } else { this[kWriteToOutput](this[kPrompt]); } } [kQuestion](query, cb) { if (this.closed) { throw new ERR_USE_AFTER_CLOSE("readline"); } if (this[kQuestionCallback]) { this.prompt(); } else { this[kOldPrompt] = this[kPrompt]; this.setPrompt(query); this[kQuestionCallback] = cb; this.prompt(); } } [kOnLine](line) { if (this[kQuestionCallback]) { const cb = this[kQuestionCallback]; this[kQuestionCallback] = null; this.setPrompt(this[kOldPrompt]); cb(line); } else { this.emit("line", line); } } [kQuestionCancel]() { if (this[kQuestionCallback]) { this[kQuestionCallback] = null; this.setPrompt(this[kOldPrompt]); this.clearLine(); } } [kWriteToOutput](stringToWrite) { validateString(stringToWrite, "stringToWrite"); if (this.output !== null && this.output !== undefined) { this.output.write(stringToWrite); } } [kAddHistory]() { if (this.line.length === 0) return ""; // If the history is disabled then return the line if (this.historySize === 0) return this.line; // If the trimmed line is empty then return the line if (this.line.trim().length === 0) return this.line; if (this.history.length === 0 || this.history[0] !== this.line) { if (this.removeHistoryDuplicates) { // Remove older history line if identical to new one const dupIndex = this.history.indexOf(this.line); if (dupIndex !== -1) this.history.splice(dupIndex, 1); } this.history.unshift(this.line); // Only store so many if (this.history.length > this.historySize) { this.history.pop(); } } this.historyIndex = -1; // The listener could change the history object, possibly // to remove the last added entry if it is sensitive and should // not be persisted in the history, like a password const line = this.history[0]; // Emit history event to notify listeners of update this.emit("history", this.history); return line; } [kRefreshLine]() { // line length const line = this[kPrompt] + this.line; const dispPos = this[kGetDisplayPos](line); const lineCols = dispPos.cols; const lineRows = dispPos.rows; // cursor position const cursorPos = this.getCursorPos(); // First move to the bottom of the current line, based on cursor pos const prevRows = this.prevRows || 0; if (prevRows > 0) { moveCursor(this.output, 0, -prevRows); } // Cursor to left edge. cursorTo(this.output, 0); // erase data clearScreenDown(this.output); // Write the prompt and the current buffer content. this[kWriteToOutput](line); // Force terminal to allocate a new line if (lineCols === 0) { this[kWriteToOutput](" "); } // Move cursor to original position. cursorTo(this.output, cursorPos.cols); const diff = lineRows - cursorPos.rows; if (diff > 0) { moveCursor(this.output, 0, -diff); } this.prevRows = cursorPos.rows; } /** * Closes the `readline.Interface` instance. * @returns {void} */ close() { if (this.closed) return; this.pause(); if (this.terminal) { this[kSetRawMode](false); } this.closed = true; this.emit("close"); } /** * Pauses the `input` stream. * @returns {void | Interface} */ pause() { if (this.paused) return; this.input.pause(); this.paused = true; this.emit("pause"); return this; } /** * Resumes the `input` stream if paused. * @returns {void | Interface} */ resume() { if (!this.paused) return; this.input.resume(); this.paused = false; this.emit("resume"); return this; } /** * Writes either `data` or a `key` sequence identified by * `key` to the `output`. * @param {string} d * @param {{ * ctrl?: boolean; * meta?: boolean; * shift?: boolean; * name?: string; * }} [key] * @returns {void} */ write(d, key) { if (this.paused) this.resume(); if (this.terminal) { this[kTtyWrite](d, key); } else { this[kNormalWrite](d); } } [kNormalWrite](b) { if (b === undefined) { return; } let string = this[kDecoder].write(b); if ( this[kSawReturnAt] && Date.now() - this[kSawReturnAt] <= this.crlfDelay ) { string = string.replace(/^\n/, ""); this[kSawReturnAt] = 0; } // Run test() on the new string chunk, not on the entire line buffer. const newPartContainsEnding = lineEnding.test(string); if (this[kLine_buffer]) { string = this[kLine_buffer] + string; this[kLine_buffer] = null; } if (newPartContainsEnding) { this[kSawReturnAt] = string.endsWith("\r") ? Date.now() : 0; // Got one or more newlines; process into "line" events const lines = string.split(lineEnding); // Either '' or (conceivably) the unfinished portion of the next line string = lines.pop(); this[kLine_buffer] = string; for (let n = 0; n < lines.length; n++) this[kOnLine](lines[n]); } else if (string) { // No newlines this time, save what we have for next time this[kLine_buffer] = string; } } [kInsertString](c) { if (this.cursor < this.line.length) { const beg = this.line.slice(0, this.cursor); const end = this.line.slice( this.cursor, this.line.length, ); this.line = beg + c + end; this.cursor += c.length; this[kRefreshLine](); } else { this.line += c; this.cursor += c.length; if (this.getCursorPos().cols === 0) { this[kRefreshLine](); } else { this[kWriteToOutput](c); } } } async [kTabComplete](lastKeypressWasTab) { this.pause(); const string = this.line.slice(0, this.cursor); let value; try { value = await this.completer(string); } catch (err) { // TODO(bartlomieju): inspect is not ported yet // this[kWriteToOutput](`Tab completion error: ${inspect(err)}`); this[kWriteToOutput](`Tab completion error: ${err}`); return; } finally { this.resume(); } this[kTabCompleter](lastKeypressWasTab, value); } [kTabCompleter](lastKeypressWasTab, { 0: completions, 1: completeOn }) { // Result and the text that was completed. if (!completions || completions.length === 0) { return; } // If there is a common prefix to all matches, then apply that portion. const prefix = commonPrefix( completions.filter((e) => e !== ""), ); if ( prefix.startsWith(completeOn) && prefix.length > completeOn.length ) { this[kInsertString](prefix.slice(completeOn.length)); return; } else if (!completeOn.startsWith(prefix)) { this.line = this.line.slice(0, this.cursor - completeOn.length) + prefix + this.line.slice(this.cursor, this.line.length); this.cursor = this.cursor - completeOn.length + prefix.length; this._refreshLine(); return; } if (!lastKeypressWasTab) { return; } // Apply/show completions. const completionsWidth = completions.map( (e) => getStringWidth(e), ); const width = Math.max.apply(completionsWidth) + 2; // 2 space padding let maxColumns = Math.floor(this.columns / width) || 1; if (maxColumns === Infinity) { maxColumns = 1; } let output = "\r\n"; let lineIndex = 0; let whitespace = 0; for (let i = 0; i < completions.length; i++) { const completion = completions[i]; if (completion === "" || lineIndex === maxColumns) { output += "\r\n"; lineIndex = 0; whitespace = 0; } else { output += " ".repeat(whitespace); } if (completion !== "") { output += completion; whitespace = width - completionsWidth[i]; lineIndex++; } else { output += "\r\n"; } } if (lineIndex !== 0) { output += "\r\n\r\n"; } this[kWriteToOutput](output); this[kRefreshLine](); } [kWordLeft]() { if (this.cursor > 0) { // Reverse the string and match a word near beginning // to avoid quadratic time complexity const leading = this.line.slice(0, this.cursor); const reversed = Array.from(leading).reverse().join(""); const match = reversed.match(/^\s*(?:[^\w\s]+|\w+)?/); this[kMoveCursor](-match[0].length); } } [kWordRight]() { if (this.cursor < this.line.length) { const trailing = this.line.slice(this.cursor); const match = trailing.match(/^(?:\s+|[^\w\s]+|\w+)\s*/); this[kMoveCursor](match[0].length); } } [kDeleteLeft]() { if (this.cursor > 0 && this.line.length > 0) { // The number of UTF-16 units comprising the character to the left const charSize = charLengthLeft(this.line, this.cursor); this.line = this.line.slice(0, this.cursor - charSize) + this.line.slice(this.cursor, this.line.length); this.cursor -= charSize; this[kRefreshLine](); } } [kDeleteRight]() { if (this.cursor < this.line.length) { // The number of UTF-16 units comprising the character to the left const charSize = charLengthAt(this.line, this.cursor); this.line = this.line.slice(0, this.cursor) + this.line.slice( this.cursor + charSize, this.line.length, ); this[kRefreshLine](); } } [kDeleteWordLeft]() { if (this.cursor > 0) { // Reverse the string and match a word near beginning // to avoid quadratic time complexity let leading = this.line.slice(0, this.cursor); const reversed = Array.from(leading).reverse().join(""); const match = reversed.match(/^\s*(?:[^\w\s]+|\w+)?/); leading = leading.slice( 0, leading.length - match[0].length, ); this.line = leading + this.line.slice(this.cursor, this.line.length); this.cursor = leading.length; this[kRefreshLine](); } } [kDeleteWordRight]() { if (this.cursor < this.line.length) { const trailing = this.line.slice(this.cursor); const match = trailing.match(/^(?:\s+|\W+|\w+)\s*/); this.line = this.line.slice(0, this.cursor) + trailing.slice(match[0].length); this[kRefreshLine](); } } [kDeleteLineLeft]() { this.line = this.line.slice(this.cursor); this.cursor = 0; this[kRefreshLine](); } [kDeleteLineRight]() { this.line = this.line.slice(0, this.cursor); this[kRefreshLine](); } clearLine() { this[kMoveCursor](+Infinity); this[kWriteToOutput]("\r\n"); this.line = ""; this.cursor = 0; this.prevRows = 0; } [kLine]() { const line = this[kAddHistory](); this.clearLine(); this[kOnLine](line); } // TODO(BridgeAR): Add underscores to the search part and a red background in // case no match is found. This should only be the visual part and not the // actual line content! // TODO(BridgeAR): In case the substring based search is active and the end is // reached, show a comment how to search the history as before. E.g., using // + N. Only show this after two/three UPs or DOWNs, not on the first // one. [kHistoryNext]() { if (this.historyIndex >= 0) { const search = this[kSubstringSearch] || ""; let index = this.historyIndex - 1; while ( index >= 0 && (!this.history[index].startsWith(search) || this.line === this.history[index]) ) { index--; } if (index === -1) { this.line = search; } else { this.line = this.history[index]; } this.historyIndex = index; this.cursor = this.line.length; // Set cursor to end of line. this[kRefreshLine](); } } [kHistoryPrev]() { if (this.historyIndex < this.history.length && this.history.length) { const search = this[kSubstringSearch] || ""; let index = this.historyIndex + 1; while ( index < this.history.length && (!this.history[index].startsWith(search) || this.line === this.history[index]) ) { index++; } if (index === this.history.length) { this.line = search; } else { this.line = this.history[index]; } this.historyIndex = index; this.cursor = this.line.length; // Set cursor to end of line. this[kRefreshLine](); } } // Returns the last character's display position of the given string [kGetDisplayPos](str) { let offset = 0; const col = this.columns; let rows = 0; str = stripVTControlCharacters(str); for (const char of str[Symbol.iterator]()) { if (char === "\n") { // Rows must be incremented by 1 even if offset = 0 or col = +Infinity. rows += Math.ceil(offset / col) || 1; offset = 0; continue; } // Tabs must be aligned by an offset of the tab size. if (char === "\t") { offset += this.tabSize - (offset % this.tabSize); continue; } const width = getStringWidth(char); if (width === 0 || width === 1) { offset += width; } else { // width === 2 if ((offset + 1) % col === 0) { offset++; } offset += 2; } } const cols = offset % col; rows += (offset - cols) / col; return { cols, rows }; } /** * Returns the real position of the cursor in relation * to the input prompt + string. * @returns {{ * rows: number; * cols: number; * }} */ getCursorPos() { const strBeforeCursor = this[kPrompt] + this.line.slice(0, this.cursor); return this[kGetDisplayPos](strBeforeCursor); } // This function moves cursor dx places to the right // (-dx for left) and refreshes the line if it is needed. [kMoveCursor](dx) { if (dx === 0) { return; } const oldPos = this.getCursorPos(); this.cursor += dx; // Bounds check if (this.cursor < 0) { this.cursor = 0; } else if (this.cursor > this.line.length) { this.cursor = this.line.length; } const newPos = this.getCursorPos(); // Check if cursor stayed on the line. if (oldPos.rows === newPos.rows) { const diffWidth = newPos.cols - oldPos.cols; moveCursor(this.output, diffWidth, 0); } else { this[kRefreshLine](); } } // Handle a write from the tty [kTtyWrite](s, key) { const previousKey = this[kPreviousKey]; key = key || {}; this[kPreviousKey] = key; // Activate or deactivate substring search. if ( (key.name === "up" || key.name === "down") && !key.ctrl && !key.meta && !key.shift ) { if (this[kSubstringSearch] === null) { this[kSubstringSearch] = this.line.slice( 0, this.cursor, ); } } else if (this[kSubstringSearch] !== null) { this[kSubstringSearch] = null; // Reset the index in case there's no match. if (this.history.length === this.historyIndex) { this.historyIndex = -1; } } // Ignore escape key, fixes // https://github.com/nodejs/node-v0.x-archive/issues/2876. if (key.name === "escape") return; if (key.ctrl && key.shift) { /* Control and shift pressed */ switch (key.name) { // TODO(BridgeAR): The transmitted escape sequence is `\b` and that is // identical to -h. It should have a unique escape sequence. case "backspace": this[kDeleteLineLeft](); break; case "delete": this[kDeleteLineRight](); break; } } else if (key.ctrl) { /* Control key pressed */ switch (key.name) { case "c": if (this.listenerCount("SIGINT") > 0) { this.emit("SIGINT"); } else { // This readline instance is finished this.close(); } break; case "h": // delete left this[kDeleteLeft](); break; case "d": // delete right or EOF if (this.cursor === 0 && this.line.length === 0) { // This readline instance is finished this.close(); } else if (this.cursor < this.line.length) { this[kDeleteRight](); } break; case "u": // Delete from current to start of line this[kDeleteLineLeft](); break; case "k": // Delete from current to end of line this[kDeleteLineRight](); break; case "a": // Go to the start of the line this[kMoveCursor](-Infinity); break; case "e": // Go to the end of the line this[kMoveCursor](+Infinity); break; case "b": // back one character this[kMoveCursor](-charLengthLeft(this.line, this.cursor)); break; case "f": // Forward one character this[kMoveCursor](+charLengthAt(this.line, this.cursor)); break; case "l": // Clear the whole screen cursorTo(this.output, 0, 0); clearScreenDown(this.output); this[kRefreshLine](); break; case "n": // next history item this[kHistoryNext](); break; case "p": // Previous history item this[kHistoryPrev](); break; case "z": if (process.platform === "win32") break; if (this.listenerCount("SIGTSTP") > 0) { this.emit("SIGTSTP"); } else { process.once("SIGCONT", () => { // Don't raise events if stream has already been abandoned. if (!this.paused) { // Stream must be paused and resumed after SIGCONT to catch // SIGINT, SIGTSTP, and EOF. this.pause(); this.emit("SIGCONT"); } // Explicitly re-enable "raw mode" and move the cursor to // the correct position. // See https://github.com/joyent/node/issues/3295. this[kSetRawMode](true); this[kRefreshLine](); }); this[kSetRawMode](false); process.kill(process.pid, "SIGTSTP"); } break; case "w": // Delete backwards to a word boundary // TODO(BridgeAR): The transmitted escape sequence is `\b` and that is // identical to -h. It should have a unique escape sequence. // Falls through case "backspace": this[kDeleteWordLeft](); break; case "delete": // Delete forward to a word boundary this[kDeleteWordRight](); break; case "left": this[kWordLeft](); break; case "right": this[kWordRight](); break; } } else if (key.meta) { /* Meta key pressed */ switch (key.name) { case "b": // backward word this[kWordLeft](); break; case "f": // forward word this[kWordRight](); break; case "d": // delete forward word case "delete": this[kDeleteWordRight](); break; case "backspace": // Delete backwards to a word boundary this[kDeleteWordLeft](); break; } } else { /* No modifier keys used */ // \r bookkeeping is only relevant if a \n comes right after. if (this[kSawReturnAt] && key.name !== "enter") this[kSawReturnAt] = 0; switch (key.name) { case "return": // Carriage return, i.e. \r this[kSawReturnAt] = Date.now(); this[kLine](); break; case "enter": // When key interval > crlfDelay if ( this[kSawReturnAt] === 0 || Date.now() - this[kSawReturnAt] > this.crlfDelay ) { this[kLine](); } this[kSawReturnAt] = 0; break; case "backspace": this[kDeleteLeft](); break; case "delete": this[kDeleteRight](); break; case "left": // Obtain the code point to the left this[kMoveCursor](-charLengthLeft(this.line, this.cursor)); break; case "right": this[kMoveCursor](+charLengthAt(this.line, this.cursor)); break; case "home": this[kMoveCursor](-Infinity); break; case "end": this[kMoveCursor](+Infinity); break; case "up": this[kHistoryPrev](); break; case "down": this[kHistoryNext](); break; case "tab": // If tab completion enabled, do that... if ( typeof this.completer === "function" && this.isCompletionEnabled ) { const lastKeypressWasTab = previousKey && previousKey.name === "tab"; this[kTabComplete](lastKeypressWasTab); break; } // falls through default: if (typeof s === "string" && s) { const lines = s.split(/\r\n|\n|\r/); for (let i = 0, len = lines.length; i < len; i++) { if (i > 0) { this[kLine](); } this[kInsertString](lines[i]); } } } } } /** * Creates an `AsyncIterator` object that iterates through * each line in the input stream as a string. * @typedef {{ * [Symbol.asyncIterator]: () => InterfaceAsyncIterator, * next: () => Promise * }} InterfaceAsyncIterator * @returns {InterfaceAsyncIterator} */ [Symbol.asyncIterator]() { if (this[kLineObjectStream] === undefined) { const readable = new Readable({ objectMode: true, read: () => { this.resume(); }, destroy: (err, cb) => { this.off("line", lineListener); this.off("close", closeListener); this.close(); cb(err); }, }); const lineListener = (input) => { if (!readable.push(input)) { // TODO(rexagod): drain to resume flow this.pause(); } }; const closeListener = () => { readable.push(null); }; const errorListener = (err) => { readable.destroy(err); }; this.on("error", errorListener); this.on("line", lineListener); this.on("close", closeListener); this[kLineObjectStream] = readable; } return this[kLineObjectStream][Symbol.asyncIterator](); } }  Qf-ext:deno_node/internal/readline/interface.mjsa bD`M`9 T]`v5LaK0 Lb T I`x",iF22@22@24@45@58 @88@9;@<>@UW*Sb1M"NNOPd?????Ib`4L`   ]`" ]`0"$ ]`"]`(]`b ]`B]` ]`a* ]`3 ]`L]` L`  *D*c  "+D"+c  +D+c   ,D,c   ,D,c 0  -D-c 4 @  -D-c D S  .D.c W g  .D.c k y  /D/c }  /D/c  0D0c  0D0c  0D0c  b1Db1c  1D1c  b2Db2c  2D2c  B3DB3c  3D3c    "4D"4c  +  4D4c / ;  B5DB5c ? K  5D5c O [  B6DB6c _ j  6D6c n z  B7DB7c ~  7D7c  B8DB8c  8D8c  B9DB9c 8L` B}` L`B}*` L`*` L`b` L`b]L`3 D  c{ D((c D c D  cQY Dc  Dbbcbn Dcr DB{B{c Dc DB|B|c D||c D""ct D**c  D"+"+c  D++c   D,,c   D,,c 0  D--c 4 @  D--c D S  D..c W g  D..c k y  D//c }  D//c  D00c  D00c  D00c  Db1b1c  D11c  Db2b2c  D22c  DB3B3c  D33c    D"4"4c  +  D44c / ;  DB5B5c ? K  D55c O [  DB6B6c _ j  Dc D66c n z  DB7B7c ~  D77c  DB8B8c  D88c  DB9B9c  D}}c D* c D66c DB B c D!!c D  c D^ ^ c'`7 a?(a?B a?!a? a?^ a?"a?6a? a?|a?ba?a?a?a?B{a?B|a?}a? a?* a?a?*a?"+a?+a?,a?,a?-a?-a?.a?.a?/a?/a?0a?0a?0a?b1a?1a?b2a?2a?B3a?3a?"4a?4a?B5a?5a?B6a?6a?B7a?7a?B8a?8a?B9a?ba?a?*a?B}a?Fb@;b%a "O BPb   `AT ``/ `/ `?  `  a #D]!f @GDb. } `F`  T I`P%r%"Wb ?B6 T I`%5&`b @ T I`&'SbA T I`'(`b B2 T I`))`b C T I`**`bDB9 T I`*`+`bE* T I`q+/`b F4 T I`/3`bG T I` 44bH T I`55 bI T I`5h6 bJ T I`|78bbK1 T I`(8Y<`bL0 T I`l<T>`bM6 T I`l>L@`bΑNB7 T I`_@G`bOB8 T I`GI`b "P8 T I`.IJ`b #Q+ T I`JK`b $R- T I`KM`b%S- T I`)M\O`b&T. T I`rOP`b'U, T I`P Q`b(V, T I`#QvQ`b)W T I`QRzb *X0 T I`RwR`b+Y/ T I`8TcV`b,Z/ T I`uVX`b-[. T I`EY\`b.\ T I`t]^Ib /]b1 T I`^``b 0^7 T I``=|`b 1_bZ T I`}`b3`  Z`DE h %%%%%ei h  % d%z%!b%!b1!b1 %! - 0- 0 - _! - 00_0 Â0t0t0t0t0t 0t 0t   !߂"0#t݂$0%tۂ&0'tق(0)tׂ*0+tՂ,0-tӂ.0/tт001tς203t͂405t˂607tɂ809tǂ:Ƃ;0t‚?0@tA0BtC D!0EtF"0GtH#!-ItJ$e+A 1 b& bA:fD*2>FNV^fnv~ưDΰְް&.6>FDNDD`RD]DH Q6 p// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file no-explicit-any export function createSecureContext(options) { return { ca: options?.ca, cert: options?.cert, key: options?.key }; } export default { createSecureContext }; QdrGext:deno_node/_tls_common.tsa bD`M` TH`K La!L` T  I`EB@Sb1Ibp`] L`` L`B` L`B]`Ba?a?^b@bba bBCB  r`Dk h ei h  ~)03 1  abAa~D`RD]DH iQe:0// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file no-explicit-any prefer-primordials import { ObjectAssign, StringPrototypeReplace } from "ext:deno_node/internal/primordials.mjs"; import assert from "ext:deno_node/internal/assert.mjs"; import * as net from "node:net"; import { createSecureContext } from "ext:deno_node/_tls_common.ts"; import { kStreamBaseField } from "ext:deno_node/internal_binding/stream_wrap.ts"; import { connResetException } from "ext:deno_node/internal/errors.ts"; import { emitWarning } from "node:process"; import { debuglog } from "ext:deno_node/internal/util/debuglog.ts"; import { constants as TCPConstants, TCP } from "ext:deno_node/internal_binding/tcp_wrap.ts"; import { constants as PipeConstants, Pipe } from "ext:deno_node/internal_binding/pipe_wrap.ts"; import { EventEmitter } from "node:events"; import { kEmptyObject } from "ext:deno_node/internal/util.mjs"; import { nextTick } from "ext:deno_node/_next_tick.ts"; import { kHandle } from "ext:deno_node/internal/stream_base_commons.ts"; import { isAnyArrayBuffer, isArrayBufferView } from "ext:deno_node/internal/util/types.ts"; const kConnectOptions = Symbol("connect-options"); const kIsVerified = Symbol("verified"); const kPendingSession = Symbol("pendingSession"); const kRes = Symbol("res"); let debug = debuglog("tls", (fn)=>{ debug = fn; }); function onConnectEnd() { // NOTE: This logic is shared with _http_client.js if (!this._hadError) { const options = this[kConnectOptions]; this._hadError = true; const error = connResetException("Client network socket disconnected " + "before secure TLS connection was " + "established"); error.path = options.path; error.host = options.host; error.port = options.port; error.localAddress = options.localAddress; this.destroy(error); } } export class TLSSocket extends net.Socket { _tlsOptions; _secureEstablished; _securePending; _newSessionPending; _controlReleased; secureConnecting; _SNICallback; servername; alpnProtocols; authorized; authorizationError; [kRes]; [kIsVerified]; [kPendingSession]; [kConnectOptions]; ssl; _start() { this[kHandle].afterConnect(); } constructor(socket, opts = kEmptyObject){ const tlsOptions = { ...opts }; const hostname = opts.servername ?? opts.host ?? socket._host; tlsOptions.hostname = hostname; const _cert = tlsOptions?.secureContext?.cert; const _key = tlsOptions?.secureContext?.key; let caCerts = tlsOptions?.secureContext?.ca; if (typeof caCerts === "string") caCerts = [ caCerts ]; else if (isArrayBufferView(caCerts) || isAnyArrayBuffer(caCerts)) { caCerts = [ new TextDecoder().decode(caCerts) ]; } tlsOptions.caCerts = caCerts; tlsOptions.alpnProtocols = [ "h2", "http/1.1" ]; super({ handle: _wrapHandle(tlsOptions, socket), ...opts, manualStart: true }); if (socket) { this._parent = socket; } this._tlsOptions = tlsOptions; this._secureEstablished = false; this._securePending = false; this._newSessionPending = false; this._controlReleased = false; this.secureConnecting = true; this._SNICallback = null; this.servername = null; this.alpnProtocols = tlsOptions.alpnProtocols; this.authorized = false; this.authorizationError = null; this[kRes] = null; this[kIsVerified] = false; this[kPendingSession] = null; this.ssl = new class { verifyError() { return null; // Never fails, rejectUnauthorized is always true in Deno. } }(); // deno-lint-ignore no-this-alias const tlssock = this; /** Wraps the given socket and adds the tls capability to the underlying * handle */ function _wrapHandle(tlsOptions, wrap) { let handle; if (wrap) { handle = wrap._handle; } const options = tlsOptions; if (!handle) { handle = options.pipe ? new Pipe(PipeConstants.SOCKET) : new TCP(TCPConstants.SOCKET); } // Patches `afterConnect` hook to replace TCP conn with TLS conn const afterConnect = handle.afterConnect; handle.afterConnect = async (req, status)=>{ try { const conn = await Deno.startTls(handle[kStreamBaseField], options); handle[kStreamBaseField] = conn; tlssock.emit("secure"); tlssock.removeListener("end", onConnectEnd); } catch { // TODO(kt3k): Handle this } return afterConnect.call(handle, req, status); }; handle.verifyError = function() { return null; // Never fails, rejectUnauthorized is always true in Deno. }; // Pretends `handle` is `tls_wrap.wrap(handle, ...)` to make some npm modules happy // An example usage of `_parentWrap` in npm module: // https://github.com/szmarczak/http2-wrapper/blob/51eeaf59ff9344fb192b092241bfda8506983620/source/utils/js-stream-socket.js#L6 handle._parent = handle; handle._parentWrap = wrap; return handle; } } _tlsError(err) { this.emit("_tlsError", err); if (this._controlReleased) { return err; } return null; } _releaseControl() { if (this._controlReleased) { return false; } this._controlReleased = true; this.removeListener("error", this._tlsError); return true; } getEphemeralKeyInfo() { return {}; } isSessionReused() { return false; } setSession(_session) { // TODO(kt3k): implement this } setServername(_servername) { // TODO(kt3k): implement this } getPeerCertificate(_detailed) { // TODO(kt3k): implement this return { subject: "localhost", subjectaltname: "IP Address:127.0.0.1, IP Address:::1" }; } } function normalizeConnectArgs(listArgs) { const args = net._normalizeArgs(listArgs); const options = args[0]; const cb = args[1]; // If args[0] was options, then normalize dealt with it. // If args[0] is port, or args[0], args[1] is host, port, we need to // find the options and merge them in, normalize's options has only // the host/port/path args that it knows about, not the tls options. // This means that options.host overrides a host arg. if (listArgs[1] !== null && typeof listArgs[1] === "object") { ObjectAssign(options, listArgs[1]); } else if (listArgs[2] !== null && typeof listArgs[2] === "object") { ObjectAssign(options, listArgs[2]); } return cb ? [ options, cb ] : [ options ]; } let ipServernameWarned = false; export function Server(options, listener) { return new ServerImpl(options, listener); } export class ServerImpl extends EventEmitter { options; listener; #closed; constructor(options, listener){ super(); this.options = options; this.#closed = false; if (listener) { this.on("secureConnection", listener); } } listen(port, callback) { const key = this.options.key?.toString(); const cert = this.options.cert?.toString(); // TODO(kt3k): The default host should be "localhost" const hostname = this.options.host ?? "0.0.0.0"; this.listener = Deno.listenTls({ port, hostname, cert, key }); callback?.call(this); this.#listen(this.listener); return this; } async #listen(listener) { while(!this.#closed){ try { // Creates TCP handle and socket directly from Deno.TlsConn. // This works as TLS socket. We don't use TLSSocket class for doing // this because Deno.startTls only supports client side tcp connection. const handle = new TCP(TCPConstants.SOCKET, await listener.accept()); const socket = new net.Socket({ handle }); this.emit("secureConnection", socket); } catch (e) { if (e instanceof Deno.errors.BadResource) { this.#closed = true; } // swallow } } } close(cb) { if (this.listener) { this.listener.close(); } cb?.(); nextTick(()=>{ this.emit("close"); }); return this; } address() { const addr = this.listener.addr; return { port: addr.port, address: addr.hostname }; } } Server.prototype = ServerImpl.prototype; export function createServer(options, listener) { return new ServerImpl(options, listener); } function onConnectSecure() { this.authorized = true; this.secureConnecting = false; debug("client emit secureConnect. authorized:", this.authorized); this.emit("secureConnect"); this.removeListener("end", onConnectEnd); } export function connect(...args) { args = normalizeConnectArgs(args); let options = args[0]; const cb = args[1]; const allowUnauthorized = getAllowUnauthorized(); options = { rejectUnauthorized: !allowUnauthorized, ciphers: DEFAULT_CIPHERS, checkServerIdentity, minDHSize: 1024, ...options }; if (!options.keepAlive) { options.singleUse = true; } assert(typeof options.checkServerIdentity === "function"); assert(typeof options.minDHSize === "number", "options.minDHSize is not a number: " + options.minDHSize); assert(options.minDHSize > 0, "options.minDHSize is not a positive number: " + options.minDHSize); const context = options.secureContext || createSecureContext(options); const tlssock = new TLSSocket(options.socket, { allowHalfOpen: options.allowHalfOpen, pipe: !!options.path, secureContext: context, isServer: false, requestCert: true, rejectUnauthorized: options.rejectUnauthorized !== false, session: options.session, ALPNProtocols: options.ALPNProtocols, requestOCSP: options.requestOCSP, enableTrace: options.enableTrace, pskCallback: options.pskCallback, highWaterMark: options.highWaterMark, onread: options.onread, signal: options.signal, ...options }); // rejectUnauthorized property can be explicitly defined as `undefined` // causing the assignment to default value (`true`) fail. Before assigning // it to the tlssock connection options, explicitly check if it is false // and update rejectUnauthorized property. The property gets used by TLSSocket // connection handler to allow or reject connection if unauthorized options.rejectUnauthorized = options.rejectUnauthorized !== false; tlssock[kConnectOptions] = options; if (cb) { tlssock.once("secureConnect", cb); } if (!options.socket) { // If user provided the socket, it's their responsibility to manage its // connectivity. If we created one internally, we connect it. if (options.timeout) { tlssock.setTimeout(options.timeout); } tlssock.connect(options, tlssock._start); } tlssock._releaseControl(); if (options.session) { tlssock.setSession(options.session); } if (options.servername) { if (!ipServernameWarned && net.isIP(options.servername)) { emitWarning("Setting the TLS ServerName to an IP address is not permitted by " + "RFC 6066. This will be ignored in a future version.", "DeprecationWarning", "DEP0123"); ipServernameWarned = true; } tlssock.setServername(options.servername); } if (options.socket) { tlssock._start(); } tlssock.on("secure", onConnectSecure); tlssock.prependListener("end", onConnectEnd); return tlssock; } function getAllowUnauthorized() { return false; } // TODO(kt3k): Implement this when Deno provides APIs for getting peer // certificates. export function checkServerIdentity(_hostname, _cert) {} function unfqdn(host) { return StringPrototypeReplace(host, /[.]$/, ""); } // Order matters. Mirrors ALL_CIPHER_SUITES from rustls/src/suites.rs but // using openssl cipher names instead. Mutable in Node but not (yet) in Deno. export const DEFAULT_CIPHERS = [ // TLSv1.3 suites "AES256-GCM-SHA384", "AES128-GCM-SHA256", "TLS_CHACHA20_POLY1305_SHA256", // TLSv1.2 suites "ECDHE-ECDSA-AES256-GCM-SHA384", "ECDHE-ECDSA-AES128-GCM-SHA256", "ECDHE-ECDSA-CHACHA20-POLY1305", "ECDHE-RSA-AES256-GCM-SHA384", "ECDHE-RSA-AES128-GCM-SHA256", "ECDHE-RSA-CHACHA20-POLY1305" ].join(":"); export default { TLSSocket, connect, createServer, checkServerIdentity, DEFAULT_CIPHERS, Server, unfqdn }; Qd jq>ext:deno_node/_tls_wrap.tsa bD`M`! T!`La6Z T  I`kSb1 % ghijkxyz{j???????????Ib0`DL`  ]`L ]`b% ]`]`¸ ]`4 ]`* ]`b ]`^ ]`K]`"]`" ]`"B ]`^B ]`" ]`]hL`` L`` L` ` L` ® ` L`® "` L`"` L`>` L`>³ ` L`³  L`  D% DcPL` D  c  Dc , Dc  Dbbc  D``c.D Db^ b^ c@C Dbbc%. D c} Db` b` cn DBBc D  c DKKc D11c D"3"3c D  c  Dc  DB B c, D± ± c NV`a?`a?a?Ba?B a?b` a?Ka? a?ba?b^ a?ba?a? a? a?± a?a?1a?"3a?"a? a?® a?³ a?>a?a?a?a?b@h T I`[xʱb@i T  I`!x"zb@j T I`D-Z-{b@k T I`-8.|b@ lHLa T I` b@db T I`M!!³ b@ea T I`"&->b@fa T I`--b@gca  BhBi"j B7  T I`IbKm`Ke&@ < X H X P P @ 8 D 8\(DT P rn333333 3 333 3 55553 (Sbqq"`Dapc 0 0 0 0 4 bw 4Sb @"zd???!ʱ  `T ``/ `/ `?  `  a!D]< ` aj;ajajb aj]®  T  I`}"zVb Qx  T I`4® b Ճy T I`m;bz T I` b{ T I` !b b| T,`L`/  `Kb  ,0 /d335(Sbqq® `Da! a 0b}  `,M` Bb±b¶"Hb"C>C³ CCC C|C">³  | `D h %%%%%% % % % % ei e% h  !  b%!  b%!  b%!  b%0‚c %%%%%- t%t%t%t%     e+2 1% !e%""e%#%0$% &'(e+)2 100-*2*{+%-,-^1~.)03/030031 032"033$034& 35( 1 ʱd*@@,,0 0 0bAcβ±D "*2:rzjDƲD`RD]DH Q"0// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // This module ports: // - https://github.com/nodejs/node/blob/master/src/async_wrap-inl.h // - https://github.com/nodejs/node/blob/master/src/async_wrap.cc // - https://github.com/nodejs/node/blob/master/src/async_wrap.h // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials export function registerDestroyHook(// deno-lint-ignore no-explicit-any _target, _asyncId, _prop) { // TODO(kt3k): implement actual procedures } export var constants; (function(constants) { constants[constants["kInit"] = 0] = "kInit"; constants[constants["kBefore"] = 1] = "kBefore"; constants[constants["kAfter"] = 2] = "kAfter"; constants[constants["kDestroy"] = 3] = "kDestroy"; constants[constants["kPromiseResolve"] = 4] = "kPromiseResolve"; constants[constants["kTotals"] = 5] = "kTotals"; constants[constants["kCheck"] = 6] = "kCheck"; constants[constants["kExecutionAsyncId"] = 7] = "kExecutionAsyncId"; constants[constants["kTriggerAsyncId"] = 8] = "kTriggerAsyncId"; constants[constants["kAsyncIdCounter"] = 9] = "kAsyncIdCounter"; constants[constants["kDefaultTriggerAsyncId"] = 10] = "kDefaultTriggerAsyncId"; constants[constants["kUsesExecutionAsyncResource"] = 11] = "kUsesExecutionAsyncResource"; constants[constants["kStackLength"] = 12] = "kStackLength"; })(constants || (constants = {})); const asyncHookFields = new Uint32Array(Object.keys(constants).length); export { asyncHookFields as async_hook_fields }; // Increment the internal id counter and return the value. export function newAsyncId() { return ++asyncIdFields[constants.kAsyncIdCounter]; } export var UidFields; (function(UidFields) { UidFields[UidFields["kExecutionAsyncId"] = 0] = "kExecutionAsyncId"; UidFields[UidFields["kTriggerAsyncId"] = 1] = "kTriggerAsyncId"; UidFields[UidFields["kAsyncIdCounter"] = 2] = "kAsyncIdCounter"; UidFields[UidFields["kDefaultTriggerAsyncId"] = 3] = "kDefaultTriggerAsyncId"; UidFields[UidFields["kUidFieldsCount"] = 4] = "kUidFieldsCount"; })(UidFields || (UidFields = {})); const asyncIdFields = new Float64Array(Object.keys(UidFields).length); // `kAsyncIdCounter` should start at `1` because that'll be the id the execution // context during bootstrap. asyncIdFields[UidFields.kAsyncIdCounter] = 1; // `kDefaultTriggerAsyncId` should be `-1`, this indicates that there is no // specified default value and it should fallback to the executionAsyncId. // 0 is not used as the magic value, because that indicates a missing // context which is different from a default context. asyncIdFields[UidFields.kDefaultTriggerAsyncId] = -1; export { asyncIdFields }; export var providerType; (function(providerType) { providerType[providerType["NONE"] = 0] = "NONE"; providerType[providerType["DIRHANDLE"] = 1] = "DIRHANDLE"; providerType[providerType["DNSCHANNEL"] = 2] = "DNSCHANNEL"; providerType[providerType["ELDHISTOGRAM"] = 3] = "ELDHISTOGRAM"; providerType[providerType["FILEHANDLE"] = 4] = "FILEHANDLE"; providerType[providerType["FILEHANDLECLOSEREQ"] = 5] = "FILEHANDLECLOSEREQ"; providerType[providerType["FIXEDSIZEBLOBCOPY"] = 6] = "FIXEDSIZEBLOBCOPY"; providerType[providerType["FSEVENTWRAP"] = 7] = "FSEVENTWRAP"; providerType[providerType["FSREQCALLBACK"] = 8] = "FSREQCALLBACK"; providerType[providerType["FSREQPROMISE"] = 9] = "FSREQPROMISE"; providerType[providerType["GETADDRINFOREQWRAP"] = 10] = "GETADDRINFOREQWRAP"; providerType[providerType["GETNAMEINFOREQWRAP"] = 11] = "GETNAMEINFOREQWRAP"; providerType[providerType["HEAPSNAPSHOT"] = 12] = "HEAPSNAPSHOT"; providerType[providerType["HTTP2SESSION"] = 13] = "HTTP2SESSION"; providerType[providerType["HTTP2STREAM"] = 14] = "HTTP2STREAM"; providerType[providerType["HTTP2PING"] = 15] = "HTTP2PING"; providerType[providerType["HTTP2SETTINGS"] = 16] = "HTTP2SETTINGS"; providerType[providerType["HTTPINCOMINGMESSAGE"] = 17] = "HTTPINCOMINGMESSAGE"; providerType[providerType["HTTPCLIENTREQUEST"] = 18] = "HTTPCLIENTREQUEST"; providerType[providerType["JSSTREAM"] = 19] = "JSSTREAM"; providerType[providerType["JSUDPWRAP"] = 20] = "JSUDPWRAP"; providerType[providerType["MESSAGEPORT"] = 21] = "MESSAGEPORT"; providerType[providerType["PIPECONNECTWRAP"] = 22] = "PIPECONNECTWRAP"; providerType[providerType["PIPESERVERWRAP"] = 23] = "PIPESERVERWRAP"; providerType[providerType["PIPEWRAP"] = 24] = "PIPEWRAP"; providerType[providerType["PROCESSWRAP"] = 25] = "PROCESSWRAP"; providerType[providerType["PROMISE"] = 26] = "PROMISE"; providerType[providerType["QUERYWRAP"] = 27] = "QUERYWRAP"; providerType[providerType["SHUTDOWNWRAP"] = 28] = "SHUTDOWNWRAP"; providerType[providerType["SIGNALWRAP"] = 29] = "SIGNALWRAP"; providerType[providerType["STATWATCHER"] = 30] = "STATWATCHER"; providerType[providerType["STREAMPIPE"] = 31] = "STREAMPIPE"; providerType[providerType["TCPCONNECTWRAP"] = 32] = "TCPCONNECTWRAP"; providerType[providerType["TCPSERVERWRAP"] = 33] = "TCPSERVERWRAP"; providerType[providerType["TCPWRAP"] = 34] = "TCPWRAP"; providerType[providerType["TTYWRAP"] = 35] = "TTYWRAP"; providerType[providerType["UDPSENDWRAP"] = 36] = "UDPSENDWRAP"; providerType[providerType["UDPWRAP"] = 37] = "UDPWRAP"; providerType[providerType["SIGINTWATCHDOG"] = 38] = "SIGINTWATCHDOG"; providerType[providerType["WORKER"] = 39] = "WORKER"; providerType[providerType["WORKERHEAPSNAPSHOT"] = 40] = "WORKERHEAPSNAPSHOT"; providerType[providerType["WRITEWRAP"] = 41] = "WRITEWRAP"; providerType[providerType["ZLIB"] = 42] = "ZLIB"; })(providerType || (providerType = {})); const kInvalidAsyncId = -1; export class AsyncWrap { provider = providerType.NONE; asyncId = kInvalidAsyncId; constructor(provider){ this.provider = provider; this.getAsyncId(); } getAsyncId() { this.asyncId = this.asyncId === kInvalidAsyncId ? newAsyncId() : this.asyncId; return this.asyncId; } getProviderType() { return this.provider; } }  Qfa,ext:deno_node/internal_binding/async_wrap.tsa bD`0M`  T`XLa$,L`  T  I`(abSb1`?Ib`]hL`b` L`b"` L`"` L`cc` L`cb` L`bb` L`b` L`ab` L`ab]`aba?ba?a?ba?"a?ca?a?ba?³b@b T0`L`cb  `De00-/P4 (SbqAb`Da   a b@ca  Tx` 2@4B 2D4F 2H4J 2L4N 2P4R 2T4V 2X4Z 2\4^ 2`4b 2d4f 2h4j 2l4n 2p4r 2t4v 2x4z 2|4~ 2  4 !2!!4 "2""4 #2##4 $2$$4 %2%%4 &2&&4 '2''4 (2((4 )2))4 *2**4(SbqAI`Da1qDo 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8b@  `T ``/ `/ `?  `  aD]0 ` ajajaj] T0`L` "  `De- ] 2-](SbpGb`Da\ a ³b Ճ T4`'L`n `Df-m 0a-2- (Sbpm`Dai a D `b  T  I`b T,`L`b"n  ´`Kb p Hd0-33(Sbqqb`Da a0³b   ֳ`D@h %ei h  01b!!-0^- i 1 01b! !-0^- i100-  400-  4 01b %Âe+2" 1 c$ `P`@8PbA~.F^D`RD]DH Q"W<// Copyright the Browserify authors. MIT License. // Ported from https://github.com/browserify/path-browserify/ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Alphabet chars. export const CHAR_UPPERCASE_A = 65; /* A */ export const CHAR_LOWERCASE_A = 97; /* a */ export const CHAR_UPPERCASE_Z = 90; /* Z */ export const CHAR_LOWERCASE_Z = 122; /* z */ // Non-alphabetic chars. export const CHAR_DOT = 46; /* . */ export const CHAR_FORWARD_SLASH = 47; /* / */ export const CHAR_BACKWARD_SLASH = 92; /* \ */ export const CHAR_VERTICAL_LINE = 124; /* | */ export const CHAR_COLON = 58; /* : */ export const CHAR_QUESTION_MARK = 63; /* ? */ export const CHAR_UNDERSCORE = 95; /* _ */ export const CHAR_LINE_FEED = 10; /* \n */ export const CHAR_CARRIAGE_RETURN = 13; /* \r */ export const CHAR_TAB = 9; /* \t */ export const CHAR_FORM_FEED = 12; /* \f */ export const CHAR_EXCLAMATION_MARK = 33; /* ! */ export const CHAR_HASH = 35; /* # */ export const CHAR_SPACE = 32; /* */ export const CHAR_NO_BREAK_SPACE = 160; /* \u00A0 */ export const CHAR_ZERO_WIDTH_NOBREAK_SPACE = 65279; /* \uFEFF */ export const CHAR_LEFT_SQUARE_BRACKET = 91; /* [ */ export const CHAR_RIGHT_SQUARE_BRACKET = 93; /* ] */ export const CHAR_LEFT_ANGLE_BRACKET = 60; /* < */ export const CHAR_RIGHT_ANGLE_BRACKET = 62; /* > */ export const CHAR_LEFT_CURLY_BRACKET = 123; /* { */ export const CHAR_RIGHT_CURLY_BRACKET = 125; /* } */ export const CHAR_HYPHEN_MINUS = 45; /* - */ export const CHAR_PLUS = 43; /* + */ export const CHAR_DOUBLE_QUOTE = 34; /* " */ export const CHAR_SINGLE_QUOTE = 39; /* ' */ export const CHAR_PERCENT = 37; /* % */ export const CHAR_SEMICOLON = 59; /* ; */ export const CHAR_CIRCUMFLEX_ACCENT = 94; /* ^ */ export const CHAR_GRAVE_ACCENT = 96; /* ` */ export const CHAR_AT = 64; /* @ */ export const CHAR_AMPERSAND = 38; /* & */ export const CHAR_EQUAL = 61; /* = */ // Digits export const CHAR_0 = 48; /* 0 */ export const CHAR_9 = 57; /* 9 */ Qd ext:deno_node/path/_constants.tsa bD` M` T`La!L'$% &#" !'  a   `D h ei h   A1$ a1 Z1% z1 .1 /1 \1 |1& :1 ?1 _1# 1 1 1" 1 !1 #1 1! 1 1' [1 ]1 <1 >1 {1 }1 -1 +1 "1 '1 %1 ;1 ^1 `1 @1 &1 =1 01 91 Sb1Ib`]L`u"` L`"` L`` L`` L`B` L`B` L`` L`` L`"`  L`"`  L`"`  L`"`  L`"`  L`"V ` L`V ` L`B` L`B` L`b` L`b` L`` L`B` L`B` L`B` L`B` L`b` L`b` L`b` L`b` L`` L`B` L`B` L``  L`"`! L`"`" L``# L``$ L``% L``& L`"`' L`"]`'a$?a?a%?Ba?"a ?V a?Ba?a&?a?ba?a#?Ba?a?a"?"a ?a ?Ba?"a!?a?"a'?a?Ba?ba?a?a?a?a?a?a ?a ?ba?a?a?a?a?a?"a ?"a?a? bAD`RD]DH Q~= // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // // Adapted from Node.js. Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // These are simplified versions of the "real" errors in Node. import { primordials } from "ext:core/mod.js"; const { ArrayPrototypePop, Error, FunctionPrototypeBind, ReflectApply, ObjectDefineProperties, ObjectGetOwnPropertyDescriptors, ObjectSetPrototypeOf, ObjectValues, PromisePrototypeThen, } = primordials; import { nextTick } from "ext:deno_node/_next_tick.ts"; import { validateFunction } from "ext:deno_node/internal/validators.mjs"; class NodeFalsyValueRejectionError extends Error { code = "ERR_FALSY_VALUE_REJECTION"; constructor(reason) { super("Promise was rejected with falsy value"); this.reason = reason; } } function callbackify(original) { validateFunction(original, "original"); // We DO NOT return the promise as it gives the user a false sense that // the promise is actually somehow related to the callback's execution // and that the callback throwing will reject the promise. function callbackified(...args) { const maybeCb = ArrayPrototypePop(args); validateFunction(maybeCb, "last argument"); const cb = FunctionPrototypeBind(maybeCb, this); // In true node style we process the callback on `nextTick` with all the // implications (stack, `uncaughtException`, `async_hooks`) PromisePrototypeThen( ReflectApply(original, this, args), (ret) => nextTick(cb, null, ret), (rej) => { rej = rej || new NodeFalsyValueRejectionError(rej); return nextTick(cb, rej); }, ); } const descriptors = ObjectGetOwnPropertyDescriptors(original); // It is possible to manipulate a functions `length` or `name` property. This // guards against the manipulation. if (typeof descriptors.length.value === "number") { descriptors.length.value++; } if (typeof descriptors.name.value === "string") { descriptors.name.value += "Callbackified"; } const propertiesValues = ObjectValues(descriptors); for (let i = 0; i < propertiesValues.length; i++) { // We want to use null-prototype objects to not rely on globally mutable // %Object.prototype%. ObjectSetPrototypeOf(propertiesValues[i], null); } ObjectDefineProperties(callbackified, descriptors); return callbackified; } export { callbackify }; Qe^ql(ext:deno_node/_util/_util_callbackify.jsa bD`$M` Tx`PLa<L` T I`| b @@Sb1 ^I h?????????Ib `L` bS]`.B ]`8" ]`x]L`` L`]L`  D± ± c(0 Dc& D  c`p`a?± a? a?a?b@aa ^ I   `T ``/ `/ `?  `  afD] ` aj] T  I`dڵb Ճ T$`L`B5q  &` Ka6,b3(Sbqq`Daf a b  µ`Dw8h %%%%%%% % % ei h  0-%--%-%- %- %- %- % - % e+2 % ڵbPPP bA"εDD`RD]DH Q*// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. import { primordials } from "ext:core/mod.js"; const { ArrayPrototypeForEach, ArrayPrototypeIncludes, ArrayPrototypePushApply, ArrayPrototypeShift, ArrayPrototypeSlice, ArrayPrototypePush, ArrayPrototypeUnshiftApply, ObjectHasOwn, ObjectEntries, StringPrototypeCharAt, StringPrototypeIndexOf, StringPrototypeSlice, } = primordials; import { validateArray, validateBoolean, validateObject, validateString, validateUnion, } from "ext:deno_node/internal/validators.mjs"; import { findLongOptionForShort, isLoneLongOption, isLoneShortOption, isLongOptionAndValue, isOptionLikeValue, isOptionValue, isShortOptionAndValue, isShortOptionGroup, objectGetOwn, optionsGetOwn, } from "ext:deno_node/internal/util/parse_args/utils.js"; import { codes } from "ext:deno_node/internal/error_codes.ts"; const { ERR_INVALID_ARG_VALUE, ERR_PARSE_ARGS_INVALID_OPTION_VALUE, ERR_PARSE_ARGS_UNKNOWN_OPTION, ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL, } = codes; import process from "node:process"; function getMainArgs() { // Work out where to slice process.argv for user supplied arguments. // Check node options for scenarios where user CLI args follow executable. const execArgv = process.execArgv; if ( ArrayPrototypeIncludes(execArgv, "-e") || ArrayPrototypeIncludes(execArgv, "--eval") || ArrayPrototypeIncludes(execArgv, "-p") || ArrayPrototypeIncludes(execArgv, "--print") ) { return ArrayPrototypeSlice(process.argv, 1); } // Normally first two arguments are executable and script, then CLI arguments return ArrayPrototypeSlice(process.argv, 2); } /** * In strict mode, throw for possible usage errors like --foo --bar * * @param {string} longOption - long option name e.g. 'foo' * @param {string|undefined} optionValue - value from user args * @param {string} shortOrLong - option used, with dashes e.g. `-l` or `--long` * @param {boolean} strict - show errors, from parseArgs({ strict }) */ function checkOptionLikeValue(longOption, optionValue, shortOrLong, strict) { if (strict && isOptionLikeValue(optionValue)) { // Only show short example if user used short option. const example = (shortOrLong.length === 2) ? `'--${longOption}=-XYZ' or '${shortOrLong}-XYZ'` : `'--${longOption}=-XYZ'`; const errorMessage = `Option '${shortOrLong}' argument is ambiguous. Did you forget to specify the option argument for '${shortOrLong}'? To specify an option argument starting with a dash use ${example}.`; throw new ERR_PARSE_ARGS_INVALID_OPTION_VALUE(errorMessage); } } /** * In strict mode, throw for usage errors. * * @param {string} longOption - long option name e.g. 'foo' * @param {string|undefined} optionValue - value from user args * @param {object} options - option configs, from parseArgs({ options }) * @param {string} shortOrLong - option used, with dashes e.g. `-l` or `--long` * @param {boolean} strict - show errors, from parseArgs({ strict }) * @param {boolean} allowPositionals - from parseArgs({ allowPositionals }) */ function checkOptionUsage( longOption, optionValue, options, shortOrLong, strict, allowPositionals, ) { // Strict and options are used from local context. if (!strict) return; if (!ObjectHasOwn(options, longOption)) { throw new ERR_PARSE_ARGS_UNKNOWN_OPTION(shortOrLong, allowPositionals); } const short = optionsGetOwn(options, longOption, "short"); const shortAndLong = short ? `-${short}, --${longOption}` : `--${longOption}`; const type = optionsGetOwn(options, longOption, "type"); if (type === "string" && typeof optionValue !== "string") { throw new ERR_PARSE_ARGS_INVALID_OPTION_VALUE( `Option '${shortAndLong} ' argument missing`, ); } // (Idiomatic test for undefined||null, expecting undefined.) if (type === "boolean" && optionValue != null) { throw new ERR_PARSE_ARGS_INVALID_OPTION_VALUE( `Option '${shortAndLong}' does not take an argument`, ); } } /** * Store the option value in `values`. * * @param {string} longOption - long option name e.g. 'foo' * @param {string|undefined} optionValue - value from user args * @param {object} options - option configs, from parseArgs({ options }) * @param {object} values - option values returned in `values` by parseArgs */ function storeOption(longOption, optionValue, options, values) { if (longOption === "__proto__") { return; // No. Just no. } // We store based on the option value rather than option type, // preserving the users intent for author to deal with. const newValue = optionValue ?? true; if (optionsGetOwn(options, longOption, "multiple")) { // Always store value in array, including for boolean. // values[longOption] starts out not present, // first value is added as new array [newValue], // subsequent values are pushed to existing array. // (note: values has null prototype, so simpler usage) if (values[longOption]) { ArrayPrototypePush(values[longOption], newValue); } else { values[longOption] = [newValue]; } } else { values[longOption] = newValue; } } export const parseArgs = (config = { __proto__: null }) => { const args = objectGetOwn(config, "args") ?? getMainArgs(); const strict = objectGetOwn(config, "strict") ?? true; const allowPositionals = objectGetOwn(config, "allowPositionals") ?? !strict; const options = objectGetOwn(config, "options") ?? { __proto__: null }; // Validate input configuration. validateArray(args, "args"); validateBoolean(strict, "strict"); validateBoolean(allowPositionals, "allowPositionals"); validateObject(options, "options"); ArrayPrototypeForEach( ObjectEntries(options), ({ 0: longOption, 1: optionConfig }) => { validateObject(optionConfig, `options.${longOption}`); // type is required validateUnion( objectGetOwn(optionConfig, "type"), `options.${longOption}.type`, ["string", "boolean"], ); if (ObjectHasOwn(optionConfig, "short")) { const shortOption = optionConfig.short; validateString(shortOption, `options.${longOption}.short`); if (shortOption.length !== 1) { throw new ERR_INVALID_ARG_VALUE( `options.${longOption}.short`, shortOption, "must be a single character", ); } } if (ObjectHasOwn(optionConfig, "multiple")) { validateBoolean( optionConfig.multiple, `options.${longOption}.multiple`, ); } }, ); const result = { values: { __proto__: null }, positionals: [], }; const remainingArgs = ArrayPrototypeSlice(args); while (remainingArgs.length > 0) { const arg = ArrayPrototypeShift(remainingArgs); const nextArg = remainingArgs[0]; // Check if `arg` is an options terminator. // Guideline 10 in https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html if (arg === "--") { if (!allowPositionals && remainingArgs.length > 0) { throw new ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL(nextArg); } // Everything after a bare '--' is considered a positional argument. ArrayPrototypePushApply( result.positionals, remainingArgs, ); break; // Finished processing args, leave while loop. } if (isLoneShortOption(arg)) { // e.g. '-f' const shortOption = StringPrototypeCharAt(arg, 1); const longOption = findLongOptionForShort(shortOption, options); let optionValue; if ( optionsGetOwn(options, longOption, "type") === "string" && isOptionValue(nextArg) ) { // e.g. '-f', 'bar' optionValue = ArrayPrototypeShift(remainingArgs); checkOptionLikeValue(longOption, optionValue, arg, strict); } checkOptionUsage( longOption, optionValue, options, arg, strict, allowPositionals, ); storeOption(longOption, optionValue, options, result.values); continue; } if (isShortOptionGroup(arg, options)) { // Expand -fXzy to -f -X -z -y const expanded = []; for (let index = 1; index < arg.length; index++) { const shortOption = StringPrototypeCharAt(arg, index); const longOption = findLongOptionForShort(shortOption, options); if ( optionsGetOwn(options, longOption, "type") !== "string" || index === arg.length - 1 ) { // Boolean option, or last short in group. Well formed. ArrayPrototypePush(expanded, `-${shortOption}`); } else { // String option in middle. Yuck. // Expand -abfFILE to -a -b -fFILE ArrayPrototypePush(expanded, `-${StringPrototypeSlice(arg, index)}`); break; // finished short group } } ArrayPrototypeUnshiftApply(remainingArgs, expanded); continue; } if (isShortOptionAndValue(arg, options)) { // e.g. -fFILE const shortOption = StringPrototypeCharAt(arg, 1); const longOption = findLongOptionForShort(shortOption, options); const optionValue = StringPrototypeSlice(arg, 2); checkOptionUsage( longOption, optionValue, options, `-${shortOption}`, strict, allowPositionals, ); storeOption(longOption, optionValue, options, result.values); continue; } if (isLoneLongOption(arg)) { // e.g. '--foo' const longOption = StringPrototypeSlice(arg, 2); let optionValue; if ( optionsGetOwn(options, longOption, "type") === "string" && isOptionValue(nextArg) ) { // e.g. '--foo', 'bar' optionValue = ArrayPrototypeShift(remainingArgs); checkOptionLikeValue(longOption, optionValue, arg, strict); } checkOptionUsage( longOption, optionValue, options, arg, strict, allowPositionals, ); storeOption(longOption, optionValue, options, result.values); continue; } if (isLongOptionAndValue(arg)) { // e.g. --foo=bar const index = StringPrototypeIndexOf(arg, "="); const longOption = StringPrototypeSlice(arg, 2, index); const optionValue = StringPrototypeSlice(arg, index + 1); checkOptionUsage( longOption, optionValue, options, `--${longOption}`, strict, allowPositionals, ); storeOption(longOption, optionValue, options, result.values); continue; } // Anything left is a positional if (!allowPositionals) { throw new ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL(arg); } ArrayPrototypePush(result.positionals, arg); } return result; }; $Qg4ext:deno_node/internal/util/parse_args/parse_args.jsa bD`$M` T`tLai T  I`Sb1c!_a`aAa SYb BAC"Bs????????????????????Ib*`L` bS]`" ]`g]`r ]`* ]`]L`` L`]PL`  D" " c Dœœc Dbbc Dc Dc D""c DŸŸc  DBBc2 Dc6H DcLX Dc\i Dc D* c D!!c  D  c) D  c-; D  c?M DcQ^`a?!a? a? a? a?a?œa?ba?a?a?"a?Ÿa?Ba?a?a?a?" a?* a?a?Fb@ T I`z jb@ T I` Cb@ T I`b@ Laa c!_a`aAa SYb"  BAC"B T `*bK  Z`D h %%%%%%% % % % % %%%%%%%%%ei h  0- %- %- %- %- %- %- % -% -% -% -% -%0-%-%-%-%1 c PPPPPbAb޶DD`RD]DH !Q!6  C// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright (c) 2014-2015 Devon Govett // Forked from https://github.com/browserify/browserify-zlib // deno-lint-ignore-file import { Buffer, kMaxLength } from "node:buffer"; import { Transform } from "node:stream"; import * as binding from "ext:deno_node/_zlib_binding.mjs"; import util from "node:util"; import { ok as assert } from "node:assert"; import { zlib as zlibConstants } from "ext:deno_node/internal_binding/constants.ts"; import { nextTick } from "ext:deno_node/_next_tick.ts"; import { isAnyArrayBuffer, isArrayBufferView, } from "ext:deno_node/internal/util/types.ts"; var kRangeErrorMessage = "Cannot create final Buffer. It would be larger " + "than 0x" + kMaxLength.toString(16) + " bytes"; // translation table for return codes. export const codes = Object.freeze({ Z_OK: binding.Z_OK, Z_STREAM_END: binding.Z_STREAM_END, Z_NEED_DICT: binding.Z_NEED_DICT, Z_ERRNO: binding.Z_ERRNO, Z_STREAM_ERROR: binding.Z_STREAM_ERROR, Z_DATA_ERROR: binding.Z_DATA_ERROR, Z_MEM_ERROR: binding.Z_MEM_ERROR, Z_BUF_ERROR: binding.Z_BUF_ERROR, Z_VERSION_ERROR: binding.Z_VERSION_ERROR, [binding.Z_OK]: "Z_OK", [binding.Z_STREAM_END]: "Z_STREAM_END", [binding.Z_NEED_DICT]: "Z_NEED_DICT", [binding.Z_ERRNO]: "Z_ERRNO", [binding.Z_STREAM_ERROR]: "Z_STREAM_ERROR", [binding.Z_DATA_ERROR]: "Z_DATA_ERROR", [binding.Z_MEM_ERROR]: "Z_MEM_ERROR", [binding.Z_BUF_ERROR]: "Z_BUF_ERROR", [binding.Z_VERSION_ERROR]: "Z_VERSION_ERROR", }); export const createDeflate = function (o) { return new Deflate(o); }; export const createInflate = function (o) { return new Inflate(o); }; export const createDeflateRaw = function (o) { return new DeflateRaw(o); }; export const createInflateRaw = function (o) { return new InflateRaw(o); }; export const createGzip = function (o) { return new Gzip(o); }; export const createGunzip = function (o) { return new Gunzip(o); }; export const createUnzip = function (o) { return new Unzip(o); }; // Convenience methods. // compress/decompress a string or buffer in one step. export const deflate = function (buffer, opts, callback) { if (typeof opts === "function") { callback = opts; opts = {}; } return zlibBuffer(new Deflate(opts), buffer, callback); }; export const deflateSync = function (buffer, opts) { return zlibBufferSync(new Deflate(opts), buffer); }; export const gzip = function (buffer, opts, callback) { if (typeof opts === "function") { callback = opts; opts = {}; } return zlibBuffer(new Gzip(opts), buffer, callback); }; export const gzipSync = function (buffer, opts) { return zlibBufferSync(new Gzip(opts), buffer); }; export const deflateRaw = function (buffer, opts, callback) { if (typeof opts === "function") { callback = opts; opts = {}; } return zlibBuffer(new DeflateRaw(opts), buffer, callback); }; export const deflateRawSync = function (buffer, opts) { return zlibBufferSync(new DeflateRaw(opts), buffer); }; export const unzip = function (buffer, opts, callback) { if (typeof opts === "function") { callback = opts; opts = {}; } return zlibBuffer(new Unzip(opts), buffer, callback); }; export const unzipSync = function (buffer, opts) { return zlibBufferSync(new Unzip(opts), buffer); }; export const inflate = function (buffer, opts, callback) { if (typeof opts === "function") { callback = opts; opts = {}; } return zlibBuffer(new Inflate(opts), buffer, callback); }; export const inflateSync = function (buffer, opts) { return zlibBufferSync(new Inflate(opts), buffer); }; export const gunzip = function (buffer, opts, callback) { if (typeof opts === "function") { callback = opts; opts = {}; } return zlibBuffer(new Gunzip(opts), buffer, callback); }; export const gunzipSync = function (buffer, opts) { return zlibBufferSync(new Gunzip(opts), buffer); }; export const inflateRaw = function (buffer, opts, callback) { if (typeof opts === "function") { callback = opts; opts = {}; } return zlibBuffer(new InflateRaw(opts), buffer, callback); }; export const inflateRawSync = function (buffer, opts) { return zlibBufferSync(new InflateRaw(opts), buffer); }; function sanitizeInput(input) { if (typeof input === "string") input = Buffer.from(input); if ( !Buffer.isBuffer(input) && (input.buffer && !input.buffer.constructor === ArrayBuffer) ) throw new TypeError("Not a string, buffer or dataview"); if (input.buffer) { input = new Uint8Array(input.buffer, input.byteOffset, input.byteLength); } return input; } function zlibBuffer(engine, buffer, callback) { var buffers = []; var nread = 0; buffer = sanitizeInput(buffer); engine.on("error", onError); engine.on("end", onEnd); engine.end(buffer); flow(); function flow() { var chunk; while (null !== (chunk = engine.read())) { buffers.push(chunk); nread += chunk.length; } engine.once("readable", flow); } function onError(err) { engine.removeListener("end", onEnd); engine.removeListener("readable", flow); callback(err); } function onEnd() { var buf; var err = null; if (nread >= kMaxLength) { err = new RangeError(kRangeErrorMessage); } else { buf = Buffer.concat(buffers, nread); } buffers = []; engine.close(); callback(err, buf); } } function zlibBufferSync(engine, buffer) { buffer = sanitizeInput(buffer); var flushFlag = engine._finishFlushFlag; return engine._processChunk(buffer, flushFlag); } // generic zlib // minimal 2-byte header function Deflate(opts) { if (!(this instanceof Deflate)) return new Deflate(opts); Zlib.call(this, opts, binding.DEFLATE); } function Inflate(opts) { if (!(this instanceof Inflate)) return new Inflate(opts); Zlib.call(this, opts, binding.INFLATE); } // gzip - bigger header, same deflate compression function Gzip(opts) { if (!(this instanceof Gzip)) return new Gzip(opts); Zlib.call(this, opts, binding.GZIP); } function Gunzip(opts) { if (!(this instanceof Gunzip)) return new Gunzip(opts); Zlib.call(this, opts, binding.GUNZIP); } // raw - no header function DeflateRaw(opts) { if (!(this instanceof DeflateRaw)) return new DeflateRaw(opts); Zlib.call(this, opts, binding.DEFLATERAW); } function InflateRaw(opts) { if (!(this instanceof InflateRaw)) return new InflateRaw(opts); Zlib.call(this, opts, binding.INFLATERAW); } // auto-detect header. function Unzip(opts) { if (!(this instanceof Unzip)) return new Unzip(opts); Zlib.call(this, opts, binding.UNZIP); } function isValidFlushFlag(flag) { return flag === binding.Z_NO_FLUSH || flag === binding.Z_PARTIAL_FLUSH || flag === binding.Z_SYNC_FLUSH || flag === binding.Z_FULL_FLUSH || flag === binding.Z_FINISH || flag === binding.Z_BLOCK; } // the Zlib class they all inherit from // This thing manages the queue of requests, and returns // true or false if there is anything in the queue when // you call the .write() method. function Zlib(opts, mode) { var _this = this; this._opts = opts = opts || {}; this._chunkSize = opts.chunkSize || zlibConstants.Z_DEFAULT_CHUNK; Transform.call(this, opts); if (opts.flush && !isValidFlushFlag(opts.flush)) { throw new Error("Invalid flush flag: " + opts.flush); } if (opts.finishFlush && !isValidFlushFlag(opts.finishFlush)) { throw new Error("Invalid flush flag: " + opts.finishFlush); } this._flushFlag = opts.flush || binding.Z_NO_FLUSH; this._finishFlushFlag = typeof opts.finishFlush !== "undefined" ? opts.finishFlush : binding.Z_FINISH; if (opts.chunkSize) { if ( opts.chunkSize < zlibConstants.Z_MIN_CHUNK || opts.chunkSize > zlibConstants.Z_MAX_CHUNK ) { throw new Error("Invalid chunk size: " + opts.chunkSize); } } if (opts.windowBits) { if ( opts.windowBits < zlibConstants.Z_MIN_WINDOWBITS || opts.windowBits > zlibConstants.Z_MAX_WINDOWBITS ) { throw new Error("Invalid windowBits: " + opts.windowBits); } } if (opts.level) { if ( opts.level < zlibConstants.Z_MIN_LEVEL || opts.level > zlibConstants.Z_MAX_LEVEL ) { throw new Error("Invalid compression level: " + opts.level); } } if (opts.memLevel) { if ( opts.memLevel < zlibConstants.Z_MIN_MEMLEVEL || opts.memLevel > zlibConstants.Z_MAX_MEMLEVEL ) { throw new Error("Invalid memLevel: " + opts.memLevel); } } if (opts.strategy) { if ( opts.strategy != zlibConstants.Z_FILTERED && opts.strategy != zlibConstants.Z_HUFFMAN_ONLY && opts.strategy != zlibConstants.Z_RLE && opts.strategy != zlibConstants.Z_FIXED && opts.strategy != zlibConstants.Z_DEFAULT_STRATEGY ) { throw new Error("Invalid strategy: " + opts.strategy); } } let dictionary = opts.dictionary; if (dictionary !== undefined && !isArrayBufferView(dictionary)) { if (isAnyArrayBuffer(dictionary)) { dictionary = Buffer.from(dictionary); } else { throw new TypeError("Invalid dictionary"); } } this._handle = new binding.Zlib(mode); var self = this; this._hadError = false; this._handle.onerror = function (message, errno) { // there is no way to cleanly recover. // continuing only obscures problems. _close(self); self._hadError = true; var error = new Error(message); error.errno = errno; error.code = codes[errno]; self.emit("error", error); }; var level = zlibConstants.Z_DEFAULT_COMPRESSION; if (typeof opts.level === "number") level = opts.level; var strategy = zlibConstants.Z_DEFAULT_STRATEGY; if (typeof opts.strategy === "number") strategy = opts.strategy; this._handle.init( opts.windowBits || zlibConstants.Z_DEFAULT_WINDOWBITS, level, opts.memLevel || zlibConstants.Z_DEFAULT_MEMLEVEL, strategy, dictionary, ); this._buffer = Buffer.allocUnsafe(this._chunkSize); this._offset = 0; this._level = level; this._strategy = strategy; this.once("end", this.close); Object.defineProperty(this, "_closed", { get: function () { return !_this._handle; }, configurable: true, enumerable: true, }); } util.inherits(Zlib, Transform); Zlib.prototype.params = function (level, strategy, callback) { if (level < zlibConstants.Z_MIN_LEVEL || level > zlibConstants.Z_MAX_LEVEL) { throw new RangeError("Invalid compression level: " + level); } if ( strategy != zlibConstants.Z_FILTERED && strategy != zlibConstants.Z_HUFFMAN_ONLY && strategy != zlibConstants.Z_RLE && strategy != zlibConstants.Z_FIXED && strategy != zlibConstants.Z_DEFAULT_STRATEGY ) { throw new TypeError("Invalid strategy: " + strategy); } if (this._level !== level || this._strategy !== strategy) { var self = this; this.flush(binding.Z_SYNC_FLUSH, function () { assert(self._handle, "zlib binding closed"); self._handle.params(level, strategy); if (!self._hadError) { self._level = level; self._strategy = strategy; if (callback) callback(); } }); } else { nextTick(callback); } }; Zlib.prototype.reset = function () { assert(this._handle, "zlib binding closed"); return this._handle.reset(); }; // This is the _flush function called by the transform class, // internally, when the last chunk has been written. Zlib.prototype._flush = function (callback) { this._transform(Buffer.alloc(0), "", callback); }; Zlib.prototype.flush = function (kind, callback) { var _this2 = this; var ws = this._writableState; if (typeof kind === "function" || kind === undefined && !callback) { callback = kind; kind = binding.Z_FULL_FLUSH; } if (ws.ended) { if (callback) nextTick(callback); } else if (ws.ending) { if (callback) this.once("end", callback); } else if (ws.needDrain) { if (callback) { this.once("drain", function () { return _this2.flush(kind, callback); }); } } else { this._flushFlag = kind; this.write(Buffer.alloc(0), "", callback); } }; Zlib.prototype.close = function (callback) { _close(this, callback); nextTick(emitCloseNT, this); }; function _close(engine, callback) { if (callback) nextTick(callback); // Caller may invoke .close after a zlib error (which will null _handle). if (!engine._handle) return; engine._handle.close(); engine._handle = null; } function emitCloseNT(self) { self.emit("close"); } Zlib.prototype._transform = function (chunk, encoding, cb) { var flushFlag; var ws = this._writableState; var ending = ws.ending || ws.ended; var last = ending && (!chunk || ws.length === chunk.length); if (chunk !== null && !Buffer.isBuffer(chunk)) { return cb(new Error("invalid input")); } if (!this._handle) return cb(new Error("zlib binding closed")); // If it's the last chunk, or a final flush, we use the Z_FINISH flush flag // (or whatever flag was provided using opts.finishFlush). // If it's explicitly flushing at some other time, then we use // Z_FULL_FLUSH. Otherwise, use Z_NO_FLUSH for maximum compression // goodness. if (last) flushFlag = this._finishFlushFlag; else { flushFlag = this._flushFlag; // once we've flushed the last of the queue, stop flushing and // go back to the normal behavior. if (chunk.length >= ws.length) { this._flushFlag = this._opts.flush || binding.Z_NO_FLUSH; } } this._processChunk(chunk, flushFlag, cb); }; Zlib.prototype._processChunk = function (chunk, flushFlag, cb) { var availInBefore = chunk && chunk.length; var availOutBefore = this._chunkSize - this._offset; var inOff = 0; var self = this; var async = typeof cb === "function"; if (!async) { var buffers = []; var nread = 0; var error; this.on("error", function (er) { error = er; }); assert(this._handle, "zlib binding closed"); do { var res = this._handle.writeSync( flushFlag, chunk, // in inOff, // in_off availInBefore, // in_len this._buffer, // out this._offset, //out_off availOutBefore, ); // out_len } while (!this._hadError && callback(res[0], res[1])); if (this._hadError) { throw error; } if (nread >= kMaxLength) { _close(this); throw new RangeError(kRangeErrorMessage); } var buf = Buffer.concat(buffers, nread); _close(this); return buf; } assert(this._handle, "zlib binding closed"); var req = this._handle.write( flushFlag, chunk, // in inOff, // in_off availInBefore, // in_len this._buffer, // out this._offset, //out_off availOutBefore, ); // out_len req.buffer = chunk; req.callback = callback; function callback(availInAfter, availOutAfter) { // When the callback is used in an async write, the callback's // context is the `req` object that was created. The req object // is === this._handle, and that's why it's important to null // out the values after they are done being used. `this._handle` // can stay in memory longer than the callback and buffer are needed. if (this) { this.buffer = null; this.callback = null; } if (self._hadError) return; var have = availOutBefore - availOutAfter; assert(have >= 0, "have should not go down"); if (have > 0) { var out = self._buffer.slice(self._offset, self._offset + have); self._offset += have; // serve some output to the consumer. if (async) { self.push(out); } else { buffers.push(out); nread += out.length; } } // exhausted the output buffer, or used all the input create a new one. if (availOutAfter === 0 || self._offset >= self._chunkSize) { availOutBefore = self._chunkSize; self._offset = 0; self._buffer = Buffer.allocUnsafe(self._chunkSize); } if (availOutAfter === 0) { // Not actually done. Need to reprocess. // Also, update the availInBefore to the availInAfter value, // so that if we have to hit it a third (fourth, etc.) time, // it'll have the correct byte counts. inOff += availInBefore - availInAfter; availInBefore = availInAfter; if (!async) return true; var newReq = self._handle.write( flushFlag, chunk, inOff, availInBefore, self._buffer, self._offset, self._chunkSize, ); newReq.callback = callback; // this same function newReq.buffer = chunk; return; } if (!async) return false; // finished with the chunk. cb(); } }; util.inherits(Deflate, Zlib); util.inherits(Inflate, Zlib); util.inherits(Gzip, Zlib); util.inherits(Gunzip, Zlib); util.inherits(DeflateRaw, Zlib); util.inherits(InflateRaw, Zlib); util.inherits(Unzip, Zlib); export { Deflate, DeflateRaw, Gunzip, Gzip, Inflate, InflateRaw, Unzip }; QcbIext:deno_node/_zlib.mjsa bD`M`4 T`QLaCU T  I`P9Sb1 Y"´h?????????Ib C`(L` b]`/ ]`/b]`W: ]`]`"} ]`B ]`2" ]`]eL`WJ` L`JAK` L`AKAM` L`AMN` L`NAO` L`AOP` L`PR` L`R" ` L`" aG`  L`aGG`  L`GaH`  L`aHH`  L`HaI`  L`aII` L`IaJ` L`aJ"` L`"K` L`KAL` L`ALL` L`LM` L`MN` L`N` L`N` L`NO` L`OP` L`PQ` L`QQ` L`QaR` L`aRR` L`R L`  DYDcJQ,L`  D"{ "{ c D  c' D c D11c\l D"3"3cp D  c D± ± c"* D": c D"> c`&"{ a? a? a?": a?a?"a?± a?1a?"3a?" a?aGa ?aIa ?Ga ?Ia?Ha ?aHa ?aJa?"a?La?a?Na?Ka?ALa?aRa?Ra?Oa?Qa?Ma?Na?Pa?Qa?Ja?AOa?Na?AMa?AKa?Pa?Ra? b@ T I`eod&'@'(@(*@ .b@ T  I`b@ T I`K""b@# TI`|(cIK @PP@@´b @$ T I`a0;1b@. T I`Q1q1בb@/Lv+   T I`XJb@a# T I`JAOb@a$ T I`Nb @a% T I`pAMb@a& T I`AKb@ a' T I`&Pb@!a( T I`0Rb@"a)a BB 1 *XbbC‡CBCˆC"CC"CC"Cb‡Bˆ""" T aG`NnaGb @ T aI`aIb @ T G`Gb @ T I`2UIb @ T H`{Hb @ T aH`aHb @ T aJ`$aJb @ T "`8 "b @ T L`_ Lb @  T ` d b @  T N` Nb @  T K` Kb @  T AL` ALb @  T aR`* aRb @ T R` 3 Rb @ T O`V Ob @ T Q`eQb @ T M`(Mb @ T N`NNb @ T P`^Pb @ T Q`Qb @":   TQb Zlib.params`(8,b VX@ I b @' T Qb Zlib.reset`[,,Ib @) T Qb Zlib._flush`F--Ib @*  T Qb Zlib.flush`-/b ^_@I.b @+] T  Qb Zlib.close`0O0Ib @- T y`´Qb ._transform`1m5Ib @0 T`´`b`5Acmm@u @ ЀIb @1b  `D8h Ƃ%%%%% % % ei e% h     80 - ^88%!- ~ )- 3-3-3-3-3- 3"-$3&-(3*-,3.- t70-t72-t74-t76-t78- t7:-$t7<-(t7>-,t7@^B11 1  1  1 1 ! 1 " 1#1$1%1&1'1(1)1*1+1,1-1.1/10101-2D 03_F -4HĂ526J -4HĂ728L -4HĂ92:N -4HĂ;2R -4HĂ?!2@T -4HĂA"2BV0-2D0 _X0-2D0 _Z0-2D0 _\0-2D0 _^0-2D0 _`0-2D0 _b0-2D0 _dū,if* Ѐ&0P 0P 0P H H H @, , ,@@@ bAz¸ʸҸڸ &D>FNV^fnD"D2>JDZ*2fvDD`RD]DH Q // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { core } from "ext:core/mod.js"; import { op_brotli_compress, op_brotli_compress_async, op_brotli_compress_stream, op_brotli_compress_stream_end, op_brotli_decompress, op_brotli_decompress_async, op_brotli_decompress_stream, op_create_brotli_compress, op_create_brotli_decompress, } from "ext:core/ops"; import { zlib as constants } from "ext:deno_node/internal_binding/constants.ts"; import { TextEncoder } from "ext:deno_web/08_text_encoding.js"; import { Transform } from "node:stream"; import { Buffer } from "node:buffer"; const enc = new TextEncoder(); const toU8 = (input) => { if (typeof input === "string") { return enc.encode(input); } if (input.buffer) { return new Uint8Array(input.buffer); } return input; }; export function createBrotliCompress(options) { return new BrotliCompress(options); } export function createBrotliDecompress(options) { return new BrotliDecompress(options); } export class BrotliDecompress extends Transform { #context; // TODO(littledivy): use `options` argument constructor(_options = {}) { super({ // TODO(littledivy): use `encoding` argument transform(chunk, _encoding, callback) { const input = toU8(chunk); const output = new Uint8Array(chunk.byteLength); const avail = op_brotli_decompress_stream(context, input, output); this.push(output.slice(0, avail)); callback(); }, flush(callback) { core.close(context); callback(); }, }); this.#context = op_create_brotli_decompress(); const context = this.#context; } } export class BrotliCompress extends Transform { #context; constructor(options = {}) { super({ // TODO(littledivy): use `encoding` argument transform(chunk, _encoding, callback) { const input = toU8(chunk); const output = new Uint8Array(brotliMaxCompressedSize(input.length)); const written = op_brotli_compress_stream(context, input, output); if (written > 0) { this.push(output.slice(0, written)); } callback(); }, flush(callback) { const output = new Uint8Array(1024); let avail; while ((avail = op_brotli_compress_stream_end(context, output)) > 0) { this.push(output.slice(0, avail)); } core.close(context); callback(); }, }); const params = Object.values(options?.params ?? {}); this.#context = op_create_brotli_compress(params); const context = this.#context; } } function oneOffCompressOptions(options) { const quality = options?.params?.[constants.BROTLI_PARAM_QUALITY] ?? constants.BROTLI_DEFAULT_QUALITY; const lgwin = options?.params?.[constants.BROTLI_PARAM_LGWIN] ?? constants.BROTLI_DEFAULT_WINDOW; const mode = options?.params?.[constants.BROTLI_PARAM_MODE] ?? constants.BROTLI_MODE_GENERIC; return { quality, lgwin, mode, }; } function brotliMaxCompressedSize(input) { if (input == 0) return 2; // [window bits / empty metadata] + N * [uncompressed] + [last empty] const numLargeBlocks = input >> 24; const overhead = 2 + (4 * numLargeBlocks) + 3 + 1; const result = input + overhead; return result < input ? 0 : result; } export function brotliCompress( input, options, callback, ) { const buf = toU8(input); if (typeof options === "function") { callback = options; options = {}; } const { quality, lgwin, mode } = oneOffCompressOptions(options); op_brotli_compress_async(buf, quality, lgwin, mode) .then((result) => callback(null, Buffer.from(result))) .catch((err) => callback(err)); } export function brotliCompressSync( input, options, ) { const buf = toU8(input); const output = new Uint8Array(brotliMaxCompressedSize(buf.length)); const { quality, lgwin, mode } = oneOffCompressOptions(options); const len = op_brotli_compress(buf, output, quality, lgwin, mode); return Buffer.from(output.subarray(0, len)); } export function brotliDecompress(input) { const buf = toU8(input); return op_brotli_decompress_async(buf) .then((result) => callback(null, Buffer.from(result))) .catch((err) => callback(err)); } export function brotliDecompressSync(input) { return Buffer.from(op_brotli_decompress(toU8(input))); } Qcext:deno_node/_brotli.jsa bD``M` T`TLa3 T  I` [ QSb11 bc????Ib` L` bS]`B]`"} ]`(]`s/ ]`b]`]hL`X` L`XaY` L`aYS` L`SaT` L`aTU` L`UU` L`U!V` L`!VV` L`V]@L`  D"{ "{ c DBBc`k D  c Db> c D  c D  c D  c D  c!: D  c>[ D ! !c_s D % %cw D ) )c D - -c D 1 1c` a? a? a? a? a? !a? %a? )a? -a? 1a?ba?Ba? a?"{ a?!Va?Va?aYa?Xa?Sa?aTa?Ua?Ua?b@  T I`} bb @ XL` T I`!Vb@a T I`=rVb@c T I` #Sb@a  T I`G{aTb@a  T I`KUb@a  T I`qUb@a a B T 1 `1 bK$Sb @bpb?{  `T ``/ `/ `?  `  a{D] ` aj]bp  T I`c @ @aY~b Ճ T(` ]  ` Ka%  c5(SbqqaY`Da a b $Sb @bpb?   `T ``/ `/ `?  `  a D] ` aj] T I`^ c@@ Xb Ճ T(` ]  ں` Ka:  c5(SbqqX`DaB  a b  `D{8h %%%%ei h  0i%%  e%0  e+ 2 1  e%0e+2 1  a ,bAvFNDʺDֺ:VD^fDnD`RD]DH Qb// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // This module ports: // - https://github.com/nodejs/node/blob/master/src/node_symbols.cc // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials export const asyncIdSymbol = Symbol("asyncIdSymbol"); export const ownerSymbol = Symbol("ownerSymbol");  Qf)ext:deno_node/internal_binding/symbols.tsa bD` M` TL`V$La!Lba  "     `Dl h ei h  !b1!b1 @Sb1Ib`] L`" ` L`"  ` L` ]`" a? a? a@bAD`RD]DH aQ]cү// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // // Adapted from Node.js. Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. import { core } from "ext:core/mod.js"; export const { // isExternal, isAnyArrayBuffer, isArgumentsObject, isArrayBuffer, isAsyncFunction, isBigIntObject, isBooleanObject, isBoxedPrimitive, isDataView, isDate, isGeneratorFunction, isGeneratorObject, isMap, isMapIterator, isModuleNamespaceObject, isNativeError, isNumberObject, isPromise, isProxy, isRegExp, isSet, isSetIterator, isSharedArrayBuffer, isStringObject, isSymbolObject, isTypedArray, isWeakMap, isWeakSet } = core; Qe$'ext:deno_node/internal_binding/types.tsa bD` M` T`La !tL{ a  1223B44B55B66B77B88b99b::B;;<<"==">>"?  F`D h ei h  0-1-1-1-1- 1- 1- 1- 1- 1 -1 -1 -1 -1 -1-1-1- 1-"1-$1-&1-(1-*1-,1-.1-01-21-41 ySb1Ib` L` bS]`]ML`Q1` L`12` L`22` L`23` L`3B4` L`B44` L`4B5` L`B55` L`5B6`  L`B66`  L`6B7`  L`B77`  L`7B8`  L`B88` L`8b9` L`b99` L`9b:` L`b::` L`:B;` L`B;;` L`;<` L`<<` L`<"=` L`"==` L`=">` L`">>` L`>"?` L`"?] L`  D  c` a?1a?2a?2a?3a?B4a?4a?B5a?5a?B6a ?6a ?B7a ?7a ?B8a ?8a?b9a?9a?b:a?:a?B;a?;a?<a?<a?"=a?=a?">a?>a?"?a?e6PPPPPPPPP2bAD`RD]DH  Q 0// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file import { aggregateTwoErrors, ERR_MULTIPLE_CALLBACK, } from "ext:deno_node/internal/errors.ts"; import * as process from "ext:deno_node/_process/process.ts"; const kDestroy = Symbol("kDestroy"); const kConstruct = Symbol("kConstruct"); function checkError(err, w, r) { if (err) { // Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364 err.stack; // eslint-disable-line no-unused-expressions if (w && !w.errored) { w.errored = err; } if (r && !r.errored) { r.errored = err; } } } // Backwards compat. cb() is undocumented and unused in core but // unfortunately might be used by modules. function destroy(err, cb) { const r = this._readableState; const w = this._writableState; // With duplex streams we use the writable side for state. const s = w || r; if ((w && w.destroyed) || (r && r.destroyed)) { if (typeof cb === "function") { cb(); } return this; } // We set destroyed to true before firing error callbacks in order // to make it re-entrance safe in case destroy() is called within callbacks checkError(err, w, r); if (w) { w.destroyed = true; } if (r) { r.destroyed = true; } // If still constructing then defer calling _destroy. if (!s.constructed) { this.once(kDestroy, function (er) { _destroy(this, aggregateTwoErrors(er, err), cb); }); } else { _destroy(this, err, cb); } return this; } function _destroy(self, err, cb) { let called = false; function onDestroy(err) { if (called) { return; } called = true; const r = self._readableState; const w = self._writableState; checkError(err, w, r); if (w) { w.closed = true; } if (r) { r.closed = true; } if (typeof cb === "function") { cb(err); } if (err) { process.nextTick(emitErrorCloseNT, self, err); } else { process.nextTick(emitCloseNT, self); } } try { const result = self._destroy(err || null, onDestroy); if (result != null) { const then = result.then; if (typeof then === "function") { then.call( result, function () { process.nextTick(onDestroy, null); }, function (err) { process.nextTick(onDestroy, err); }, ); } } } catch (err) { onDestroy(err); } } function emitErrorCloseNT(self, err) { emitErrorNT(self, err); emitCloseNT(self); } function emitCloseNT(self) { const r = self._readableState; const w = self._writableState; if (w) { w.closeEmitted = true; } if (r) { r.closeEmitted = true; } if ((w && w.emitClose) || (r && r.emitClose)) { self.emit("close"); } } function emitErrorNT(self, err) { const r = self._readableState; const w = self._writableState; if ((w && w.errorEmitted) || (r && r.errorEmitted)) { return; } if (w) { w.errorEmitted = true; } if (r) { r.errorEmitted = true; } self.emit("error", err); } function undestroy() { const r = this._readableState; const w = this._writableState; if (r) { r.constructed = true; r.closed = false; r.closeEmitted = false; r.destroyed = false; r.errored = null; r.errorEmitted = false; r.reading = false; r.ended = false; r.endEmitted = false; } if (w) { w.constructed = true; w.destroyed = false; w.closed = false; w.closeEmitted = false; w.errored = null; w.errorEmitted = false; w.ended = false; w.ending = false; w.finalCalled = false; w.prefinished = false; w.finished = false; } } function errorOrDestroy(stream, err, sync) { // We have tests that rely on errors being emitted // in the same tick, so changing this is semver major. // For now when you opt-in to autoDestroy we allow // the error to be emitted nextTick. In a future // semver major update we should change the default to this. const r = stream._readableState; const w = stream._writableState; if ((w && w.destroyed) || (r && r.destroyed)) { return this; } if ((r && r.autoDestroy) || (w && w.autoDestroy)) { stream.destroy(err); } else if (err) { // Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364 err.stack; // eslint-disable-line no-unused-expressions if (w && !w.errored) { w.errored = err; } if (r && !r.errored) { r.errored = err; } if (sync) { process.nextTick(emitErrorNT, stream, err); } else { emitErrorNT(stream, err); } } } function construct(stream, cb) { if (typeof stream._construct !== "function") { return; } const r = stream._readableState; const w = stream._writableState; if (r) { r.constructed = false; } if (w) { w.constructed = false; } stream.once(kConstruct, cb); if (stream.listenerCount(kConstruct) > 1) { // Duplex return; } process.nextTick(constructNT, stream); } function constructNT(stream) { let called = false; function onConstruct(err) { if (called) { errorOrDestroy(stream, err ?? new ERR_MULTIPLE_CALLBACK()); return; } called = true; const r = stream._readableState; const w = stream._writableState; const s = w || r; if (r) { r.constructed = true; } if (w) { w.constructed = true; } if (s.destroyed) { stream.emit(kDestroy, err); } else if (err) { errorOrDestroy(stream, err, true); } else { process.nextTick(emitConstructNT, stream); } } try { const result = stream._construct(onConstruct); if (result != null) { const then = result.then; if (typeof then === "function") { then.call( result, function () { process.nextTick(onConstruct, null); }, function (err) { process.nextTick(onConstruct, err); }, ); } } } catch (err) { onConstruct(err); } } function emitConstructNT(stream) { stream.emit(kConstruct); } function isRequest(stream) { return stream && stream.setHeader && typeof stream.abort === "function"; } // Normalize destroy for legacy. function destroyer(stream, err) { if (!stream) return; if (isRequest(stream)) return stream.abort(); if (isRequest(stream.req)) return stream.req.abort(); if (typeof stream.destroy === "function") return stream.destroy(err); if (typeof stream.close === "function") return stream.close(); } export default { construct, destroyer, destroy, undestroy, errorOrDestroy, }; export { construct, destroy, destroyer, errorOrDestroy, undestroy };  Qf6'*ext:deno_node/internal/streams/destroy.mjsa bD`\M` T`\Laa T  I`aSb1 * aeaB !!j???????????Ib`L`  ]`A]`.]PL`` L`` L` ` L` A` L`A!` L`!` L` L`  D* Dc!(L` D  c DIIc`Ia? a? a?a?!a?a?Aa?a?b@ T I`z( d @@@B b@ T  I`C !וb@ T I` וb@  T I` !ؕb@  TI`tgd)-@//@/0@ ٕb@ T I`ڕb@ T I`b@HL` TI`Xgb @  b@a T I` ؕb@ a  T I`*!ٕb@ a  T I`^b@ a  T I`HaAܕb@b a  ae8b CAC CC!CA !  `Dz h %%%%%% % % % %  ei e% h   !  b%! b%~)0303 03 03 03 1 b @bADJDV^fnDzD`RD]DH  Q {// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file const kIsDisturbed = Symbol("kIsDisturbed"); function isReadableNodeStream(obj) { return !!( obj && typeof obj.pipe === "function" && typeof obj.on === "function" && (!obj._writableState || obj._readableState?.readable !== false) && // Duplex (!obj._writableState || obj._readableState) // Writable has .pipe. ); } function isWritableNodeStream(obj) { return !!( obj && typeof obj.write === "function" && typeof obj.on === "function" && (!obj._readableState || obj._writableState?.writable !== false) // Duplex ); } function isDuplexNodeStream(obj) { return !!( obj && (typeof obj.pipe === "function" && obj._readableState) && typeof obj.on === "function" && typeof obj.write === "function" ); } function isNodeStream(obj) { return ( obj && ( obj._readableState || obj._writableState || (typeof obj.write === "function" && typeof obj.on === "function") || (typeof obj.pipe === "function" && typeof obj.on === "function") ) ); } function isDestroyed(stream) { if (!isNodeStream(stream)) return null; const wState = stream._writableState; const rState = stream._readableState; const state = wState || rState; return !!(stream.destroyed || state?.destroyed); } // Have been end():d. function isWritableEnded(stream) { if (!isWritableNodeStream(stream)) return null; if (stream.writableEnded === true) return true; const wState = stream._writableState; if (wState?.errored) return false; if (typeof wState?.ended !== "boolean") return null; return wState.ended; } // Have emitted 'finish'. function isWritableFinished(stream, strict) { if (!isWritableNodeStream(stream)) return null; if (stream.writableFinished === true) return true; const wState = stream._writableState; if (wState?.errored) return false; if (typeof wState?.finished !== "boolean") return null; return !!( wState.finished || (strict === false && wState.ended === true && wState.length === 0) ); } // Have been push(null):d. function isReadableEnded(stream) { if (!isReadableNodeStream(stream)) return null; if (stream.readableEnded === true) return true; const rState = stream._readableState; if (!rState || rState.errored) return false; if (typeof rState?.ended !== "boolean") return null; return rState.ended; } // Have emitted 'end'. function isReadableFinished(stream, strict) { if (!isReadableNodeStream(stream)) return null; const rState = stream._readableState; if (rState?.errored) return false; if (typeof rState?.endEmitted !== "boolean") return null; return !!( rState.endEmitted || (strict === false && rState.ended === true && rState.length === 0) ); } function isDisturbed(stream) { return !!(stream && ( stream.readableDidRead || stream.readableAborted || stream[kIsDisturbed] )); } function isReadable(stream) { const r = isReadableNodeStream(stream); if (r === null || typeof stream?.readable !== "boolean") return null; if (isDestroyed(stream)) return false; return r && stream.readable && !isReadableFinished(stream); } function isWritable(stream) { const r = isWritableNodeStream(stream); if (r === null || typeof stream?.writable !== "boolean") return null; if (isDestroyed(stream)) return false; return r && stream.writable && !isWritableEnded(stream); } function isFinished(stream, opts) { if (!isNodeStream(stream)) { return null; } if (isDestroyed(stream)) { return true; } if (opts?.readable !== false && isReadable(stream)) { return false; } if (opts?.writable !== false && isWritable(stream)) { return false; } return true; } function isClosed(stream) { if (!isNodeStream(stream)) { return null; } const wState = stream._writableState; const rState = stream._readableState; if ( typeof wState?.closed === "boolean" || typeof rState?.closed === "boolean" ) { return wState?.closed || rState?.closed; } if (typeof stream._closed === "boolean" && isOutgoingMessage(stream)) { return stream._closed; } return null; } function isOutgoingMessage(stream) { return ( typeof stream._closed === "boolean" && typeof stream._defaultKeepAlive === "boolean" && typeof stream._removedConnection === "boolean" && typeof stream._removedContLen === "boolean" ); } function isServerResponse(stream) { return ( typeof stream._sent100 === "boolean" && isOutgoingMessage(stream) ); } function isServerRequest(stream) { return ( typeof stream._consuming === "boolean" && typeof stream._dumped === "boolean" && stream.req?.upgradeOrConnect === undefined ); } function willEmitClose(stream) { if (!isNodeStream(stream)) return null; const wState = stream._writableState; const rState = stream._readableState; const state = wState || rState; return (!state && isServerResponse(stream)) || !!( state && state.autoDestroy && state.emitClose && state.closed === false ); } export default { isDisturbed, kIsDisturbed, isClosed, isDestroyed, isDuplexNodeStream, isFinished, isReadable, isReadableNodeStream, isReadableEnded, isReadableFinished, isNodeStream, isWritable, isWritableNodeStream, isWritableEnded, isWritableFinished, isServerRequest, isServerResponse, willEmitClose, }; export { isClosed, isDestroyed, isDisturbed, isDuplexNodeStream, isFinished, isNodeStream, isReadable, isReadableEnded, isReadableFinished, isReadableNodeStream, isServerRequest, isServerResponse, isWritable, isWritableEnded, isWritableFinished, isWritableNodeStream, kIsDisturbed, willEmitClose, }; Qec(ext:deno_node/internal/streams/utils.mjsa bD`TM` T`lLa' T  I`aSb1a`?Ib`]L`9` L`` L`A` L`A` L`` L`` L`A` L`A` L``  L`!`  L`!!`  L`!`  L``  L`A` L`A` L`` L`a` L`a` L`` L`]`a?!a ?aa?a?Aa?Aa?a?a?a ?!a ?a?a?Aa?a?a?a ?a ?a?a?Ƽb@La5 T I`!b@a  T I`$ab@a T I`b@a T I`Ab@a T I`Ab@a T I`b@a T I` b@a T I` b@a  T I` Q !b@ a  T I`g b@ a  T I` b@ a  T I` Ab@ a  T I` b@ a  T I`&b@a T I`Bb@a  T I`\b@a  T I`Tb@ba  b$CCCACCCC!CC!CACACaCCCCCCA!!AAa  ڼ`D| h Ƃ%ei h  !b1~)030303 03 03 03 03 0 30 30 30303030303!0 3#0 3%03' 1 d)0bAFNV^fnv~ƽD`RD]DH Qfl5*// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // This file is vendored from std/fmt/colors.ts import { primordials } from "ext:core/mod.js"; const { ArrayPrototypeJoin, MathMax, MathMin, MathTrunc, SafeRegExp, StringPrototypeReplace } = primordials; // TODO(kt3k): Initialize this at the start of runtime // based on Deno.noColor const noColor = false; let enabled = !noColor; /** * Set changing text color to enabled or disabled * @param value */ export function setColorEnabled(value) { if (noColor) { return; } enabled = value; } /** Get whether text color change is enabled or disabled. */ export function getColorEnabled() { return enabled; } /** * Builds color code * @param open * @param close */ function code(open, close) { return { open: `\x1b[${ArrayPrototypeJoin(open, ";")}m`, close: `\x1b[${close}m`, regexp: new SafeRegExp(`\\x1b\\[${close}m`, "g") }; } /** * Applies color and background based on color code and its associated text * @param str text to apply color settings to * @param code color code to apply */ function run(str, code) { return enabled ? `${code.open}${StringPrototypeReplace(str, code.regexp, code.open)}${code.close}` : str; } /** * Reset the text modified * @param str text to reset */ export function reset(str) { return run(str, code([ 0 ], 0)); } /** * Make the text bold. * @param str text to make bold */ export function bold(str) { return run(str, code([ 1 ], 22)); } /** * The text emits only a small amount of light. * @param str text to dim */ export function dim(str) { return run(str, code([ 2 ], 22)); } /** * Make the text italic. * @param str text to make italic */ export function italic(str) { return run(str, code([ 3 ], 23)); } /** * Make the text underline. * @param str text to underline */ export function underline(str) { return run(str, code([ 4 ], 24)); } /** * Invert background color and text color. * @param str text to invert its color */ export function inverse(str) { return run(str, code([ 7 ], 27)); } /** * Make the text hidden. * @param str text to hide */ export function hidden(str) { return run(str, code([ 8 ], 28)); } /** * Put horizontal line through the center of the text. * @param str text to strike through */ export function strikethrough(str) { return run(str, code([ 9 ], 29)); } /** * Set text color to black. * @param str text to make black */ export function black(str) { return run(str, code([ 30 ], 39)); } /** * Set text color to red. * @param str text to make red */ export function red(str) { return run(str, code([ 31 ], 39)); } /** * Set text color to green. * @param str text to make green */ export function green(str) { return run(str, code([ 32 ], 39)); } /** * Set text color to yellow. * @param str text to make yellow */ export function yellow(str) { return run(str, code([ 33 ], 39)); } /** * Set text color to blue. * @param str text to make blue */ export function blue(str) { return run(str, code([ 34 ], 39)); } /** * Set text color to magenta. * @param str text to make magenta */ export function magenta(str) { return run(str, code([ 35 ], 39)); } /** * Set text color to cyan. * @param str text to make cyan */ export function cyan(str) { return run(str, code([ 36 ], 39)); } /** * Set text color to white. * @param str text to make white */ export function white(str) { return run(str, code([ 37 ], 39)); } /** * Set text color to gray. * @param str text to make gray */ export function gray(str) { return brightBlack(str); } /** * Set text color to bright black. * @param str text to make bright-black */ export function brightBlack(str) { return run(str, code([ 90 ], 39)); } /** * Set text color to bright red. * @param str text to make bright-red */ export function brightRed(str) { return run(str, code([ 91 ], 39)); } /** * Set text color to bright green. * @param str text to make bright-green */ export function brightGreen(str) { return run(str, code([ 92 ], 39)); } /** * Set text color to bright yellow. * @param str text to make bright-yellow */ export function brightYellow(str) { return run(str, code([ 93 ], 39)); } /** * Set text color to bright blue. * @param str text to make bright-blue */ export function brightBlue(str) { return run(str, code([ 94 ], 39)); } /** * Set text color to bright magenta. * @param str text to make bright-magenta */ export function brightMagenta(str) { return run(str, code([ 95 ], 39)); } /** * Set text color to bright cyan. * @param str text to make bright-cyan */ export function brightCyan(str) { return run(str, code([ 96 ], 39)); } /** * Set text color to bright white. * @param str text to make bright-white */ export function brightWhite(str) { return run(str, code([ 97 ], 39)); } /** * Set background color to black. * @param str text to make its background black */ export function bgBlack(str) { return run(str, code([ 40 ], 49)); } /** * Set background color to red. * @param str text to make its background red */ export function bgRed(str) { return run(str, code([ 41 ], 49)); } /** * Set background color to green. * @param str text to make its background green */ export function bgGreen(str) { return run(str, code([ 42 ], 49)); } /** * Set background color to yellow. * @param str text to make its background yellow */ export function bgYellow(str) { return run(str, code([ 43 ], 49)); } /** * Set background color to blue. * @param str text to make its background blue */ export function bgBlue(str) { return run(str, code([ 44 ], 49)); } /** * Set background color to magenta. * @param str text to make its background magenta */ export function bgMagenta(str) { return run(str, code([ 45 ], 49)); } /** * Set background color to cyan. * @param str text to make its background cyan */ export function bgCyan(str) { return run(str, code([ 46 ], 49)); } /** * Set background color to white. * @param str text to make its background white */ export function bgWhite(str) { return run(str, code([ 47 ], 49)); } /** * Set background color to bright black. * @param str text to make its background bright-black */ export function bgBrightBlack(str) { return run(str, code([ 100 ], 49)); } /** * Set background color to bright red. * @param str text to make its background bright-red */ export function bgBrightRed(str) { return run(str, code([ 101 ], 49)); } /** * Set background color to bright green. * @param str text to make its background bright-green */ export function bgBrightGreen(str) { return run(str, code([ 102 ], 49)); } /** * Set background color to bright yellow. * @param str text to make its background bright-yellow */ export function bgBrightYellow(str) { return run(str, code([ 103 ], 49)); } /** * Set background color to bright blue. * @param str text to make its background bright-blue */ export function bgBrightBlue(str) { return run(str, code([ 104 ], 49)); } /** * Set background color to bright magenta. * @param str text to make its background bright-magenta */ export function bgBrightMagenta(str) { return run(str, code([ 105 ], 49)); } /** * Set background color to bright cyan. * @param str text to make its background bright-cyan */ export function bgBrightCyan(str) { return run(str, code([ 106 ], 49)); } /** * Set background color to bright white. * @param str text to make its background bright-white */ export function bgBrightWhite(str) { return run(str, code([ 107 ], 49)); } /* Special Color Sequences */ /** * Clam and truncate color codes * @param n * @param max number to truncate to * @param min number to truncate from */ function clampAndTruncate(n, max = 255, min = 0) { return MathTrunc(MathMax(MathMin(n, max), min)); } /** * Set text color using paletted 8bit colors. * https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit * @param str text color to apply paletted 8bit colors to * @param color code */ export function rgb8(str, color) { return run(str, code([ 38, 5, clampAndTruncate(color) ], 39)); } /** * Set background color using paletted 8bit colors. * https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit * @param str text color to apply paletted 8bit background colors to * @param color code */ export function bgRgb8(str, color) { return run(str, code([ 48, 5, clampAndTruncate(color) ], 49)); } /** * Set text color using 24bit rgb. * `color` can be a number in range `0x000000` to `0xffffff` or * an `Rgb`. * * To produce the color magenta: * * ```ts * import { rgb24 } from "https://deno.land/std@$STD_VERSION/fmt/colors.ts"; * rgb24("foo", 0xff00ff); * rgb24("foo", {r: 255, g: 0, b: 255}); * ``` * @param str text color to apply 24bit rgb to * @param color code */ export function rgb24(str, color) { if (typeof color === "number") { return run(str, code([ 38, 2, color >> 16 & 0xff, color >> 8 & 0xff, color & 0xff ], 39)); } return run(str, code([ 38, 2, clampAndTruncate(color.r), clampAndTruncate(color.g), clampAndTruncate(color.b) ], 39)); } /** * Set background color using 24bit rgb. * `color` can be a number in range `0x000000` to `0xffffff` or * an `Rgb`. * * To produce the color magenta: * * ```ts * import { bgRgb24 } from "https://deno.land/std@$STD_VERSION/fmt/colors.ts"; * bgRgb24("foo", 0xff00ff); * bgRgb24("foo", {r: 255, g: 0, b: 255}); * ``` * @param str text color to apply 24bit rgb to * @param color code */ export function bgRgb24(str, color) { if (typeof color === "number") { return run(str, code([ 48, 2, color >> 16 & 0xff, color >> 8 & 0xff, color & 0xff ], 49)); } return run(str, code([ 48, 2, clampAndTruncate(color.r), clampAndTruncate(color.g), clampAndTruncate(color.b) ], 49)); } // https://github.com/chalk/ansi-regex/blob/02fa893d619d3da85411acc8fd4e2eea0e95a9d9/index.js const ANSI_PATTERN = new SafeRegExp(ArrayPrototypeJoin([ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))" ], "|"), "g"); /** * Remove ANSI escape codes from the string. * @param string to remove ANSI escape codes from */ export function stripColor(string) { return StringPrototypeReplace(string, ANSI_PATTERN, ""); } Qey%ext:deno_node/_util/std_fmt_colors.tsa bD`M`4 T`LLaN T  I`qSb1 !aB%`¢" BBk????????????Ib*` L` bS]`]IL`` L`b` L`bB` L`BB` L`BB` L`BB` L`B` L`` L``  L``  L`B`  L`B`  L`±`  L`±B` L`B` L`"` L`"` L`` L`®` L`®"` L`"BI` L`BIB` L`BB` L`BB` L`BB` L`B` L`¿` L`¿` L`` L`¥` L`¥B` L`B¾`  L`¾`! L``" L`b`# L`b`$ L``% L``& L`b`' L`b`( L``) L``* L`B`+ L`B­`, L`­D`- L`D"`. L`"`/ L`"`0 L`"] L`  Dc`1a?Ba+?¾a ?a(?BIa?Ba?a%?"a.?a$?ba#?­a,?®a?ba'?a"?"a0?"a?a&?¥a?a/?a!?Ba?¿a?Ba?a?Ba?a?Ba?a?a?Ba?a ?a?ba?±a ?Ba ?a?Ba?a?Ba?a ?Ba?a?Ba?a ?a*?"a?a)?a?Da-?ڽb @  T I`V b @! T I`6Bb@."IL` T I`>Bb@a+ T I`¾b@a  T I`&Xb@a( T I`BIb @a T I`ExBb @a T I`b@a% T I`c"b@ a . T I`;b@ a $ T I`bb@ a # T I`C v ­b@ a , T I`  ®b@ a  T I`Z bb @a' T I`  b@a" T I`{ "b@a0 T I` ; "b @a T I` b@a& T I`( \ ¥b @a T I` b@a/ T I`Cgb @a! T I` Bb@a T I`s¿b@a T I`JBb@a T I`b@a T I`\Bb@a T I`9b@a T I`Bb@ a T I`H|b@ a T I`"b@ a T I`Bb@ a T I`4hb@ a  T I`b@!a! T I`bb@"a" T I`-a±b@#a#  T I`Bb@$a$  T I`vb@%a% T I`0eBb@&a& T I`b@'a' T I`Bb@(a( T I`^b@)a)  T I`KBb@*a* T I` b@+a+ T I`Bb@,a, T I`Jb@-a-  T I`V b @/a.* T I`!!"b@0a/ T I`#$b@1a0) T I`&'b@2a1 T I`)*Db@3a2-a !aB%`  `M`1*  `Dy0h %%%%%%% % % % % %ei h  0-%- %- %- %- %- %%  T% { %c  i% b3PPbAھ&.6>FNV^fnv~ƿοֿ޿&.6>FNV^fD`RD]DH QƋ]X/// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // This file was vendored from std/testing/_diff.ts import { primordials } from "ext:core/mod.js"; const { ArrayFrom, ArrayPrototypeFilter, ArrayPrototypeForEach, ArrayPrototypeJoin, ArrayPrototypeMap, ArrayPrototypePop, ArrayPrototypePush, ArrayPrototypePushApply, ArrayPrototypeReverse, ArrayPrototypeShift, ArrayPrototypeSlice, ArrayPrototypeSome, ArrayPrototypeSplice, ArrayPrototypeUnshift, MathMin, ObjectFreeze, SafeArrayIterator, SafeRegExp, StringPrototypeReplace, StringPrototypeSplit, StringPrototypeTrim, Uint32Array } = primordials; import { bgGreen, bgRed, bold, gray, green, red, white } from "ext:deno_node/_util/std_fmt_colors.ts"; export var DiffType; (function(DiffType) { DiffType["removed"] = "removed"; DiffType["common"] = "common"; DiffType["added"] = "added"; })(DiffType || (DiffType = {})); const REMOVED = 1; const COMMON = 2; const ADDED = 3; function createCommon(A, B, reverse) { const common = []; if (A.length === 0 || B.length === 0) return []; for(let i = 0; i < MathMin(A.length, B.length); i += 1){ if (A[reverse ? A.length - i - 1 : i] === B[reverse ? B.length - i - 1 : i]) { ArrayPrototypePush(common, A[reverse ? A.length - i - 1 : i]); } else { return common; } } return common; } /** * Renders the differences between the actual and expected values * @param A Actual value * @param B Expected value */ export function diff(A, B) { const prefixCommon = createCommon(A, B); const suffixCommon = ArrayPrototypeReverse(createCommon(ArrayPrototypeSlice(A, prefixCommon.length), ArrayPrototypeSlice(B, prefixCommon.length), true)); A = suffixCommon.length ? ArrayPrototypeSlice(A, prefixCommon.length, -suffixCommon.length) : ArrayPrototypeSlice(A, prefixCommon.length); B = suffixCommon.length ? ArrayPrototypeSlice(B, prefixCommon.length, -suffixCommon.length) : ArrayPrototypeSlice(B, prefixCommon.length); const swapped = B.length > A.length; if (swapped) { const temp = A; A = B; B = temp; } const M = A.length; const N = B.length; if (M === 0 && N === 0 && suffixCommon.length === 0 && prefixCommon.length === 0) return []; if (N === 0) { return [ ...new SafeArrayIterator(ArrayPrototypeMap(prefixCommon, (c)=>({ type: DiffType.common, value: c }))), ...new SafeArrayIterator(ArrayPrototypeMap(A, (a)=>({ type: swapped ? DiffType.added : DiffType.removed, value: a }))), ...new SafeArrayIterator(ArrayPrototypeMap(suffixCommon, (c)=>({ type: DiffType.common, value: c }))) ]; } const offset = N; const delta = M - N; const size = M + N + 1; const fp = ArrayFrom({ length: size }, ()=>({ y: -1, id: -1 })); /** * INFO: * This buffer is used to save memory and improve performance. * The first half is used to save route and last half is used to save diff * type. * This is because, when I kept new uint8array area to save type,performance * worsened. */ const routes = new Uint32Array((M * N + size + 1) * 2); const diffTypesPtrOffset = routes.length / 2; let ptr = 0; let p = -1; function backTrace(A, B, current, swapped) { const M = A.length; const N = B.length; const result = []; let a = M - 1; let b = N - 1; let j = routes[current.id]; let type = routes[current.id + diffTypesPtrOffset]; while(true){ if (!j && !type) break; const prev = j; if (type === REMOVED) { ArrayPrototypeUnshift(result, { type: swapped ? DiffType.removed : DiffType.added, value: B[b] }); b -= 1; } else if (type === ADDED) { ArrayPrototypeUnshift(result, { type: swapped ? DiffType.added : DiffType.removed, value: A[a] }); a -= 1; } else { ArrayPrototypeUnshift(result, { type: DiffType.common, value: A[a] }); a -= 1; b -= 1; } j = routes[prev]; type = routes[prev + diffTypesPtrOffset]; } return result; } function createFP(slide, down, k, M) { if (slide && slide.y === -1 && down && down.y === -1) { return { y: 0, id: 0 }; } if (down && down.y === -1 || k === M || (slide && slide.y) > (down && down.y) + 1) { const prev = slide.id; ptr++; routes[ptr] = prev; routes[ptr + diffTypesPtrOffset] = ADDED; return { y: slide.y, id: ptr }; } else { const prev = down.id; ptr++; routes[ptr] = prev; routes[ptr + diffTypesPtrOffset] = REMOVED; return { y: down.y + 1, id: ptr }; } } function snake(k, slide, down, _offset, A, B) { const M = A.length; const N = B.length; if (k < -N || M < k) return { y: -1, id: -1 }; const fp = createFP(slide, down, k, M); while(fp.y + k < M && fp.y < N && A[fp.y + k] === B[fp.y]){ const prev = fp.id; ptr++; fp.id = ptr; fp.y += 1; routes[ptr] = prev; routes[ptr + diffTypesPtrOffset] = COMMON; } return fp; } while(fp[delta + offset].y < N){ p = p + 1; for(let k = -p; k < delta; ++k){ fp[k + offset] = snake(k, fp[k - 1 + offset], fp[k + 1 + offset], offset, A, B); } for(let k = delta + p; k > delta; --k){ fp[k + offset] = snake(k, fp[k - 1 + offset], fp[k + 1 + offset], offset, A, B); } fp[delta + offset] = snake(delta, fp[delta - 1 + offset], fp[delta + 1 + offset], offset, A, B); } return [ ...new SafeArrayIterator(ArrayPrototypeMap(prefixCommon, (c)=>({ type: DiffType.common, value: c }))), ...new SafeArrayIterator(backTrace(A, B, fp[delta + offset], swapped)), ...new SafeArrayIterator(ArrayPrototypeMap(suffixCommon, (c)=>({ type: DiffType.common, value: c }))) ]; } const ESCAPE_PATTERN = new SafeRegExp(/([\b\f\t\v])/g); const ESCAPE_MAP = ObjectFreeze({ "\b": "\\b", "\f": "\\f", "\t": "\\t", "\v": "\\v" }); const LINE_BREAK_GLOBAL_PATTERN = new SafeRegExp(/\r\n|\r|\n/g); const LINE_BREAK_PATTERN = new SafeRegExp(/(\n|\r\n)/); const WHITESPACE_PATTERN = new SafeRegExp(/\s+/); const WHITESPACE_SYMBOL_PATTERN = new SafeRegExp(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/); const LATIN_CHARACTER_PATTERN = new SafeRegExp(/^[a-zA-Z\u{C0}-\u{FF}\u{D8}-\u{F6}\u{F8}-\u{2C6}\u{2C8}-\u{2D7}\u{2DE}-\u{2FF}\u{1E00}-\u{1EFF}]+$/u); /** * Renders the differences between the actual and expected strings * Partially inspired from https://github.com/kpdecker/jsdiff * @param A Actual string * @param B Expected string */ export function diffstr(A, B) { function unescape(string) { // unescape invisible characters. // ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences return StringPrototypeReplace(StringPrototypeReplace(string, ESCAPE_PATTERN, (c)=>ESCAPE_MAP[c]), LINE_BREAK_GLOBAL_PATTERN, (str)=>str === "\r" ? "\\r" : str === "\n" ? "\\n\n" : "\\r\\n\r\n"); } function tokenize(string, { wordDiff = false } = {}) { if (wordDiff) { // Split string on whitespace symbols const tokens = StringPrototypeSplit(string, WHITESPACE_SYMBOL_PATTERN); // Join boundary splits that we do not consider to be boundaries and merge empty strings surrounded by word chars for(let i = 0; i < tokens.length - 1; i++){ if (!tokens[i + 1] && tokens[i + 2] && LATIN_CHARACTER_PATTERN.test(tokens[i]) && LATIN_CHARACTER_PATTERN.test(tokens[i + 2])) { tokens[i] += tokens[i + 2]; ArrayPrototypeSplice(tokens, i + 1, 2); i--; } } return ArrayPrototypeFilter(tokens, (token)=>token); } else { // Split string on new lines symbols const tokens = [], lines = StringPrototypeSplit(string, LINE_BREAK_PATTERN); // Ignore final empty token when text ends with a newline if (lines[lines.length - 1] === "") { ArrayPrototypePop(lines); } // Merge the content and line separators into single tokens for(let i = 0; i < lines.length; i++){ if (i % 2) { tokens[tokens.length - 1] += lines[i]; } else { ArrayPrototypePush(tokens, lines[i]); } } return tokens; } } // Create details by filtering relevant word-diff for current line // and merge "space-diff" if surrounded by word-diff for cleaner displays function createDetails(line, tokens) { return ArrayPrototypeMap(ArrayPrototypeFilter(tokens, ({ type })=>type === line.type || type === DiffType.common), (result, i, t)=>{ if (result.type === DiffType.common && t[i - 1] && t[i - 1]?.type === t[i + 1]?.type && WHITESPACE_PATTERN.test(result.value)) { return { ...result, type: t[i - 1].type }; } return result; }); } // Compute multi-line diff const diffResult = diff(tokenize(`${unescape(A)}\n`), tokenize(`${unescape(B)}\n`)); const added = [], removed = []; for(let i = 0; i < diffResult.length; ++i){ const result = diffResult[i]; if (result.type === DiffType.added) { ArrayPrototypePush(added, result); } if (result.type === DiffType.removed) { ArrayPrototypePush(removed, result); } } // Compute word-diff const aLines = added.length < removed.length ? added : removed; const bLines = aLines === removed ? added : removed; for(let i = 0; i < aLines.length; ++i){ const a = aLines[i]; let tokens = [], b; // Search another diff line with at least one common token while(bLines.length !== 0){ b = ArrayPrototypeShift(bLines); tokens = diff(tokenize(a.value, { wordDiff: true }), tokenize(b?.value ?? "", { wordDiff: true })); if (ArrayPrototypeSome(tokens, ({ type, value })=>type === DiffType.common && StringPrototypeTrim(value).length)) { break; } } // Register word-diff details a.details = createDetails(a, tokens); if (b) { b.details = createDetails(b, tokens); } } return diffResult; } /** * Colors the output of assertion diffs * @param diffType Difference type, either added or removed */ function createColor(diffType, { background = false } = {}) { // TODO(@littledivy): Remove this when we can detect // true color terminals. // https://github.com/denoland/deno_std/issues/2575 background = false; switch(diffType){ case DiffType.added: return (s)=>background ? bgGreen(white(s)) : green(bold(s)); case DiffType.removed: return (s)=>background ? bgRed(white(s)) : red(bold(s)); default: return white; } } /** * Prefixes `+` or `-` in diff output * @param diffType Difference type, either added or removed */ function createSign(diffType) { switch(diffType){ case DiffType.added: return "+ "; case DiffType.removed: return "- "; default: return " "; } } export function buildMessage(diffResult, { stringDiff = false } = {}) { const messages = [], diffMessages = []; ArrayPrototypePush(messages, ""); ArrayPrototypePush(messages, ""); ArrayPrototypePush(messages, ` ${gray(bold("[Diff]"))} ${red(bold("Actual"))} / ${green(bold("Expected"))}`); ArrayPrototypePush(messages, ""); ArrayPrototypePush(messages, ""); ArrayPrototypeForEach(diffResult, (result)=>{ const c = createColor(result.type); const line = result.details != null ? ArrayPrototypeJoin(ArrayPrototypeMap(result.details, (detail)=>detail.type !== DiffType.common ? createColor(detail.type, { background: true })(detail.value) : detail.value), "") : result.value; ArrayPrototypePush(diffMessages, c(`${createSign(result.type)}${line}`)); }); ArrayPrototypePushApply(messages, stringDiff ? [ ArrayPrototypeJoin(diffMessages, "") ] : diffMessages); ArrayPrototypePush(messages, ""); return messages; } Qe̩'ext:deno_node/_util/std_testing_diff.tsa bD`M` T`La& T  I`9BSb1!aUf!^A!__a`aAica`"djE "BBQBR"b"b ?????????????????????????????????IbX/`L` bS]`E]`]8L` ` L`"b` L`"b"` L`"b` L`b](L`  Dcv} DBBc DBIBIc Dc Dc Dc Dbbc Dc` a?a?Ba?BIa?a?a?ba?a?a?"a?ba?"ba?~b@' T I`(m*b@( T I`*+b b@),L`  T I` f- @ %@%)@+H@@"b @$a TI`4(e'58@8B@CF @@@bb@ %a T  I`+W/"bb@&aa aUf!^A!__a`aAica%`"djE  T,`L`b"  &`Dd222(SbqAI`Dac a ,~b@*0bb"bRB `D0h %%%%%%% % % % % %%%%%%%%%%%%%%%%%%% %!%"%#ei h  0-%- %- %- %- %- %- % -% -% -% -% -%-%-%-%-- %-"-$%-&%-(%-*%01b, % % %z. i/%~ 1)b2%z!4 i5%z"7 i8%z#: i;%z$= i>% z%@ iA%!  fCPPPPPPP0 `0 `0 `0 bA#"DDDDD`RD]DH QRk// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { Encodings } from "ext:deno_node/internal_binding/_node.ts"; const encodings = []; encodings[Encodings.ASCII] = "ascii"; encodings[Encodings.BASE64] = "base64"; encodings[Encodings.BASE64URL] = "base64url"; encodings[Encodings.BUFFER] = "buffer"; encodings[Encodings.HEX] = "hex"; encodings[Encodings.LATIN1] = "latin1"; encodings[Encodings.UCS2] = "utf16le"; encodings[Encodings.UTF8] = "utf8"; export default { encodings }; export { encodings };  Qf6P0ext:deno_node/internal_binding/string_decoder.tsa bD` M` T`dLa!Lba "B?bIy "bŒ b"C"  Z`D(h ei h  }100-400-400-  4 00-  400- 400-400-400-4~!)03" 1 LSb1Ib` L` B]`e] L`` L`"` L`"] L`  DcT]`a?"a?a?c$   FbA+D`RD]DH QPIO// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { Encodings } from "ext:deno_node/internal_binding/_node.ts"; export function indexOfNeedle(source, needle, start = 0) { if (start >= source.length) { return -1; } if (start < 0) { start = Math.max(0, source.length + start); } const s = needle[0]; for(let i = start; i < source.length; i++){ if (source[i] !== s) continue; const pin = i; let matched = 1; let j = i; while(matched < needle.length){ j++; if (source[j] !== needle[j - pin]) { break; } matched++; } if (matched === needle.length) { return pin; } } return -1; } export function numberToBytes(n) { if (n === 0) return new Uint8Array([ 0 ]); const bytes = []; bytes.unshift(n & 255); while(n >= 256){ n = n >>> 8; bytes.unshift(n & 255); } return new Uint8Array(bytes); } // TODO(Soremwar) // Check if offset or buffer can be transform in order to just use std's lastIndexOf directly // This implementation differs from std's lastIndexOf in the fact that // it also includes items outside of the offset as long as part of the // set is contained inside of the offset // Probably way slower too function findLastIndex(targetBuffer, buffer, offset) { offset = offset > targetBuffer.length ? targetBuffer.length : offset; const searchableBuffer = targetBuffer.slice(0, offset + buffer.length); const searchableBufferLastIndex = searchableBuffer.length - 1; const bufferLastIndex = buffer.length - 1; // Important to keep track of the last match index in order to backtrack after an incomplete match // Not doing this will cause the search to skip all possible matches that happened in the // last match range let lastMatchIndex = -1; let matches = 0; let index = -1; for(let x = 0; x <= searchableBufferLastIndex; x++){ if (searchableBuffer[searchableBufferLastIndex - x] === buffer[bufferLastIndex - matches]) { if (lastMatchIndex === -1) { lastMatchIndex = x; } matches++; } else { matches = 0; if (lastMatchIndex !== -1) { // Restart the search right after the last index was ignored x = lastMatchIndex + 1; lastMatchIndex = -1; } continue; } if (matches === buffer.length) { index = x; break; } } if (index === -1) return index; return searchableBufferLastIndex - index; } // TODO(@bartlomieju): // Take encoding into account when evaluating index function indexOfBuffer(targetBuffer, buffer, byteOffset, encoding, forwardDirection) { if (!Encodings[encoding] === undefined) { throw new Error(`Unknown encoding code ${encoding}`); } if (!forwardDirection) { // If negative the offset is calculated from the end of the buffer if (byteOffset < 0) { byteOffset = targetBuffer.length + byteOffset; } if (buffer.length === 0) { return byteOffset <= targetBuffer.length ? byteOffset : targetBuffer.length; } return findLastIndex(targetBuffer, buffer, byteOffset); } if (buffer.length === 0) { return byteOffset <= targetBuffer.length ? byteOffset : targetBuffer.length; } return indexOfNeedle(targetBuffer, buffer, byteOffset); } // TODO(Soremwar) // Node's implementation is a very obscure algorithm that I haven't been able to crack just yet function indexOfNumber(targetBuffer, number, byteOffset, forwardDirection) { const bytes = numberToBytes(number); if (bytes.length > 1) { throw new Error("Multi byte number search is not supported"); } return indexOfBuffer(targetBuffer, numberToBytes(number), byteOffset, Encodings.UTF8, forwardDirection); } export default { indexOfBuffer, indexOfNumber }; export { indexOfBuffer, indexOfNumber }; QeV,(ext:deno_node/internal_binding/buffer.tsa bD` M` TL`X(La' T  I`m 6xSb16`?IbO` L` B]`]DL`` L`` L`B` L`B"` L`"` L`] L`  Dc`a?Ba?a?a?"a?a?b@1>> 1; const byteArray = new Uint8Array(length); let i; for(i = 0; i < length; i++){ const a = Number.parseInt(str[i * 2], 16); const b = Number.parseInt(str[i * 2 + 1], 16); if (Number.isNaN(a) && Number.isNaN(b)) { break; } byteArray[i] = a << 4 | b; } // Returning a buffer subarray is okay: This API's return value // is never exposed to users and is only ever used for its length // and the data within the subarray. return i === length ? byteArray : byteArray.subarray(0, i); } export function utf16leToBytes(str, units) { // If units is defined, round it to even values for 16 byte "steps" // and use it as an upper bound value for our string byte array's length. const length = Math.min(str.length * 2, units ? (units >>> 1) * 2 : Infinity); const byteArray = new Uint8Array(length); const view = new DataView(byteArray.buffer); let i; for(i = 0; i * 2 < length; i++){ view.setUint16(i * 2, str.charCodeAt(i), true); } // Returning a buffer subarray is okay: This API's return value // is never exposed to users and is only ever used for its length // and the data within the subarray. return i * 2 === length ? byteArray : byteArray.subarray(0, i * 2); } export function bytesToAscii(bytes) { let res = ""; const length = bytes.byteLength; for(let i = 0; i < length; ++i){ res = `${res}${String.fromCharCode(bytes[i] & 127)}`; } return res; } export function bytesToUtf16le(bytes) { let res = ""; const length = bytes.byteLength; const view = new DataView(bytes.buffer, bytes.byteOffset, length); for(let i = 0; i < length - 1; i += 2){ res = `${res}${String.fromCharCode(view.getUint16(i, true))}`; } return res; } Qe^(ext:deno_node/internal_binding/_utils.tsa bD`,M`  TH`J La* T  I`Sb1a??Ibb ` L` n]`]\L`` L`` L`` L`` L`` L`` L`` L`]L`  D>>c DBCBCc` >a?BCa?a?a?a?a?a?a?a?b@:\L` T I`2>b@3a T I` b@4a T I`fb@5a T I`b@6a T I`v b@7a T I` @ b@8a T I`_ a b@9aa   .`Dk h %%ei h  z%  abA2~6D`RD]DH 5Q1z1Q // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. import { isWindows } from "ext:deno_node/_util/os.ts"; // Alphabet chars. export const CHAR_UPPERCASE_A = 65; /* A */ export const CHAR_LOWERCASE_A = 97; /* a */ export const CHAR_UPPERCASE_Z = 90; /* Z */ export const CHAR_LOWERCASE_Z = 122; /* z */ export const CHAR_UPPERCASE_C = 67; /* C */ export const CHAR_LOWERCASE_B = 98; /* b */ export const CHAR_LOWERCASE_E = 101; /* e */ export const CHAR_LOWERCASE_N = 110; /* n */ // Non-alphabetic chars. export const CHAR_DOT = 46; /* . */ export const CHAR_FORWARD_SLASH = 47; /* / */ export const CHAR_BACKWARD_SLASH = 92; /* \ */ export const CHAR_VERTICAL_LINE = 124; /* | */ export const CHAR_COLON = 58; /* = */ export const CHAR_QUESTION_MARK = 63; /* ? */ export const CHAR_UNDERSCORE = 95; /* _ */ export const CHAR_LINE_FEED = 10; /* \n */ export const CHAR_CARRIAGE_RETURN = 13; /* \r */ export const CHAR_TAB = 9; /* \t */ export const CHAR_FORM_FEED = 12; /* \f */ export const CHAR_EXCLAMATION_MARK = 33; /* ! */ export const CHAR_HASH = 35; /* # */ export const CHAR_SPACE = 32; /* */ export const CHAR_NO_BREAK_SPACE = 160; /* \u00A0 */ export const CHAR_ZERO_WIDTH_NOBREAK_SPACE = 65279; /* \uFEFF */ export const CHAR_LEFT_SQUARE_BRACKET = 91; /* [ */ export const CHAR_RIGHT_SQUARE_BRACKET = 93; /* ] */ export const CHAR_LEFT_ANGLE_BRACKET = 60; /* < */ export const CHAR_RIGHT_ANGLE_BRACKET = 62; /* > */ export const CHAR_LEFT_CURLY_BRACKET = 123; /* { */ export const CHAR_RIGHT_CURLY_BRACKET = 125; /* } */ export const CHAR_HYPHEN_MINUS = 45; /* - */ export const CHAR_PLUS = 43; /* + */ export const CHAR_DOUBLE_QUOTE = 34; /* " */ export const CHAR_SINGLE_QUOTE = 39; /* ' */ export const CHAR_PERCENT = 37; /* % */ export const CHAR_SEMICOLON = 59; /* ; */ export const CHAR_CIRCUMFLEX_ACCENT = 94; /* ^ */ export const CHAR_GRAVE_ACCENT = 96; /* ` */ export const CHAR_AT = 64; /* @ */ export const CHAR_AMPERSAND = 38; /* & */ export const CHAR_EQUAL = 61; /* = */ // Digits export const CHAR_0 = 48; /* 0 */ export const CHAR_9 = 57; /* 9 */ export const EOL = isWindows ? "\r\n" : "\n"; export default { CHAR_UPPERCASE_A, CHAR_LOWERCASE_A, CHAR_UPPERCASE_Z, CHAR_LOWERCASE_Z, CHAR_UPPERCASE_C, CHAR_LOWERCASE_B, CHAR_LOWERCASE_E, CHAR_LOWERCASE_N, CHAR_DOT, CHAR_FORWARD_SLASH, CHAR_BACKWARD_SLASH, CHAR_VERTICAL_LINE, CHAR_COLON, CHAR_QUESTION_MARK, CHAR_UNDERSCORE, CHAR_LINE_FEED, CHAR_CARRIAGE_RETURN, CHAR_TAB, CHAR_FORM_FEED, CHAR_EXCLAMATION_MARK, CHAR_HASH, CHAR_SPACE, CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_NOBREAK_SPACE, CHAR_LEFT_SQUARE_BRACKET, CHAR_RIGHT_SQUARE_BRACKET, CHAR_LEFT_ANGLE_BRACKET, CHAR_RIGHT_ANGLE_BRACKET, CHAR_LEFT_CURLY_BRACKET, CHAR_RIGHT_CURLY_BRACKET, CHAR_HYPHEN_MINUS, CHAR_PLUS, CHAR_DOUBLE_QUOTE, CHAR_SINGLE_QUOTE, CHAR_PERCENT, CHAR_SEMICOLON, CHAR_CIRCUMFLEX_ACCENT, CHAR_GRAVE_ACCENT, CHAR_AT, CHAR_AMPERSAND, CHAR_EQUAL, CHAR_0, CHAR_9, EOL }; Qer"#ext:deno_node/internal/constants.tsa bD` M` TU`eLa4!L-(*) + '& %," ! $# -a t"qbX,CCCBCbCbCbCbC"CV CBCCCbCCBCCC"CCBC"CC"CCBCbCCCCCCCCbCCCCCC"C"CC0CBbbbb"V BbB"B""Bbb""0  `D= h ei h   A1( a1 Z1* z1 C1) b1 e1 n1 .1 /1 \1 |1+ :1 ?1 _1' 1 1 1& 1 !1 #1 1% 1 1, [1 ]1" <1 >1 {1 }1! -1 +1 "1 '1$ %1 ;1# ^1 `1 @1 &1 =1 01 9101-~)0(303 0*3 03 0)3 03 03 030 303030+30 3030'30303!0&3#03%0 3'03)0%3+03-0,3/03 10"3!303"50 3#703$90!3%;03&=03'?0 3(A0$3)C03*E0#3+G03,I03-K03.M03/O0 30Q031S032U0-33W 1 QSb1IbQ ` L` " ]`]%L`` L`"` L`"` L`` L`` L`B` L`B` L`` L``  L`"`  L`"`  L`"`  L`"`  L`"` L`"V ` L`V ` L`B` L`B` L`b` L`b` L`` L`B` L`B` L`b` L`bb` L`bb` L`bB` L`B` L`b` L`b` L`b` L`b`  L``! L`B`" L`B`# L``$ L`"`% L`"`& L``' L``( L`b`) L`b`* L``+ L`"`, L`"0`- L`0] L`  Dttc`.ta?a(?a?a*?Ba?ba)?ba?ba?ba?"a ?V a?Ba?a+?a ?ba?a'?Ba?a?a&?"a?a ?Ba?"a%?a?"a,?a?Ba"?ba?a ?a?a!?a?a?a ?a$?ba?a#?a?a?a?a?"a ?"a?a?0a-?a?(hYbA;D`RD]DH Q~_ܧ// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials "use strict"; import { ERR_INVALID_ARG_VALUE, ERR_INVALID_CURSOR_POS, } from "ext:deno_node/internal/errors.ts"; import { validateFunction } from "ext:deno_node/internal/validators.mjs"; import { CSI } from "ext:deno_node/internal/readline/utils.mjs"; const { kClearLine, kClearScreenDown, kClearToLineBeginning, kClearToLineEnd, } = CSI; /** * moves the cursor to the x and y coordinate on the given stream */ export function cursorTo(stream, x, y, callback) { if (callback !== undefined) { validateFunction(callback, "callback"); } if (typeof y === "function") { callback = y; y = undefined; } if (Number.isNaN(x)) throw new ERR_INVALID_ARG_VALUE("x", x); if (Number.isNaN(y)) throw new ERR_INVALID_ARG_VALUE("y", y); if (stream == null || (typeof x !== "number" && typeof y !== "number")) { if (typeof callback === "function") process.nextTick(callback, null); return true; } if (typeof x !== "number") throw new ERR_INVALID_CURSOR_POS(); const data = typeof y !== "number" ? CSI`${x + 1}G` : CSI`${y + 1};${x + 1}H`; return stream.write(data, callback); } /** * moves the cursor relative to its current location */ export function moveCursor(stream, dx, dy, callback) { if (callback !== undefined) { validateFunction(callback, "callback"); } if (stream == null || !(dx || dy)) { if (typeof callback === "function") process.nextTick(callback, null); return true; } let data = ""; if (dx < 0) { data += CSI`${-dx}D`; } else if (dx > 0) { data += CSI`${dx}C`; } if (dy < 0) { data += CSI`${-dy}A`; } else if (dy > 0) { data += CSI`${dy}B`; } return stream.write(data, callback); } /** * clears the current line the cursor is on: * -1 for left of the cursor * +1 for right of the cursor * 0 for the entire line */ export function clearLine(stream, dir, callback) { if (callback !== undefined) { validateFunction(callback, "callback"); } if (stream === null || stream === undefined) { if (typeof callback === "function") process.nextTick(callback, null); return true; } const type = dir < 0 ? kClearToLineBeginning : dir > 0 ? kClearToLineEnd : kClearLine; return stream.write(type, callback); } /** * clears the screen from the current position of the cursor down */ export function clearScreenDown(stream, callback) { if (callback !== undefined) { validateFunction(callback, "callback"); } if (stream === null || stream === undefined) { if (typeof callback === "function") process.nextTick(callback, null); return true; } return stream.write(kClearScreenDown, callback); }  QfH-ext:deno_node/internal/readline/callbacks.mjsa bD`M` TT`d0La -8L`  T  I` B|Sb1M»¼c????Ib`L`  ]`{" ]`b ]`]8L` z` L`zB{` L`B{B|` L`B|}` L`}]L`  DLLc D  cCX Db b c\r D  c` a?b a? a?La?B|a?}a?za?B{a?b@=a T I` }b@>a T I` zb@?a T I`{B{b@@aa LM»¼  `Dn h %%%%ei h  0-%-%-%- %  aPbA<"*2D`RD]DH QB"} // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { getStringWidth } from "ext:deno_node/internal/util/inspect.mjs"; const tableChars = { middleMiddle: "\u2500", rowMiddle: "\u253c", topRight: "\u2510", topLeft: "\u250c", leftMiddle: "\u251c", topMiddle: "\u252c", bottomRight: "\u2518", bottomLeft: "\u2514", bottomMiddle: "\u2534", rightMiddle: "\u2524", left: "\u2502 ", right: " \u2502", middle: " \u2502 " }; const renderRow = (row, columnWidths)=>{ let out = tableChars.left; for(let i = 0; i < row.length; i++){ const cell = row[i]; const len = getStringWidth(cell); const needed = (columnWidths[i] - len) / 2; // round(needed) + ceil(needed) will always add up to the amount // of spaces we need while also left justifying the output. out += " ".repeat(needed) + cell + " ".repeat(Math.ceil(needed)); if (i !== row.length - 1) { out += tableChars.middle; } } out += tableChars.right; return out; }; const table = (head, columns)=>{ const rows = []; const columnWidths = head.map((h)=>getStringWidth(h)); const longestColumn = Math.max(...columns.map((a)=>a.length)); for(let i = 0; i < head.length; i++){ const column = columns[i]; for(let j = 0; j < longestColumn; j++){ if (rows[j] === undefined) { rows[j] = []; } const value = rows[j][i] = Object.hasOwn(column, j) ? column[j] : ""; const width = columnWidths[i] || 0; const counted = getStringWidth(value); columnWidths[i] = Math.max(width, counted); } } const divider = columnWidths.map((i)=>tableChars.middleMiddle.repeat(i + 2)); let result = tableChars.topLeft + divider.join(tableChars.topMiddle) + tableChars.topRight + "\n" + renderRow(head, columnWidths) + "\n" + tableChars.leftMiddle + divider.join(tableChars.rowMiddle) + tableChars.rightMiddle + "\n"; for (const row of rows){ result += `${renderRow(row, columnWidths)}\n`; } result += tableChars.bottomLeft + divider.join(tableChars.bottomMiddle) + tableChars.bottomRight; return result; }; export default table; QeS#ext:deno_node/internal/cli_table.tsa bD` M` TL`T$La' Laa xb 9 5: 9: =: AB; E; IB< M< QB= U= YB> ]> a? e T  b?`b?PSb19b?a??Ib ` L` "$ ]`&]L`` L`] L`  D""c`"a?a?BbKB T `nbKC  V`Dl(h %%ei h  ~)%%1  abAAfDD`RD]DH %Q!~2// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { primordials } from "ext:core/mod.js"; import { op_create_worker, op_host_post_message, op_host_recv_ctrl, op_host_recv_message, op_host_terminate_worker, } from "ext:core/ops"; const { ArrayPrototypeFilter, Error, ObjectPrototypeIsPrototypeOf, String, StringPrototypeStartsWith, SymbolFor, SymbolIterator, SymbolToStringTag, } = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; import { URL } from "ext:deno_url/00_url.js"; import { getLocationHref } from "ext:deno_web/12_location.js"; import { serializePermissions } from "ext:runtime/10_permissions.js"; import { log } from "ext:runtime/06_util.js"; import { defineEventHandler, ErrorEvent, EventTarget, MessageEvent, setIsTrusted, } from "ext:deno_web/02_event.js"; import { deserializeJsMessageData, MessagePortPrototype, serializeJsMessageData, } from "ext:deno_web/13_message_port.js"; function createWorker( specifier, hasSourceCode, sourceCode, permissions, name, workerType, ) { return op_create_worker({ hasSourceCode, name, permissions: serializePermissions(permissions), sourceCode, specifier, workerType, }); } function hostTerminateWorker(id) { op_host_terminate_worker(id); } function hostPostMessage(id, data) { op_host_post_message(id, data); } function hostRecvCtrl(id) { return op_host_recv_ctrl(id); } function hostRecvMessage(id) { return op_host_recv_message(id); } class Worker extends EventTarget { #id = 0; #name = ""; // "RUNNING" | "CLOSED" | "TERMINATED" // "TERMINATED" means that any controls or messages received will be // discarded. "CLOSED" means that we have received a control // indicating that the worker is no longer running, but there might // still be messages left to receive. #status = "RUNNING"; constructor(specifier, options = {}) { super(); specifier = String(specifier); const { deno, name, type = "classic", } = options; const workerType = webidl.converters["WorkerType"](type); if ( StringPrototypeStartsWith(specifier, "./") || StringPrototypeStartsWith(specifier, "../") || StringPrototypeStartsWith(specifier, "/") || workerType === "classic" ) { const baseUrl = getLocationHref(); if (baseUrl != null) { specifier = new URL(specifier, baseUrl).href; } } this.#name = name; let hasSourceCode, sourceCode; if (workerType === "classic") { hasSourceCode = true; sourceCode = `importScripts("#");`; } else { hasSourceCode = false; sourceCode = ""; } const id = createWorker( specifier, hasSourceCode, sourceCode, deno?.permissions, name, workerType, ); this.#id = id; this.#pollControl(); this.#pollMessages(); } #handleError(e) { const event = new ErrorEvent("error", { cancelable: true, message: e.message, lineno: e.lineNumber ? e.lineNumber : undefined, colno: e.columnNumber ? e.columnNumber : undefined, filename: e.fileName, error: null, }); this.dispatchEvent(event); // Don't bubble error event to window for loader errors (`!e.fileName`). // TODO(nayeemrmn): It's not correct to use `e.fileName` to detect user // errors. It won't be there for non-awaited async ops for example. if (e.fileName && !event.defaultPrevented) { globalThis.dispatchEvent(event); } return event.defaultPrevented; } #pollControl = async () => { while (this.#status === "RUNNING") { const { 0: type, 1: data } = await hostRecvCtrl(this.#id); // If terminate was called then we ignore all messages if (this.#status === "TERMINATED") { return; } switch (type) { case 1: { // TerminalError this.#status = "CLOSED"; } /* falls through */ case 2: { // Error if (!this.#handleError(data)) { throw new Error("Unhandled error in child worker."); } break; } case 3: { // Close log(`Host got "close" message from worker: ${this.#name}`); this.#status = "CLOSED"; return; } default: { throw new Error(`Unknown worker event: "${type}"`); } } } }; #pollMessages = async () => { while (this.#status !== "TERMINATED") { const data = await hostRecvMessage(this.#id); if (this.#status === "TERMINATED" || data === null) { return; } let message, transferables; try { const v = deserializeJsMessageData(data); message = v[0]; transferables = v[1]; } catch (err) { const event = new MessageEvent("messageerror", { cancelable: false, data: err, }); setIsTrusted(event, true); this.dispatchEvent(event); return; } const event = new MessageEvent("message", { cancelable: false, data: message, ports: ArrayPrototypeFilter( transferables, (t) => ObjectPrototypeIsPrototypeOf(MessagePortPrototype, t), ), }); setIsTrusted(event, true); this.dispatchEvent(event); } }; postMessage(message, transferOrOptions = {}) { const prefix = "Failed to execute 'postMessage' on 'MessagePort'"; webidl.requiredArguments(arguments.length, 1, prefix); message = webidl.converters.any(message); let options; if ( webidl.type(transferOrOptions) === "Object" && transferOrOptions !== undefined && transferOrOptions[SymbolIterator] !== undefined ) { const transfer = webidl.converters["sequence"]( transferOrOptions, prefix, "Argument 2", ); options = { transfer }; } else { options = webidl.converters.StructuredSerializeOptions( transferOrOptions, prefix, "Argument 2", ); } const { transfer } = options; const data = serializeJsMessageData(message, transfer); if (this.#status === "RUNNING") { hostPostMessage(this.#id, data); } } terminate() { if (this.#status !== "TERMINATED") { this.#status = "TERMINATED"; hostTerminateWorker(this.#id); } } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(WorkerPrototype, this), keys: [ "onerror", "onmessage", "onmessageerror", ], }), inspectOptions, ); } [SymbolToStringTag] = "Worker"; } const WorkerPrototype = Worker.prototype; defineEventHandler(Worker.prototype, "error"); defineEventHandler(Worker.prototype, "message"); defineEventHandler(Worker.prototype, "messageerror"); webidl.converters["WorkerType"] = webidl.createEnumConverter("WorkerType", [ "classic", "module", ]); export { Worker }; Qdqext:runtime/11_workers.jsa bD`DM` T`La,^ T  I`B<BSb1 f !gBbbl?????????????Ib2`0L`  bS]`hB]`b]`"]`)&]`_+]`]`]`]`0]` ]L`b2 ` L`b2  L`  DDcTL` DcMW Dc[f Dcjv Dc  DB B cTW Dc! Dc7I D""c  Dc Dc  D 5 5c D 9 9c D = =c D A Ac D E Ec DcU` Dc  DBBc D††cz`a? 5a? 9a? =a? Aa? Ea?a?B a?a?Ba?a?a?a?a?a?†a?"a?a?a?b2 a?b@E T I`Zb@F T I`bb@G T I` b@H T I`%Pbb@I Laa f!gBrx\Sb @BB!bbi????????R  `T ``/ `/ `?  `  aRD]f bVa D aa DHcD Lab2 BB! T  I` ebzb Jb T I` b2 b ՃK T I`Wb  L T I`bbVb  M T I``b( N TL`V L`0Sbbqq `?b2 `DasI T b`xbbLPP T `GbLP Qb2   `Kc3(4 6I,l % 555ł5ł55  a  4 4bO 1Y³b^B  `M`¨  `Dph %%%%%%% % % % %%ei e% h  0 - %- %- %- %-%- - %-ă%e% e%e%e%%e%e%0bt t%e+! 2" 10-#%0$0-#%c00-#&c00-#'c -( -)*{+ %_!2*# d% PP@ @PLbADV^fnDD`RD]DH Q7SV%// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { core, internals } from "ext:core/mod.js"; import { op_net_listen_udp, op_net_listen_unixpacket, op_runtime_memory_usage, } from "ext:core/ops"; import * as timers from "ext:deno_web/02_timers.js"; import * as httpClient from "ext:deno_fetch/22_http_client.js"; import * as console from "ext:deno_console/01_console.js"; import * as ffi from "ext:deno_ffi/00_ffi.js"; import * as net from "ext:deno_net/01_net.js"; import * as tls from "ext:deno_net/02_tls.js"; import * as http from "ext:deno_http/01_http.js"; import * as errors from "ext:runtime/01_errors.js"; import * as version from "ext:runtime/01_version.ts"; import * as permissions from "ext:runtime/10_permissions.js"; import * as io from "ext:deno_io/12_io.js"; import * as buffer from "ext:runtime/13_buffer.js"; import * as fs from "ext:deno_fs/30_fs.js"; import * as os from "ext:runtime/30_os.js"; import * as fsEvents from "ext:runtime/40_fs_events.js"; import * as process from "ext:runtime/40_process.js"; import * as signals from "ext:runtime/40_signals.js"; import * as tty from "ext:runtime/40_tty.js"; // TODO(bartlomieju): this is funky we have two `http` imports import * as httpRuntime from "ext:runtime/40_http.js"; import * as kv from "ext:deno_kv/01_db.ts"; import * as cron from "ext:deno_cron/01_cron.ts"; import * as webgpuSurface from "ext:deno_webgpu/02_surface.js"; const denoNs = { metrics: () => { internals.warnOnDeprecatedApi("Deno.metrics()", new Error().stack); return core.metrics(); }, Process: process.Process, run: process.run, isatty: tty.isatty, writeFileSync: fs.writeFileSync, writeFile: fs.writeFile, writeTextFileSync: fs.writeTextFileSync, writeTextFile: fs.writeTextFile, readTextFile: fs.readTextFile, readTextFileSync: fs.readTextFileSync, readFile: fs.readFile, readFileSync: fs.readFileSync, watchFs: fsEvents.watchFs, chmodSync: fs.chmodSync, chmod: fs.chmod, chown: fs.chown, chownSync: fs.chownSync, copyFileSync: fs.copyFileSync, cwd: fs.cwd, makeTempDirSync: fs.makeTempDirSync, makeTempDir: fs.makeTempDir, makeTempFileSync: fs.makeTempFileSync, makeTempFile: fs.makeTempFile, memoryUsage: () => op_runtime_memory_usage(), mkdirSync: fs.mkdirSync, mkdir: fs.mkdir, chdir: fs.chdir, copyFile: fs.copyFile, readDirSync: fs.readDirSync, readDir: fs.readDir, readLinkSync: fs.readLinkSync, readLink: fs.readLink, realPathSync: fs.realPathSync, realPath: fs.realPath, removeSync: fs.removeSync, remove: fs.remove, renameSync: fs.renameSync, rename: fs.rename, version: version.version, build: core.build, statSync: fs.statSync, lstatSync: fs.lstatSync, stat: fs.stat, lstat: fs.lstat, truncateSync: fs.truncateSync, truncate: fs.truncate, ftruncateSync(rid, len) { internals.warnOnDeprecatedApi( "Deno.ftruncateSync()", new Error().stack, "Use `Deno.FsFile.truncateSync()` instead.", ); return fs.ftruncateSync(rid, len); }, ftruncate(rid, len) { internals.warnOnDeprecatedApi( "Deno.ftruncate()", new Error().stack, "Use `Deno.FsFile.truncate()` instead.", ); return fs.ftruncate(rid, len); }, async futime(rid, atime, mtime) { internals.warnOnDeprecatedApi( "Deno.futime()", new Error().stack, "Use `Deno.FsFile.utime()` instead.", ); await fs.futime(rid, atime, mtime); }, futimeSync(rid, atime, mtime) { internals.warnOnDeprecatedApi( "Deno.futimeSync()", new Error().stack, "Use `Deno.FsFile.utimeSync()` instead.", ); fs.futimeSync(rid, atime, mtime); }, errors: errors.errors, inspect: console.inspect, env: os.env, exit: os.exit, execPath: os.execPath, Buffer: buffer.Buffer, readAll: buffer.readAll, readAllSync: buffer.readAllSync, writeAll: buffer.writeAll, writeAllSync: buffer.writeAllSync, copy: io.copy, iter: io.iter, iterSync: io.iterSync, SeekMode: io.SeekMode, read(rid, buffer) { internals.warnOnDeprecatedApi( "Deno.read()", new Error().stack, "Use `reader.read()` instead.", ); return io.read(rid, buffer); }, readSync(rid, buffer) { internals.warnOnDeprecatedApi( "Deno.readSync()", new Error().stack, "Use `reader.readSync()` instead.", ); return io.readSync(rid, buffer); }, write(rid, data) { internals.warnOnDeprecatedApi( "Deno.write()", new Error().stack, "Use `writer.write()` instead.", ); return io.write(rid, data); }, writeSync(rid, data) { internals.warnOnDeprecatedApi( "Deno.writeSync()", new Error().stack, "Use `writer.writeSync()` instead.", ); return io.writeSync(rid, data); }, File: fs.File, FsFile: fs.FsFile, open: fs.open, openSync: fs.openSync, create: fs.create, createSync: fs.createSync, stdin: io.stdin, stdout: io.stdout, stderr: io.stderr, seek(rid, offset, whence) { internals.warnOnDeprecatedApi( "Deno.seek()", new Error().stack, "Use `file.seek()` instead.", ); return fs.seek(rid, offset, whence); }, seekSync(rid, offset, whence) { internals.warnOnDeprecatedApi( "Deno.seekSync()", new Error().stack, "Use `file.seekSync()` instead.", ); return fs.seekSync(rid, offset, whence); }, connect: net.connect, listen: net.listen, loadavg: os.loadavg, connectTls: tls.connectTls, listenTls: tls.listenTls, startTls: tls.startTls, shutdown(rid) { internals.warnOnDeprecatedApi( "Deno.shutdown()", new Error().stack, "Use `Deno.Conn.closeWrite()` instead.", ); net.shutdown(rid); }, fstatSync(rid) { internals.warnOnDeprecatedApi( "Deno.fstatSync()", new Error().stack, "Use `Deno.FsFile.statSync()` instead.", ); return fs.fstatSync(rid); }, fstat(rid) { internals.warnOnDeprecatedApi( "Deno.fstat()", new Error().stack, "Use `Deno.FsFile.stat()` instead.", ); return fs.fstat(rid); }, fsyncSync: fs.fsyncSync, fsync: fs.fsync, fdatasyncSync: fs.fdatasyncSync, fdatasync: fs.fdatasync, symlink: fs.symlink, symlinkSync: fs.symlinkSync, link: fs.link, linkSync: fs.linkSync, permissions: permissions.permissions, Permissions: permissions.Permissions, PermissionStatus: permissions.PermissionStatus, // TODO(bartlomieju): why is this not in one of extensions? serveHttp: httpRuntime.serveHttp, serve: http.serve, resolveDns: net.resolveDns, upgradeWebSocket: http.upgradeWebSocket, utime: fs.utime, utimeSync: fs.utimeSync, kill: process.kill, addSignalListener: signals.addSignalListener, removeSignalListener: signals.removeSignalListener, refTimer: timers.refTimer, unrefTimer: timers.unrefTimer, osRelease: os.osRelease, osUptime: os.osUptime, hostname: os.hostname, systemMemoryInfo: os.systemMemoryInfo, networkInterfaces: os.networkInterfaces, consoleSize: tty.consoleSize, gid: os.gid, uid: os.uid, Command: process.Command, // TODO(bartlomieju): why is this exported? ChildProcess: process.ChildProcess, }; // NOTE(bartlomieju): keep IDs in sync with `cli/main.rs` const unstableIds = { broadcastChannel: 1, cron: 2, ffi: 3, fs: 4, http: 5, kv: 6, net: 7, temporal: 8, unsafeProto: 9, webgpu: 10, workerOptions: 11, }; const denoNsUnstableById = {}; // denoNsUnstableById[unstableIds.broadcastChannel] = {} denoNsUnstableById[unstableIds.cron] = { cron: cron.cron, }; denoNsUnstableById[unstableIds.ffi] = { dlopen: ffi.dlopen, UnsafeCallback: ffi.UnsafeCallback, UnsafePointer: ffi.UnsafePointer, UnsafePointerView: ffi.UnsafePointerView, UnsafeFnPointer: ffi.UnsafeFnPointer, }; denoNsUnstableById[unstableIds.fs] = { flock: fs.flock, flockSync: fs.flockSync, funlock: fs.funlock, funlockSync: fs.funlockSync, umask: fs.umask, }; denoNsUnstableById[unstableIds.http] = { HttpClient: httpClient.HttpClient, createHttpClient: httpClient.createHttpClient, // TODO(bartlomieju): why is it needed? http, }; denoNsUnstableById[unstableIds.kv] = { openKv: kv.openKv, AtomicOperation: kv.AtomicOperation, Kv: kv.Kv, KvU64: kv.KvU64, KvListIterator: kv.KvListIterator, }; denoNsUnstableById[unstableIds.net] = { listenDatagram: net.createListenDatagram( op_net_listen_udp, op_net_listen_unixpacket, ), }; // denoNsUnstableById[unstableIds.unsafeProto] = {} denoNsUnstableById[unstableIds.webgpu] = { UnsafeWindowSurface: webgpuSurface.UnsafeWindowSurface, }; // denoNsUnstableById[unstableIds.workerOptions] = {} // when editing this list, also update unstableDenoProps in cli/tsc/99_main_compiler.js const denoNsUnstable = { listenDatagram: net.createListenDatagram( op_net_listen_udp, op_net_listen_unixpacket, ), umask: fs.umask, HttpClient: httpClient.HttpClient, createHttpClient: httpClient.createHttpClient, // TODO(bartlomieju): why is it needed? http, dlopen: ffi.dlopen, UnsafeCallback: ffi.UnsafeCallback, UnsafePointer: ffi.UnsafePointer, UnsafePointerView: ffi.UnsafePointerView, UnsafeFnPointer: ffi.UnsafeFnPointer, UnsafeWindowSurface: webgpuSurface.UnsafeWindowSurface, flock: fs.flock, flockSync: fs.flockSync, funlock: fs.funlock, funlockSync: fs.funlockSync, openKv: kv.openKv, AtomicOperation: kv.AtomicOperation, Kv: kv.Kv, KvU64: kv.KvU64, KvListIterator: kv.KvListIterator, cron: cron.cron, }; export { denoNs, denoNsUnstable, denoNsUnstableById, unstableIds }; Qdΰext:runtime/90_deno_ns.jsa b D`HM` T` LaLda bxCbVC CCCbCBCCbCCCCBCCC"CCC"CbCCbCC?CbCCC¦CBC«C"CCCCCBCbCC&CBCbCCC"CBC¿CBC¾CCC5CCC" CVC"{ CC"CCCCCbCbCCCbCCCCBvC"C)CbCBCCCCC>C;Cb(Cb@CCCDCCBC»CCbCCbCCCMCCC" C C" C|C",C"CC"C* C CB CBICICCb"CCC(C C¤CbCHC C T  y` Qa.metrics`-Sb1% Gb???Ib%`hL` bS]`lB]`]`"-]`="]`zB]`>]`bk]`]`?]`s"]`]`b]`]`GE]`w"]`]`bH]` ]`Cb]`u]`]`"]`FB]`]8L` ` L`` L`b ` L`b ` L``L`  DDc DbDc-7 DDcmt DDc D% Dc DB7 Dc  DbDc59 DDc gm D&Dc  DDc  DGDc  DIDc ;A DDcoq DDc DDc D* Dc DDc6= D8 Dclo DDc D"Dc D"iDc<@ DDcn{L` D  cUY DBKBKc[d D I Ic D M Mc D Q Qc` a?BKa? Ia? Ma? Qa?a?a?b a?a?bKSbV bBbB""bb T `Qb .memoryUsage`?.bKT?b¦B«"Bb& Bb"B¿ T  I`( Bb UB T I` ¾b V¾ T I` b QW T I` qb X5" V"{ "bb T I`bY T I`PbZ T I`Y bb [b T I`b  \Bv")bB T I`[b ] T I`g3b ^>;b(b@CD T I`b _ T I`GBb `B T I`P»ba»bbM"  " |",""*  B BIIb"( ¤bH hb B`"i```b`"`% `"`b ` B`  ` "ib"iC8b +C$CbCbCC+$bb8b CCC"C"C""b(b)CB)CbC)B)"8b FCNCGCb]CSCFNGb]S% b>C< I M>Bb"C"b*>C"C)CB)CbC+C$CbCbCC"CCCC"CFCNCGCb]CSC"iC  `Dh ei e e e e e% e e e e e e% e e% e e e e e e e e e h  ~)3-3-3 - 3 - 3 - 3 - 3 - 3 -3!-#3%-'3)-+3--/31-335-739-;3=-?3A-C3E-G3I-K3M-O3Q-S3U-W3Y3[-]3_- a3 c-!e3!g-"i3"k-#m3#o-$q3$s-%u3%w-&y3&{-'}3'-(3(-)3)-*3*-+3+-,3,--3-0.-/3/-030-131-232-333-434-535637839:3;<3=->3>-?3?-@3@-A3A-B3B-C3C-D3D-E3E-F3F-G3G-H3H-I3I-J3J-K3KL3MN3OP3QR 3S-T3T-U3U-V3V-W 3W -X 3X-Y3Y-Z3Z-[3[-\3\] 3^!_ 3`#-a%3a'-b)3b+-c-3c/-d13d3-e53e7-f93f;g 3h=i 3j?k3lA-mC3mE-nG3nI-oK3oM-pO3pQ-qS3qU-rW3rY-s[3s]-t_3ta-uc3ue-vg3vi-wk3wm-xo3xq-ys3yu-zw3zy-{{3{}-|3|-}3}-~3~-3-3-3-3-3-3-3-3-3-3-3-3-3-3 1~)1100-~)-3 400-~)-3-3-3-3-3 400-~)-3-3-3-3-3 400-~)-3-3 3  4 00-~)-3-3-3-3-!3# 4%00-'~))-*00_,3. 4000-2~4)-537 49~;)-*00_<3>-3@-3B-3D 3F-3H-3J-3L-3N-3P-53R-3T-3V-3X-3Z-3\-3^-3`-3b-!3d-3f 1 h                                  `0  `0P 0 Y  8P   `@ 8P` 0 0 0 0 0 0 0bAR"2:BJRZbjrzD`RD]DH Q:ɦ\// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // This module ports: // - https://github.com/nodejs/node/blob/master/src/node_options-inl.h // - https://github.com/nodejs/node/blob/master/src/node_options.cc // - https://github.com/nodejs/node/blob/master/src/node_options.h // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials export function getOptions() { // TODO(kt3k): Return option arguments as parsed object return { options: new Map() }; // const { Deno } = globalThis as any; // const args = parse(Deno?.args ?? []); // const options = new Map( // Object.entries(args).map(([key, value]) => [key, { value }]), // ); // // return { options }; }  Qf^݃W.ext:deno_node/internal_binding/node_options.tsa b D`M` T@`:La!L` T,`L`b/CE/  `Dd~)!i3 (SbqA‡`Da%[4Sb1Ib\`]L`‡` L`‡]`‡a? ab@caa  `Di h ei h   `bAbD`RD]DH EQAmq// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { Buffer } from "node:buffer"; function assert(cond) { if (!cond) { throw new Error("assertion failed"); } } /** Compare to array buffers or data views in a way that timing based attacks * cannot gain information about the platform. */ function stdTimingSafeEqual(a, b) { if (a.byteLength !== b.byteLength) { return false; } if (!(a instanceof DataView)) { a = new DataView(ArrayBuffer.isView(a) ? a.buffer : a); } if (!(b instanceof DataView)) { b = new DataView(ArrayBuffer.isView(b) ? b.buffer : b); } assert(a instanceof DataView); assert(b instanceof DataView); const length = a.byteLength; let out = 0; let i = -1; while(++i < length){ out |= a.getUint8(i) ^ b.getUint8(i); } return out === 0; } export const timingSafeEqual = (a, b)=>{ if (a instanceof Buffer) a = new DataView(a.buffer); if (a instanceof Buffer) b = new DataView(a.buffer); return stdTimingSafeEqual(a, b); }; $Qg2ext:deno_node/internal_binding/_timingSafeEqual.tsa b D`M` TH`M$La- T  I`5 PSb1a??Ibq` L` b]`]L` ` L` ] L`  D"{ "{ c`"{ a? a?b@e T I`>b@f Laa  T  `o bKg  .`Dk h Ƃ%%ei h  1 `bAd6^jD`RD]DH QZIl// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // This module ports: // - https://github.com/nodejs/node/blob/master/src/handle_wrap.cc // - https://github.com/nodejs/node/blob/master/src/handle_wrap.h // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { unreachable } from "ext:deno_node/_util/asserts.ts"; import { AsyncWrap } from "ext:deno_node/internal_binding/async_wrap.ts"; export class HandleWrap extends AsyncWrap { constructor(provider){ super(provider); } close(cb = ()=>{}) { this._onClose(); queueMicrotask(cb); } ref() { unreachable(); } unref() { unreachable(); } // deno-lint-ignore no-explicit-any _onClose() {} }  Qf;-ext:deno_node/internal_binding/handle_wrap.tsa b D`$M` TX`i4La ! Laa   `T ``/ `/ `?  `  aQkD]H ` ajajB'aj'aj"aj]b T  I`LSb1Ibl`L` b ]`b]`]L`` L`]L`  Dbbc  DByByc`Bya?ba?a?zb i T I`bj T I`B'bk T I`3'bl T I`di"bm  `DoPh ei h  0  e+ 1 `bAhDD`RD]DH Qڨ3// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials // Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two. const kSize = 2048; const kMask = kSize - 1; // The FixedQueue is implemented as a singly-linked list of fixed-size // circular buffers. It looks something like this: // // head tail // | | // v v // +-----------+ <-----\ +-----------+ <------\ +-----------+ // | [null] | \----- | next | \------- | next | // +-----------+ +-----------+ +-----------+ // | item | <-- bottom | item | <-- bottom | [empty] | // | item | | item | | [empty] | // | item | | item | | [empty] | // | item | | item | | [empty] | // | item | | item | bottom --> | item | // | item | | item | | item | // | ... | | ... | | ... | // | item | | item | | item | // | item | | item | | item | // | [empty] | <-- top | item | | item | // | [empty] | | item | | item | // | [empty] | | [empty] | <-- top top --> | [empty] | // +-----------+ +-----------+ +-----------+ // // Or, if there is only one circular buffer, it looks something // like either of these: // // head tail head tail // | | | | // v v v v // +-----------+ +-----------+ // | [null] | | [null] | // +-----------+ +-----------+ // | [empty] | | item | // | [empty] | | item | // | item | <-- bottom top --> | [empty] | // | item | | [empty] | // | [empty] | <-- top bottom --> | item | // | [empty] | | item | // +-----------+ +-----------+ // // Adding a value means moving `top` forward by one, removing means // moving `bottom` forward by one. After reaching the end, the queue // wraps around. // // When `top === bottom` the current queue is empty and when // `top + 1 === bottom` it's full. This wastes a single space of storage // but allows much quicker checks. class FixedCircularBuffer { bottom; top; list; next; constructor(){ this.bottom = 0; this.top = 0; this.list = new Array(kSize); this.next = null; } isEmpty() { return this.top === this.bottom; } isFull() { return (this.top + 1 & kMask) === this.bottom; } push(data) { this.list[this.top] = data; this.top = this.top + 1 & kMask; } shift() { const nextItem = this.list[this.bottom]; if (nextItem === undefined) { return null; } this.list[this.bottom] = undefined; this.bottom = this.bottom + 1 & kMask; return nextItem; } } export class FixedQueue { head; tail; constructor(){ this.head = this.tail = new FixedCircularBuffer(); } isEmpty() { return this.head.isEmpty(); } push(data) { if (this.head.isFull()) { // Head is full: Creates a new queue, sets the old queue's `.next` to it, // and sets it as the new main queue. this.head = this.head.next = new FixedCircularBuffer(); } this.head.push(data); } shift() { const tail = this.tail; const next = tail.shift(); if (tail.isEmpty() && tail.next !== null) { // If there is another queue, it forms the new tail. this.tail = tail.next; } return next; } } QeE<%ext:deno_node/internal/fixed_queue.tsa b D`8M`  Tx`PLa* Laa   `T ``/ `/ `?  `  a. D]H ` ajBajaj8aj8aj] T<`3$L` "   6`Dh(- ] 2 2! i 2 2(SbpG`Dax LSb1"b???Ib3`]L`` L`]`a?b @ ,b Ճo T  I`  BFbp T I` Y bq T I`` 8br T I` 8bs T,`L`   ~`Kbb (  d3333(Sbqq`DaH  a 0 bt   `T ``/ `/ `?  `  a2D]< ` ajBaj8aj8aj] T4`%L` BB  `Df(- ]i2 2(SbpG`Da F a @ ,b Ճu T  I`;Bbv T I`BF8b w T I`N08b x T(` L`BB `Kb u c33(Sbqq`Da2 a 0b y  `DwPh %%%ei h   %E% e+ 2  %   e+ 2  1 F a pbAn2ZbjrzD`RD]DH QE // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // This module ports: // - https://github.com/nodejs/node/blob/master/src/node_file-inl.h // - https://github.com/nodejs/node/blob/master/src/node_file.cc // - https://github.com/nodejs/node/blob/master/src/node_file.h // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { assert } from "ext:deno_node/_util/asserts.ts"; import * as io from "ext:deno_io/12_io.js"; import * as fs from "ext:deno_fs/30_fs.js"; /** * Write to the given file from the given buffer synchronously. * * Implements sync part of WriteBuffer in src/node_file.cc * See: https://github.com/nodejs/node/blob/e9ed113/src/node_file.cc#L1818 * * @param fs file descriptor * @param buffer the data to write * @param offset where in the buffer to start from * @param length how much to write * @param position if integer, position to write at in the file. if null, write from the current position * @param context context object for passing error number */ export function writeBuffer(fd, buffer, offset, length, position, ctx) { assert(offset >= 0, "offset should be greater or equal to 0"); assert(offset + length <= buffer.byteLength, `buffer doesn't have enough data: byteLength = ${buffer.byteLength}, offset + length = ${offset + length}`); if (position) { fs.seekSync(fd, position, io.SeekMode.Current); } const subarray = buffer.subarray(offset, offset + length); try { return io.writeSync(fd, subarray); } catch (e) { ctx.errno = extractOsErrorNumberFromErrorMessage(e); return 0; } } function extractOsErrorNumberFromErrorMessage(e) { const match = e instanceof Error ? e.message.match(/\(os error (\d+)\)/) : false; if (match) { return +match[1]; } return 255; // Unknown error }  Qf1f+ext:deno_node/internal_binding/node_file.tsa bD`M` TL`TLa; T  I` HXSb1GHb???Ib `L` b ]`b]`OE]`{]L`` L`L`  DGDcGI DDcsu L` D c `a?a?b-@|L` T I` b@{aa   `Dl h Ƃ%ei e% e% h   `bAzVD`RD]DH  Q i// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { O_APPEND, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY } from "ext:deno_node/_fs/_fs_constants.ts"; import { validateFunction } from "ext:deno_node/internal/validators.mjs"; import { notImplemented } from "ext:deno_node/_utils.ts"; export function isFileOptions(fileOptions) { if (!fileOptions) return false; return fileOptions.encoding != undefined || fileOptions.flag != undefined || fileOptions.signal != undefined || fileOptions.mode != undefined; } export function getEncoding(optOrCallback) { if (!optOrCallback || typeof optOrCallback === "function") { return null; } const encoding = typeof optOrCallback === "string" ? optOrCallback : optOrCallback.encoding; if (!encoding) return null; return encoding; } export function checkEncoding(encoding) { if (!encoding) return null; encoding = encoding.toLowerCase(); if ([ "utf8", "hex", "base64", "ascii" ].includes(encoding)) return encoding; if (encoding === "utf-8") { return "utf8"; } if (encoding === "binary") { return "binary"; // before this was buffer, however buffer is not used in Node // node -e "require('fs').readFile('../world.txt', 'buffer', console.log)" } const notImplementedEncodings = [ "utf16le", "latin1", "ucs2" ]; if (notImplementedEncodings.includes(encoding)) { notImplemented(`"${encoding}" encoding`); } throw new Error(`The value "${encoding}" is invalid for option "encoding"`); } export function getOpenOptions(flag) { if (flag === undefined) { return { create: true, append: true }; } let openOptions = {}; if (typeof flag === "string") { switch(flag){ case "a": { // 'a': Open file for appending. The file is created if it does not exist. openOptions = { create: true, append: true }; break; } case "ax": case "xa": { // 'ax', 'xa': Like 'a' but fails if the path exists. openOptions = { createNew: true, write: true, append: true }; break; } case "a+": { // 'a+': Open file for reading and appending. The file is created if it does not exist. openOptions = { read: true, create: true, append: true }; break; } case "ax+": case "xa+": { // 'ax+', 'xa+': Like 'a+' but fails if the path exists. openOptions = { read: true, createNew: true, append: true }; break; } case "r": { // 'r': Open file for reading. An exception occurs if the file does not exist. openOptions = { read: true }; break; } case "r+": { // 'r+': Open file for reading and writing. An exception occurs if the file does not exist. openOptions = { read: true, write: true }; break; } case "w": { // 'w': Open file for writing. The file is created (if it does not exist) or truncated (if it exists). openOptions = { create: true, write: true, truncate: true }; break; } case "wx": case "xw": { // 'wx', 'xw': Like 'w' but fails if the path exists. openOptions = { createNew: true, write: true }; break; } case "w+": { // 'w+': Open file for reading and writing. The file is created (if it does not exist) or truncated (if it exists). openOptions = { create: true, write: true, truncate: true, read: true }; break; } case "wx+": case "xw+": { // 'wx+', 'xw+': Like 'w+' but fails if the path exists. openOptions = { createNew: true, write: true, read: true }; break; } case "as": case "sa": { // 'as', 'sa': Open file for appending in synchronous mode. The file is created if it does not exist. openOptions = { create: true, append: true }; break; } case "as+": case "sa+": { // 'as+', 'sa+': Open file for reading and appending in synchronous mode. The file is created if it does not exist. openOptions = { create: true, read: true, append: true }; break; } case "rs+": case "sr+": { // 'rs+', 'sr+': Open file for reading and writing in synchronous mode. Instructs the operating system to bypass the local file system cache. openOptions = { create: true, read: true, write: true }; break; } default: { throw new Error(`Unrecognized file system flag: ${flag}`); } } } else if (typeof flag === "number") { if ((flag & O_APPEND) === O_APPEND) { openOptions.append = true; } if ((flag & O_CREAT) === O_CREAT) { openOptions.create = true; openOptions.write = true; } if ((flag & O_EXCL) === O_EXCL) { openOptions.createNew = true; openOptions.read = true; openOptions.write = true; } if ((flag & O_TRUNC) === O_TRUNC) { openOptions.truncate = true; } if ((flag & O_RDONLY) === O_RDONLY) { openOptions.read = true; } if ((flag & O_WRONLY) === O_WRONLY) { openOptions.write = true; } if ((flag & O_RDWR) === O_RDWR) { openOptions.read = true; openOptions.write = true; } } return openOptions; } export { isUint32 as isFd } from "ext:deno_node/internal/validators.mjs"; export function maybeCallback(cb) { validateFunction(cb, "cb"); return cb; } // Ensure that callbacks run in the global context. Only use this function // for callbacks that are passed to the binding layer, callbacks that are // invoked from JS already run in the proper scope. export function makeCallback(cb) { validateFunction(cb, "cb"); return (...args)=>Reflect.apply(cb, this, args); } Qdext:deno_node/_fs/_fs_common.tsa bD`(M` T@`:La!PL` T  I`blSb1Ib`L` B$ ]` " ]`P ]` L`  bADA{c3CPL`k` L`kU` L`UK` L`Kbl` L`bl?` L`?! ` L`! ],L`  D> > c DA A c DB B c D< < c Db= b= c D"> "> c D= = c Db b c D  c8H`> a?A a?B a?< a?b= a?"> a?= a? a?b a?bla?Ua?ka?Ka?! a??a?fb@~a T I`Ub@a T I`xkb@a T I`)Kb@a T I`! b@a T I`?b@aa   z`Di h ei h   `bA} DD`RD]DH yQu:`i// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { EventEmitter } from "node:events"; import { Buffer } from "node:buffer"; import { promises, read, write } from "node:fs"; import { core } from "ext:core/mod.js"; export class FileHandle extends EventEmitter { #rid; constructor(rid){ super(); this.rid = rid; } get fd() { return this.rid; } read(bufferOrOpt, offset, length, position) { if (bufferOrOpt instanceof Buffer) { return new Promise((resolve, reject)=>{ read(this.fd, bufferOrOpt, offset, length, position, (err, bytesRead, buffer)=>{ if (err) reject(err); else resolve({ buffer: buffer, bytesRead: bytesRead }); }); }); } else { return new Promise((resolve, reject)=>{ read(this.fd, bufferOrOpt, (err, bytesRead, buffer)=>{ if (err) reject(err); else resolve({ buffer: buffer, bytesRead: bytesRead }); }); }); } } readFile(opt) { return promises.readFile(this, opt); } write(bufferOrStr, offsetOrPosition, lengthOrEncoding, position) { if (bufferOrStr instanceof Buffer) { const buffer = bufferOrStr; const offset = offsetOrPosition; const length = lengthOrEncoding; return new Promise((resolve, reject)=>{ write(this.fd, buffer, offset, length, position, (err, bytesWritten, buffer)=>{ if (err) reject(err); else resolve({ buffer, bytesWritten }); }); }); } else { const str = bufferOrStr; const position = offsetOrPosition; const encoding = lengthOrEncoding; return new Promise((resolve, reject)=>{ write(this.fd, str, position, encoding, (err, bytesWritten, buffer)=>{ if (err) reject(err); else resolve({ buffer, bytesWritten }); }); }); } } close() { // Note that Deno.close is not async return Promise.resolve(core.close(this.fd)); } } export default { FileHandle }; QeZ'#ext:deno_node/internal/fs/handle.tsa bD`HM` Tp`PLa!Lba $Sb @Bhb?lSb1Ib`L` "]`b]`]`2bS]`R] L`` L`L` L`L] L`  D"{ "{ c D  c D  cFJ D  c Dc# Dbbc%*` a?"{ a? a?a?ba? a?La?a?  `T ``/ `/ `?  `  alD]T ` ajB`+ } `Fajaj bajaj]Bh  T  I`LB"b Ճ T I` Qaget fdb T I`b T I`b T I`Nbb  T I`Vb T(` ]  ` Ka  9c5(SbqqL`Da a b bLCL 6`Du`h ei h  e%0‚     e+2 1~)03 1 F a L"bADDD`RD]DH Q2^Ŀ`// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // This module is vendored from std/async/delay.ts // (with some modifications) import { primordials } from "ext:core/mod.js"; const { Promise, PromiseReject } = primordials; import { clearTimeout, setTimeout } from "ext:deno_web/02_timers.js"; /** Resolve a Promise after a given amount of milliseconds. */ export function delay(ms, options = {}) { const { signal } = options; if (signal?.aborted) { return PromiseReject(signal.reason); } return new Promise((resolve, reject)=>{ const abort = ()=>{ clearTimeout(i); reject(signal.reason); }; const done = ()=>{ signal?.removeEventListener("abort", abort); resolve(); }; const i = setTimeout(done, ms); signal?.addEventListener("abort", abort, { once: true }); }); } Qd>9<ext:deno_node/_util/async.tsa bD`M` TL`R$La'L` T  I`_HhSb1!ba??Ib``L` bS]`]`#]L`H` L`H]L`  Dc Dc D""c`a?a?"a?Ha?b@aa b   `Dl h %%ei h  0-%-%  abADD`RD]DH 9Q5 ^// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // This module ports: // - https://github.com/nodejs/node/blob/master/src/connection_wrap.cc // - https://github.com/nodejs/node/blob/master/src/connection_wrap.h import { LibuvStreamWrap } from "ext:deno_node/internal_binding/stream_wrap.ts"; export class ConnectionWrap extends LibuvStreamWrap { /** Optional connection callback. */ onconnection = null; /** * Creates a new ConnectionWrap class instance. * @param provider Provider type. * @param object Optional stream object. */ constructor(provider, object){ super(provider, object); } /** * @param req A connect request. * @param status An error status code. */ afterConnect(req, status) { const isSuccessStatus = !status; const readable = isSuccessStatus; const writable = isSuccessStatus; try { req.oncomplete(status, this, req, readable, writable); } catch { // swallow callback errors. } return; } } $QgS1ext:deno_node/internal_binding/connection_wrap.tsa bD`M` TT`b0La ! Laa   `T ``/ `/ `?  `  a]D]$ ` ajraj]b T  I`y@Sb1Ib^` L` ¸ ]`{]L`y` L`y] L`  Dbbcds`ba?ya?Rb Ճ T I`O[rb  T$` L`  `Kb / b3(Sbqqy`Da] a b  f`Dn8h ei h  0Âe+2 1  a RbAD`RD]DH UQQ/// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials /** * @param n Number to act on. * @return The number rounded up to the nearest power of 2. */ export function ceilPowOf2(n) { const roundPowOf2 = 1 << 31 - Math.clz32(n); return roundPowOf2 < n ? roundPowOf2 * 2 : roundPowOf2; } /** Initial backoff delay of 5ms following a temporary accept failure. */ export const INITIAL_ACCEPT_BACKOFF_DELAY = 5; /** Max backoff delay of 1s following a temporary accept failure. */ export const MAX_ACCEPT_BACKOFF_DELAY = 1000;  Qfpp)ext:deno_node/internal_binding/_listen.tsa bD`M` TD`FLa!L` T  I`6b{LSb1Ib`],L` {` L`{|` L`|b{` L`b{]`b{a?{a?|a?b@ca   `Dj h ei h   1 1 `bAD`RD]DH |Q}^z// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { op_node_sys_to_uv_error } from "ext:core/ops"; export function uvTranslateSysError(sysErrno) { return op_node_sys_to_uv_error(sysErrno); } $Qg1ext:deno_node/internal_binding/_libuv_winerror.tsa bD`M` T@`:La!L` T  I`@Sb1Ib` L` B]`s]L`` L`] L`  D U UcTk` Ua?a?b@aa   2`Di h ei h   F`bA>D`RD]DH 5Q5~k// Copyright the Browserify authors. MIT License. // Ported from https://github.com/browserify/path-browserify/ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { CHAR_BACKWARD_SLASH, CHAR_COLON, CHAR_DOT, CHAR_QUESTION_MARK } from "ext:deno_node/path/_constants.ts"; import { ERR_INVALID_ARG_TYPE } from "ext:deno_node/internal/errors.ts"; import { _format, assertPath, isPathSeparator, isWindowsDeviceRoot, normalizeString } from "ext:deno_node/path/_util.ts"; import { assert } from "ext:deno_node/_util/asserts.ts"; export const sep = "\\"; export const delimiter = ";"; /** * Resolves path segments into a `path` * @param pathSegments to process to path */ export function resolve(...pathSegments) { let resolvedDevice = ""; let resolvedTail = ""; let resolvedAbsolute = false; for(let i = pathSegments.length - 1; i >= -1; i--){ let path; // deno-lint-ignore no-explicit-any const { Deno } = globalThis; if (i >= 0) { path = pathSegments[i]; } else if (!resolvedDevice) { if (typeof Deno?.cwd !== "function") { throw new TypeError("Resolved a drive-letter-less path without a CWD."); } path = Deno.cwd(); } else { if (typeof Deno?.env?.get !== "function" || typeof Deno?.cwd !== "function") { throw new TypeError("Resolved a relative path without a CWD."); } path = Deno.cwd(); // Verify that a cwd was found and that it actually points // to our drive. If not, default to the drive's root. if (path === undefined || path.slice(0, 3).toLowerCase() !== `${resolvedDevice.toLowerCase()}\\`) { path = `${resolvedDevice}\\`; } } assertPath(path); const len = path.length; // Skip empty entries if (len === 0) continue; let rootEnd = 0; let device = ""; let isAbsolute = false; const code = path.charCodeAt(0); // Try to match a root if (len > 1) { if (isPathSeparator(code)) { // Possible UNC root // If we started with a separator, we know we at least have an // absolute path of some kind (UNC or otherwise) isAbsolute = true; if (isPathSeparator(path.charCodeAt(1))) { // Matched double path separator at beginning let j = 2; let last = j; // Match 1 or more non-path separators for(; j < len; ++j){ if (isPathSeparator(path.charCodeAt(j))) break; } if (j < len && j !== last) { const firstPart = path.slice(last, j); // Matched! last = j; // Match 1 or more path separators for(; j < len; ++j){ if (!isPathSeparator(path.charCodeAt(j))) break; } if (j < len && j !== last) { // Matched! last = j; // Match 1 or more non-path separators for(; j < len; ++j){ if (isPathSeparator(path.charCodeAt(j))) break; } if (j === len) { // We matched a UNC root only device = `\\\\${firstPart}\\${path.slice(last)}`; rootEnd = j; } else if (j !== last) { // We matched a UNC root with leftovers device = `\\\\${firstPart}\\${path.slice(last, j)}`; rootEnd = j; } } } } else { rootEnd = 1; } } else if (isWindowsDeviceRoot(code)) { // Possible device root if (path.charCodeAt(1) === CHAR_COLON) { device = path.slice(0, 2); rootEnd = 2; if (len > 2) { if (isPathSeparator(path.charCodeAt(2))) { // Treat separator following drive name as an absolute path // indicator isAbsolute = true; rootEnd = 3; } } } } } else if (isPathSeparator(code)) { // `path` contains just a path separator rootEnd = 1; isAbsolute = true; } if (device.length > 0 && resolvedDevice.length > 0 && device.toLowerCase() !== resolvedDevice.toLowerCase()) { continue; } if (resolvedDevice.length === 0 && device.length > 0) { resolvedDevice = device; } if (!resolvedAbsolute) { resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`; resolvedAbsolute = isAbsolute; } if (resolvedAbsolute && resolvedDevice.length > 0) break; } // At this point the path should be resolved to a full absolute path, // but handle relative paths to be safe (might happen when process.cwd() // fails) // Normalize the tail path resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, "\\", isPathSeparator); return resolvedDevice + (resolvedAbsolute ? "\\" : "") + resolvedTail || "."; } /** * Normalizes a `path` * @param path to normalize */ export function normalize(path) { assertPath(path); const len = path.length; if (len === 0) return "."; let rootEnd = 0; let device; let isAbsolute = false; const code = path.charCodeAt(0); // Try to match a root if (len > 1) { if (isPathSeparator(code)) { // Possible UNC root // If we started with a separator, we know we at least have an absolute // path of some kind (UNC or otherwise) isAbsolute = true; if (isPathSeparator(path.charCodeAt(1))) { // Matched double path separator at beginning let j = 2; let last = j; // Match 1 or more non-path separators for(; j < len; ++j){ if (isPathSeparator(path.charCodeAt(j))) break; } if (j < len && j !== last) { const firstPart = path.slice(last, j); // Matched! last = j; // Match 1 or more path separators for(; j < len; ++j){ if (!isPathSeparator(path.charCodeAt(j))) break; } if (j < len && j !== last) { // Matched! last = j; // Match 1 or more non-path separators for(; j < len; ++j){ if (isPathSeparator(path.charCodeAt(j))) break; } if (j === len) { // We matched a UNC root only // Return the normalized version of the UNC root since there // is nothing left to process return `\\\\${firstPart}\\${path.slice(last)}\\`; } else if (j !== last) { // We matched a UNC root with leftovers device = `\\\\${firstPart}\\${path.slice(last, j)}`; rootEnd = j; } } } } else { rootEnd = 1; } } else if (isWindowsDeviceRoot(code)) { // Possible device root if (path.charCodeAt(1) === CHAR_COLON) { device = path.slice(0, 2); rootEnd = 2; if (len > 2) { if (isPathSeparator(path.charCodeAt(2))) { // Treat separator following drive name as an absolute path // indicator isAbsolute = true; rootEnd = 3; } } } } } else if (isPathSeparator(code)) { // `path` contains just a path separator, exit early to avoid unnecessary // work return "\\"; } let tail; if (rootEnd < len) { tail = normalizeString(path.slice(rootEnd), !isAbsolute, "\\", isPathSeparator); } else { tail = ""; } if (tail.length === 0 && !isAbsolute) tail = "."; if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) { tail += "\\"; } if (device === undefined) { if (isAbsolute) { if (tail.length > 0) return `\\${tail}`; else return "\\"; } else if (tail.length > 0) { return tail; } else { return ""; } } else if (isAbsolute) { if (tail.length > 0) return `${device}\\${tail}`; else return `${device}\\`; } else if (tail.length > 0) { return device + tail; } else { return device; } } /** * Verifies whether path is absolute * @param path to verify */ export function isAbsolute(path) { assertPath(path); const len = path.length; if (len === 0) return false; const code = path.charCodeAt(0); if (isPathSeparator(code)) { return true; } else if (isWindowsDeviceRoot(code)) { // Possible device root if (len > 2 && path.charCodeAt(1) === CHAR_COLON) { if (isPathSeparator(path.charCodeAt(2))) return true; } } return false; } /** * Join all given a sequence of `paths`,then normalizes the resulting path. * @param paths to be joined and normalized */ export function join(...paths) { const pathsCount = paths.length; if (pathsCount === 0) return "."; let joined; let firstPart = null; for(let i = 0; i < pathsCount; ++i){ const path = paths[i]; assertPath(path); if (path.length > 0) { if (joined === undefined) joined = firstPart = path; else joined += `\\${path}`; } } if (joined === undefined) return "."; // Make sure that the joined path doesn't start with two slashes, because // normalize() will mistake it for an UNC path then. // // This step is skipped when it is very clear that the user actually // intended to point at an UNC path. This is assumed when the first // non-empty string arguments starts with exactly two slashes followed by // at least one more non-slash character. // // Note that for normalize() to treat a path as an UNC path it needs to // have at least 2 components, so we don't filter for that here. // This means that the user can use join to construct UNC paths from // a server name and a share name; for example: // path.join('//server', 'share') -> '\\\\server\\share\\') let needsReplace = true; let slashCount = 0; assert(firstPart != null); if (isPathSeparator(firstPart.charCodeAt(0))) { ++slashCount; const firstLen = firstPart.length; if (firstLen > 1) { if (isPathSeparator(firstPart.charCodeAt(1))) { ++slashCount; if (firstLen > 2) { if (isPathSeparator(firstPart.charCodeAt(2))) ++slashCount; else { // We matched a UNC path in the first part needsReplace = false; } } } } } if (needsReplace) { // Find any more consecutive slashes we need to replace for(; slashCount < joined.length; ++slashCount){ if (!isPathSeparator(joined.charCodeAt(slashCount))) break; } // Replace the slashes if needed if (slashCount >= 2) joined = `\\${joined.slice(slashCount)}`; } return normalize(joined); } /** * It will solve the relative path from `from` to `to`, for instance: * from = 'C:\\orandea\\test\\aaa' * to = 'C:\\orandea\\impl\\bbb' * The output of the function should be: '..\\..\\impl\\bbb' * @param from relative path * @param to relative path */ export function relative(from, to) { assertPath(from); assertPath(to); if (from === to) return ""; const fromOrig = resolve(from); const toOrig = resolve(to); if (fromOrig === toOrig) return ""; from = fromOrig.toLowerCase(); to = toOrig.toLowerCase(); if (from === to) return ""; // Trim any leading backslashes let fromStart = 0; let fromEnd = from.length; for(; fromStart < fromEnd; ++fromStart){ if (from.charCodeAt(fromStart) !== CHAR_BACKWARD_SLASH) break; } // Trim trailing backslashes (applicable to UNC paths only) for(; fromEnd - 1 > fromStart; --fromEnd){ if (from.charCodeAt(fromEnd - 1) !== CHAR_BACKWARD_SLASH) break; } const fromLen = fromEnd - fromStart; // Trim any leading backslashes let toStart = 0; let toEnd = to.length; for(; toStart < toEnd; ++toStart){ if (to.charCodeAt(toStart) !== CHAR_BACKWARD_SLASH) break; } // Trim trailing backslashes (applicable to UNC paths only) for(; toEnd - 1 > toStart; --toEnd){ if (to.charCodeAt(toEnd - 1) !== CHAR_BACKWARD_SLASH) break; } const toLen = toEnd - toStart; // Compare paths to find the longest common path from root const length = fromLen < toLen ? fromLen : toLen; let lastCommonSep = -1; let i = 0; for(; i <= length; ++i){ if (i === length) { if (toLen > length) { if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) { // We get here if `from` is the exact base path for `to`. // For example: from='C:\\foo\\bar'; to='C:\\foo\\bar\\baz' return toOrig.slice(toStart + i + 1); } else if (i === 2) { // We get here if `from` is the device root. // For example: from='C:\\'; to='C:\\foo' return toOrig.slice(toStart + i); } } if (fromLen > length) { if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) { // We get here if `to` is the exact base path for `from`. // For example: from='C:\\foo\\bar'; to='C:\\foo' lastCommonSep = i; } else if (i === 2) { // We get here if `to` is the device root. // For example: from='C:\\foo\\bar'; to='C:\\' lastCommonSep = 3; } } break; } const fromCode = from.charCodeAt(fromStart + i); const toCode = to.charCodeAt(toStart + i); if (fromCode !== toCode) break; else if (fromCode === CHAR_BACKWARD_SLASH) lastCommonSep = i; } // We found a mismatch before the first common path separator was seen, so // return the original `to`. if (i !== length && lastCommonSep === -1) { return toOrig; } let out = ""; if (lastCommonSep === -1) lastCommonSep = 0; // Generate the relative path based on the path difference between `to` and // `from` for(i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i){ if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) { if (out.length === 0) out += ".."; else out += "\\.."; } } // Lastly, append the rest of the destination (`to`) path that comes after // the common path parts if (out.length > 0) { return out + toOrig.slice(toStart + lastCommonSep, toEnd); } else { toStart += lastCommonSep; if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) ++toStart; return toOrig.slice(toStart, toEnd); } } /** * Resolves path to a namespace path * @param path to resolve to namespace */ export function toNamespacedPath(path) { // Note: this will *probably* throw somewhere. if (typeof path !== "string") return path; if (path.length === 0) return ""; const resolvedPath = resolve(path); if (resolvedPath.length >= 3) { if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) { // Possible UNC root if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) { const code = resolvedPath.charCodeAt(2); if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) { // Matched non-long UNC root, convert the path to a long UNC path return `\\\\?\\UNC\\${resolvedPath.slice(2)}`; } } } else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0))) { // Possible device root if (resolvedPath.charCodeAt(1) === CHAR_COLON && resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH) { // Matched device root, convert the path to a long UNC path return `\\\\?\\${resolvedPath}`; } } } return path; } /** * Return the directory name of a `path`. * @param path to determine name for */ export function dirname(path) { assertPath(path); const len = path.length; if (len === 0) return "."; let rootEnd = -1; let end = -1; let matchedSlash = true; let offset = 0; const code = path.charCodeAt(0); // Try to match a root if (len > 1) { if (isPathSeparator(code)) { // Possible UNC root rootEnd = offset = 1; if (isPathSeparator(path.charCodeAt(1))) { // Matched double path separator at beginning let j = 2; let last = j; // Match 1 or more non-path separators for(; j < len; ++j){ if (isPathSeparator(path.charCodeAt(j))) break; } if (j < len && j !== last) { // Matched! last = j; // Match 1 or more path separators for(; j < len; ++j){ if (!isPathSeparator(path.charCodeAt(j))) break; } if (j < len && j !== last) { // Matched! last = j; // Match 1 or more non-path separators for(; j < len; ++j){ if (isPathSeparator(path.charCodeAt(j))) break; } if (j === len) { // We matched a UNC root only return path; } if (j !== last) { // We matched a UNC root with leftovers // Offset by 1 to include the separator after the UNC root to // treat it as a "normal root" on top of a (UNC) root rootEnd = offset = j + 1; } } } } } else if (isWindowsDeviceRoot(code)) { // Possible device root if (path.charCodeAt(1) === CHAR_COLON) { rootEnd = offset = 2; if (len > 2) { if (isPathSeparator(path.charCodeAt(2))) rootEnd = offset = 3; } } } } else if (isPathSeparator(code)) { // `path` contains just a path separator, exit early to avoid // unnecessary work return path; } for(let i = len - 1; i >= offset; --i){ if (isPathSeparator(path.charCodeAt(i))) { if (!matchedSlash) { end = i; break; } } else { // We saw the first non-path separator matchedSlash = false; } } if (end === -1) { if (rootEnd === -1) return "."; else end = rootEnd; } return path.slice(0, end); } /** * Return the last portion of a `path`. Trailing directory separators are ignored. * @param path to process * @param ext of path directory */ export function basename(path, ext = "") { if (ext !== undefined && typeof ext !== "string") { throw new ERR_INVALID_ARG_TYPE("ext", [ "string" ], ext); } assertPath(path); let start = 0; let end = -1; let matchedSlash = true; let i; // Check for a drive letter prefix so as not to mistake the following // path separator as an extra separator at the end of the path that can be // disregarded if (path.length >= 2) { const drive = path.charCodeAt(0); if (isWindowsDeviceRoot(drive)) { if (path.charCodeAt(1) === CHAR_COLON) start = 2; } } if (ext !== undefined && ext.length > 0 && ext.length <= path.length) { if (ext.length === path.length && ext === path) return ""; let extIdx = ext.length - 1; let firstNonSlashEnd = -1; for(i = path.length - 1; i >= start; --i){ const code = path.charCodeAt(i); if (isPathSeparator(code)) { // If we reached a path separator that was not part of a set of path // separators at the end of the string, stop now if (!matchedSlash) { start = i + 1; break; } } else { if (firstNonSlashEnd === -1) { // We saw the first non-path separator, remember this index in case // we need it if the extension ends up not matching matchedSlash = false; firstNonSlashEnd = i + 1; } if (extIdx >= 0) { // Try to match the explicit extension if (code === ext.charCodeAt(extIdx)) { if (--extIdx === -1) { // We matched the extension, so mark this as the end of our path // component end = i; } } else { // Extension does not match, so our result is the entire path // component extIdx = -1; end = firstNonSlashEnd; } } } } if (start === end) end = firstNonSlashEnd; else if (end === -1) end = path.length; return path.slice(start, end); } else { for(i = path.length - 1; i >= start; --i){ if (isPathSeparator(path.charCodeAt(i))) { // If we reached a path separator that was not part of a set of path // separators at the end of the string, stop now if (!matchedSlash) { start = i + 1; break; } } else if (end === -1) { // We saw the first non-path separator, mark this as the end of our // path component matchedSlash = false; end = i + 1; } } if (end === -1) return ""; return path.slice(start, end); } } /** * Return the extension of the `path`. * @param path with extension */ export function extname(path) { assertPath(path); let start = 0; let startDot = -1; let startPart = 0; let end = -1; let matchedSlash = true; // Track the state of characters (if any) we see before our first dot and // after any path separator we find let preDotState = 0; // Check for a drive letter prefix so as not to mistake the following // path separator as an extra separator at the end of the path that can be // disregarded if (path.length >= 2 && path.charCodeAt(1) === CHAR_COLON && isWindowsDeviceRoot(path.charCodeAt(0))) { start = startPart = 2; } for(let i = path.length - 1; i >= start; --i){ const code = path.charCodeAt(i); if (isPathSeparator(code)) { // If we reached a path separator that was not part of a set of path // separators at the end of the string, stop now if (!matchedSlash) { startPart = i + 1; break; } continue; } if (end === -1) { // We saw the first non-path separator, mark this as the end of our // extension matchedSlash = false; end = i + 1; } if (code === CHAR_DOT) { // If this is our first dot, mark it as the start of our extension if (startDot === -1) startDot = i; else if (preDotState !== 1) preDotState = 1; } else if (startDot !== -1) { // We saw a non-dot and non-path separator before our dot, so we should // have a good chance at having a non-empty extension preDotState = -1; } } if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot preDotState === 0 || // The (right-most) trimmed path component is exactly '..' preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { return ""; } return path.slice(startDot, end); } /** * Generate a path from `FormatInputPathObject` object. * @param pathObject with path */ export function format(pathObject) { if (pathObject === null || typeof pathObject !== "object") { throw new ERR_INVALID_ARG_TYPE("pathObject", [ "Object" ], pathObject); } return _format("\\", pathObject); } /** * Return a `ParsedPath` object of the `path`. * @param path to process */ export function parse(path) { assertPath(path); const ret = { root: "", dir: "", base: "", ext: "", name: "" }; const len = path.length; if (len === 0) return ret; let rootEnd = 0; let code = path.charCodeAt(0); // Try to match a root if (len > 1) { if (isPathSeparator(code)) { // Possible UNC root rootEnd = 1; if (isPathSeparator(path.charCodeAt(1))) { // Matched double path separator at beginning let j = 2; let last = j; // Match 1 or more non-path separators for(; j < len; ++j){ if (isPathSeparator(path.charCodeAt(j))) break; } if (j < len && j !== last) { // Matched! last = j; // Match 1 or more path separators for(; j < len; ++j){ if (!isPathSeparator(path.charCodeAt(j))) break; } if (j < len && j !== last) { // Matched! last = j; // Match 1 or more non-path separators for(; j < len; ++j){ if (isPathSeparator(path.charCodeAt(j))) break; } if (j === len) { // We matched a UNC root only rootEnd = j; } else if (j !== last) { // We matched a UNC root with leftovers rootEnd = j + 1; } } } } } else if (isWindowsDeviceRoot(code)) { // Possible device root if (path.charCodeAt(1) === CHAR_COLON) { rootEnd = 2; if (len > 2) { if (isPathSeparator(path.charCodeAt(2))) { if (len === 3) { // `path` contains just a drive root, exit early to avoid // unnecessary work ret.root = ret.dir = path; return ret; } rootEnd = 3; } } else { // `path` contains just a drive root, exit early to avoid // unnecessary work ret.root = ret.dir = path; return ret; } } } } else if (isPathSeparator(code)) { // `path` contains just a path separator, exit early to avoid // unnecessary work ret.root = ret.dir = path; return ret; } if (rootEnd > 0) ret.root = path.slice(0, rootEnd); let startDot = -1; let startPart = rootEnd; let end = -1; let matchedSlash = true; let i = path.length - 1; // Track the state of characters (if any) we see before our first dot and // after any path separator we find let preDotState = 0; // Get non-dir info for(; i >= rootEnd; --i){ code = path.charCodeAt(i); if (isPathSeparator(code)) { // If we reached a path separator that was not part of a set of path // separators at the end of the string, stop now if (!matchedSlash) { startPart = i + 1; break; } continue; } if (end === -1) { // We saw the first non-path separator, mark this as the end of our // extension matchedSlash = false; end = i + 1; } if (code === CHAR_DOT) { // If this is our first dot, mark it as the start of our extension if (startDot === -1) startDot = i; else if (preDotState !== 1) preDotState = 1; } else if (startDot !== -1) { // We saw a non-dot and non-path separator before our dot, so we should // have a good chance at having a non-empty extension preDotState = -1; } } if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot preDotState === 0 || // The (right-most) trimmed path component is exactly '..' preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { if (end !== -1) { ret.base = ret.name = path.slice(startPart, end); } } else { ret.name = path.slice(startPart, startDot); ret.base = path.slice(startPart, end); ret.ext = path.slice(startDot, end); } // If the directory is the root, use the entire root as the `dir` including // the trailing slash if any (`C:\abc` -> `C:\`). Otherwise, strip out the // trailing slash (`C:\abc\def` -> `C:\abc`). if (startPart > 0 && startPart !== rootEnd) { ret.dir = path.slice(0, startPart - 1); } else ret.dir = ret.root; return ret; } export default { basename, delimiter, dirname, extname, format, isAbsolute, join, normalize, parse, relative, resolve, sep, toNamespacedPath }; Qdvext:deno_node/path/_win32.tsa bD`8M`  Tx`XLa!Lb$  T  I`@ USb1Ibk`L` ]`x ]`"]`@b ]`v]L`*` L`3` L`3b3` L`b3y ` L`y 3` L`3-` L`b ` L`b ` L`"O`  L`"OB``  L`B`B4`  L`B4`  L`a`  L`4` L`4]4L`   DBBc3F DcHR D""cT\ Dbbc^p Db b c DN N c D chn Dc Dc Dc' Dc)8`Ba?a?"a?ba?b a?N a?a?a?a?a?a?a ?b3a? a ?"Oa ?b a?a?B4a ?4a?y a?3a?3a?a?B`a ?a?nb@a  T  I`"Ob@a  T I`4 !b b@a T I`H"*b @a T I`'+8B4b@a  T I`8`<4b@a T I`<Ey b@a T I`}FP3b@a T I`Q X3b@ a T I`XcYb@ a  T I`YtjB`b@ b a %xb 3Cb3Cy C3C-Cb CC"OCB`CB4CCaC4C3b3y 3b "OB`B44  `Dw h ei h  1 1~)030303 03 03 03 03 0 30 30 30 30 303 1 c nbA&.6>FNV^fD`RD]DH Q5|)5// Copyright the Browserify authors. MIT License. // Ported from https://github.com/browserify/path-browserify/ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { CHAR_DOT, CHAR_FORWARD_SLASH } from "ext:deno_node/path/_constants.ts"; import { ERR_INVALID_ARG_TYPE } from "ext:deno_node/internal/errors.ts"; import { _format, assertPath, isPosixPathSeparator, normalizeString } from "ext:deno_node/path/_util.ts"; export const sep = "/"; export const delimiter = ":"; // path.resolve([from ...], to) /** * Resolves `pathSegments` into an absolute path. * @param pathSegments an array of path segments */ export function resolve(...pathSegments) { let resolvedPath = ""; let resolvedAbsolute = false; for(let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--){ let path; if (i >= 0) path = pathSegments[i]; else { // deno-lint-ignore no-explicit-any const { Deno } = globalThis; if (typeof Deno?.cwd !== "function") { throw new TypeError("Resolved a relative path without a CWD."); } path = Deno.cwd(); } assertPath(path); // Skip empty entries if (path.length === 0) { continue; } resolvedPath = `${path}/${resolvedPath}`; resolvedAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; } // At this point the path should be resolved to a full absolute path, but // handle relative paths to be safe (might happen when process.cwd() fails) // Normalize the path resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, "/", isPosixPathSeparator); if (resolvedAbsolute) { if (resolvedPath.length > 0) return `/${resolvedPath}`; else return "/"; } else if (resolvedPath.length > 0) return resolvedPath; else return "."; } /** * Normalize the `path`, resolving `'..'` and `'.'` segments. * @param path to be normalized */ export function normalize(path) { assertPath(path); if (path.length === 0) return "."; const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; const trailingSeparator = path.charCodeAt(path.length - 1) === CHAR_FORWARD_SLASH; // Normalize the path path = normalizeString(path, !isAbsolute, "/", isPosixPathSeparator); if (path.length === 0 && !isAbsolute) path = "."; if (path.length > 0 && trailingSeparator) path += "/"; if (isAbsolute) return `/${path}`; return path; } /** * Verifies whether provided path is absolute * @param path to be verified as absolute */ export function isAbsolute(path) { assertPath(path); return path.length > 0 && path.charCodeAt(0) === CHAR_FORWARD_SLASH; } /** * Join all given a sequence of `paths`,then normalizes the resulting path. * @param paths to be joined and normalized */ export function join(...paths) { if (paths.length === 0) return "."; let joined; for(let i = 0, len = paths.length; i < len; ++i){ const path = paths[i]; assertPath(path); if (path.length > 0) { if (!joined) joined = path; else joined += `/${path}`; } } if (!joined) return "."; return normalize(joined); } /** * Return the relative path from `from` to `to` based on current working directory. * @param from path in current working directory * @param to path in current working directory */ export function relative(from, to) { assertPath(from); assertPath(to); if (from === to) return ""; from = resolve(from); to = resolve(to); if (from === to) return ""; // Trim any leading backslashes let fromStart = 1; const fromEnd = from.length; for(; fromStart < fromEnd; ++fromStart){ if (from.charCodeAt(fromStart) !== CHAR_FORWARD_SLASH) break; } const fromLen = fromEnd - fromStart; // Trim any leading backslashes let toStart = 1; const toEnd = to.length; for(; toStart < toEnd; ++toStart){ if (to.charCodeAt(toStart) !== CHAR_FORWARD_SLASH) break; } const toLen = toEnd - toStart; // Compare paths to find the longest common path from root const length = fromLen < toLen ? fromLen : toLen; let lastCommonSep = -1; let i = 0; for(; i <= length; ++i){ if (i === length) { if (toLen > length) { if (to.charCodeAt(toStart + i) === CHAR_FORWARD_SLASH) { // We get here if `from` is the exact base path for `to`. // For example: from='/foo/bar'; to='/foo/bar/baz' return to.slice(toStart + i + 1); } else if (i === 0) { // We get here if `from` is the root // For example: from='/'; to='/foo' return to.slice(toStart + i); } } else if (fromLen > length) { if (from.charCodeAt(fromStart + i) === CHAR_FORWARD_SLASH) { // We get here if `to` is the exact base path for `from`. // For example: from='/foo/bar/baz'; to='/foo/bar' lastCommonSep = i; } else if (i === 0) { // We get here if `to` is the root. // For example: from='/foo'; to='/' lastCommonSep = 0; } } break; } const fromCode = from.charCodeAt(fromStart + i); const toCode = to.charCodeAt(toStart + i); if (fromCode !== toCode) break; else if (fromCode === CHAR_FORWARD_SLASH) lastCommonSep = i; } let out = ""; // Generate the relative path based on the path difference between `to` // and `from` for(i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i){ if (i === fromEnd || from.charCodeAt(i) === CHAR_FORWARD_SLASH) { if (out.length === 0) out += ".."; else out += "/.."; } } // Lastly, append the rest of the destination (`to`) path that comes after // the common path parts if (out.length > 0) return out + to.slice(toStart + lastCommonSep); else { toStart += lastCommonSep; if (to.charCodeAt(toStart) === CHAR_FORWARD_SLASH) ++toStart; return to.slice(toStart); } } /** * Resolves path to a namespace path * @param path to resolve to namespace */ export function toNamespacedPath(path) { // Non-op on posix systems return path; } /** * Return the directory name of a `path`. * @param path to determine name for */ export function dirname(path) { assertPath(path); if (path.length === 0) return "."; const hasRoot = path.charCodeAt(0) === CHAR_FORWARD_SLASH; let end = -1; let matchedSlash = true; for(let i = path.length - 1; i >= 1; --i){ if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) { if (!matchedSlash) { end = i; break; } } else { // We saw the first non-path separator matchedSlash = false; } } if (end === -1) return hasRoot ? "/" : "."; if (hasRoot && end === 1) return "//"; return path.slice(0, end); } /** * Return the last portion of a `path`. Trailing directory separators are ignored. * @param path to process * @param ext of path directory */ export function basename(path, ext = "") { if (ext !== undefined && typeof ext !== "string") { throw new ERR_INVALID_ARG_TYPE("ext", [ "string" ], ext); } assertPath(path); let start = 0; let end = -1; let matchedSlash = true; let i; if (ext !== undefined && ext.length > 0 && ext.length <= path.length) { if (ext.length === path.length && ext === path) return ""; let extIdx = ext.length - 1; let firstNonSlashEnd = -1; for(i = path.length - 1; i >= 0; --i){ const code = path.charCodeAt(i); if (code === CHAR_FORWARD_SLASH) { // If we reached a path separator that was not part of a set of path // separators at the end of the string, stop now if (!matchedSlash) { start = i + 1; break; } } else { if (firstNonSlashEnd === -1) { // We saw the first non-path separator, remember this index in case // we need it if the extension ends up not matching matchedSlash = false; firstNonSlashEnd = i + 1; } if (extIdx >= 0) { // Try to match the explicit extension if (code === ext.charCodeAt(extIdx)) { if (--extIdx === -1) { // We matched the extension, so mark this as the end of our path // component end = i; } } else { // Extension does not match, so our result is the entire path // component extIdx = -1; end = firstNonSlashEnd; } } } } if (start === end) end = firstNonSlashEnd; else if (end === -1) end = path.length; return path.slice(start, end); } else { for(i = path.length - 1; i >= 0; --i){ if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) { // If we reached a path separator that was not part of a set of path // separators at the end of the string, stop now if (!matchedSlash) { start = i + 1; break; } } else if (end === -1) { // We saw the first non-path separator, mark this as the end of our // path component matchedSlash = false; end = i + 1; } } if (end === -1) return ""; return path.slice(start, end); } } /** * Return the extension of the `path`. * @param path with extension */ export function extname(path) { assertPath(path); let startDot = -1; let startPart = 0; let end = -1; let matchedSlash = true; // Track the state of characters (if any) we see before our first dot and // after any path separator we find let preDotState = 0; for(let i = path.length - 1; i >= 0; --i){ const code = path.charCodeAt(i); if (code === CHAR_FORWARD_SLASH) { // If we reached a path separator that was not part of a set of path // separators at the end of the string, stop now if (!matchedSlash) { startPart = i + 1; break; } continue; } if (end === -1) { // We saw the first non-path separator, mark this as the end of our // extension matchedSlash = false; end = i + 1; } if (code === CHAR_DOT) { // If this is our first dot, mark it as the start of our extension if (startDot === -1) startDot = i; else if (preDotState !== 1) preDotState = 1; } else if (startDot !== -1) { // We saw a non-dot and non-path separator before our dot, so we should // have a good chance at having a non-empty extension preDotState = -1; } } if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot preDotState === 0 || // The (right-most) trimmed path component is exactly '..' preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { return ""; } return path.slice(startDot, end); } /** * Generate a path from `FormatInputPathObject` object. * @param pathObject with path */ export function format(pathObject) { if (pathObject === null || typeof pathObject !== "object") { throw new ERR_INVALID_ARG_TYPE("pathObject", [ "Object" ], pathObject); } return _format("/", pathObject); } /** * Return a `ParsedPath` object of the `path`. * @param path to process */ export function parse(path) { assertPath(path); const ret = { root: "", dir: "", base: "", ext: "", name: "" }; if (path.length === 0) return ret; const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; let start; if (isAbsolute) { ret.root = "/"; start = 1; } else { start = 0; } let startDot = -1; let startPart = 0; let end = -1; let matchedSlash = true; let i = path.length - 1; // Track the state of characters (if any) we see before our first dot and // after any path separator we find let preDotState = 0; // Get non-dir info for(; i >= start; --i){ const code = path.charCodeAt(i); if (code === CHAR_FORWARD_SLASH) { // If we reached a path separator that was not part of a set of path // separators at the end of the string, stop now if (!matchedSlash) { startPart = i + 1; break; } continue; } if (end === -1) { // We saw the first non-path separator, mark this as the end of our // extension matchedSlash = false; end = i + 1; } if (code === CHAR_DOT) { // If this is our first dot, mark it as the start of our extension if (startDot === -1) startDot = i; else if (preDotState !== 1) preDotState = 1; } else if (startDot !== -1) { // We saw a non-dot and non-path separator before our dot, so we should // have a good chance at having a non-empty extension preDotState = -1; } } if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot preDotState === 0 || // The (right-most) trimmed path component is exactly '..' preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { if (end !== -1) { if (startPart === 0 && isAbsolute) { ret.base = ret.name = path.slice(1, end); } else { ret.base = ret.name = path.slice(startPart, end); } } } else { if (startPart === 0 && isAbsolute) { ret.name = path.slice(1, startDot); ret.base = path.slice(1, end); } else { ret.name = path.slice(startPart, startDot); ret.base = path.slice(startPart, end); } ret.ext = path.slice(startDot, end); } if (startPart > 0) ret.dir = path.slice(0, startPart - 1); else if (isAbsolute) ret.dir = "/"; return ret; } export default { basename, delimiter, dirname, extname, format, isAbsolute, join, normalize, parse, relative, resolve, sep, toNamespacedPath }; Qd&Cext:deno_node/path/_posix.tsa bD`8M`  Tx`XLa!Lb$  T  I`i %Sb1Ib5`L` ]`W ]`"]`]L`*` L`3` L`3b3` L`b3y ` L`y 3` L`3-` L`b ` L`b ` L`"O`  L`"OB``  L`B`B4`  L`B4`  L`a`  L`4` L`4]$L`  D""c3; DV V c=O Db b c DN N c Dc D"'"'c Dc`"a?V a?b a?N a?a?"'a?a?a ?b3a?a ?"Oa ?b a?a?B4a ?4a?y a?3a?3a?a?B`a ?a?zb@a  T  I` "Ob@a  T I`= b b@a T I`7 } b @a T I`R 9B4b@a  T I`4b@a T I`Swy b@a T I`%$3b@a T I`x$@*3b@ a T I`*+b@ a  T I`+5B`b@ b a "xb 3Cb3Cy C3CCb CC"OCB`CB4C CC4C3b3y 3b "OB`B44  `Dw h ei h  1 1~)030303 03 03 03 03 0 30 30 30 30 303 1 c zbA&.6>FNV^D`RD]DH iQe6// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // This module is browser compatible. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { SEP } from "ext:deno_node/path/separator.ts"; /** Determines the common path from a set of paths, using an optional separator, * which defaults to the OS default separator. * * ```ts * const p = common([ * "./deno/std/path/mod.ts", * "./deno/std/fs/mod.ts", * ]); * console.log(p); // "./deno/std/" * ``` */ export function common(paths, sep = SEP) { const [first = "", ...remaining] = paths; if (first === "" || remaining.length === 0) { return first.substring(0, first.lastIndexOf(sep) + 1); } const parts = first.split(sep); let endOfPrefix = parts.length; for (const path of remaining){ const compare = path.split(sep); for(let i = 0; i < endOfPrefix; i++){ if (compare[i] !== parts[i]) { endOfPrefix = i; } } if (endOfPrefix === 0) { return ""; } } const prefix = parts.slice(0, endOfPrefix).join(sep); return prefix.endsWith(sep) ? prefix : `${prefix}${sep}`; } Qd'ext:deno_node/path/common.tsa bD`M` T@`:La!L` T  I`_@Sb1Ib` L` ")]`]L`` L`] L`  D((c`(a?a?rb@aa   `Di h ei h   `bAD`RD]DH \Qu]// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. /** * A parsed path object generated by path.parse() or consumed by path.format(). */ Qd" ext:deno_node/path/_interface.tsa bD` M` T8`-Lc   `Dg h Ʊh   (Sb1Ib`]` bAD`RD]DH Q8// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { charLengthAt, CSI, emitKeys, } from "ext:deno_node/internal/readline/utils.mjs"; import { kSawKeyPress } from "ext:deno_node/internal/readline/symbols.mjs"; import { clearTimeout, setTimeout } from "node:timers"; const { kEscape, } = CSI; import { StringDecoder } from "node:string_decoder"; const KEYPRESS_DECODER = Symbol("keypress-decoder"); const ESCAPE_DECODER = Symbol("escape-decoder"); // GNU readline library - keyseq-timeout is 500ms (default) const ESCAPE_CODE_TIMEOUT = 500; /** * accepts a readable Stream instance and makes it emit "keypress" events */ export function emitKeypressEvents(stream, iface = {}) { if (stream[KEYPRESS_DECODER]) return; stream[KEYPRESS_DECODER] = new StringDecoder("utf8"); stream[ESCAPE_DECODER] = emitKeys(stream); stream[ESCAPE_DECODER].next(); const triggerEscape = () => stream[ESCAPE_DECODER].next(""); const { escapeCodeTimeout = ESCAPE_CODE_TIMEOUT } = iface; let timeoutId; function onData(input) { if (stream.listenerCount("keypress") > 0) { const string = stream[KEYPRESS_DECODER].write(input); if (string) { clearTimeout(timeoutId); // This supports characters of length 2. iface[kSawKeyPress] = charLengthAt(string, 0) === string.length; iface.isCompletionEnabled = false; let length = 0; for (const character of string[Symbol.iterator]()) { length += character.length; if (length === string.length) { iface.isCompletionEnabled = true; } try { stream[ESCAPE_DECODER].next(character); // Escape letter at the tail position if (length === string.length && character === kEscape) { timeoutId = setTimeout(triggerEscape, escapeCodeTimeout); } } catch (err) { // If the generator throws (it could happen in the `keypress` // event), we need to restart it. stream[ESCAPE_DECODER] = emitKeys(stream); stream[ESCAPE_DECODER].next(); throw err; } } } } else { // Nobody's watching anyway stream.removeListener("data", onData); stream.on("newListener", onNewListener); } } function onNewListener(event) { if (event === "keypress") { stream.on("data", onData); stream.removeListener("newListener", onNewListener); } } if (stream.listenerCount("keypress") > 0) { stream.on("data", onData); } else { stream.on("newListener", onNewListener); } } $Qg6ext:deno_node/internal/readline/emitKeypressEvents.mjsa bD`M` T\`r,La -L` T I`7c@@ |Sb1b*b+Pc????Ib8`L` b ]`\L]`5 ]`3 ]`I]L`|` L`|]$L`  DLLcDG Dc4A Dbbc4@ Dc DcKS DB5B5c D""c`ba?La?a?B5a?a?"a?a?|a?b@aa L *+  `Dp h %%%%ei h  0-%!b%!b% %  a@bA DD`RD]DH Q&J// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials export const kAddHistory = Symbol("_addHistory"); export const kDecoder = Symbol("_decoder"); export const kDeleteLeft = Symbol("_deleteLeft"); export const kDeleteLineLeft = Symbol("_deleteLineLeft"); export const kDeleteLineRight = Symbol("_deleteLineRight"); export const kDeleteRight = Symbol("_deleteRight"); export const kDeleteWordLeft = Symbol("_deleteWordLeft"); export const kDeleteWordRight = Symbol("_deleteWordRight"); export const kGetDisplayPos = Symbol("_getDisplayPos"); export const kHistoryNext = Symbol("_historyNext"); export const kHistoryPrev = Symbol("_historyPrev"); export const kInsertString = Symbol("_insertString"); export const kLine = Symbol("_line"); export const kLine_buffer = Symbol("_line_buffer"); export const kMoveCursor = Symbol("_moveCursor"); export const kNormalWrite = Symbol("_normalWrite"); export const kOldPrompt = Symbol("_oldPrompt"); export const kOnLine = Symbol("_onLine"); export const kPreviousKey = Symbol("_previousKey"); export const kPrompt = Symbol("_prompt"); export const kQuestionCallback = Symbol("_questionCallback"); export const kRefreshLine = Symbol("_refreshLine"); export const kSawKeyPress = Symbol("_sawKeyPress"); export const kSawReturnAt = Symbol("_sawReturnAt"); export const kSetRawMode = Symbol("_setRawMode"); export const kTabComplete = Symbol("_tabComplete"); export const kTabCompleter = Symbol("_tabCompleter"); export const kTtyWrite = Symbol("_ttyWrite"); export const kWordLeft = Symbol("_wordLeft"); export const kWordRight = Symbol("_wordRight"); export const kWriteToOutput = Symbol("_writeToOutput");  Qf 6+ext:deno_node/internal/readline/symbols.mjsa bD` M` T`La$!L a  @:"D"FFD"EEHGHA"G";JA;"?"<<=@=">>Bb.J"CC?  v`D h ei h  !b1!b1!b1!b1! b 1! b 1! b1! b1! b1 !b1 !b1 !b1 !b1 !b1!b1!b 1!b"1!b$1!b&1!b(1!b*1!b,1!b.1!b01!b21!b41!b61! b81!!b:1!"b<1!#b>1 Sb1IbJ`]}L`]*` L`*"+` L`"++` L`+,` L`,,` L`,-` L`--` L`-.` L`..`  L`./`  L`//`  L`/0`  L`00`  L`00` L`0b1` L`b11` L`1b2` L`b22` L`2B3` L`B33` L`3"4` L`"44` L`4B5` L`B55` L`5B6` L`B66` L`6B7` L`B77` L`7B8` L`B88` L`8B9` L`B9]`*a?"+a?+a?,a?,a?-a?-a?.a?.a ?/a ?/a ?0a ?0a ?0a?b1a?1a?b2a?2a?B3a?3a?"4a?4a?B5a?5a?B6a?6a?B7a?7a?B8a?8a?B9a? f@@@@@@@@@@@bbAD`RD]DH  Q A\// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. import { primordials } from "ext:core/mod.js"; const { ArrayPrototypeFind, ObjectEntries, ObjectHasOwn, StringPrototypeCharAt, StringPrototypeIncludes, StringPrototypeStartsWith, } = primordials; import { validateObject } from "ext:deno_node/internal/validators.mjs"; // These are internal utilities to make the parsing logic easier to read, and // add lots of detail for the curious. They are in a separate file to allow // unit testing, although that is not essential (this could be rolled into // main file and just tested implicitly via API). // // These routines are for internal use, not for export to client. /** * Return the named property, but only if it is an own property. */ function objectGetOwn(obj, prop) { if (ObjectHasOwn(obj, prop)) { return obj[prop]; } } /** * Return the named options property, but only if it is an own property. */ function optionsGetOwn(options, longOption, prop) { if (ObjectHasOwn(options, longOption)) { return objectGetOwn(options[longOption], prop); } } /** * Determines if the argument may be used as an option value. * @example * isOptionValue('V') // returns true * isOptionValue('-v') // returns true (greedy) * isOptionValue('--foo') // returns true (greedy) * isOptionValue(undefined) // returns false */ function isOptionValue(value) { if (value == null) return false; // Open Group Utility Conventions are that an option-argument // is the argument after the option, and may start with a dash. return true; // greedy! } /** * Detect whether there is possible confusion and user may have omitted * the option argument, like `--port --verbose` when `port` of type:string. * In strict mode we throw errors if value is option-like. */ function isOptionLikeValue(value) { if (value == null) return false; return value.length > 1 && StringPrototypeCharAt(value, 0) === "-"; } /** * Determines if `arg` is just a short option. * @example '-f' */ function isLoneShortOption(arg) { return arg.length === 2 && StringPrototypeCharAt(arg, 0) === "-" && StringPrototypeCharAt(arg, 1) !== "-"; } /** * Determines if `arg` is a lone long option. * @example * isLoneLongOption('a') // returns false * isLoneLongOption('-a') // returns false * isLoneLongOption('--foo') // returns true * isLoneLongOption('--foo=bar') // returns false */ function isLoneLongOption(arg) { return arg.length > 2 && StringPrototypeStartsWith(arg, "--") && !StringPrototypeIncludes(arg, "=", 3); } /** * Determines if `arg` is a long option and value in the same argument. * @example * isLongOptionAndValue('--foo') // returns false * isLongOptionAndValue('--foo=bar') // returns true */ function isLongOptionAndValue(arg) { return arg.length > 2 && StringPrototypeStartsWith(arg, "--") && StringPrototypeIncludes(arg, "=", 3); } /** * Determines if `arg` is a short option group. * * See Guideline 5 of the [Open Group Utility Conventions](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html). * One or more options without option-arguments, followed by at most one * option that takes an option-argument, should be accepted when grouped * behind one '-' delimiter. * @example * isShortOptionGroup('-a', {}) // returns false * isShortOptionGroup('-ab', {}) // returns true * // -fb is an option and a value, not a short option group * isShortOptionGroup('-fb', { * options: { f: { type: 'string' } } * }) // returns false * isShortOptionGroup('-bf', { * options: { f: { type: 'string' } } * }) // returns true * // -bfb is an edge case, return true and caller sorts it out * isShortOptionGroup('-bfb', { * options: { f: { type: 'string' } } * }) // returns true */ function isShortOptionGroup(arg, options) { if (arg.length <= 2) return false; if (StringPrototypeCharAt(arg, 0) !== "-") return false; if (StringPrototypeCharAt(arg, 1) === "-") return false; const firstShort = StringPrototypeCharAt(arg, 1); const longOption = findLongOptionForShort(firstShort, options); return optionsGetOwn(options, longOption, "type") !== "string"; } /** * Determine if arg is a short string option followed by its value. * @example * isShortOptionAndValue('-a', {}); // returns false * isShortOptionAndValue('-ab', {}); // returns false * isShortOptionAndValue('-fFILE', { * options: { foo: { short: 'f', type: 'string' }} * }) // returns true */ function isShortOptionAndValue(arg, options) { validateObject(options, "options"); if (arg.length <= 2) return false; if (StringPrototypeCharAt(arg, 0) !== "-") return false; if (StringPrototypeCharAt(arg, 1) === "-") return false; const shortOption = StringPrototypeCharAt(arg, 1); const longOption = findLongOptionForShort(shortOption, options); return optionsGetOwn(options, longOption, "type") === "string"; } /** * Find the long option associated with a short option. Looks for a configured * `short` and returns the short option itself if a long option is not found. * @example * findLongOptionForShort('a', {}) // returns 'a' * findLongOptionForShort('b', { * options: { bar: { short: 'b' } } * }) // returns 'bar' */ function findLongOptionForShort(shortOption, options) { validateObject(options, "options"); const longOptionEntry = ArrayPrototypeFind( ObjectEntries(options), ({ 1: optionConfig }) => objectGetOwn(optionConfig, "short") === shortOption, ); return longOptionEntry?.[0] ?? shortOption; } export { findLongOptionForShort, isLoneLongOption, isLoneShortOption, isLongOptionAndValue, isOptionLikeValue, isOptionValue, isShortOptionAndValue, isShortOptionGroup, objectGetOwn, optionsGetOwn, };  Qf/ext:deno_node/internal/util/parse_args/utils.jsa bD`8M`  T\`v4La 3L` T  I`nSb1![ SbXge??????Ib`L` bS]`" ]`]L`œ` L`œb` L`b` L`` L`"` L`"Ÿ` L`ŸB` L`B` L``  L``  L`]L`  Dc D  cs` a? a?a ?a ?Ÿa?"a?a?ba?a?a?Ba?œa?b@a  T I`!:b@a  T I`Ÿb@a T I`"b@a T I`Zb@a T I` d bb@a T I`F b@a T I`Wb@a T I`Bb@ a T I`œb@ a a ![ SbXg  &`Dp h %%%%%%ei h  0-%-%-%-%- %- %  a PPbA2DD`RD]DH Q ` // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // deno-lint-ignore-file // https://github.com/nodeca/pako/blob/master/lib/zlib/constants.js export const Z_NO_FLUSH = 0; export const Z_PARTIAL_FLUSH = 1; export const Z_SYNC_FLUSH = 2; export const Z_FULL_FLUSH = 3; export const Z_FINISH = 4; export const Z_BLOCK = 5; export const Z_TREES = 6; export const Z_OK = 0; export const Z_STREAM_END = 1; export const Z_NEED_DICT = 2; export const Z_ERRNO = -1; export const Z_STREAM_ERROR = -2; export const Z_DATA_ERROR = -3; export const Z_MEM_ERROR = -4; export const Z_BUF_ERROR = -5; export const Z_VERSION_ERROR = -6; export const Z_NO_COMPRESSION = 0; export const Z_BEST_SPEED = 1; export const Z_BEST_COMPRESSION = 9; export const Z_DEFAULT_COMPRESSION = -1; export const Z_FILTERED = 1; export const Z_HUFFMAN_ONLY = 2; export const Z_RLE = 3; export const Z_FIXED = 4; export const Z_DEFAULT_STRATEGY = 0; export const Z_BINARY = 0; export const Z_TEXT = 1; export const Z_UNKNOWN = 2; export const Z_DEFLATED = 8; // zlib modes export const NONE = 0; export const DEFLATE = 1; export const INFLATE = 2; export const GZIP = 3; export const GUNZIP = 4; export const DEFLATERAW = 5; export const INFLATERAW = 6; export const UNZIP = 7; import { op_zlib_close, op_zlib_close_if_pending, op_zlib_init, op_zlib_new, op_zlib_reset, op_zlib_write, op_zlib_write_async, } from "ext:core/ops"; const writeResult = new Uint32Array(2); class Zlib { #handle; constructor(mode) { this.#handle = op_zlib_new(mode); } close() { op_zlib_close(this.#handle); } writeSync( flush, input, in_off, in_len, out, out_off, out_len, ) { const err = op_zlib_write( this.#handle, flush, input, in_off, in_len, out, out_off, out_len, writeResult, ); if (this.#checkError(err)) { return [writeResult[1], writeResult[0]]; } return; } #checkError(err) { // Acceptable error states depend on the type of zlib stream. switch (err) { case Z_BUF_ERROR: this.#error("unexpected end of file", err); return false; case Z_OK: case Z_STREAM_END: // normal statuses, not fatal break; case Z_NEED_DICT: this.#error("Bad dictionary", err); return false; default: // something else. this.#error("Zlib error", err); return false; } return true; } write( flush, input, in_off, in_len, out, out_off, out_len, ) { op_zlib_write_async( this.#handle, flush ?? Z_NO_FLUSH, input, in_off, in_len, out, out_off, out_len, ).then(([err, availOut, availIn]) => { if (this.#checkError(err)) { this.callback(availIn, availOut); } }); return this; } init( windowBits, level, memLevel, strategy, dictionary, ) { const err = op_zlib_init( this.#handle, level, windowBits, memLevel, strategy, dictionary ?? new Uint8Array(0), ); if (err != Z_OK) { this.#error("Failed to initialize zlib", err); } } params() { throw new Error("deflateParams Not supported"); } reset() { const err = op_zlib_reset(this.#handle); if (err != Z_OK) { this.#error("Failed to reset stream", err); } } #error(message, err) { this.onerror(message, err); op_zlib_close_if_pending(this.#handle); } } export { Zlib }; Qdeext:deno_node/_zlib_binding.mjsa bD`8M`  T`fXLa$L&! #  %  "$&a E b@ R`Di h Ʊh  01būn abAZD`RD]DH ]QY*c// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { primordials } from "ext:core/mod.js"; import { op_query_permission, op_request_permission, op_revoke_permission, } from "ext:core/ops"; const { ArrayIsArray, ArrayPrototypeIncludes, ArrayPrototypeMap, ArrayPrototypeSlice, MapPrototypeGet, MapPrototypeHas, MapPrototypeSet, FunctionPrototypeCall, PromiseResolve, PromiseReject, ReflectHas, SafeArrayIterator, SafeMap, Symbol, SymbolFor, TypeError, } = primordials; import { pathFromURL } from "ext:deno_web/00_infra.js"; import { Event, EventTarget } from "ext:deno_web/02_event.js"; const illegalConstructorKey = Symbol("illegalConstructorKey"); /** * @typedef StatusCacheValue * @property {PermissionState} state * @property {PermissionStatus} status * @property {boolean} partial */ /** @type {ReadonlyArray<"read" | "write" | "net" | "env" | "sys" | "run" | "ffi" | "hrtime">} */ const permissionNames = [ "read", "write", "net", "env", "sys", "run", "ffi", "hrtime", ]; /** * @param {Deno.PermissionDescriptor} desc * @returns {Deno.PermissionState} */ function opQuery(desc) { return op_query_permission(desc); } /** * @param {Deno.PermissionDescriptor} desc * @returns {Deno.PermissionState} */ function opRevoke(desc) { return op_revoke_permission(desc); } /** * @param {Deno.PermissionDescriptor} desc * @returns {Deno.PermissionState} */ function opRequest(desc) { return op_request_permission(desc); } class PermissionStatus extends EventTarget { /** @type {{ state: Deno.PermissionState, partial: boolean }} */ #status; /** @type {((this: PermissionStatus, event: Event) => any) | null} */ onchange = null; /** @returns {Deno.PermissionState} */ get state() { return this.#status.state; } /** @returns {boolean} */ get partial() { return this.#status.partial; } /** * @param {{ state: Deno.PermissionState, partial: boolean }} status * @param {unknown} key */ constructor(status = null, key = null) { if (key != illegalConstructorKey) { throw new TypeError("Illegal constructor."); } super(); this.#status = status; } /** * @param {Event} event * @returns {boolean} */ dispatchEvent(event) { let dispatched = super.dispatchEvent(event); if (dispatched && this.onchange) { FunctionPrototypeCall(this.onchange, this, event); dispatched = !event.defaultPrevented; } return dispatched; } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { const object = { state: this.state, onchange: this.onchange }; if (this.partial) object.partial = this.partial; return `${this.constructor.name} ${inspect(object, inspectOptions)}`; } } /** @type {Map} */ const statusCache = new SafeMap(); /** * @param {Deno.PermissionDescriptor} desc * @param {{ state: Deno.PermissionState, partial: boolean }} rawStatus * @returns {PermissionStatus} */ function cache(desc, rawStatus) { let { name: key } = desc; if ( (desc.name === "read" || desc.name === "write" || desc.name === "ffi") && ReflectHas(desc, "path") ) { key += `-${desc.path}&`; } else if (desc.name === "net" && desc.host) { key += `-${desc.host}&`; } else if (desc.name === "run" && desc.command) { key += `-${desc.command}&`; } else if (desc.name === "env" && desc.variable) { key += `-${desc.variable}&`; } else if (desc.name === "sys" && desc.kind) { key += `-${desc.kind}&`; } else { key += "$"; } if (MapPrototypeHas(statusCache, key)) { const cachedObj = MapPrototypeGet(statusCache, key); if ( cachedObj.state !== rawStatus.state || cachedObj.partial !== rawStatus.partial ) { cachedObj.state = rawStatus.state; cachedObj.partial = rawStatus.partial; cachedObj.status.dispatchEvent( new Event("change", { cancelable: false }), ); } return cachedObj.status; } /** @type {{ state: Deno.PermissionState, partial: boolean, status?: PermissionStatus }} */ const obj = rawStatus; obj.status = new PermissionStatus(obj, illegalConstructorKey); MapPrototypeSet(statusCache, key, obj); return obj.status; } /** * @param {unknown} desc * @returns {desc is Deno.PermissionDescriptor} */ function isValidDescriptor(desc) { return typeof desc === "object" && desc !== null && ArrayPrototypeIncludes(permissionNames, desc.name); } /** * @param {Deno.PermissionDescriptor} desc * @returns {desc is Deno.PermissionDescriptor} */ function formDescriptor(desc) { if ( desc.name === "read" || desc.name === "write" || desc.name === "ffi" ) { desc.path = pathFromURL(desc.path); } else if (desc.name === "run") { desc.command = pathFromURL(desc.command); } } class Permissions { constructor(key = null) { if (key != illegalConstructorKey) { throw new TypeError("Illegal constructor."); } } query(desc) { try { return PromiseResolve(this.querySync(desc)); } catch (error) { return PromiseReject(error); } } querySync(desc) { if (!isValidDescriptor(desc)) { throw new TypeError( `The provided value "${desc?.name}" is not a valid permission name.`, ); } formDescriptor(desc); const status = opQuery(desc); return cache(desc, status); } revoke(desc) { try { return PromiseResolve(this.revokeSync(desc)); } catch (error) { return PromiseReject(error); } } revokeSync(desc) { if (!isValidDescriptor(desc)) { throw new TypeError( `The provided value "${desc?.name}" is not a valid permission name.`, ); } formDescriptor(desc); const status = opRevoke(desc); return cache(desc, status); } request(desc) { try { return PromiseResolve(this.requestSync(desc)); } catch (error) { return PromiseReject(error); } } requestSync(desc) { if (!isValidDescriptor(desc)) { throw new TypeError( `The provided value "${desc?.name}" is not a valid permission name.`, ); } formDescriptor(desc); const status = opRequest(desc); return cache(desc, status); } } const permissions = new Permissions(illegalConstructorKey); /** Converts all file URLs in FS allowlists to paths. */ function serializePermissions(permissions) { if (typeof permissions == "object" && permissions != null) { const serializedPermissions = {}; for ( const key of new SafeArrayIterator(["read", "write", "run", "ffi"]) ) { if (ArrayIsArray(permissions[key])) { serializedPermissions[key] = ArrayPrototypeMap( permissions[key], (path) => pathFromURL(path), ); } else { serializedPermissions[key] = permissions[key]; } } for ( const key of new SafeArrayIterator(["env", "hrtime", "net", "sys"]) ) { if (ArrayIsArray(permissions[key])) { serializedPermissions[key] = ArrayPrototypeSlice(permissions[key]); } else { serializedPermissions[key] = permissions[key]; } } return serializedPermissions; } return permissions; } export { Permissions, permissions, PermissionStatus, serializePermissions }; Qdj8ext:runtime/10_permissions.jsa bD``M` T`La1u T  I`7]Sb1TcaabK= 67b779"y;;u??????????????????????Ib`L` bS]`hB]`n]`6]`u]8L`  ` L` " ` L`" ` L`B` L`B]$L`  D""c[` Dcbm D u uc D y yc D } }c DbJbJc#. DcU`` a? ua? ya? }a?bJa?"a?a? a?" a?a?Ba?b@ T I`.]b7b@ T I`7b@ T I` "yb@  T I`%;b@  T I`;b@  Lc T I`XBb@aa TcaabK!$ Br  `(M`b% b4  bQ4Sb @B!d???   `T ``/ `/ `?  `  a D]fD a8 } `F` ! `F` Da HcD LaB! T  I` :b Ճ T I`,Qb get stateb  T I`WQb get partialb  T I` b  T I` `b( T(` L`B8  `Kb 1   !c53(Sbqq `Da$  a 0b    ` T ``/ `/ `?  `  aD]` ` aj ,aj"<aj maj<aj.aj"=aj] T4`%L`= "^  `Df  l i(SbqF" `Da ab   T  I`,b T I`+1"<b  T I`;mb T I`<b  T I`n.b T I`}"=b  `D܀h %%%%%%% % % % % %%%%%%%%%%%ei h  0 - %- %- %-%-%- %- % -% -% -% -% -%----%b %{"%%e%0 !"#$ %b#t& e+% %' 2(% 1 i'%* )+ ,-./0e+ 10 i)1 d+PPPPP0 `bAfr^~*DD`RD]DH QnBY// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { primordials } from "ext:core/mod.js"; import { op_bootstrap_log_level } from "ext:core/ops"; const { SafeArrayIterator } = primordials; // WARNING: Keep this in sync with Rust (search for LogLevel) const LogLevel = { Error: 1, Warn: 2, Info: 3, Debug: 4, }; const logSource = "JS"; let logLevel_ = null; function logLevel() { if (logLevel_ === null) { logLevel_ = op_bootstrap_log_level() || 3; } return logLevel_; } function log(...args) { if (logLevel() >= LogLevel.Debug) { // if we destructure `console` off `globalThis` too early, we don't bind to // the right console, therefore we don't log anything out. globalThis.console.error( `DEBUG ${logSource} -`, ...new SafeArrayIterator(args), ); } } export { log }; QcI,~ext:runtime/06_util.jsa bD`M` TT`e,La 3 T  I` "AtSb1B>?@"Ad?????IbY`L` bS]`hB]`]L`` L`]L`  D  c DcU``a? a?a? b@L` T I`G.b @aa 0b `>`?`b?`B@  `Dn h %%%%%ei h  0-%~)%%%  aLbA&ZD`RD]DH Q // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { core, primordials } from "ext:core/mod.js"; const { BadResource, Interrupted } = core; const { Error } = primordials; class NotFound extends Error { constructor(msg) { super(msg); this.name = "NotFound"; } } class PermissionDenied extends Error { constructor(msg) { super(msg); this.name = "PermissionDenied"; } } class ConnectionRefused extends Error { constructor(msg) { super(msg); this.name = "ConnectionRefused"; } } class ConnectionReset extends Error { constructor(msg) { super(msg); this.name = "ConnectionReset"; } } class ConnectionAborted extends Error { constructor(msg) { super(msg); this.name = "ConnectionAborted"; } } class NotConnected extends Error { constructor(msg) { super(msg); this.name = "NotConnected"; } } class AddrInUse extends Error { constructor(msg) { super(msg); this.name = "AddrInUse"; } } class AddrNotAvailable extends Error { constructor(msg) { super(msg); this.name = "AddrNotAvailable"; } } class BrokenPipe extends Error { constructor(msg) { super(msg); this.name = "BrokenPipe"; } } class AlreadyExists extends Error { constructor(msg) { super(msg); this.name = "AlreadyExists"; } } class InvalidData extends Error { constructor(msg) { super(msg); this.name = "InvalidData"; } } class TimedOut extends Error { constructor(msg) { super(msg); this.name = "TimedOut"; } } class WriteZero extends Error { constructor(msg) { super(msg); this.name = "WriteZero"; } } class WouldBlock extends Error { constructor(msg) { super(msg); this.name = "WouldBlock"; } } class UnexpectedEof extends Error { constructor(msg) { super(msg); this.name = "UnexpectedEof"; } } class Http extends Error { constructor(msg) { super(msg); this.name = "Http"; } } class Busy extends Error { constructor(msg) { super(msg); this.name = "Busy"; } } class NotSupported extends Error { constructor(msg) { super(msg); this.name = "NotSupported"; } } class FilesystemLoop extends Error { constructor(msg) { super(msg); this.name = "FilesystemLoop"; } } class IsADirectory extends Error { constructor(msg) { super(msg); this.name = "IsADirectory"; } } class NetworkUnreachable extends Error { constructor(msg) { super(msg); this.name = "NetworkUnreachable"; } } class NotADirectory extends Error { constructor(msg) { super(msg); this.name = "NotADirectory"; } } const errors = { NotFound, PermissionDenied, ConnectionRefused, ConnectionReset, ConnectionAborted, NotConnected, AddrInUse, AddrNotAvailable, BrokenPipe, AlreadyExists, InvalidData, TimedOut, Interrupted, WriteZero, WouldBlock, UnexpectedEof, BadResource, Http, Busy, NotSupported, FilesystemLoop, IsADirectory, NetworkUnreachable, NotADirectory, }; export { errors }; QcbKext:runtime/01_errors.jsa b D`dM` T`9LaL" Laa     `T ``/ `/ `?  `  a1D] ` aj] T  I`/Bp LSb1Ib ` L` bS]`n]L`5` L`]L`  D  cUY Dc[f` a?a?a?nb   `T ``/ `/ `?  `  a3D] ` aj] T  I`gAnb   `T``/ `/ `?  `  a!D] ` aj] T  I`Bnb   `T``/ `/ `?  `  a#D] ` aj] T  I`VBnb   `T``/ `/ `?  `  aD] ` aj] T  I` "Cnb   `T``/ `/ `?  `  a~D] ` aj] T  I`A|Cnb   `T``/ `/ `?  `  aD] ` aj] T  I`BDnb   `T``/ `/ `?  `  a^D] ` aj] T  I`\Dnb   `T``/ `/ `?  `  a`D] ` aj] T  I`BEnb    `T``/ `/ `?  `  a:D] ` aj] T  I`8Enb    `T``/ `/ `?  `  a<D] ` aj] T  I`kBFnb    `T``/ `/ `?  `  aD] ` aj] T  I` Fnb    `T``/ `/ `?  `  awD] ` aj] T  I`=u"Gnb    `T``/ `/ `?  `  ayD] ` aj] T  I`Gnb   `T``/ `/ `?  `  aSD] ` aj] T  I`Q"Hnb   `T``/ `/ `?  `  aUD] ` aj] T  I`}Hnb   `T``/ `/ `?  `  aD] ` aj] T  I`Inb   `T``/ `/ `?  `  aD] ` aj] T  I`C~bInb   `T``/ `/ `?  `  aD] ` aj] T  I`Inb   `T``/ `/ `?  `  ab D] ` aj] T  I`% ` bJnb   `T``/ `/ `?  `  ad D] ` aj] T  I` Jnb   `T``/ `/ `?  `  a N D] ` aj] T  I` L Knb b0Bp CACBCBC"CCCCBDCDCBECECBFCFCC"GCGC"HCCHCICbICICbJCJCKCBp ABB"CCBDDBEEBFF"GG"HHIbIIbJJK  `Dh ei h  ީ ޫ0--0-  e+  e+ e+e+e+e+e+e+e+ e+ e+ e+" !e+$ #e+&%e+('e+*)e+,+e+.-e+0/e+21e+43e+~5) 36 37 38 39 3: 3; 3< 3= 3> 3? 3@ 3A 3 3B! 3C# 3D% 3' 3E) 3F+ 3G- 3H/ 3I1 3J3 3K5 1 ߫e7PbA ":Rj*BZrD`RD]DH Qf̙T// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { primordials } from "ext:core/mod.js"; const { ObjectFreeze } = primordials; const version = { deno: "", v8: "", typescript: "" }; function setVersions(denoVersion, v8Version, tsVersion) { version.deno = denoVersion; version.v8 = v8Version; version.typescript = tsVersion; ObjectFreeze(version); } export { setVersions, version }; QdZext:runtime/01_version.tsa b!D`M` TH`P$La$La T  I`LTSb1`?Ib` L` bS]`g] L`L` L`L&` L`&] L`  DcT_`a?&a?La?b@aa (bII; II  `Dk h %ei h  0-%~)1  aLbAD`RD]DH Qi// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // This code has been ported almost directly from Go's src/bytes/buffer.go // Copyright 2009 The Go Authors. All rights reserved. BSD license. // https://github.com/golang/go/blob/master/LICENSE import { internals, primordials } from "ext:core/mod.js"; const { ArrayBufferPrototypeGetByteLength, TypedArrayPrototypeSubarray, TypedArrayPrototypeSlice, TypedArrayPrototypeSet, TypedArrayPrototypeGetBuffer, TypedArrayPrototypeGetByteLength, MathFloor, MathMin, PromiseResolve, Uint8Array, Error, } = primordials; import { assert } from "ext:deno_web/00_infra.js"; // MIN_READ is the minimum ArrayBuffer size passed to a read call by // buffer.ReadFrom. As long as the Buffer has at least MIN_READ bytes beyond // what is required to hold the contents of r, readFrom() will not grow the // underlying buffer. const MIN_READ = 32 * 1024; const MAX_SIZE = 2 ** 32 - 2; // `off` is the offset into `dst` where it will at which to begin writing values // from `src`. // Returns the number of bytes copied. function copyBytes(src, dst, off = 0) { const r = TypedArrayPrototypeGetByteLength(dst) - off; if (TypedArrayPrototypeGetByteLength(src) > r) { src = TypedArrayPrototypeSubarray(src, 0, r); } TypedArrayPrototypeSet(dst, src, off); return TypedArrayPrototypeGetByteLength(src); } class Buffer { #buf = null; // contents are the bytes buf[off : len(buf)] #off = 0; // read at buf[off], write at buf[buf.byteLength] constructor(ab) { internals.warnOnDeprecatedApi( "new Deno.Buffer()", new Error().stack, "Use `Buffer` from `https://deno.land/std/io/buffer.ts` instead.", ); if (ab == null) { this.#buf = new Uint8Array(0); return; } this.#buf = new Uint8Array(ab); } bytes(options = { copy: true }) { if (options.copy === false) { return TypedArrayPrototypeSubarray(this.#buf, this.#off); } return TypedArrayPrototypeSlice(this.#buf, this.#off); } empty() { return TypedArrayPrototypeGetByteLength(this.#buf) <= this.#off; } get length() { return TypedArrayPrototypeGetByteLength(this.#buf) - this.#off; } get capacity() { return ArrayBufferPrototypeGetByteLength( TypedArrayPrototypeGetBuffer(this.#buf), ); } truncate(n) { if (n === 0) { this.reset(); return; } if (n < 0 || n > this.length) { throw Error("bytes.Buffer: truncation out of range"); } this.#reslice(this.#off + n); } reset() { this.#reslice(0); this.#off = 0; } #tryGrowByReslice(n) { const l = TypedArrayPrototypeGetByteLength(this.#buf); if (n <= this.capacity - l) { this.#reslice(l + n); return l; } return -1; } #reslice(len) { const ab = TypedArrayPrototypeGetBuffer(this.#buf); assert(len <= ArrayBufferPrototypeGetByteLength(ab)); this.#buf = new Uint8Array(ab, 0, len); } readSync(p) { if (this.empty()) { // Buffer is empty, reset to recover space. this.reset(); if (TypedArrayPrototypeGetByteLength(p) === 0) { // this edge case is tested in 'bufferReadEmptyAtEOF' test return 0; } return null; } const nread = copyBytes( TypedArrayPrototypeSubarray(this.#buf, this.#off), p, ); this.#off += nread; return nread; } read(p) { const rr = this.readSync(p); return PromiseResolve(rr); } writeSync(p) { const m = this.#grow(TypedArrayPrototypeGetByteLength(p)); return copyBytes(p, this.#buf, m); } write(p) { const n = this.writeSync(p); return PromiseResolve(n); } #grow(n) { const m = this.length; // If buffer is empty, reset to recover space. if (m === 0 && this.#off !== 0) { this.reset(); } // Fast: Try to grow by means of a reslice. const i = this.#tryGrowByReslice(n); if (i >= 0) { return i; } const c = this.capacity; if (n <= MathFloor(c / 2) - m) { // We can slide things down instead of allocating a new // ArrayBuffer. We only need m+n <= c to slide, but // we instead let capacity get twice as large so we // don't spend all our time copying. copyBytes(TypedArrayPrototypeSubarray(this.#buf, this.#off), this.#buf); } else if (c + n > MAX_SIZE) { throw new Error("The buffer cannot be grown beyond the maximum size."); } else { // Not enough space anywhere, we need to allocate. const buf = new Uint8Array(MathMin(2 * c + n, MAX_SIZE)); copyBytes(TypedArrayPrototypeSubarray(this.#buf, this.#off), buf); this.#buf = buf; } // Restore this.#off and len(this.#buf). this.#off = 0; this.#reslice(MathMin(m + n, MAX_SIZE)); return m; } grow(n) { if (n < 0) { throw Error("Buffer.grow: negative count"); } const m = this.#grow(n); this.#reslice(m); } async readFrom(r) { let n = 0; const tmp = new Uint8Array(MIN_READ); while (true) { const shouldGrow = this.capacity - this.length < MIN_READ; // read into tmp buffer if there's not enough room // otherwise read directly into the internal buffer const buf = shouldGrow ? tmp : new Uint8Array(TypedArrayPrototypeGetBuffer(this.#buf), this.length); const nread = await r.read(buf); if (nread === null) { return n; } // write will grow if needed if (shouldGrow) { this.writeSync(TypedArrayPrototypeSubarray(buf, 0, nread)); } else this.#reslice(this.length + nread); n += nread; } } readFromSync(r) { let n = 0; const tmp = new Uint8Array(MIN_READ); while (true) { const shouldGrow = this.capacity - this.length < MIN_READ; // read into tmp buffer if there's not enough room // otherwise read directly into the internal buffer const buf = shouldGrow ? tmp : new Uint8Array(TypedArrayPrototypeGetBuffer(this.#buf), this.length); const nread = r.readSync(buf); if (nread === null) { return n; } // write will grow if needed if (shouldGrow) { this.writeSync(TypedArrayPrototypeSubarray(buf, 0, nread)); } else this.#reslice(this.length + nread); n += nread; } } } async function readAll(r) { internals.warnOnDeprecatedApi( "Deno.readAll()", new Error().stack, "Use `readAll()` from `https://deno.land/std/io/read_all.ts` instead.", ); const buf = new Buffer(); await buf.readFrom(r); return buf.bytes(); } function readAllSync(r) { internals.warnOnDeprecatedApi( "Deno.readAllSync()", new Error().stack, "Use `readAllSync()` from `https://deno.land/std/io/read_all.ts` instead.", ); const buf = new Buffer(); buf.readFromSync(r); return buf.bytes(); } async function writeAll(w, arr) { internals.warnOnDeprecatedApi( "Deno.writeAll()", new Error().stack, "Use `writeAll()` from `https://deno.land/std/io/write_all.ts` instead.", ); let nwritten = 0; while (nwritten < arr.length) { nwritten += await w.write(TypedArrayPrototypeSubarray(arr, nwritten)); } } function writeAllSync(w, arr) { internals.warnOnDeprecatedApi( "Deno.writeAllSync()", new Error().stack, "Use `writeAllSync()` from `https://deno.land/std/io/write_all.ts` instead.", ); let nwritten = 0; while (nwritten < arr.length) { nwritten += w.writeSync(TypedArrayPrototypeSubarray(arr, nwritten)); } } export { Buffer, readAll, readAllSync, writeAll, writeAllSync }; QcFext:runtime/13_buffer.jsa b"D`hM` T`[La*N T  I`_qbNSb1!sb":aI  NbNm??????????????Ib`L` bS]`7n]`z]DL`"{ ` L`"{ ` L`"` L`"` L`` L`]L`  D clr DBKBKc" Dc$/`BKa?a?a?"{ a?a?"a?a?a?&b@` Ka,'c 5(SbqqbR`Da a b  `D|h %%%%%%ei h  0-%-%0-%- %- %- Ń e%  t0te+ 2  % b PP zbA"*2:D`RD]DH Q b // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { core, primordials } from "ext:core/mod.js"; import { op_signal_bind, op_signal_poll, op_signal_unbind } from "ext:core/ops"; const { SafeSet, SafeSetIterator, SetPrototypeAdd, SetPrototypeDelete, TypeError, } = primordials; function bindSignal(signo) { return op_signal_bind(signo); } function pollSignal(rid) { const promise = op_signal_poll(rid); core.unrefOpPromise(promise); return promise; } function unbindSignal(rid) { op_signal_unbind(rid); } // Stores signal listeners and resource data. This has type of // `Record void> }` const signalData = {}; /** Gets the signal handlers and resource data of the given signal */ function getSignalData(signo) { return signalData[signo] ?? (signalData[signo] = { rid: undefined, listeners: new SafeSet() }); } function checkSignalListenerType(listener) { if (typeof listener !== "function") { throw new TypeError( `Signal listener must be a function. "${typeof listener}" is given.`, ); } } function addSignalListener(signo, listener) { checkSignalListenerType(listener); const sigData = getSignalData(signo); SetPrototypeAdd(sigData.listeners, listener); if (!sigData.rid) { // If signal resource doesn't exist, create it. // The program starts listening to the signal sigData.rid = bindSignal(signo); loop(sigData); } } function removeSignalListener(signo, listener) { checkSignalListenerType(listener); const sigData = getSignalData(signo); SetPrototypeDelete(sigData.listeners, listener); if (sigData.listeners.size === 0 && sigData.rid) { unbindSignal(sigData.rid); sigData.rid = undefined; } } async function loop(sigData) { while (sigData.rid) { if (await pollSignal(sigData.rid)) { return; } for (const listener of new SafeSetIterator(sigData.listeners)) { listener(); } } } export { addSignalListener, removeSignalListener }; QdVext:runtime/40_signals.jsa b$D`,M`  Tl`HLaW T  I`S~RSb1 %EBF= RbSSbTTbUbVk????????????Ib `L` bS]`nB]`] L` ` L` B ` L`B ]L`  D  cUY D  c D  c D  c Dc[f` a?a? a? a? a? a?B a?Zb@" T I`bS~b@# T I` .Sb@$ T I`/Tb@% T I`hbUb @& T I`bVbMQ' L` T I` b@ a T I`B b@!aa %EBF  n`Dt h %%%%%%% % % % % %ei h  0 - %- %- %-%-%%  a PbAvD`RD]DH ]QY<С// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { internals, primordials } from "ext:core/mod.js"; import { op_console_size, op_is_terminal } from "ext:core/ops"; const { Uint32Array, } = primordials; const size = new Uint32Array(2); function consoleSize() { op_console_size(size); return { columns: size[0], rows: size[1] }; } function isatty(rid) { internals.warnOnDeprecatedApi( "Deno.isatty()", new Error().stack, "Use `Deno.stdin.isTerminal()`, `Deno.stdout.isTerminal()`, `Deno.stderr.isTerminal()` or `Deno.FsFile.isTerminal()` instead.", ); return op_is_terminal(rid); } export { consoleSize, isatty }; QcjB[!ext:runtime/40_tty.jsa b%D`M` TL`T La$ L` T  I`$q xSb1`?Ib`L` bS]`rB]`] L` ` L` ` L`]L`  DBKBKcT] D  c D  c Dc_j`BKa?a? a? a? a?a?b@)a T I`"b@*aa E   `Dl(h %ei h  0-  i%  abA(VD`RD]DH Q`&// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { core, internals } from "ext:core/mod.js"; import { op_http_start } from "ext:core/ops"; const { internalRidSymbol } = core; import { HttpConn } from "ext:deno_http/01_http.js"; function serveHttp(conn) { internals.warnOnDeprecatedApi( "Deno.serveHttp()", new Error().stack, "Use `Deno.serve()` instead.", ); const rid = op_http_start(conn[internalRidSymbol]); return new HttpConn(rid, conn.remoteAddr, conn.localAddr); } export { serveHttp }; Qco}ext:runtime/40_http.jsa b&D`M` TH`I La$L` T  I`" lSb1&`?Ib&`L` bS]`kB]`]`]L`" ` L`" ]L`  DBBc D  cTX DBKBKcZc D  c` a?BKa? a?Ba?" a?fb@,aa  &  z`Dk h %ei h  0-%  abA+D`RD]DH MQI*- // Copyright the Browserify authors. MIT License. // Ported from https://github.com/browserify/path-browserify/ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { CHAR_BACKWARD_SLASH, CHAR_DOT, CHAR_FORWARD_SLASH, CHAR_LOWERCASE_A, CHAR_LOWERCASE_Z, CHAR_UPPERCASE_A, CHAR_UPPERCASE_Z } from "ext:deno_node/path/_constants.ts"; import { ERR_INVALID_ARG_TYPE } from "ext:deno_node/internal/errors.ts"; export function assertPath(path) { if (typeof path !== "string") { throw new ERR_INVALID_ARG_TYPE("path", [ "string" ], path); } } export function isPosixPathSeparator(code) { return code === CHAR_FORWARD_SLASH; } export function isPathSeparator(code) { return isPosixPathSeparator(code) || code === CHAR_BACKWARD_SLASH; } export function isWindowsDeviceRoot(code) { return code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z || code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z; } // Resolves . and .. elements in a path with directory names export function normalizeString(path, allowAboveRoot, separator, isPathSeparator) { let res = ""; let lastSegmentLength = 0; let lastSlash = -1; let dots = 0; let code; for(let i = 0, len = path.length; i <= len; ++i){ if (i < len) code = path.charCodeAt(i); else if (isPathSeparator(code)) break; else code = CHAR_FORWARD_SLASH; if (isPathSeparator(code)) { if (lastSlash === i - 1 || dots === 1) { // NOOP } else if (lastSlash !== i - 1 && dots === 2) { if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== CHAR_DOT || res.charCodeAt(res.length - 2) !== CHAR_DOT) { if (res.length > 2) { const lastSlashIndex = res.lastIndexOf(separator); if (lastSlashIndex === -1) { res = ""; lastSegmentLength = 0; } else { res = res.slice(0, lastSlashIndex); lastSegmentLength = res.length - 1 - res.lastIndexOf(separator); } lastSlash = i; dots = 0; continue; } else if (res.length === 2 || res.length === 1) { res = ""; lastSegmentLength = 0; lastSlash = i; dots = 0; continue; } } if (allowAboveRoot) { if (res.length > 0) res += `${separator}..`; else res = ".."; lastSegmentLength = 2; } } else { if (res.length > 0) res += separator + path.slice(lastSlash + 1, i); else res = path.slice(lastSlash + 1, i); lastSegmentLength = i - lastSlash - 1; } lastSlash = i; dots = 0; } else if (code === CHAR_DOT && dots !== -1) { ++dots; } else { dots = -1; } } return res; } export function _format(sep, pathObject) { const dir = pathObject.dir || pathObject.root; const base = pathObject.base || (pathObject.name || "") + (pathObject.ext || ""); if (!dir) return base; if (dir === pathObject.root) return dir + base; return dir + sep + base; } QdY$ ext:deno_node/path/_util.tsa b'D`$M` T@`:La!PL` T  I`;Sb1Ib `L` ]` ]`]PL`N ` L`N ` L`` L`"'` L`"'` L`` L`](L`  DBBc3F D""cHP DV V cRd Dcfv DBBcx Dc Dc Db b c`Ba?"a?V a?a?Ba?a?a?b a?a?"'a?a?a?a?N a?b@.a T I` "'b@/a T I`*yb@0a T I`b@1a T I`{h b@2a T I` N b@3aa   `Di h ei h   `bA-FNV^fD`RD]DH Qb('U// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { isWindows } from "ext:deno_node/_util/os.ts"; export const SEP = isWindows ? "\\" : "/"; export const SEP_PATTERN = isWindows ? /[\\/]+/ : /\/+/; Qdvkqext:deno_node/path/separator.tsa b(D` M` TP`^,La !Lba t%BZZ  `Dm h ei h  010 zz1 LSb1IbU` L` " ]`] L`(` L`(Y` L`Y] L`  Dttc`ta?(a?Ya? asvbA4D`RD]DH Q&h]// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { core, primordials } from "ext:core/mod.js"; import { op_read_line_prompt } from "ext:core/ops"; const { ArrayPrototypePush, StringPrototypeCharCodeAt, Uint8Array, } = primordials; import { stdin } from "ext:deno_io/12_io.js"; const LF = StringPrototypeCharCodeAt("\n", 0); const CR = StringPrototypeCharCodeAt("\r", 0); function alert(message = "Alert") { if (!stdin.isTerminal()) { return; } core.print(`${message} [Enter] `, false); readLineFromStdinSync(); } function confirm(message = "Confirm") { if (!stdin.isTerminal()) { return false; } core.print(`${message} [y/N] `, false); const answer = readLineFromStdinSync(); return answer === "Y" || answer === "y"; } function prompt(message = "Prompt", defaultValue) { defaultValue ??= ""; if (!stdin.isTerminal()) { return null; } return op_read_line_prompt( `${message} `, `${defaultValue}`, ); } function readLineFromStdinSync() { const c = new Uint8Array(1); const buf = []; while (true) { const n = stdin.readSync(c); if (n === null || n === 0) { break; } if (c[0] === CR) { const n = stdin.readSync(c); if (c[0] === LF) { break; } ArrayPrototypePush(buf, CR); if (n === null || n === 0) { break; } } if (c[0] === LF) { break; } ArrayPrototypePush(buf, c[0]); } return core.decode(new Uint8Array(buf)); } export { alert, confirm, prompt }; Qcn#ext:runtime/41_prompt.jsa b)D`M` T``{4La 3 T  I`b[Sb1AI Bb[d?????Ib`L` bS]`mB]`b]`%],L` [` L`[\` L`\S` L`S]L`  D  cTX D  c DcZe DBBc` a?a? a?Ba?[a?\a?Sa?b@9,L`  T I`8[b@6a T I`J\b@7a T I`)Sb@8aa AS"B  `Dq0h %%%%%ei h  0-%--% c% c%  a PbA5&.6D`RD]DH QMI // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { core, primordials } from "ext:core/mod.js"; import { op_bootstrap_language, op_bootstrap_numcpus, op_bootstrap_user_agent, } from "ext:core/ops"; const { ObjectDefineProperties, ObjectPrototypeIsPrototypeOf, SymbolFor, } = primordials; import * as location from "ext:deno_web/12_location.js"; import * as console from "ext:deno_console/01_console.js"; import * as webidl from "ext:deno_webidl/00_webidl.js"; import * as globalInterfaces from "ext:deno_web/04_global_interfaces.js"; import * as webStorage from "ext:deno_webstorage/01_webstorage.js"; import * as prompt from "ext:runtime/41_prompt.js"; import { loadWebGPU } from "ext:deno_webgpu/00_init.js"; class Navigator { constructor() { webidl.illegalConstructor(); } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( console.createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(NavigatorPrototype, this), keys: [ "hardwareConcurrency", "userAgent", "language", "languages", ], }), inspectOptions, ); } } const navigator = webidl.createBranded(Navigator); function memoizeLazy(f) { let v_ = null; return () => { if (v_ === null) { v_ = f(); } return v_; }; } const numCpus = memoizeLazy(() => op_bootstrap_numcpus()); const userAgent = memoizeLazy(() => op_bootstrap_user_agent()); const language = memoizeLazy(() => op_bootstrap_language()); ObjectDefineProperties(Navigator.prototype, { gpu: { configurable: true, enumerable: true, get() { webidl.assertBranded(this, NavigatorPrototype); const webgpu = loadWebGPU(); return webgpu.gpu; }, }, hardwareConcurrency: { configurable: true, enumerable: true, get() { webidl.assertBranded(this, NavigatorPrototype); return numCpus(); }, }, userAgent: { configurable: true, enumerable: true, get() { webidl.assertBranded(this, NavigatorPrototype); return userAgent(); }, }, language: { configurable: true, enumerable: true, get() { webidl.assertBranded(this, NavigatorPrototype); return language(); }, }, languages: { configurable: true, enumerable: true, get() { webidl.assertBranded(this, NavigatorPrototype); return [language()]; }, }, }); const NavigatorPrototype = Navigator.prototype; const mainRuntimeGlobalProperties = { Location: location.locationConstructorDescriptor, location: location.locationDescriptor, Window: globalInterfaces.windowConstructorDescriptor, window: core.propGetterOnly(() => globalThis), self: core.propGetterOnly(() => globalThis), Navigator: core.propNonEnumerable(Navigator), navigator: core.propGetterOnly(() => navigator), alert: core.propWritable(prompt.alert), confirm: core.propWritable(prompt.confirm), prompt: core.propWritable(prompt.prompt), localStorage: core.propGetterOnly(webStorage.localStorage), sessionStorage: core.propGetterOnly(webStorage.sessionStorage), Storage: core.propNonEnumerable(webStorage.Storage), }; export { mainRuntimeGlobalProperties, memoizeLazy }; Qe>+%ext:runtime/98_global_scope_window.jsa b*D`HM` TY`pLa:kL` T,`L`8SbqA)baa?``DaSb1!"0a"bB`g????????Ib `,L`  bS]`nB]`+]`h"]`b]`\]`B^]``"_]`b]`] L`"d` L`"d`` L`` L`  D"DcZb DDc DDc Db\Dc D]DcPZ DSDc L` D  cUY D""c D  c D  c D  c Dc[f` a?a? a? a? a?"a?`a?"da? T  I`;IrFbK  j`Dd %%%`b@;b a  !Br  `T ``/ `/ `?  `  aD]Pf D aHcD La  T  I`>_vFb < T I`j`b(= T I`IbK> T I`IbK? T I`<IbK@8b bCcC"bCCcC(bGGC T  I`(vFbAb(bGGC T I`}b Bc(bGGC T I` zb C"b(bGGC T I` b D(bGGC T I`h b Ecxb BC"CCCC_C"0C[C\CSC"CBCCB" ! T I` IbK F T I`  IbKG_ T I`k z IbKH"0b[\S"B  Z`DAh %%%%% % ei e e% e% e e e h  0--%-  bt e+- ^ %0 b %0b%0b% -~~)3 3~)3 3~)3 3"~$)3% 3'~)) 3* 3!,c.-% ~"0)-#13$3-%53&7-'93(;0)-*=+ ^?3,A0-*=- ^C3.E0-/G^I30K0-*=1 ^M32O0-3Q-4S^U34W0-3Q-5Y^[35]0-3Q-6_^a36c0-*=-7e^g37i0-*=-8k^m38o0-/G-9q^s39u 1 0jwP@@ L`2& 0@        bA:f"*2BNZfr~D`RD]DH QV // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { core, primordials } from "ext:core/mod.js"; import { op_bootstrap_language, op_bootstrap_numcpus, op_bootstrap_user_agent, } from "ext:core/ops"; const { ObjectDefineProperties, ObjectPrototypeIsPrototypeOf, SymbolFor, } = primordials; import * as location from "ext:deno_web/12_location.js"; import * as console from "ext:deno_console/01_console.js"; import * as webidl from "ext:deno_webidl/00_webidl.js"; import * as globalInterfaces from "ext:deno_web/04_global_interfaces.js"; import { loadWebGPU } from "ext:deno_webgpu/00_init.js"; function memoizeLazy(f) { let v_ = null; return () => { if (v_ === null) { v_ = f(); } return v_; }; } const numCpus = memoizeLazy(() => op_bootstrap_numcpus()); const userAgent = memoizeLazy(() => op_bootstrap_user_agent()); const language = memoizeLazy(() => op_bootstrap_language()); class WorkerNavigator { constructor() { webidl.illegalConstructor(); } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { return inspect( console.createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(WorkerNavigatorPrototype, this), keys: [ "hardwareConcurrency", "userAgent", "language", "languages", ], }), inspectOptions, ); } } const workerNavigator = webidl.createBranded(WorkerNavigator); ObjectDefineProperties(WorkerNavigator.prototype, { gpu: { configurable: true, enumerable: true, get() { webidl.assertBranded(this, WorkerNavigatorPrototype); const webgpu = loadWebGPU(); return webgpu.gpu; }, }, hardwareConcurrency: { configurable: true, enumerable: true, get() { webidl.assertBranded(this, WorkerNavigatorPrototype); return numCpus(); }, }, userAgent: { configurable: true, enumerable: true, get() { webidl.assertBranded(this, WorkerNavigatorPrototype); return userAgent(); }, }, language: { configurable: true, enumerable: true, get() { webidl.assertBranded(this, WorkerNavigatorPrototype); return language(); }, }, languages: { configurable: true, enumerable: true, get() { webidl.assertBranded(this, WorkerNavigatorPrototype); return [language()]; }, }, }); const WorkerNavigatorPrototype = WorkerNavigator.prototype; const workerRuntimeGlobalProperties = { WorkerLocation: location.workerLocationConstructorDescriptor, location: location.workerLocationDescriptor, WorkerGlobalScope: globalInterfaces.workerGlobalScopeConstructorDescriptor, DedicatedWorkerGlobalScope: globalInterfaces.dedicatedWorkerGlobalScopeConstructorDescriptor, WorkerNavigator: core.propNonEnumerable(WorkerNavigator), navigator: core.propGetterOnly(() => workerNavigator), self: core.propGetterOnly(() => globalThis), }; export { workerRuntimeGlobalProperties }; QeZL%ext:runtime/98_global_scope_worker.jsa b+D`DM` T`La4^ T,`L`8SbqA)baa?``DaSb1!a"bfbeg????????Ib `$L` bS]`nB]`+]`h"]`b]`\]`b]`_]L`f` L`fL`  D"DcZb DDc DDc Db\Dc L` D  cUY D""cMW D  c D  c D  c Dc[f` a?a? a? a? a?"a?fa? T  I`IbK  `Dd %%%`b@J Laa  !Br T I`6IbKK T I`WvIbKL T I`IbKM  `T ``/ `/ `?  `  aD]Pf D aHcD La  T  I`db N T I`1`b(O8b bCcC"bCCcC(bGGC T  I`RbPb(bGGC T I`)b Qc(bGGC T I`2b R"b(bGGC T I`|b S(bGGC T I`& b TcHbC"C"CCdC"0CC§B"B" d! T I`u IbK U"0 T I` IbKV  `Dxh %%%%% % ei e e% e% e h  0--%-Ă b% b% b %  b te+-^% -~~)3 3~)3 3~)3 3"~$) 3% 3'~ ))! 3* 3",c.-% ~#0)-$13%3-&53'7-(93);-*=3+?0,--A^C3.E0-/G0 ^I31K0-/G2 ^M33O 1 $gQ P@@ L`2& 0@   bAI*>FNnvD`RD]DH Y4QU4jh// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Remove Intl.v8BreakIterator because it is a non-standard API. delete Intl.v8BreakIterator; import { core, internals, primordials } from "ext:core/mod.js"; const ops = core.ops; import { op_bootstrap_args, op_bootstrap_is_tty, op_bootstrap_no_color, op_bootstrap_pid, op_main_module, op_ppid, op_set_format_exception_callback, op_snapshot_options, op_worker_close, op_worker_get_type, op_worker_post_message, op_worker_recv_message, op_worker_sync_fetch, } from "ext:core/ops"; const { ArrayPrototypeFilter, ArrayPrototypeIncludes, ArrayPrototypeMap, ArrayPrototypePop, ArrayPrototypeShift, DateNow, Error, ErrorPrototype, FunctionPrototypeBind, FunctionPrototypeCall, ObjectAssign, ObjectDefineProperties, ObjectDefineProperty, ObjectKeys, ObjectPrototypeIsPrototypeOf, ObjectSetPrototypeOf, ObjectValues, PromisePrototypeThen, PromiseResolve, SafeSet, StringPrototypeIncludes, StringPrototypeSplit, StringPrototypeTrim, Symbol, SymbolIterator, TypeError, } = primordials; const { isNativeError, } = core; import * as event from "ext:deno_web/02_event.js"; import * as location from "ext:deno_web/12_location.js"; import * as version from "ext:runtime/01_version.ts"; import * as os from "ext:runtime/30_os.js"; import * as timers from "ext:deno_web/02_timers.js"; import { customInspect, getDefaultInspectOptions, getNoColor, inspectArgs, quoteString, setNoColorFn, } from "ext:deno_console/01_console.js"; import * as performance from "ext:deno_web/15_performance.js"; import * as url from "ext:deno_url/00_url.js"; import * as fetch from "ext:deno_fetch/26_fetch.js"; import * as messagePort from "ext:deno_web/13_message_port.js"; import { denoNs, denoNsUnstable, denoNsUnstableById, unstableIds, } from "ext:runtime/90_deno_ns.js"; import { errors } from "ext:runtime/01_errors.js"; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { DOMException } from "ext:deno_web/01_dom_exception.js"; import { unstableForWindowOrWorkerGlobalScope, windowOrWorkerGlobalScope, } from "ext:runtime/98_global_scope_shared.js"; import { mainRuntimeGlobalProperties, memoizeLazy, } from "ext:runtime/98_global_scope_window.js"; import { workerRuntimeGlobalProperties, } from "ext:runtime/98_global_scope_worker.js"; import { SymbolAsyncDispose, SymbolDispose, SymbolMetadata, } from "ext:deno_web/00_infra.js"; // deno-lint-ignore prefer-primordials if (Symbol.dispose) throw "V8 supports Symbol.dispose now, no need to shim it!"; // deno-lint-ignore prefer-primordials if (Symbol.asyncDispose) { throw "V8 supports Symbol.asyncDispose now, no need to shim it!"; } // deno-lint-ignore prefer-primordials if (Symbol.metadata) { throw "V8 supports Symbol.metadata now, no need to shim it!"; } ObjectDefineProperties(Symbol, { dispose: { value: SymbolDispose, enumerable: false, writable: false, configurable: false, }, asyncDispose: { value: SymbolAsyncDispose, enumerable: false, writable: false, configurable: false, }, metadata: { value: SymbolMetadata, enumerable: false, writable: false, configurable: false, }, }); let windowIsClosing = false; let globalThis_; let verboseDeprecatedApiWarning = false; let deprecatedApiWarningDisabled = false; const ALREADY_WARNED_DEPRECATED = new SafeSet(); function warnOnDeprecatedApi(apiName, stack, ...suggestions) { if (deprecatedApiWarningDisabled) { return; } if (!verboseDeprecatedApiWarning) { if (ALREADY_WARNED_DEPRECATED.has(apiName)) { return; } ALREADY_WARNED_DEPRECATED.add(apiName); console.error( `%cwarning: %cUse of deprecated "${apiName}" API. This API will be removed in Deno 2. Run again with DENO_VERBOSE_WARNINGS=1 to get more details.`, "color: yellow;", "font-weight: bold;", ); return; } if (ALREADY_WARNED_DEPRECATED.has(apiName + stack)) { return; } // If we haven't warned yet, let's do some processing of the stack trace // to make it more useful. const stackLines = StringPrototypeSplit(stack, "\n"); ArrayPrototypeShift(stackLines); while (stackLines.length > 0) { // Filter out internal frames at the top of the stack - they are not useful // to the user. if ( StringPrototypeIncludes(stackLines[0], "(ext:") || StringPrototypeIncludes(stackLines[0], "(node:") || StringPrototypeIncludes(stackLines[0], "") ) { ArrayPrototypeShift(stackLines); } else { break; } } // Now remove the last frame if it's coming from "ext:core" - this is most likely // event loop tick or promise handler calling a user function - again not // useful to the user. if ( stackLines.length > 0 && StringPrototypeIncludes(stackLines[stackLines.length - 1], "(ext:core/") ) { ArrayPrototypePop(stackLines); } let isFromRemoteDependency = false; const firstStackLine = stackLines[0]; if (firstStackLine && !StringPrototypeIncludes(firstStackLine, "file:")) { isFromRemoteDependency = true; } ALREADY_WARNED_DEPRECATED.add(apiName + stack); console.error( `%cwarning: %cUse of deprecated "${apiName}" API. This API will be removed in Deno 2.`, "color: yellow;", "font-weight: bold;", ); console.error(); console.error( "See the Deno 1 to 2 Migration Guide for more information at https://docs.deno.com/runtime/manual/advanced/migrate_deprecations", ); console.error(); if (stackLines.length > 0) { console.error("Stack trace:"); for (let i = 0; i < stackLines.length; i++) { console.error(` ${StringPrototypeTrim(stackLines[i])}`); } console.error(); } for (let i = 0; i < suggestions.length; i++) { const suggestion = suggestions[i]; console.error( `%chint: ${suggestion}`, "font-weight: bold;", ); } if (isFromRemoteDependency) { console.error( `%chint: It appears this API is used by a remote dependency. Try upgrading to the latest version of that dependency.`, "font-weight: bold;", ); } console.error(); } function windowClose() { if (!windowIsClosing) { windowIsClosing = true; // Push a macrotask to exit after a promise resolve. // This is not perfect, but should be fine for first pass. PromisePrototypeThen( PromiseResolve(), () => FunctionPrototypeCall(timers.setTimeout, null, () => { // This should be fine, since only Window/MainWorker has .close() os.exit(0); }, 0), ); } } function workerClose() { if (isClosing) { return; } isClosing = true; op_worker_close(); } function postMessage(message, transferOrOptions = {}) { const prefix = "Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope'"; webidl.requiredArguments(arguments.length, 1, prefix); message = webidl.converters.any(message); let options; if ( webidl.type(transferOrOptions) === "Object" && transferOrOptions !== undefined && transferOrOptions[SymbolIterator] !== undefined ) { const transfer = webidl.converters["sequence"]( transferOrOptions, prefix, "Argument 2", ); options = { transfer }; } else { options = webidl.converters.StructuredSerializeOptions( transferOrOptions, prefix, "Argument 2", ); } const { transfer } = options; const data = messagePort.serializeJsMessageData(message, transfer); op_worker_post_message(data); } let isClosing = false; let globalDispatchEvent; async function pollForMessages() { if (!globalDispatchEvent) { globalDispatchEvent = FunctionPrototypeBind( globalThis.dispatchEvent, globalThis, ); } while (!isClosing) { const data = await op_worker_recv_message(); if (data === null) break; const v = messagePort.deserializeJsMessageData(data); const message = v[0]; const transferables = v[1]; const msgEvent = new event.MessageEvent("message", { cancelable: false, data: message, ports: ArrayPrototypeFilter( transferables, (t) => ObjectPrototypeIsPrototypeOf(messagePort.MessagePortPrototype, t), ), }); event.setIsTrusted(msgEvent, true); try { globalDispatchEvent(msgEvent); } catch (e) { const errorEvent = new event.ErrorEvent("error", { cancelable: true, message: e.message, lineno: e.lineNumber ? e.lineNumber + 1 : undefined, colno: e.columnNumber ? e.columnNumber + 1 : undefined, filename: e.fileName, error: e, }); event.setIsTrusted(errorEvent, true); globalDispatchEvent(errorEvent); if (!errorEvent.defaultPrevented) { throw e; } } } } let loadedMainWorkerScript = false; function importScripts(...urls) { if (op_worker_get_type() === "module") { throw new TypeError("Can't import scripts in a module worker."); } const baseUrl = location.getLocationHref(); const parsedUrls = ArrayPrototypeMap(urls, (scriptUrl) => { try { return new url.URL(scriptUrl, baseUrl ?? undefined).href; } catch { throw new DOMException( "Failed to parse URL.", "SyntaxError", ); } }); // A classic worker's main script has looser MIME type checks than any // imported scripts, so we use `loadedMainWorkerScript` to distinguish them. // TODO(andreubotella) Refactor worker creation so the main script isn't // loaded with `importScripts()`. const scripts = op_worker_sync_fetch( parsedUrls, !loadedMainWorkerScript, ); loadedMainWorkerScript = true; for (let i = 0; i < scripts.length; ++i) { const { url, script } = scripts[i]; const err = core.evalContext(script, url)[1]; if (err !== null) { throw err.thrown; } } } const opArgs = memoizeLazy(() => op_bootstrap_args()); const opPid = memoizeLazy(() => op_bootstrap_pid()); const opPpid = memoizeLazy(() => op_ppid()); setNoColorFn(() => op_bootstrap_no_color() || !op_bootstrap_is_tty()); function formatException(error) { if ( isNativeError(error) || ObjectPrototypeIsPrototypeOf(ErrorPrototype, error) ) { return null; } else if (typeof error == "string") { return `Uncaught ${ inspectArgs([quoteString(error, getDefaultInspectOptions())], { colors: !getNoColor(), }) }`; } else { return `Uncaught ${inspectArgs([error], { colors: !getNoColor() })}`; } } core.registerErrorClass("NotFound", errors.NotFound); core.registerErrorClass("PermissionDenied", errors.PermissionDenied); core.registerErrorClass("ConnectionRefused", errors.ConnectionRefused); core.registerErrorClass("ConnectionReset", errors.ConnectionReset); core.registerErrorClass("ConnectionAborted", errors.ConnectionAborted); core.registerErrorClass("NotConnected", errors.NotConnected); core.registerErrorClass("AddrInUse", errors.AddrInUse); core.registerErrorClass("AddrNotAvailable", errors.AddrNotAvailable); core.registerErrorClass("BrokenPipe", errors.BrokenPipe); core.registerErrorClass("AlreadyExists", errors.AlreadyExists); core.registerErrorClass("InvalidData", errors.InvalidData); core.registerErrorClass("TimedOut", errors.TimedOut); core.registerErrorClass("WouldBlock", errors.WouldBlock); core.registerErrorClass("WriteZero", errors.WriteZero); core.registerErrorClass("UnexpectedEof", errors.UnexpectedEof); core.registerErrorClass("Http", errors.Http); core.registerErrorClass("Busy", errors.Busy); core.registerErrorClass("NotSupported", errors.NotSupported); core.registerErrorClass("FilesystemLoop", errors.FilesystemLoop); core.registerErrorClass("IsADirectory", errors.IsADirectory); core.registerErrorClass("NetworkUnreachable", errors.NetworkUnreachable); core.registerErrorClass("NotADirectory", errors.NotADirectory); core.registerErrorBuilder( "DOMExceptionOperationError", function DOMExceptionOperationError(msg) { return new DOMException(msg, "OperationError"); }, ); core.registerErrorBuilder( "DOMExceptionQuotaExceededError", function DOMExceptionQuotaExceededError(msg) { return new DOMException(msg, "QuotaExceededError"); }, ); core.registerErrorBuilder( "DOMExceptionNotSupportedError", function DOMExceptionNotSupportedError(msg) { return new DOMException(msg, "NotSupported"); }, ); core.registerErrorBuilder( "DOMExceptionNetworkError", function DOMExceptionNetworkError(msg) { return new DOMException(msg, "NetworkError"); }, ); core.registerErrorBuilder( "DOMExceptionAbortError", function DOMExceptionAbortError(msg) { return new DOMException(msg, "AbortError"); }, ); core.registerErrorBuilder( "DOMExceptionInvalidCharacterError", function DOMExceptionInvalidCharacterError(msg) { return new DOMException(msg, "InvalidCharacterError"); }, ); core.registerErrorBuilder( "DOMExceptionDataError", function DOMExceptionDataError(msg) { return new DOMException(msg, "DataError"); }, ); function runtimeStart( denoVersion, v8Version, tsVersion, target, ) { core.setMacrotaskCallback(timers.handleTimerMacrotask); core.setWasmStreamingCallback(fetch.handleWasmStreaming); core.setReportExceptionCallback(event.reportException); op_set_format_exception_callback(formatException); version.setVersions( denoVersion, v8Version, tsVersion, ); core.setBuildInfo(target); } core.setUnhandledPromiseRejectionHandler(processUnhandledPromiseRejection); core.setHandledPromiseRejectionHandler(processRejectionHandled); // Notification that the core received an unhandled promise rejection that is about to // terminate the runtime. If we can handle it, attempt to do so. function processUnhandledPromiseRejection(promise, reason) { const rejectionEvent = new event.PromiseRejectionEvent( "unhandledrejection", { cancelable: true, promise, reason, }, ); // Note that the handler may throw, causing a recursive "error" event globalThis_.dispatchEvent(rejectionEvent); // If event was not yet prevented, try handing it off to Node compat layer // (if it was initialized) if ( !rejectionEvent.defaultPrevented && typeof internals.nodeProcessUnhandledRejectionCallback !== "undefined" ) { internals.nodeProcessUnhandledRejectionCallback(rejectionEvent); } // If event was not prevented (or "unhandledrejection" listeners didn't // throw) we will let Rust side handle it. if (rejectionEvent.defaultPrevented) { return true; } return false; } function processRejectionHandled(promise, reason) { const rejectionHandledEvent = new event.PromiseRejectionEvent( "rejectionhandled", { promise, reason }, ); // Note that the handler may throw, causing a recursive "error" event globalThis_.dispatchEvent(rejectionHandledEvent); if (typeof internals.nodeProcessRejectionHandledCallback !== "undefined") { internals.nodeProcessRejectionHandledCallback(rejectionHandledEvent); } } let hasBootstrapped = false; // Delete the `console` object that V8 automaticaly adds onto the global wrapper // object on context creation. We don't want this console object to shadow the // `console` object exposed by the ext/node globalThis proxy. delete globalThis.console; // Set up global properties shared by main and worker runtime. ObjectDefineProperties(globalThis, windowOrWorkerGlobalScope); // Set up global properties shared by main and worker runtime that are exposed // by unstable features if those are enabled. function exposeUnstableFeaturesForWindowOrWorkerGlobalScope(options) { const { unstableFlag, unstableFeatures } = options; if (unstableFlag) { const all = ObjectValues(unstableForWindowOrWorkerGlobalScope); for (let i = 0; i <= all.length; i++) { const props = all[i]; ObjectDefineProperties(globalThis, { ...props }); } } else { const featureIds = ArrayPrototypeMap( ObjectKeys( unstableForWindowOrWorkerGlobalScope, ), (k) => k | 0, ); for (let i = 0; i <= featureIds.length; i++) { const featureId = featureIds[i]; if (ArrayPrototypeIncludes(unstableFeatures, featureId)) { const props = unstableForWindowOrWorkerGlobalScope[featureId]; ObjectDefineProperties(globalThis, { ...props }); } } } } // NOTE(bartlomieju): remove all the ops that have already been imported using // "virtual op module" (`ext:core/ops`). const NOT_IMPORTED_OPS = [ // Related to `Deno.bench()` API "op_bench_now", "op_dispatch_bench_event", "op_register_bench", // Related to `Deno.jupyter` API "op_jupyter_broadcast", // Related to `Deno.test()` API "op_test_event_step_result_failed", "op_test_event_step_result_ignored", "op_test_event_step_result_ok", "op_test_event_step_wait", "op_test_op_sanitizer_collect", "op_test_op_sanitizer_finish", "op_test_op_sanitizer_get_async_message", "op_test_op_sanitizer_report", "op_restore_test_permissions", "op_register_test_step", "op_register_test", "op_pledge_test_permissions", // TODO(bartlomieju): used in various integration tests - figure out a way // to not depend on them. "op_set_exit_code", "op_napi_open", "op_npm_process_state", ]; function removeImportedOps() { const allOpNames = ObjectKeys(ops); for (let i = 0; i < allOpNames.length; i++) { const opName = allOpNames[i]; if (!ArrayPrototypeIncludes(NOT_IMPORTED_OPS, opName)) { delete ops[opName]; } } } // FIXME(bartlomieju): temporarily add whole `Deno.core` to // `Deno[Deno.internal]` namespace. It should be removed and only necessary // methods should be left there. ObjectAssign(internals, { core, warnOnDeprecatedApi }); const internalSymbol = Symbol("Deno.internal"); const finalDenoNs = { internal: internalSymbol, [internalSymbol]: internals, resources() { internals.warnOnDeprecatedApi("Deno.resources()", new Error().stack); return core.resources(); }, close(rid) { internals.warnOnDeprecatedApi( "Deno.close()", new Error().stack, "Use `closer.close()` instead.", ); core.close(rid); }, ...denoNs, // Deno.test and Deno.bench are noops here, but kept for compatibility; so // that they don't cause errors when used outside of `deno test`/`deno bench` // contexts. test: () => {}, bench: () => {}, }; const { denoVersion, tsVersion, v8Version, target, } = op_snapshot_options(); function bootstrapMainRuntime(runtimeOptions) { if (hasBootstrapped) { throw new Error("Worker runtime already bootstrapped"); } const nodeBootstrap = globalThis.nodeBootstrap; const { 0: location_, 1: unstableFlag, 2: unstableFeatures, 3: inspectFlag, 5: hasNodeModulesDir, 6: maybeBinaryNpmCommandName, 7: shouldDisableDeprecatedApiWarning, 8: shouldUseVerboseDeprecatedApiWarning, 9: future, } = runtimeOptions; removeImportedOps(); deprecatedApiWarningDisabled = shouldDisableDeprecatedApiWarning; verboseDeprecatedApiWarning = shouldUseVerboseDeprecatedApiWarning; performance.setTimeOrigin(DateNow()); globalThis_ = globalThis; // Remove bootstrapping data from the global scope delete globalThis.__bootstrap; delete globalThis.bootstrap; delete globalThis.nodeBootstrap; hasBootstrapped = true; // If the `--location` flag isn't set, make `globalThis.location` `undefined` and // writable, so that they can mock it themselves if they like. If the flag was // set, define `globalThis.location`, using the provided value. if (location_ == null) { mainRuntimeGlobalProperties.location = { writable: true, }; } else { location.setLocationHref(location_); } exposeUnstableFeaturesForWindowOrWorkerGlobalScope({ unstableFlag, unstableFeatures, }); ObjectDefineProperties(globalThis, mainRuntimeGlobalProperties); ObjectDefineProperties(globalThis, { // TODO(bartlomieju): in the future we might want to change the // behavior of setting `name` to actually update the process name. // Empty string matches what browsers do. name: core.propWritable(""), close: core.propWritable(windowClose), closed: core.propGetterOnly(() => windowIsClosing), }); ObjectSetPrototypeOf(globalThis, Window.prototype); if (inspectFlag) { const consoleFromDeno = globalThis.console; core.wrapConsole(consoleFromDeno, core.v8Console); } event.setEventTargetData(globalThis); event.saveGlobalThisReference(globalThis); event.defineEventHandler(globalThis, "error"); event.defineEventHandler(globalThis, "load"); event.defineEventHandler(globalThis, "beforeunload"); event.defineEventHandler(globalThis, "unload"); event.defineEventHandler(globalThis, "unhandledrejection"); runtimeStart( denoVersion, v8Version, tsVersion, target, ); ObjectDefineProperties(finalDenoNs, { pid: core.propGetterOnly(opPid), ppid: core.propGetterOnly(opPpid), noColor: core.propGetterOnly(() => op_bootstrap_no_color()), args: core.propGetterOnly(opArgs), mainModule: core.propGetterOnly(() => op_main_module()), // TODO(kt3k): Remove this export at v2 // See https://github.com/denoland/deno/issues/9294 customInspect: { get() { warnOnDeprecatedApi( "Deno.customInspect", new Error().stack, 'Use `Symbol.for("Deno.customInspect")` instead.', ); return customInspect; }, }, }); // TODO(bartlomieju): deprecate --unstable if (unstableFlag) { ObjectAssign(finalDenoNs, denoNsUnstable); // TODO(bartlomieju): this is not ideal, but because we use `ObjectAssign` // above any properties that are defined elsewhere using `Object.defineProperty` // are lost. let jupyterNs = undefined; ObjectDefineProperty(finalDenoNs, "jupyter", { get() { if (jupyterNs) { return jupyterNs; } throw new Error( "Deno.jupyter is only available in `deno jupyter` subcommand.", ); }, set(val) { jupyterNs = val; }, }); } else { for (let i = 0; i <= unstableFeatures.length; i++) { const id = unstableFeatures[i]; ObjectAssign(finalDenoNs, denoNsUnstableById[id]); } } if (!ArrayPrototypeIncludes(unstableFeatures, unstableIds.unsafeProto)) { // Removes the `__proto__` for security reasons. // https://tc39.es/ecma262/#sec-get-object.prototype.__proto__ delete Object.prototype.__proto__; } // Setup `Deno` global - we're actually overriding already existing global // `Deno` with `Deno` namespace from "./deno.ts". ObjectDefineProperty(globalThis, "Deno", core.propReadOnly(finalDenoNs)); if (nodeBootstrap) { nodeBootstrap(hasNodeModulesDir, maybeBinaryNpmCommandName); } if (future) { delete globalThis.window; } } function bootstrapWorkerRuntime( runtimeOptions, name, internalName, ) { if (hasBootstrapped) { throw new Error("Worker runtime already bootstrapped"); } const nodeBootstrap = globalThis.nodeBootstrap; const { 0: location_, 1: unstableFlag, 2: unstableFeatures, 4: enableTestingFeaturesFlag, 5: hasNodeModulesDir, 6: maybeBinaryNpmCommandName, 7: shouldDisableDeprecatedApiWarning, 8: shouldUseVerboseDeprecatedApiWarning, } = runtimeOptions; deprecatedApiWarningDisabled = shouldDisableDeprecatedApiWarning; verboseDeprecatedApiWarning = shouldUseVerboseDeprecatedApiWarning; performance.setTimeOrigin(DateNow()); globalThis_ = globalThis; removeImportedOps(); // Remove bootstrapping data from the global scope delete globalThis.__bootstrap; delete globalThis.bootstrap; delete globalThis.nodeBootstrap; hasBootstrapped = true; exposeUnstableFeaturesForWindowOrWorkerGlobalScope({ unstableFlag, unstableFeatures, }); ObjectDefineProperties(globalThis, workerRuntimeGlobalProperties); ObjectDefineProperties(globalThis, { name: core.propWritable(name), // TODO(bartlomieju): should be readonly? close: core.propNonEnumerable(workerClose), postMessage: core.propWritable(postMessage), }); if (enableTestingFeaturesFlag) { ObjectDefineProperty( globalThis, "importScripts", core.propWritable(importScripts), ); } ObjectSetPrototypeOf(globalThis, DedicatedWorkerGlobalScope.prototype); const consoleFromDeno = globalThis.console; core.wrapConsole(consoleFromDeno, core.v8Console); event.setEventTargetData(globalThis); event.saveGlobalThisReference(globalThis); event.defineEventHandler(self, "message"); event.defineEventHandler(self, "error", undefined, true); event.defineEventHandler(self, "unhandledrejection"); // `Deno.exit()` is an alias to `self.close()`. Setting and exit // code using an op in worker context is a no-op. os.setExitHandler((_exitCode) => { workerClose(); }); runtimeStart( denoVersion, v8Version, tsVersion, target, internalName ?? name, ); location.setLocationHref(location_); globalThis.pollForMessages = pollForMessages; // TODO(bartlomieju): deprecate --unstable if (unstableFlag) { ObjectAssign(finalDenoNs, denoNsUnstable); } else { for (let i = 0; i <= unstableFeatures.length; i++) { const id = unstableFeatures[i]; ObjectAssign(finalDenoNs, denoNsUnstableById[id]); } } if (!ArrayPrototypeIncludes(unstableFeatures, unstableIds.unsafeProto)) { // Removes the `__proto__` for security reasons. // https://tc39.es/ecma262/#sec-get-object.prototype.__proto__ delete Object.prototype.__proto__; } ObjectDefineProperties(finalDenoNs, { pid: core.propGetterOnly(opPid), noColor: core.propGetterOnly(() => op_bootstrap_no_color()), args: core.propGetterOnly(opArgs), // TODO(kt3k): Remove this export at v2 // See https://github.com/denoland/deno/issues/9294 customInspect: { get() { warnOnDeprecatedApi( "Deno.customInspect", new Error().stack, 'Use `Symbol.for("Deno.customInspect")` instead.', ); return customInspect; }, }, }); // Setup `Deno` global - we're actually overriding already // existing global `Deno` with `Deno` namespace from "./deno.ts". ObjectDefineProperty(globalThis, "Deno", core.propReadOnly(finalDenoNs)); if (nodeBootstrap) { nodeBootstrap(hasNodeModulesDir, maybeBinaryNpmCommandName); } } globalThis.bootstrap = { mainRuntime: bootstrapMainRuntime, workerRuntime: bootstrapWorkerRuntime, }; Qd/Pext:runtime_main/js/99_main.jsa b,D`M`, T`1LaN T  I` M"Sb1@ Lfc^a` a b !bX"dj= b9"&bbllmbn"BqqBrrbstbuwxbxxB~BLMM ????????????????????????????????????????????????????????????????Ibh`XL` bS]`B]`7]`+]`"]`"]`D]`t"]` b6]`I&]`e]`0]`]``]`b]`B]`8 ]`~Bg]`"h]`? n]` ]0L`   DDc D"Dc D&Dc  DDc<> DDchn DDc8C DDc wz DbDc  DDc  DDcL`$ Dllc DLLcs  DbKbKc  DNNc  D  c Dc Dc   Dc $2 Db b c 6H D5c  DbJbJc Dc DBBc DBKBKc D"d"dc D``c D  c  D  c!4 D  c8M D  cQa D  ces D  cw~ D  c D  c D  c D  c D  c D  c D  c. Dc D""c D""c Dbbc4X Dc LW D7 7 c\u Dffc 6 `$ a?BKa?a? a? a? a? a? a? a? a? a? a? a? a? a? a?a?bJa?a?Ba?"a?"a?a?a?b a?a?a?la?ba?7 a?"da?`a?fa?La?bKa?Na?b@X T  I`cBqb@Y T I`&yqb@Z T I`b@[ T I`"bsbMQ\ T I`#&bub@ ] T I`')xb@^ T I`e34B~b@_ T I`=6^9~b)@` T I`9&;b @a T I`u=`@b;@b T I`DDb@c T I`HZ f+@׭@@@"b@!d TI`1Z.hc@@™b@(ea   Lfc^a` a b !%bX"dj = b9KibM"jOBk(bKCbMCOC0bCHHHbK0bCHHHL0bCHHHN` T  I`'-'IbK f T I`J'b'IbK g T I`''IbK h" T I`''IbKiBp 5ABB"CCBDDBEEBFFG"G"HHIbIIbJJK"By T I`//n/Byb#jz T I`/0zb'kz T I`00zb&l{ T I`'1d1{b!m"| T I`11"|bn| T I`o22|b*o} T I`3J3}bpDC7   `TM`b"‡b"ŠB"B   BK b C"C""b"C" T I`eFFb q T I`F}Gbrb{ T y` Qa.test`@HHHb{bKs%  T  ` Qa.bench`SH[H% bK t LMM  b"CC"R  `Duhh %%%%%%% % % % % %%%%%%%%%%%%%%%%'%(%)%*%+%,%-%.%/%0%1%2%3%4%5%6%7%8%9  %: %;%< %=%>%?%@%A%B  e% e% e% e% e%! e%" e%# e%$ e%% e%& h  !W0-%0-%-%-%- %- %-% -% -% -% -% - %-!%-"%-#%-$ %-%"%-&$%-'&%-((%-)*-*,%-+.%-,0%--2-.4%-/6%0-08%-1:2-3<4-5>6~7@~8A)093:B 31D~;F)0<3:G 33I~=K)0>3:L 35NcP%'%(%)%* iR%+%0%1%30?@bT%50AbV%60BbX%70CDbZ0-E\F0G-F^_`0-E\H0-Hb_d0-E\I0-If_h0-E\J0-Jj_l0-E\K0-Kn_p0-E\L0-Lr_t0-E\M0-Mv_x0-E\N0-Nz_|0-E\O0-O~_0-E\P0-P_0-E\Q0-Q_0-E\R0-R_0-E\S0-S_0-E\T0-T_0-E\U0-U_0-E\V0-V_0-E\W0-W_0-E\X0-X_0-E\Y0-Y_0-E\Z0-Z_0-E\[0-[_0-E\\0-\_0-]^__0-]`a_0-]bc_0-]de_0-]fg_0-]hi_0-]jk_0-lƽ^0-mʽ^%:!nνoW!nμ0pc{q%%<0r~s)03,3tcub~v) 3w t07xy7z{70|h}~77 %>0a-%?-%@-%A-%B!nν~) 3 3 2 \uPPPPPPPPPP0' 00 @@P@P@P@P@P@P@P@P@@@P@s20@ $@  ,bAWD"*2D:DBJRZbDj "rD~DD`RD]DH Da b-!}`6M` T1` L` B,--bb(CCCCbC´C"CCCbcC¶CbC¤C"CCCBC"CCCY`Ab´"bc¶b¤"B"  J`D(!--mT!--m ?!-- m *!-- m!--m~) / / :8y3  / /  :8y3 " /% /( :'8$y3 * /- /0 :/8,3 2 /4 m6"!7 /: /= :<89 i?3A /C mE"!7 /G /J :I8F iL3N /P mR"!7 /T /W :V8S iY3[ /^ /a :`8]3c  /f /i :h8e /l /o :n8k3q  /t /w :v8s /z /} :|8y3  / / :8 / / :83  / / :8 / / :83  / / :8 / / :83  / !/ :8 / !/ :83  "/ #/ :8 "/ #/ :83  $/ %/ :8nj $/ %/ :8͘3  &/ '/ :8y &/ '/ :8y3  (/ )/ :8y (/ )/ :8y3  */ +/ :8y */ +/ :8y3 " ,/ -/ :8y& ,/ -/  :8y3   dw PXXqB 0" @ 0"@ !@ @ @"" @ @"" @ @"" @ @"">bD`D]DD])D] La aDDDD!DDD<q b-DDjD TIEDba8E`,]zfh?,]fd@,]fdA,] fB,]fC,]frD,]frE,]frF,]frG,] frH,]frI,]f2`J,]frtK,]flL,]fxM,] fPN,]fLO,]fTP,] fTQ,]fTR,]fS,] "fTT,]*fXU,]2fPV,]:fW,]Bf`X,]JfY,] RfZ,]Zfd[,]bfP\,]jf],]rf^,]zf_,] f$`,]fa,]fb,]fc,]f d,]frPe,] f f,]f g,]f4h,]f<i,]f8j,]f@k,] fDl,]fm,]f0n,]fo,]fr p,] f q,] f r,]f s,]"fr4t,]*fr4u,]2fr4v,]:fr4w,] Bf x,]Jf2y,]Rf\z,]Zf{,]bfR|,]jf},] rf ~,]zfrX ,]f, ,]fh ,]frh ,]f ,] fr< ,]fr ,]frp ,]fr,]f ,]fr,] fr|,]f\ ,]f` ,]f ,]fr  ,]f`,] f|9XXXX,] fx ,]frD,]fr ,]"fr,]*fRl,] 2fr ,]:f #8888,]BfP,]Jfr,]RfrH,]Zfr,] bfr,]jfr,]rfr,]zf>4444,]f20,]f<8888,] fTTTT,]f2%PPPP,]fRtW4444,]f2%PPPP,]fR4,]fR,] fr,]frH,]fr,]f,]f,@,]f ,] f2,]f2 ,]fd,@@@@,] frT $$$$,]f8 ,]fr,] "fr,]*f ,]2f ,]:f ,]Bf ,]Jf< ,] Rfr$,]Zfr| ,]bf ,]jf ,]rf ,]zf ,] f ,]f ,]f ,]f ,]f2,]f2,] fd,]f0,]fd,]f0,]f,]f,] fr0,]f ,]f ,]fRp ,]fR0 ,] fr|,] fr,]fP,]"fR ,]*fR` ,]2fr,]:fr,] BfT,]Jf ,]Rf0,]Zf ,]bf< 0000,]jf ,] rf ,]zf,,]f <<<<,]f< ,]f ,]f ,] f ,]f$$$$,]f ,]f ,]f ,]f ,] f ,]f ,]fR( ((,]fP ,]fL ,]fr ,] fr8(88,] fr8(88,]f,]f,]"f ,]*f ,] 2f ,]:f ,]Bf ,]Jf ,]Rf ,]Zf ,] bf ,]jf ,]rf ,]zf ,]f ,]f ,] f ,]f ,]f ,]f ,]f ,]f ,] f ,]f ,]f ,]f ,]f ,]f ,] f ,]f ,]f ,] f ,]f ,]f ,] "f ,]*f ,]2f ,]:f ,]Bf ,]Jf ,] Rf ,]Zf ,]bf ,]jf ,]rf ,]zf ,] f ,]f !,]f ",]f #,]f $,]f %,] f &,]f ',]f (,]f ),]f *,]f +,] f ,,]f -,]f .,]f /,]f 0,] f 1,] f 2,]f 3,]"f 4,]*f 5,]2f 6,]:f 7,] Bf 8,]Jf 9,]Rf :,]Zf ;,]bf<,]jf =,] rf >,]zf ?,]f @,]f A,]f B,]f C,] f D,]f E,]f F,]f G,]f H,]f I,] f J,]f K,]f L,]f M,]f N,]f O,] f P,] f Q,]f R,]f S,]"f T,]*f U,] 2f V,]:f W,]Bf X,]Jf Y,]Rf Z,]ZfP[,] bf \,]jf ],]rf$^,]zf _,]f `,]fR`a,] f b,]fc,]fd,]fe,]f f,]frg,] frdh,]fr$ i,]frX j,]f k,]f l,]f m,] f n,]f o,]f p,] f q,]f r,]f s,] "f t,]*f u,]2f v,]:f w,]Bfrh x,]Jfr y,] Rfr z,]Zfr,{,]bfr|,]jfr,},]rfR#~,]zfr,] f!,]f @<<<<,]fr,,]fr,]fr,,]f((((,] fr,,]fr,]f ((((,]fr,,]fr,]fH((((,] fr,,]fr,]f((((,]fr,,]fr,,] fr,] f,,,,,]fr4,]"fr,]*frH,]2fr,]:fr,] Bfr,]Jfr,]Rfr,]ZfR ,]bfR ,]jfr,,] rfr,]zfr,,]fr,]fr,]fr,]fr,] fr,]fr,]fr,]f< 4444,]fr,]f ,,,,,] f ,]fr,]f ,]f\D\\,]fX@XX,]f<,] f8 ,] frp,]frp,]f`T<TT,]"ftdDdd,]*fD ,] 2f2|,]:fr,]Bf2<,]Jf,]Rf,]Zf ,] bf ,]jf ,]rf4,]zf ,]f ,]f2,] ft,]f ,]f ,]f ,]f ,]fr` ,] fr,]f( ,]f ,]f ,]f,]fp ,] f` ,]f ,]f ,] f ,]fp ,]f ,] "f,]*f2(((,]2f ,]:f2(((,]Bf ,]Jf2(((,] Rf ,]Zf2D(((,]bf,]jf2D(((,]rf ,]zf2$$$,] f,]f,]f,]f8,]f,]fP,] f,]f2,,,,]f2,,,,]f2,,,,]f2,,,,,]f2,,,,,] f2x,,,,]fR,]f ,]f,]f,] f,] f,]frD,]"f ,]*f2,]2f2,]:f2,] Bf2,]Jf,]Rf0,]Zf4,]bfL,]jf,] rf(,]zf,,]fD,]fR ,]f2,]f ,] f ,]f ,]f ,]f0((((,]f ,]fP ,] f ,]fR ,]f ,]f ,]f ,]f ,] f ,] fR ,]f ,]f ,]"fL ,]*f,,] 2f ,]:f ,]Bf ,]Jf ,]Rfd ,]Zf\$$$$,] bfrp ,]jf ,]rf,]zf,]fr( ,]fr!,] f ",]f8#,]f@$,]f %,]f &,]f ',] f (,]f ),]f *,]f +,]f ,,]f -,] f .,]f /,]f 0,] ft @@@@1,]f 2,]f 3,] "f 4,]*f 5,]2f 6,]:f2 7,]Bf 8,]Jf 9,] Rf :,]Zf2p ;,]bf<,]jf=,]rf@ >,]zf `?,] f@,]frHA,]f28B,]f C,]f D,]f E,] fF,]f G,]f`H,]fI,]f J,]fK,] f L,]f0(00M,]fN,]fL O,]f P,] f Q,] f R,]fr,S,]"f$$$$T,]*f, $$$$U,]2f 4444V,]:f4 $$$$W,] Bf4 $$$$X,]Jf4 $$$$Y,]Rf4 $$$$Z,]Zf4 $$$$[,]bf \,]jf ],] rf ^,]zf _,]f `,]f$a,]f b,]f0c,] f d,]f<<<<e,]f2P @@@@f,]f g,]f h,]f i,] f j,]fX k,]f2l,]f m,]fPn,]fl o,] fLp,] f q,]f r,]f s,]"f t,]*f u,] 2f v,]:f w,]BfXtx,]Jfy,]Rf(z,]Zf<{,] bf8888|,]jf},]rf\~,]zft,]f ,]f,] f,]f,]f,]f ,]f ,]fR,] fr,]fr4,]fr,]f,]f,]f,] f,]f `,]f,] f,]f,]fr ,] "f2t ,]*f ,]2f ,]:f ,]Bf ,]Jf ,] Rf ,]Zf ,]bf ,]jf ,]rf ,]zf ,] f ,]f ,]f ,]f ,]f@,]frp ,] f@@0@@,]f|4,]f,]f ,]fr( ((,]fr( ((,] fr( ((,]fr8(88,]fr8(88,]f,]f,] f ,] f ,]fx ,]"f,]*fd4dd,]2fhd4dd,]:fh8hh,] Bfd ,]Jf,]Rf,]Zf,]bf,]jf,] rf,]zf,]f,]f2,]f2P,]fT,] fR0,]f$$$$,]fXI,]fRD<\\\\,]fr4,]f,] f,]fr ,]f\ ,]f ,]f ,]f ,] f,] f ,]f ,]f ,]"f ,]*f ,] 2f ,]:f ,]Bf ,]Jf ,]Rf ,]Zf ,] bf ,]jf ,]rf ,]zf ,]f ,]f ,] f ,]f ,]f ,]f ,]f ,]f ,] f ,]f ,]f ,]f ,]f ,]f ,] f ,]f ,]f ,] f ,]f ,]f ,] "f ,]*f ,]2f ,]:f ,]Bf ,]Jf ,] Rf ,]Zf ,]bf ,]jf ,]rf ,]zf ,] f ,]f ,]f ,]f ,]f ,]f ,] f ,]f ,]f ,]f ,]f ,]f ,] f ,]f ,]f ,]f ,]f ,] f ,] f ,]f ,]"f ,]*f ,]2f ,]:f ,] Bf ,]Jf ,]Rf ,]Zf ,]bf ,]jf ,] rf ,]zf ,]f ,]f !,]f ",]f #,] f $,]f %,]f &,]f ',]f (,]f ),] f *,]f +,]f ,,]f -,]f .,]f /,] f 0,] f 1,]f 2,]f 3,]"f 4,]*f 5,] 2f 6,]:f 7,]Bf 8,]Jf 9,]Rf :,]Zf ;,] bf <,]jf =,]rf >,]zf ?,]f @,]f A,] f B,]f C,]f D,]f E,]f F,]f G,] f H,]f I,]f J,]f K,]f L,]f M,] f N,]f O,]f P,] f Q,]f R,]f S,] "f T,]*f U,]2f V,]:f W,]Bf X,]Jf Y,] Rf Z,]Zf [,]bf \,]jf ],]rf ^,]zf _,] f `,]f a,]f b,]f c,]f d,]f e,] f f,]f g,]f h,]f i,]f j,]f k,] f l,]f m,]f n,]f o,]f p,] f q,] f r,]f s,]"f t,]*f u,]2f v,]:f w,] Bf x,]Jf y,]Rf z,]Zf {,]bf |,]jf },] rf ~,]zf ,]f ,]f ,]f ,]f ,] f ,]f ,]f ,]f ,]f ,]f ,] f ,]f ,]f ,]f ,]f ,]f ,] f ,] f ,]f ,]f ,]"f ,]*f ,] 2f ,]:f ,]Bf ,]Jf ,]Rf ,]Zf ,] bf ,]jf ,]rf ,]zf ,]f ,]f ,] f ,]f ,]f ,]f ,]f ,]f ,] f ,]f ,]f ,]f ,]f ,]f ,] f ,]f ,]f ,] f ,]f ,]f ,] "f ,]*f ,]2f ,]:f ,]Bf ,]Jf ,] Rf ,]Zf ,]bf ,]jf ,]rf ,]zf ,] f ,]f ,]f ,]f ,]f ,]f ,] f ,]f ,]f ,]f ,]f ,]f ,] f ,]f ,]f ,]f ,]f ,] f ,] f ,]f ,]"f ,]*f ,]2f ,]:f ,] Bf ,]Jf ,]Rf ,]Zf ,]bf ,]jf ,] rf ,]zf ,]f ,]f ,]f ,]f ,] f ,]f ,]f ,]f ,]frd,]f ,] f ,]f ,]f ,]fdDdd,]fdDdd,]fR,] f2T,] f4,]f08888,]f ,]"fD,]*fr,] 2f8$$$$,]:f,]Bf,]Jf,,,,,]RfrTTTT,]Zf ,] bf ,]jf@,]rf2 ,]zf$$$$,]f ,]f ,] f@,]f,]f$$$$,]f2,]f((((,]f,] f((((,]f PPPP ,]f PPPP ,]fr8 ,]f ,]f ,] f ,]fr<,]f$$$$,] f!\\\,]f \\\,]fT,] "fTT,]*f(LT\TT,]2frd,]:f ,]Bf,]Jfr(,] Rf ,]Zf,]bf,]jf@ ,]rf%xxx,]zfRD|,] f ,]fr4$XXX!,]f<l",]fP,,,,#,]f $,]f %,] f&,]fT',]f`\\\\(,]f<<<<),]f *,]f +,] f ,,]frD -,]f((((.,]f /,]f 0,] f 1,] fr 2,]fP$$$$3,]"f@@@@@4,]*f0@@@@5,]2f(hhhh6,]:f 7,] Bf(8,]Jfr9,]Rf($$$$:,]Zf:;,]bfr,,,,<,]jf DDDD=,] rfrXXXX>,]zfx@@@@?,]f%@,]f2| PPPPA,]f$$$$B,]f2 C,] fDD,]fE,]f F,]f G,]fDH,]f I,] fd J,]fK,]f8888L,]frxM,]f N,]f O,] f2@P,] f2Q,]f2HR,]f2S,]"fD T,]*f2U,] 2fRV,]:fRW,]BfX,]Jf28Y,]Rf Z,]Zf\[,] bf \,]jf(],]rf ^,]zfl_,]f2,`,]f2a,] f2,b,]f2c,]frd,]fre,]frf,]frg,] frh,]fHi,]fR j,]f k,]f l,]fr m,] fhn,]fo,]f2Xp,] frq,]fr`r,]f8888s,] "f, 8888t,]*fxu,]2frv,]:f4 w,]Bf4 x,]Jf y,] Rfpz,]Zf {,]bf< ((((|,]jfR},]rf ~,]zfR( ,] f< ,]fr< ,]f ,]f ,]fr$ ,]fR,] frt,]frp,]f,]fRH,]f,]f,] f,]fT,]fr ,]fx,]fx,] f2 ,] f ,]f,]"f,]*frh,]2frh,]:f,] Bf,]JfL,]Rf,]Zfl,]bf,]jf,] rf,]zf,]f,]ft,]ft,]f,] f,]ft,]f,]f,]f,]fR ,] fr,]fR$$$,]fl,]f,]f,]f ,] frT ,] fr ,]fp ,]fd ,]"ft,]*f,] 2f2,]:f ,]Bf ,]Jf,]Rf,]Zf28\4\\,] bfx,]jfRl,ll,]rfx,]zfrl,ll,]f,]f2d,dd,] f,]fRx`(``,]f,]f0 `,]fhPhh,]f,,,,,] fRPD,DD,]fRxD,DD,]fRxD,DD,]fR|H0HH,]fr XXXX,]f8,] f,]f,] f,] f,] f,] fR,] " fR,]* f<,]2 f<,]: f<,]B f<,]J f<,] R f,]Z f<,]b f<,]j f ,]r f<,]z f<,]  f<,] f<,] f  ,] f0 ,] f<,] f<,]  f<,] f<,] f<,] f ,] f<,] f ,]  f<,] f<,] f@,] fH,] f ,] f ,]  fL ,] f| ,]" fl ,]* f ,]2 f,]: fr,] B fT ,]J fH,]R f,]Z f\,]b f$,]j fT,] r fh,]z f,] f ,] f ,] f ,] fX,]  fX,] f,] f` ,] f` ,] f` ,] f ,]  f ,] f ,] f ,] f$ ,] fr ,] f h,]  fxXxx,] fr"````,] ft,] f ,]" f ,]* f ,] 2 f,,]: fP ,]B fd ,]J f,]R f ,]Z fl,] b fR 4,44,]j f ,]r f ,]z f,] f( (( ,] fD !,]  f| ",] fl<|<<#,] f<|<<$,] fr0%,] f$$$$&,] f$$$$',]  fr (,] fRL p  ),] f X@XX*,] f(+,] f\ ,,] fT -,]  f .,] f /,] f2 0,] fRL  1,] f\T2,] f|<<<3,] " f<<<4,]* f 5,]2 fd( ((6,]: f7,]B f LDLL8,]J f2P9,] R f:,]Z f $$$$;,]b f| ((((<,]j fP((((=,]r f@ $$$$>,]z fD?,]  fh @,] fRA,] f B,] fd 4444C,] fh,,,,D,] f E,]  f F,] f G,] fHH,] f2,I,] f J,] f K,]  f L,] f2ddddM,] fR(TTTTN,] fr PPPPO,] fh'P,] frH%ttttQ,]  fXXXXR,] fR\\\\S,]" fRT,]* fU,]2 f20000V,]: f W,] B fhhhhX,]J f2Y,]R f8 Z,]Z fr[,]b f \,]j f ],] r f ^,]z f _,] f `,] f a,] fb,] fc,]  f d,] f e,] f2/||||f,] fR4g,] f XXXXh,] f(4444i,]  f LLLLj,] f2/k,] f4lllll,] f2(m,] f2 4444n,] f2,,,,o,] f p,] fx q,]fx r,]fx s,]"f t,]*f u,] 2fx v,]:fx w,]Bf x,]Jfx y,]Rfx z,]Zfx {,] bfx |,]jfr((((},]rfr~,]zf,]f\,]fr0,] fP,,,,,]fP,,,,,]fr( ,]fr, ,]f ,]f,] f5,]f`$$$$,]f2 4444,]f$$$$,]f$$$$,]fR,] f(#,,,,,]f@!,,,,,]f ,] f4 ,]f ,]f ,] "f,]*f ,]2f\ ,]:f*,]Bf,]Jf,] RfR,XXXX,]Zf,]bf,]jf ,]rf(,]zfx,] f PPPP,]f,]f| ,]f ,]f,]fH ,,,,,] f8888,]f,]f,]f0 ,,,,,]f 0000,]f ,] f 4444,]f,]f( ,]fR ,]f,] f ,] f` ,]fh ,]"f<$$$$,]*f,]2f ,]:f,] Bfr,]Jf,]Rf,]Zf\,]bf ,]jfR,] rfR<,]zf ,]f ,]fr,]fr,]fr,] f\ ,]fr,]fr ,]frd ,]fr,]fr,] f ,]fr,]fr\,]fr,,]fr$,]fr$,] fr(,] f,]f` ,]fr ,]"frl,]*fPPPP,] 2f ,]:f ,]Bfr 4444,]Jf$8888,]Rf8,]Zf ,,,,,] bf| ,,,,,]jf ,]rf\ ,]zfrD,]fr| ,]frL ,] frT ,]frP ,]frX,]frX,]frL,]frD,] frL,]fr,]fr,]frd,]frL,]fr ,] f ,]f ,]fr,,] fr8,]fr,,]fr,,] "fr ,]*fr ,]2fr(,]:fr ,]Bfr(,]Jf2,] Rfd ,]Zf ,]bfr`,]jfr,]rfr,]zfrd,] fl ,]f ,]fl ,]fh ,]frD,]f,] fr\,]fr,]frP,]fr ,]fr ,]fr ,] fr ,]fr ,]fr,]fr,]fr,] fr,] fr,]fr,]"fr,]*fr,]2fr,]:fr,] Bfr,]Jf2 ,]Rfr ,]Zf ,]bf2,]jfrt,] rfr4 ,]zfr0,]frl ,]frl !,]f ",]f #,] fh $,]fr%,]frD &,]frD ',]fr4 (,]fr4 ),] fr4 *,]fr+,]fr< ,,]fr -,]fr(.,]fr/,] fR0,] f1,]f02,]fR 3,]"fP 4,]*fd 5,] 2f6,]:f7,]Bf2x 8,]Jf2 9,]RfR:,]Zfr ;,] bfr <,]jfP =,]rfr$ >,]zfr<?,]f @,]f| A,] fRB,]fRC,]fRlD,]f4E,]f|F,]fRG,] fPH,]f I,]fJ,]fRK,]fL,]fM,] f N,]frO,]fl P,] fh Q,]frR,]f S,] "f T,]*frU,]2frV,]:frW,]BfrX,]Jf| Y,] Rfr Z,]Zfr([,]bfr(\,]jfr(],]rfr ^,]zf$_,] fr `,]fr$ a,]frb,]f c,]f, d,]fl e,] fr f,]f g,]fh h,]fri,]f  j,]frk,] frl,]f m,]f n,]fr8o,]f p,] f q,] fr8r,]f s,]"frt,]*fru,]2f, v,]:frw,] Bfrx,]Jf, y,]Rfrz,]Zfr{,]bf, |,]jfr},] rfr~,]zf, ,]f| ,]f ,]f, ,]f ,] f ,]f ,]f ,]f ,]f ,]f ,] f ,]f ,]f ,]f ,]f ,]f ,] f ,] f ,]f ,]f ,]"f ,]*f ,] 2f ,]:f ,]Bf ,]Jf ,]Rf ,]Zf ,] bf ,]jf ,]rf ,]zf,]f,]f ,] f ,]f ,]f ,]f ,]f ,]f ,] f ,]f ,]f ,]f ,]f ,]f ,] f ,]f ,]f ,] f ,]f ,]f ,] "f ,]*f ,]2f ,]:f ,]Bf ,]Jf ,] Rf ,]Zf ,]bf ,]jf ,]rf ,]zf ,] f ,]f ,]f ,]f ,]f ,]f ,] f ,]f ,]f ,]f ,]f ,]f ,] f ,]f ,]f ,]f ,]f ,] f ,] f ,]f ,]"f ,]*f ,]2f ,]:f ,] Bf ,]Jf,]Rf ,]Zf,]bf ,]jf2,] rf ,]zf ,]f ,]f ,]f ,]f ,] f ,]f ,]f ,]f ,]f ,]f ,] f ,]f ,]f ,]f ,]f ,]f ,] f ,] f ,]f ,]f ,]"f ,]*fp,] 2fp,]:fh ,]Bfh ,]Jf ,]Rfh ,]Zfh ,] bfh ,]jfh ,]rfh ,]zfh ,]fp ,]fp8,] fp@,]fp@,]fp@,]fp@,]fp,]fp,] fp@,]fp ,]fp ,]fpH ,]fpH ,]fp  ,] fp(,]fp(,]fp$,] fp8,]fp<,]fp,,] "fp,,]*fpl,]2f,]:fL,]Bf ,]Jfp,] Rfpp,]Zf| ,]bf$ ,]jf,]rf| ,]zf$ ,] f` ,]f !,]f ",]f #,]f $,]fp%,] fP &,]f ',]f (,]f ),]f *,]f +,] f ,,]fP-,]fp.,]fp@/,]fpt0,] fP81,] fp2,]f,,,3,]"f,,,4,]*f,,,5,]2fP,,,6,]:fP,,,7,] Bf,,,8,]Jfp9,]Rfp:,]ZfpL;,]bfp<,]jfPH=,] rfp>,]zfP?,]fP@,]fPA,]fP,B,]fPC,] fpDD,]fpE,]fpF,]fPG,]f0TH,]fpI,] fp,J,]fp K,]fx L,]fp M,]fp(N,]f O,] fP,] fQ,]fpR,]fpS,]"fpT,]*fpU,] 2fpV,]:fpW,]BfpX,]JfY,]Rf| Z,]Zf [,] bfpP\,]jf],]rfp^,]zf _,]f0`,]fa,] f b,]fPc,]fPd,]fPe,]fPf,]f00g,] f| h,]f\ i,]f j,]f k,]fp l,]f| m,] fpn,]fpo,]f p,] f\ q,]f0r,]fP ,,,,s,] "fH t,]*f u,]2f v,]:fH w,]Bfx x,]Jf y,] RfP\ z,]ZfP\ {,]bf |,]jf((((},]rf0<~,]zfP,] f,]fp,]fp ,]fp8,]fp8,]fp8,] fp8,]fp@,]fp8,]fp8,]fpD,]fp,] fp,]fp,]fp,]fp0,]fp0,] fp0,] fp0,]fp0,]"fp0,]*fp8,]2fp8,]:fpT,] Bf ,]Jfp,]Rfp@,]Zf ,]bfp0,]jfp$,] rft ,]zft ,]fp ,]f ,]f ,]f ,] f ,]fph,]f,]fp,]f ,]fh ,] f| ,]fp8 ,]fp ,]fp< ,]fl ,]fl ,]  fl ,] fl ,] fl ,] fl ,]" fp ,]* fp ,] 2 fp ,]: fpt,]B fpt,]J fp,,]R fp,,]Z fp ,] b fp(,]j fp(,]r fp$,]z fp8,] f,] f,]  f ,] fp,] fpp,] f ,] f( ,] f,]  f ,] f( ,] fx,] f ,] f ,] f ,]  f ,] fp,]!fT ,] !f ,]!f ,]!f ,] "!f ,]*!f ,]2!f ,]:!fp,]B!fp,]J!fp ,] R!fp,]Z!fPH,]b!fp,]j!f,,,,]r!f,,,,]z!f,,,,] !f,,,,]!f,,,,]!f,,,,]!fp,]!fp,]!fpX,] !fp,]!fPX,]!fp,]!fp ,]!fp ,]!fp ,] !fp8,]!fp(,]!fpT,]!fp,]"fp,] "fP,] "fPd,]"f| ,]""ft ,]*"fp(,]2"f ,]:"f,] B"f,]J"fp,]R"fp,]Z"fp,]b"fp,]j"fp,] r"fp,]z"fp,]"f,]"f ,]"f ,]"fpT,] "f,]"fpd,]"f ,]"f0,]"f,]"f ,] "fp ,]"fp ,]"fp ,]"fp ,]"fP4,]"f ,] #f ,] #f ,]#ft ,]#ft,]"#fd ,]*#f0,] 2#fP ,,,,,]:#f ,]B#f ,]J#fD ,]R#f| ,]Z#f ,] b#fP\ ,]j#fP\ ,]r#f ,]z#f,]#fp ,]#fp !,] #fp8",]#fp8#,]#fp8$,]#fp8%,]#fp@&,]#fp8',] #fp8(,]#fpD),]#fp*,]#fp+,]#fp,,]#fp-,] #fp0.,]#fp0/,]$fp00,] $fp01,]$fp02,]$fp03,] "$fp84,]*$fp85,]2$fpT6,]:$f 7,]B$fp8,]J$fp@9,] R$f :,]Z$fp0;,]b$f <,]j$f =,]r$fph>,]z$f?,] $fp@,]$f A,]$f B,]$fp8 C,]$fl D,]$fl E,] $fl F,]$fl G,]$fl H,]$fl I,]$fp J,]$fpK,] $fp L,]$fptM,]$fptN,]$fp,O,]%fp,P,] %fpQ,] %fp(R,]%fp$S,]"%fp T,]*%fp4U,]2%fV,]:%fW,] B%f| X,]J%fpY,]R%fppZ,]Z%f [,]b%f( \,]j%f],] r%f ^,]z%f( _,]%fp`,]%f a,]%f b,]%f c,] %f d,]%fpe,]%fT f,]%f g,]%f h,]%f i,] %f j,]%f k,]%f l,]%fpm,]%fpn,]%fpo,] &fpp,] &fPHq,]&fpr,]&f,,,s,]"&f,,,t,]*&f,,,u,] 2&f,,,v,]:&f,,,w,]B&f,,,x,]J&fpy,]R&fpz,]Z&fpT{,] b&fp|,]j&fPT},]r&fp~,]z&fp,]&fp,]&fp,] &fp4,]&fp$,]&fpL,]&fp,]&fp,]&fP,] &fPd,]&f| ,]&ft ,]&fp$,]&fL ,]&f|,] &f|,]&fp,]'fp,] 'fp,]'fp,]'fp,] "'fp,]*'fp,]2'f|,]:'f ,]B'f ,]J'fpP,] R'f,]Z'fp`,]b'f ,]j'f0,]r'f,]z'f ,] 'fp,]'fp,]'fp,]'fp,]'fP4,]'f ,] 'f ,]'f ,]'ft ,]'fp,]'fd ,]'f0,] 'fP ,,,,,]'f ,]'f ,]'fD ,](f| ,] (f ,] (fP\ ,](fP\ ,]"(f ,]*(f,]2(fp,]:(fp ,] B(fp8,]J(fp8,]R(fp8,]Z(fp8,]b(fp@,]j(fp8,] r(fp8,]z(fpD,](fp,](fp,](fp,](fp,] (fp,,](fp,,](fp,,](fp,,](fp,,](fp,,] (fp8,](fp8,](fpP,](f ,](fp,](fp@,] )f ,] )fp,,])f ,])f ,]")fpd,]*)f,] 2)fp,]:)f ,]B)f| ,]J)fp8  :R++B++&+fY``QvI[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)|(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-ntqry=><~]))`QvI[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)|(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-ntqry=><~]))n++++v<;*2;AACfCB~B"CN:::BB2%.9.. C-CCAI)1AIqy !19aiu} 9!992:<<<//VJ:b"arZr009f~n&\[r.-Q  ext:core/opsB333 444"4*424:4B4J4z  Y`?CY`?B R4j444444444445 5325:5B55Z55r555R5555z5j5J5555"55666>6&6v6V6^66n66F6N6~6666667788z8:9.::::z:N;F;.;;;v;;2?AABrBBCC C2C"2v33+~<&877788868B8J8R8Z8;;;;;;;;;<<<"<*<2<:<B<V<^<f<n<+++J:2 BRZbjrz"*B2JZrz*" J* 2  Zjq i e I E  yYJ*2":BJ  "     Y`?CY`?*B  *   R "*2J  a66(M`Aaa -=Qey  aQ88    A  y!r  b " : J     z j   :2 B  a544   - 5 =      !I%H=IuI1IMI&!&eI]ImIUIHHHHIHHHIIH!A"!! "-"]"e"q"9""!")))1$)a6 T<q bD ]I)MD)a0E`Q op_message_port_create_entangledEDb T*M D:*a0E`Qop_ws_get_buffer_as_stringEDbx T<q bD ]Q R*U DN*a0E`Q op_ws_get_errorEDbyQ op_ws_next_event T```B`` ``b` Qarequire``Qb trace-exit` "``%````B```Qb inspect-brk`b`Qb trace-tlsQb no-trace-tls`````B``````B``````b``  ` QajitlessQb inspect-port` `Qb tls-keylog`"```Qb napi-modules``` ````B``" ``````"`Qb deprecation`B^``B`Qb perf-prof` ````"``B_``` QawarningsQb no-warningsQb force-fips` b`````Qb input-typeQb tls-max-v1.3``Qb tls-min-v1.2`` QainspectQb no-inspect` ``b``````"`Qb tls-max-v1.2`B``````B`` ```````` `Qb tls-min-v1.3```!" `Qb secure-heapQb tls-min-v1.0``` ``b``````B `` `Qb http-parser` `Qb trace-sigint` `` `Qb enable-fips` `` ``" `` ``b``"```` ``B````B `Qb icu-data-dirQb v8-pool-size```` QatitleQb tls-min-v1.1```B ``b``````"`` `` ``#````"`Qb report-dir```B``````b``"``````"``  ````  `Qb conditions`#!``&b"`` B#``#``# ``b$`Qb debug-port`%`Qb prof-process Qaloader` ``&`ƩکΩ&2>JV &B^^]]]]]*^^"^]^^ ^]2^\~ҳ```.__________^^^&__"`*`2`J`R`Z`b`j`r`z```````````=E /b^j^r^z^Y`?J^9%mUeu MYUQu$$"2  "*2:BJRZjr*b" : z"$#AMiu}eY`A]Y`AIaU]IAYIQ191FlNl~l 6lsBsssss.s:sF^6&>NV.f^VNFNf&>FV^6~zy`b !.)1 =9KKzLLLLLLLLLLLLLLLLLM MMM"M:MRMZMbMjMrMJzMMJMMMMMMMMMMMMMMMN NNN"N*N2N:NBNJNRNZNbNjNrNzNNNNNNNNNjLrL%-afqfceAfef!f9f-f ffMgagqggygigc T<q bD ]q -u D-a0E`Qop_crypto_base64url_decodeEDb T>FVnΰް^v~ưFNfNQ RQQQ y`   QQQQ  QRQ] IYi )9IiRb*Jrj * 2  jrB"*.enanum mmppyp T<q bD ] 20 D( DL`X X .0a8E`Qop_net_listen_unixpacketEDb T.6RBZ&6 T<q bD ]0D( DL`XX0a8E`Q  op_delete_envEDb T5D:5a0E`Qop_worker_get_typeEDb TU"UVVVVVVVVVVVVVVVWWWW&W.W6W>WFWNWVW^WfWnWvW~WWOEPO P^n*>FNv"*2:BJbj" !) Qa(?<=\n) !)19 Qa00 Qa01 Qa02 Qa03 Qa04 Qa05 Qa06 Qa07 Qa08 Qa09 Qa0a Qa0b Qa0c Qa0d Qa0e Qa0f Qa10 Qa11 Qa12 Qa13 Qa14 Qa15 Qa16 Qa17 Qa18 Qa19 Qa1a Qa1b Qa1c Qa1d Qa1e Qa1f Qa20 Qa21 Qa22 Qa23 Qa24 Qa25 Qa26 Qa27 Qa28 Qa29 Qa2a Qa2b Qa2c Qa2d Qa2e Qa2f Qa30 Qa31 Qa32 Qa33 Qa34 Qa35 Qa36 Qa37 Qa38 Qa39 Qa3a Qa3b Qa3c Qa3d Qa3e Qa3f Qa40 Qa41 Qa42 Qa43 Qa44 Qa45 Qa46 Qa47 Qa48 Qa49 Qa4a Qa4b Qa4c Qa4d Qa4e Qa4f Qa50 Qa51 Qa52 Qa53 Qa54 Qa55 Qa56 Qa57 Qa58 Qa59 Qa5a Qa5b Qa5c Qa5d Qa5e Qa5f Qa60 Qa61 Qa62 Qa63 Qa64 Qa65 Qa66 Qa67 Qa68 Qa69 Qa6a Qa6b Qa6c Qa6d Qa6e Qa6f Qa70 Qa71 Qa72 Qa73 Qa74 Qa75 Qa76 Qa77 Qa78 Qa79 Qa7a Qa7b Qa7c Qa7d Qa7e Qa7f Qa80 Qa81 Qa82 Qa83 Qa84 Qa85 Qa86 Qa87 Qa88 Qa89 Qa8a Qa8b Qa8c Qa8d Qa8e Qa8f Qa90 Qa91 Qa92 Qa93 Qa94 Qa95 Qa96 Qa97 Qa98 Qa99 Qa9a Qa9b Qa9c Qa9d Qa9e Qa9f Qaa0 Qaa1 Qaa2 Qaa3 Qaa4 Qaa5 Qaa6 Qaa7 Qaa8 Qaa9 Qaaa Qaab Qaac Qaad Qaae Qaaf Qab0 Qab1 Qab2 Qab3 Qab4 Qab5 Qab6 Qab7 Qab8 Qab9 Qaba Qabb Qabc Qabd Qabe Qabf Qac0 Qac1 Qac2 Qac3 Qac4 Qac5 Qac6 Qac7 Qac8 Qac9 Qaca Qacb Qacc Qacd Qace Qacf Qad0 Qad1 Qad2 Qad3 Qad4 Qad5 Qad6 Qad7 Qad8 Qad9 Qada Qadb Qadc Qadd Qade Qadf Qae0 Qae1 Qae2 Qae3 Qae4 Qae5 Qae6 Qae7 Qae8 Qae9 Qaea Qaeb Qaec Qaed Qaee Qaef Qaf0 Qaf1 Qaf2 Qaf3 Qaf4 Qaf5 Qaf6 Qaf7 Qaf8 Qaf9 Qafa Qafb Qafc Qafd Qafe QaffAIQYaiqyey !iyB J " T<q bD( D( XXXXXXXD`D u bD9`D]9a0E`IEDb%LLLELeL}LLMLYLqLLLLLLLLL [U,MMMMMMMMN NMMMErV %-5==,} R}!)Iy`BYAQa1q9iMJJAJeJJqJ}J((}((U*u*I*e**zB:RJZbrj21%auiE^U^e^]^u^m^z&r~EUFEQEYEaEiEqEEEEEEF)FEEFFEEEEE}EMF5FAFfVB J Z R b  j r z              Y`iW @Y`Uk@Y`9B.?Y`&{?Y`+eG?Y`-DT! @Y`;f?Y`;f?* 2 : 2 =WW1WaWWWyWWWiWqWWWWWJJJJJJJ9&!MiMM9MaMYMAMMM))*) *))y))E)NOMNNNNNNN BJRZ*2jrzb":6URMSR S%Sy`"=S-S5SSESS    2*"RJ 2:BZbr*j"" bjzrz****^^}^^^^^^^}q5I((((5Qop_node_scrypt_async T<q bD ]A:ED9a0E`Qop_node_scrypt_asyncEDb~ T: D( DL`X X ::a8E`Q&op_node_unstable_net_listen_unixpacketEDbRY-}q]emўٞ !)19AIM2"E,"2*Ue 9I-yAQYaiq]Me}u]m2F T<q bD ]b:D^:a0E`Qop_node_dh_compute_secretEDby TTTTTTTT&TSTTVTTTuiIYQ T<q biD ]z;D( DL`XXv;a8E`Qop_node_create_hashEDbR Tzk~kvkrrwwm*m"m~mmmnnnvvuv.vnv>vvvvnupoopjfjk&kFqpp2qvq~qpVpNpss.j jjjeelkx&xxx:uut:dBdrtBtddtt:eBerqiiirFrmBnJn)1bjr  T<q bDD<D<a0E`IEDb" *2:BJRZ9MA]m}ueѻ!yq *2^~~r.FV*^&2f NfNF">:r6V~z~~ "rZ*B2jRbJ:j~m%-EA E-%5=]e.6"F T<q bD ]9<=D<a0E`Qop_node_idna_domain_to_asciiEDb T=a8E`Qop_node_generate_secretEDbhQop_node_generate_secret_async T T<q buD ]!~=%D( DL`X)X-z=a8E`Qop_node_check_primeEDb^Qop_node_check_prime_async T   . 6 &   ! !!!!."!!""""&"!!!!! Qa%00 Qa%01 Qa%02 Qa%03 Qa%04 Qa%05 Qa%06 Qa%07 Qa%08 Qa%09 Qa%0A Qa%0B Qa%0C Qa%0D Qa%0E Qa%0F Qa%10 Qa%11 Qa%12 Qa%13 Qa%14 Qa%15 Qa%16 Qa%17 Qa%18 Qa%19 Qa%1A Qa%1B Qa%1C Qa%1D Qa%1E Qa%1F Qa%20 Qa%21 Qa%22 Qa%23 Qa%24 Qa%25 Qa%26 Qa%27 Qa%28 Qa%29 Qa%2A Qa%2B Qa%2C Qa%2D Qa%2E Qa%2F Qa%30 Qa%31 Qa%32 Qa%33 Qa%34 Qa%35 Qa%36 Qa%37 Qa%38 Qa%39 Qa%3A Qa%3B Qa%3C Qa%3D Qa%3E Qa%3F Qa%40 Qa%41 Qa%42 Qa%43 Qa%44 Qa%45 Qa%46 Qa%47 Qa%48 Qa%49 Qa%4A Qa%4B Qa%4C Qa%4D Qa%4E Qa%4F Qa%50 Qa%51 Qa%52 Qa%53 Qa%54 Qa%55 Qa%56 Qa%57 Qa%58 Qa%59 Qa%5A Qa%5B Qa%5C Qa%5D Qa%5E Qa%5F Qa%60 Qa%61 Qa%62 Qa%63 Qa%64 Qa%65 Qa%66 Qa%67 Qa%68 Qa%69 Qa%6A Qa%6B Qa%6C Qa%6D Qa%6E Qa%6F Qa%70 Qa%71 Qa%72 Qa%73 Qa%74 Qa%75 Qa%76 Qa%77 Qa%78 Qa%79 Qa%7A Qa%7B Qa%7C Qa%7D Qa%7E Qa%7F Qa%80 Qa%81 Qa%82 Qa%83 Qa%84 Qa%85 Qa%86 Qa%87 Qa%88 Qa%89 Qa%8A Qa%8B Qa%8C Qa%8D Qa%8E Qa%8F Qa%90 Qa%91 Qa%92 Qa%93 Qa%94 Qa%95 Qa%96 Qa%97 Qa%98 Qa%99 Qa%9A Qa%9B Qa%9C Qa%9D Qa%9E Qa%9F Qa%A0 Qa%A1 Qa%A2 Qa%A3 Qa%A4 Qa%A5 Qa%A6 Qa%A7 Qa%A8 Qa%A9 Qa%AA Qa%AB Qa%AC Qa%AD Qa%AE Qa%AF Qa%B0 Qa%B1 Qa%B2 Qa%B3 Qa%B4 Qa%B5 Qa%B6 Qa%B7 Qa%B8 Qa%B9 Qa%BA Qa%BB Qa%BC Qa%BD Qa%BE Qa%BF Qa%C0 Qa%C1 Qa%C2 Qa%C3 Qa%C4 Qa%C5 Qa%C6 Qa%C7 Qa%C8 Qa%C9 Qa%CA Qa%CB Qa%CC Qa%CD Qa%CE Qa%CF Qa%D0 Qa%D1 Qa%D2 Qa%D3 Qa%D4 Qa%D5 Qa%D6 Qa%D7 Qa%D8 Qa%D9 Qa%DA Qa%DB Qa%DC Qa%DD Qa%DE Qa%DF Qa%E0 Qa%E1 Qa%E2 Qa%E3 Qa%E4 Qa%E5 Qa%E6 Qa%E7 Qa%E8 Qa%E9 Qa%EA Qa%EB Qa%EC Qa%ED Qa%EE Qa%EF Qa%F0 Qa%F1 Qa%F2 Qa%F3 Qa%F4 Qa%F5 Qa%F6 Qa%F7 Qa%F8 Qa%F9 Qa%FA Qa%FB Qa%FC Qa%FD Qa%FE Qa%FF QawindowsBJR6&. N!V!N"^!f!n!v!-U!5=EM#$ $$$"$*$2$:$B$J$R$J0//$εڵ"jV:2".b޶Z$v$~$FGRFJFFFFFFFFG GGG"G*G2G:G5q)=IQYaiY` AY`AM T<q bD ]BDBa0E`Qop_node_dh_generateEDbwQop_node_dh_generate_async TBD:Ba0E`Qop_node_dh_generate_groupEDbuQop_node_dh_generate_group_async T<q bD ]VBDRBa0E`Qop_node_dh_generate_group_asyncEDbv T?B?J?R?b?j?r?z???????????7?@@@&@JA~@@8r@N@@@@@@*A:AA@@^@A@6@F@A%19i]q}a T<q bD ]FCDBCa0E`Q  op_node_signEDbj T*6^XXYXŝ  T<q bD ]ynC}D( DL`XXjCa8E`Q op_node_x509_caEDb TDa0E`Qop_node_x509_get_valid_toEDb T@@@@iűͱձݱ $$^%%%%~%& &&&%V%v%N%%f%%%%%%%n%$ T<q bD ]ED( DL`X!X%Ea8E`Qop_v8_cached_data_version_tagEDb TV^FR^jvfn~ &22:F5EM}uu]%M5-E =I%-Um% yaI1=Q=EMUYaiq} 6666BC>Cʟ6)>)F)."2JZfv>V^f¸>z FnҸʸNڸY` T<q bD ]iFmD( DL`XqXu~Fa8E`Q  op_zlib_closeEDb T`6BB Qa7fffffff&*2F~ºֺʺfVnN^ T<q bD ]GD( DL`XX~Ga8E`Qop_brotli_compressEDbQop_brotli_compress_async T& T<q bD ]1H5DHa0E`Qop_vm_run_in_new_contextEDb&&' ''*95YUɇчه !)19EMUe1`i``q````a}` a``a`````]\M]\\\])]]\5]E]=]]*:2BjrzRZb2 T`IEDb` T`EDb@ T`EDb@ T<q bDDHDHa8E`{EDb TJD(DL`X X$:Ja8E` Qop_closeEDb T<q bD](bJ,D( DL`X0X4^Ja8E`Q  op_try_closeEDb TKD( DL`XX:Ka8E`Qop_void_async_deferredEDb TND:Na0E`Qop_encoding_decode_singleEDbp TQa8E`Q!op_readable_stream_resource_closeEDb T<q bD])fQ-DbQa0E`Q'op_readable_stream_resource_await_closeEDb TRa0E`Qop_webgpu_create_samplerEDb T<q bD]VRDRRa0E`Q"op_webgpu_create_bind_group_layoutEDb TVD:Va0E` Q.op_webgpu_render_bundle_encoder_set_bind_groupEDb T<q bD]!RV%DNVa0E` Q0op_webgpu_render_bundle_encoder_push_debug_groupEDb TWa0E`Qop_webgpu_create_shader_moduleEDb TXD:Xa0E`Qop_fetch_custom_clientEDb T<q bD]RXDNXa0E`Qop_cache_storage_openEDb TYa0E`Q op_ws_get_errorEDb T[- D:[a0E`Qop_crypto_derive_bitsEDb T\ D(DL`X X :\a8E`Qop_crypto_derive_bits_x25519EDb TD] ^ D(DL`X X ^a8E`Qop_ffi_ptr_equalsEDb' T T<q bVD] a Daa0E`Qop_net_connect_tcpEDb? Tg=D( DL`XAXE:ga8E`Qop_http_upgrade_rawEDb| TiD(DL`XX:ia8E`Qop_fs_copy_file_syncEDb TtD:ta0E`Qop_node_x509_get_issuerEDb TvD( DL`XX:va8 E`Q  op_zlib_writeEDb  TD]iJxmDFxa0E`Q'op_http2_client_get_response_body_chunkEDb' Tz=D( DL`XAXE:za8E`Qop_require_is_deno_dir_packageEDb< T T|a0E`Qop_node_child_ipc_pipeEDbQ T}a0E` Qop_envEDb] T-D( DL`X1X5:a8E`Qop_bootstrap_log_levelEDb Ta0E`Qop_worker_sync_fetchEDb Ta0E`Q op_error_asyncEDb TD]Da0E`Q op_webgpu_create_render_pipelineEDb' T5D:a0E`Q"op_webgpu_render_pass_set_viewportEDb7 T T<q bVD]qޒuDڒa0E`Q$op_webgpu_render_pass_set_bind_groupEDb? Ta0E`Q&op_webgpu_render_pass_set_index_bufferEDbD T<q b\D]VDRa0E`Q'op_webgpu_render_pass_set_vertex_bufferEDbE Ta0E`Q op_net_recv_udpEDb T<q bD] V DRa0E`Q op_net_send_udpEDb Tm D:a0E`Q  op_tls_startEDb T<~]))ֿ&>6ƿNN6V޿^FV~vn^.f&>οF.fVnNn>6~*  F*z2ZbjrV zb>F. T<q bD ]֚DҚa0E`Qop_node_sys_to_uv_errorEDbZ T`EDb@  T<q bBD ]Da0E`Qop_fs_truncate_asyncEDb+ TuD:a0E`Qop_fs_read_dir_asyncEDb! TmD:a0E`Q  op_run_statusEDb Ta0E`Qop_fs_funlock_asyncEDbG TD]Da0E`Qop_fs_symlink_asyncEDb' T<q bD ]QʠUD( DL`XYX]Ơa8E`Qop_can_write_vectoredEDb TRRRRQRQ.r>rqq*eettJ.d e*t:t*ddtBuxxkkjjijs tI{Bpppfqq0p>qkJkNj^jhhh>ih2ihi iii"i*io"pvvvv^vVvfvFvNv"vbuvuu vnnllrillimmrsjkkewwexyVzvzzFzfz.z6zxy"zzyyyyygiyy]Qqn1)i(QhΕ=^[\u000a\u000d\u0009\u0020]*(.*?)[\u000a\u000d\u0009\u0020]*$a! ) 1 9 }QN)N[[}\\[\\!<; <<Y WYMYT6UYZ[Zy[[[Z[[iRaRRRRuSSiS}SSURRRR ?DDDY`?y+-+%+]+%,=K5KKK)KK.&Qop_host_recv_messageQop_host_recv_ctrlZV^fnIIIQop_cache_storage_openQop_cache_storage_hasQop_cache_storage_deleteQ  op_cache_putQ op_cache_matchQ op_cache_delete%IU1=y!am )]]y/%j% T<q bD ]I M D( DL`XQ XU a8E`Qop_broadcast_unsubscribeEDb Ta0E`Q op_cron_createEDbuUuuQ op_kv_watch_next TQop_fs_fsync_async_unstableQop_fs_fsync_async T<q b[D ]>D(DL`XX:a8E`Q op_fs_flock_syncEDbDQop_fs_flock_async T†^[\u0021\u0023\u0024\u0025\u0026\u0027\u002a\u002b\u002d\u002e\u005e\u005f\u0060\u007c\u007e\u0030-\u0039\u0041-\u005a\u0061-\u007a]+$QbҘ[\u0009\u0020]+$QbVLV^[\u0009\u0020]+PiQQQQQYQaQqqqqo}n!onnnnnnononqqoapop!p)p9pYpIpAp pQpp1pq!rqr rrqQop_net_accept_tlsQop_net_connect_tlsQ op_tls_handshakeQ  op_tls_startUnooooo=namQ op_dns_resolveQop_net_accept_tcpQop_net_connect_tcpQop_net_join_multi_v4_udpQop_net_join_multi_v6_udpQop_net_leave_multi_v4_udpQop_net_leave_multi_v6_udpQ op_net_recv_udpQ op_net_send_udpQop_net_set_multi_loopback_udpQop_net_set_multi_ttl_udp666^%Q op_ws_send_ping5V} eTEX E  S6i66666]YWy6Q  op_http_waitQop_http_upgrade_websocket_nextQ"op_http_set_response_body_resourceQ  op_http_close!Y6eY%WTTTUUU%U-U5U=UEU 7I767!7-797A7}uvwv>F[F[[E6E.EEEE FFEEEEEEE"EDDDZDNGj0"./B/0b/:/++ ,,,uu9Yww w9wQwAwawIwwywmwwYwwwwwwxw xxvvv1-5Q  op_fetch_sendQop_fetch_response_upgradePP5Q=QEQU0 ɐѐِ?)A@YAeA5AMAAAAAAAA}?@eoqoyoEoQoon)onI!ɭѭݭ %1=IQYaiqyMAiuլծݮ %z}Ui1ayqIQY)A9 u}%Me5ՍՌ-=5 }͍UmuɌ]Eō=Iݍͯ %ٯ%91yɒђْu}Փu}%}[.[ ~~~}Qop_raw_write_vectored{6{N >.=|||}}}F-f-:-,,,,,,,,,,N-V-^--,-,-&-,-,J^\r\}}....}}>[,{{{||||"|*|2|:|B|J|R|Z|b|j|r|z|||||||~~~ڡNBV^fnv~n^" "2:BJRZbnv~9A)IQY`2%%***m**!*))q)e)M)Y)((((((%%%%%y%q%i%a%Y%Q%I%A%9%1%)%!%%('Q&(''&''&-'&&'E&''9'''' '''&!''u'$$$$$$$$$)$ZBR2A!Ie(](M(U(m(b8:;>;:;:: ;:::;:::9z9999r9999999998888888888889b98C29J9N77777>7v7n7V7F77"7~7b772766.5Y`?CY`?b5Y`Y`Y`Y`Y`Y`?CY`?Y`<q?}::q:::::@mA!A :Y::!:):5:=:Q:I:=>=======%===A=a==u=I=U=}=m==88888M<<A<a<<i<}<<u<AAAe;;Y;y;;;;;;;;;y88888;)<<:A;:: ;!;::1;;);9;;999999999>K~KnKFKKNNO"O6ONOfOzOOOOOOPP.PBPZPrPPPPPPPQQ6QNQfQ~Q&KJJJJJJKJJJJnJ~JfJvJ^JVKNKKJJJJfKvKKKKKKKKK^KGWXNfQ  op_run_statusQ  op_spawn_waitQ{uz6Jƥ  RXrX^Xn1Iayňшy̓0B0&0600/0\z\  T<q bD ]D( DL`XXa8E`Q op_set_exit_codeEDb Ta8E`Q op_process_abortEDb TNVbr^c~6nvfFq!!!Q  op_read_allQ'op_readable_stream_resource_await_closeQ%op_readable_stream_resource_write_buf6/Qop_webgpu_request_device Qop_readQ  op_shutdownQ op_http2_acceptQop_http2_send_responseQop_void_async_deferred Qop_writeQop_webgpu_request_adapterQ  op_add_asyncQ  op_void_asyncQop_webgpu_buffer_get_map_async Qop_sleepQ op_error_asyncQop_sleep_intervalQop_http2_client_end_streamQop_write_type_errorQop_error_async_deferredQ op_http2_listenQ  op_write_allQop_webgpu_request_adapter_info T<q bD ]Da0E`Qop_blob_slice_partEDb TMUggA> h9 5 1  i   gLYh1ihK9h`_%hh%Y`AY`AY`AIq 9  Q  )    I   1 - y 9 M  D `e,5,%],Y`9B.?YjY`+eG?Y`Uk@Y`Y`I  a789Y`iW @ a6u7)Y`;f?  a$55Y`Y` Y`zY`;f?Y`&{?zY`<Y`-DT! @%& %(5(E'Q']'i']&&,,--- ..-.----------r[VF^NvƽּR T<q bRD ]ڰD( DL`X X ְa8E`Q op_is_weak_setEDb; Ta8E`Q  op_is_promiseEDb1 TD(DL`XX:a8E`Qop_is_generator_functionEDb* T<q b@D ]bD( DL`XX^a8E`Q  op_is_dateEDb) TD]D(DL`XXa8E`Qop_is_boxed_primitiveEDb' T<q b=D ]γD( DL`XXʳa8E`Qop_is_boolean_objectEDb& TED:a0E`Q  op_unref_opEDbB T Ta0E`Q  op_ref_opEDbA TmD:a0E`Q op_eval_contextEDbG TcFcNcVcfcnc~c.b&bbbbvcbaaaaaaaaabZbRbbbjbvbbbbbGKG*IJIRIZIbIzIIIIIII Qautf-8IIIIIIJ JJ Qa00 Qa01 Qa02 Qa03 Qa04 Qa05 Qa06 Qa07 Qa08 Qa09 Qa0a Qa0b Qa0c Qa0d Qa0e Qa0f Qa10 Qa11 Qa12 Qa13 Qa14 Qa15 Qa16 Qa17 Qa18 Qa19 Qa1a Qa1b Qa1c Qa1d Qa1e Qa1f Qa20 Qa21 Qa22 Qa23 Qa24 Qa25 Qa26 Qa27 Qa28 Qa29 Qa2a Qa2b Qa2c Qa2d Qa2e Qa2f Qa30 Qa31 Qa32 Qa33 Qa34 Qa35 Qa36 Qa37 Qa38 Qa39 Qa3a Qa3b Qa3c Qa3d Qa3e Qa3f Qa40 Qa41 Qa42 Qa43 Qa44 Qa45 Qa46 Qa47 Qa48 Qa49 Qa4a Qa4b Qa4c Qa4d Qa4e Qa4f Qa50 Qa51 Qa52 Qa53 Qa54 Qa55 Qa56 Qa57 Qa58 Qa59 Qa5a Qa5b Qa5c Qa5d Qa5e Qa5f Qa60 Qa61 Qa62 Qa63 Qa64 Qa65 Qa66 Qa67 Qa68 Qa69 Qa6a Qa6b Qa6c Qa6d Qa6e Qa6f Qa70 Qa71 Qa72 Qa73 Qa74 Qa75 Qa76 Qa77 Qa78 Qa79 Qa7a Qa7b Qa7c Qa7d Qa7e Qa7f Qa80 Qa81 Qa82 Qa83 Qa84 Qa85 Qa86 Qa87 Qa88 Qa89 Qa8a Qa8b Qa8c Qa8d Qa8e Qa8f Qa90 Qa91 Qa92 Qa93 Qa94 Qa95 Qa96 Qa97 Qa98 Qa99 Qa9a Qa9b Qa9c Qa9d Qa9e Qa9f Qaa0 Qaa1 Qaa2 Qaa3 Qaa4 Qaa5 Qaa6 Qaa7 Qaa8 Qaa9 Qaaa Qaab Qaac Qaad Qaae Qaaf Qab0 Qab1 Qab2 Qab3 Qab4 Qab5 Qab6 Qab7 Qab8 Qab9 Qaba Qabb Qabc Qabd Qabe Qabf Qac0 Qac1 Qac2 Qac3 Qac4 Qac5 Qac6 Qac7 Qac8 Qac9 Qaca Qacb Qacc Qacd Qace Qacf Qad0 Qad1 Qad2 Qad3 Qad4 Qad5 Qad6 Qad7 Qad8 Qad9 Qada Qadb Qadc Qadd Qade Qadf Qae0 Qae1 Qae2 Qae3 Qae4 Qae5 Qae6 Qae7 Qae8 Qae9 Qaea Qaeb Qaec Qaed Qaee Qaef Qaf0 Qaf1 Qaf2 Qaf3 Qaf4 Qaf5 Qaf6 Qaf7 Qaf8 Qaf9 Qafa Qafb Qafc Qafd Qafe Qaff2J:JBJ/<<<<<=brj6.&BE9M9e9U9m919]9=9 00)11191A1I1Q1q77e7}77777Y1a1i1q1y111111111111111112 22277777%2-2892A2I2Q2Y2a2i2q2y222222222222222223 333!3)31393A3I3Q3Y3a3i3q3y333333333333333334 4!4)41494A4Q4e4m4u4}444444444444444445 555%5-555=5E5M5U5]5e5m5u5}555555555555555556 666%6-6568A8 8!8)81898]8i8=6E6M6U6u9)9}u})1UC5CqCACMCiCaC%CAB9BBBBB5DIDYD=DQDaDiDyC}um 5y`'  !     U.M.A.,A-i-5-I-Q-Y-a-].BBBBBBB.66f66655.8 4jJRC>:F:C6V:. B&BB.BVBFB6BBL"L*L2LBLJLbLNJAAA?Z?A3DCC>*=<nCjC=6==>>>r><<=>=v=2>J>f>f=<<<<=<F===~>==>V=:?~3C>N<;>>>9 zai*.R.-IQY JbzjRbZBJr T`IEDb@"  T`IEDb@D :Bb "" f" #` A$@$@@$?@  @@@10 ( @@@10 @! @@@10 @) @@@10 q# @@@10 q+ @@@10 %" @@@10 %* @@@10 %2 @@@10 %: @@@10 %b @@@10 %j @@@10 %r @@@10 %z @@@10 % @@@10 % @@@10 % @@@10 % @@@10  @@@10  @@@10 r% @@@10 r- @@@10 ` @@@10 h @@@10 G @@@10  4 @@@10 6 @@@10 6 @@@10 /6 @@@10 ] @@@10 ^ @@@10 c @@@10 e @@@10 ] @@@10 g @@@10 7 @@@10  @@@10 E @@@10`%'( ,`.//+0 f  @@@10 ] @@@10 \ @@@10 i @@@10  @@@10 . @@@10  @@@10 j @@@10 _@@@10  @@@10 Z @@@10 [ @@@10  @@@10 ' @@@10 :  @@@10 A @@@10 B @@@10 C @@@10  @@@10  @@@10F ;  @@@10  @@@10  @@@10 & @ @@10 & @ @@10 & @@@10 I @@@10 ] @@@10 ] @@@10 ] @@@10 F @@@10 ] @@@10 ] @@@10 ] @@@10 Y @@@10  @@@10 8 @@@10 > @@@10   @@@10<'8#" d)length fѧ prototype $name 6q enumerable n configurable "ovalue 62writablef :_>f.@R  Q<`1 A555555?C5A55A E @@@10 E @@@10 E @@@10 E @@@10 E @@@10 E @@@10 E @@@10 E @@@10 E @@@10 E @@@10 E @@@10 E @@@10 E @@@10 E @@@10 E @@@10 E @@@10  @@@10 E @@@10 E @@@10  @@@10 " @@@10 E @@@10  E @@@10  E @@@10 E @@@10 E @@@10 9 @@@10 E @@@10 E @@@10 < @@@10 E @@@10 E @@@10 E @@@10 E @@@10 E @@@10 E @@@10 E @@@10 E @@@10 O @@@10  @@@10  @@@10 ! @@@10 ! @@@10 ! @@@10 ! @@@10 ! @@@10 ! @@@10 ! @@@10 k @@@10 l @@@10 m @@@10 n @@@10 o @@@10  @@@10 s @@@10  @@@10 t @@@10  @@@10  @@@10  @@@10  @@@10  @@@10  @@@10  @@@10 u @@@10 v @@@10 w @@@10 x @@@10 y @@@10  @@@10  @@@10 { @@@10 | @@@10 } @@@10 ? @@@10 h @@@10  @@@10  @@@10  @@@10 z @@@10 ] @@@10 ] @@@10 ] @@@10 ] @@@10 # @@@10 $ @@@10 b  @@@10 ` @@@10  @@@10 a  @@@10  @@@10  @@@10 D @@@10  H @@@10 J @@@10 L @@@10  M @@@10 Q @@@10 R @@@10 S @@@10 V @@@10 W @@@10  @@@10  X @@@10  @@@10 = @@@10Wt/3<`S `%` @` @ `     @   `     @` @` @` @` @` @` @  !`!! """@##$`$$ %%%@&&'`'' (((@))*`** +++@,,-`-- ...@//0`00 111@223`33 444@556`66 777@889`99 :::@;;<`<< ===@>>?`?? @@@@AAB`BB CCC@DDE`EE FFF@GGH`HH III@JJK`KK LLL@MMN`NN OOO@PPQ`QQ RRR@SST`TT UUU@VVW`WW XXX@YYZ`ZZ [[[@\\]`]] ^^^@__```` aaa@bbc O 2/X #f q vT + 6 D$ n l}   6 +  vE  JU a  ^ &/ H Bˢ  y& e N&r *s ̼ 7 X v}Ĩ ƀl R <! <" b7# *Y$ B+`% ꀃ*& 6s' ( *3) R5N* NF2+ >, r{'-  W. Fj/ 0 1 2  3 4 5 6 7  8 $9 v: V; R3< dE= > "G?  7S@ F_A vB [C D nE Z<F țNG *H >I G+J *tO$K vtL ^hvM ]N XO P |Q R 6VS 5 T >U vu$V jVW vX ZY ҬZ y[ FHD\ V5] ^  q_ uI` +a b BGčc bd be rf &[g Z/h 2Bi Kj 9k "gl ֜m b;n o N p 29q `r  hws t ~d#u 03v n=w >yx 2y jy'z V`{ F]| j"} >O~ qg A< ݸ J "c 4 :k .f O Z6 ֧> Fxn T "|( b t * O ~g Y R : 6& J[ l" f z-( : :> 0z  5 @ y  N RZ R nv  8  f_ w ߠ fMy # ^P v j; +Q  x _ fp" | f< 3S N s sa u*  [x ` ~) " nZ f3; ~̭ J2z  [ >{-( ^ = b5= j Nz [ :s$ " z F\  su$ ZŢ C? .:  & ZcurrencyDisplay " currencySign % dateStyle "K۠ dateTimeField . dayPeriod * daysDisplay vbAdecimal .Erdialect ĩdigital  direction fuCendRange .U5 engineering "S exceptZero 6expand NexponentInteger 7NexponentMinusSign b_exponentSeparator ~|b fallback Dfirst ҍ firstDay Kkfloor f!format bXfraction %fractionalDigits z<fractionalSecond l, full *L granularity vH˚grapheme N'group &/h11 Vh12 &h23 H=h24 OhalfCeil v(;halfEven z2 halfExpand .A& halfFloor nc&_ halfTrunc Thour12 Er hourCycle bf hourCycles G hoursDisplay 'ideo i7ignorePunctuation  Invalid Date ~integer F isWordLike kana language /5languageDisplay >] lessPrecision ֗ letter  hlist "Aliteral qklocale &8loose lXjlower R|rltr n`BmaximumFractionDigits lmaximumSignificantDigits (microsecondsDisplay :millisecondsDisplay ֹmin2 v; minimalDays FminimumFractionDigits VpminimumIntegerDigits minimumSignificantDigits r-0 JR minusSign Fs"minutesDisplay f 7 monthsDisplay ~~ morePrecision n(6nan *InanosecondsDisplay . G narrowSymbol Jynegative B@never +none 6ºnotation `normal HGbnumberingSystem өnumberingSystems knumeric nQordinal .x_ percentSign /cplusSign Bᧇquarter Յregion  R relatedYear 6Eɀ roundingMode yProundingPriority :xNrtl ꫺I scientific  DsecondsDisplay JUsegment s)"Segment Iterator [Segments  sensitivity vxGcsep Jshared KQ signDisplay "standard ڻT startRange Ρstrict stripIfInteger Ztstyle 1kterm tztextInfo \ timeStyle  timeZones =<* timeZoneName ntrailingZeroDisplay 2 trunc bQ<2-digit fvtype ιվunknown AƲupper "͌usage jf useGrouping 궻8 unitDisplay jweekday ^axweekend + weeksDisplay {YweekInfo ꀜyearName ~|' yearsDisplay NюDadd vAggregateError .1calways 1(anonymous function)  anonymous lapply r+ Arguments *MMt arguments e/|[object Arguments] pArray 3[object Array] zqJ ArrayBuffer hS Array Iterator Kas n5Kassert f:`async VprAtomics.Condition %p Atomics.Mutex _rauto ϻawait >䄐BigInt 2obigint zG] BigInt64Array >BigUint64Array bind 2Kblank 蛿Boolean Aboolean  [object Boolean] bound * $"buffer ^+ byteLength 8P byteOffset ,i CompileError jAcalendar \callee Gnpcaller Ncause f] character vk (closure) n|>code jcolumn V . v conjunction fP "console :4= constrain bCbi construct VG~current Date  [object Date] _dateAdd ^gdateFromFields 7 dateUntil fday  dayOfWeek j dayOfYear  days &} daysInMonth &ev daysInWeek Ф daysInYear ?3default defineProperty \QdeleteProperty Adetached D disjunction zh$done :{j.brand 6y.catch b$.default g.for fz.generator_object 7 .home_object " .new.target ].result B .repl_result Ҙs.static_home_object  >q .switch_tag ͼ%dotAll vError N) EvalError ʀ}element rjepochMicroseconds ǽepochMilliseconds 6DZ.epochNanoseconds ʵ2 epochSeconds g era ZeraYear |error V\ errors 17[object Error] .#I`eval " exception  ?E Int16Array Z[ Int32Array 4q Int8Array f: isExtensible +iso8601 &isoDay ^isoHour =isoMicrosecond ]isoMillisecond Ɖȇ isoMinute isoMonth ] isoNanosecond f isoSecond %isoYear ] jsMemoryEstimate R jsMemoryRange RQykeys  largestUnit V<۾ lastIndex fd2let *߷/line nlinear ΠH LinkError Xblong FgMap K Map Iterator [ maxByteLength FUmedium ^ a mergeFields ړmessage meta L -Infinity JrX microsecond j$ microseconds Js millisecond V3 milliseconds eminute L٨minutes Module  qmonth ~,monthDayFromFields N4 months [ monthsInYear J# monthCode  > multiline 2-NaN 9 nanosecond . nanoseconds Jnarrow z,native G{NFC 55NFD ҫNFKC NFKD zTl not-equal ^null ץw [object Null] be̻Number Vrnumber |[object Number] n?8Object .1object v[object Object] .ݴObject.prototype ^cof ?eoffset rX8offsetNanoseconds j`ok 2"other Z.overflow wbownKeys Npercent  plainDate S plainTime *,5position aypreventExtensions q #constructor FbPromise >promise \@ __proto__  ~proxy 5lOProxy P(?:) F> RangeError )'&rawJSON :_Uraw -ReferenceError 2}1` Reflect.get j̝ Reflect.has zrRegExp nv[object RegExp] ãreject % relativeTo ec resizable &f ResizableArrayBuffer Mreturn lrevoke AroundingIncrement OT RuntimeError "WebAssembly.Exception 2Script vscript 6GCsecond V~.seconds _Sshort vSet TPsentence set 7Bset G Set Iterator Δ<setPrototypeOf ?Z ShadowRealm rmB SharedArray f8|SharedArrayBuffer -* SharedStruct ҩsign R/size ! smallestUnit psource k! sourceText qstack stackTraceLimit  &ősticky bXString string :t[object String]  suppressed yWSuppressedError BdݮSymbol.iterator mSymbol.matchAll  ;GSymbol.replace [Symbol.species] MSymbol.species JXr Symbol.split sSymbol ~)symbol  SyntaxError "target Lf.this_function 3this B"Uthrow B` timed-out J#ɕtimeZone ǡ3toJSON n3htoString  S]itrue :Ctotal jw TypeError & Uint16Array VQu Uint32Array o Uint8Array |xaUint8ClampedArray v1rI undefined .Me[object Undefined] hunicode 6^ unicodeSets Byunit ^fyURIError UTC .3*valueOf ,%WeakMap ƂVWeakRef "ŁWeakSet  week ʠB#weeks ѯ weekOfYear Ω:with word JyearMonthFromFields year gyears , , , , , , , , , , ,w%6xBNc84pU&X\/L.H v}!2X<R7$8BT3F'*V r.z ^U%DJg: VSymbol.asyncIterator<; JAIntlLegacyConstructedSymbol%<  Symbol.matchN1= 2a* Symbol.search`>  Symbol.toPrimitiveZ-K`? FGSymbol.unscopablesR3w`@ , lSymbol.hasInstanceB. `A kʭSymbol.toStringTag BԵSymbol.isConcatSpreadable n$ constructor J?xnext )#resolve {then&8d)@wln$:z@BUV @;`1D?`1q`1`1  /81@@@@O0+0]^ 075@@@10 065@@@10 ZNot supported Wasm field type tArray Iterator.prototype.next `$ Date.prototype [ @@toPrimitive ] %[Generator].prototype.next L"[Generator].prototype.return enerator].prototype.throw F{Map.prototype.set y+~Map.prototype.delete +Map.prototype.get f(Map.prototype.has —\Map.prototype.entries |5get Map.prototype.size ?Map.prototype.forEach 3dMap.prototype.keys V!Map.prototype.values nYMap Iterator.prototype.next uU[object nQObject.prototype.toString *fdRegExp.prototype.compile "*;Set.prototype.has uSet.prototype.add CSet.prototype.delete zRjkTaggedNotEqual(key, HashTableHoleConstant()) [..\..\..\..\v8\src\builtins\builtins-collections-gen.cc:1823] YSet.prototype.entries R3Ūget Set.prototype.size ~ ιSet.prototype.forEach Set.prototype.values .7iSet Iterator.prototype.next !ShadowRealm.prototype.importValue n Atomics.load c Atomics.store Atomics.exchange ` Atomics.add ^ Atomics.sub #% Atomics.and =B Atomics.or o Atomics.xor ȔString.prototype.matchAll ӾRegExp.prototype.@@matchAll 9String.prototype.replace :String.prototype.split  TypedArray M#get TypedArray.prototype.byteLength TP#get TypedArray.prototype.byteOffset :qget TypedArray.prototype.length  W%TypedArray%.prototype.map ^WeakMap.prototype.get 7WeakMap.prototype.has :WeakMap.prototype.set LWeakMap.prototype.delete eTaggedNotEqual(key, TheHoleConstant()) [..\..\..\..\v8\src\builtins\builtins-collections-gen.cc:2771] (WeakSet.prototype.has «WeakSet.prototype.add tWeakSet.prototype.delete ΑgTaggedNotEqual(value, TheHoleConstant()) [..\..\..\..\v8\src\builtins\builtins-collections-gen.cc:2822] 4_[AsyncGenerator].prototype.next *S^![AsyncGenerator].prototype.return  [AsyncGenerator].prototype.throw v4 k)[Async-from-Sync Iterator].prototype.next Z*[Async-from-Sync Iterator].prototype.throw ҭ+[Async-from-Sync Iterator].prototype.return w[AsyncModule].evaluate B"Temporal.Calendar.prototype.fields zArray.prototype.every :"Array.prototype.filter 5*ȶTorque assert 'Convert(endIndex) <= Convert(this.length) && Convert(startIndex) <= Convert(endIndex)' failed [src/builtins/torque-internal.tq:150] jArray.prototype.find Array.prototype.findIndex Array.prototype.findLast ,ƾArray.prototype.findLastIndex "'Array.prototype.forEach *Array.fromAsync V %Array%.from =0toLocaleString 2azjoin 2r%TypedArray%.prototype.join q%%TypedArray%.prototype.toLocaleString :Array.prototype.map  @Array.prototype.reduceRight  Array.prototype.reduce F?Array.prototype.some &r$get ArrayBuffer.prototype.byteLength Rə'get ArrayBuffer.prototype.maxByteLength  #get ArrayBuffer.prototype.resizable ZnS"get ArrayBuffer.prototype.detached d-get SharedArrayBuffer.prototype.maxByteLength R,(get SharedArrayBuffer.prototype.growable rBoolean.prototype.toString &Boolean.prototype.valueOf ѥString.prototype.toString  String.prototype.valueOf R>String.prototype.charAt String.prototype.charCodeAt zString.prototype.codePointAt (́String.prototype.concat P9ToObject =Zget DataView.prototype.buffer "!get DataView.prototype.byteLength n7 !get DataView.prototype.byteOffset XDataView.prototype.getUint8 ]DataView.prototype.getInt8 rDataView.prototype.getUint16 ͤDataView.prototype.getInt16 *nDataView.prototype.getUint32 S2DataView.prototype.getInt32 :DataView.prototype.getFloat32 jDataView.prototype.getFloat64 6DataView.prototype.getBigUint64 *Q$DataView.prototype.getBigInt64 *TBDataView.prototype.setUint8 ZDataView.prototype.setInt8 ʥrDataView.prototype.setUint16 DataView.prototype.setInt16 *DataView.prototype.setUint32 JzuDataView.prototype.setInt32 Z+DataView.prototype.setFloat32 f!"DataView.prototype.setFloat64 JDataView.prototype.setBigUint64 j}DataView.prototype.setBigInt64 fm'FinalizationRegistry.prototype.register {a*FinalizationRegistry.prototype.cleanupSome NIterator ' Iterator.from  $%WrapForValidIteratorPrototype%.next [&%WrapForValidIteratorPrototype%.return >!Iterator Helper.prototype.next f Iterator Helper.prototype.return rIterator.prototype.map :EIterator.prototype.filter f->Iterator.prototype.take [Iterator.prototype.drop 2 Iterator.prototype.flatMap  Iterator.prototype.reduce Iterator.prototype.toArray  =Iterator.prototype.forEach "`nIterator.prototype.some &*Iterator.prototype.every dIterator.prototype.find 6` Map.groupBy b6INumber.prototype.toString ]ANumber.prototype.valueOf "DObject.groupBy y>Object.setPrototypeOf waObject.prototype.toLocaleString ͻ PromiseReject w Promise.all Fall LTTorque assert 'remainingElementsCount >= 0' failed [src/builtins/promise-all.tq:282] vYPromise.allSettled ~\Torque assert 'value != PromiseHole' failed [src/builtins/promise-all-element-closure.tq:15] fdTorque assert 'remainingElementsCount >= 0' failed [src/builtins/promise-all-element-closure.tq:140] Rc_status fL~ fulfilled Vvcjrejected jlreason 8 Promise.any z(0any .}MSTorque assert 'errors.length == index - 1' failed [src/builtins/promise-any.tq:328] JeĽ[Torque assert 'Is(context)' failed [src/builtins/promise-constructor.tq:100]  Promise.prototype.finally zD~WTorque assert 'Is(context)' failed [src/builtins/promise-finally.tq:173] Hr Promise.race J3imSTorque assert 'Is(context)' failed [src/builtins/promise-race.tq:17] "PromiseResolve O\xPromise.prototype.then B\Promise.withResolvers BkProxy.revocable d+Reflect.isExtensible *Reflect.preventExtensions {^Reflect.getPrototypeOf BPReflect.setPrototypeOf \Reflect.deleteProperty ^ IX Reflect.getOwnPropertyDescriptor f&4RegExp.prototype.exec bK%%RegExpStringIterator%.prototype.next :RegExp.prototype.@@match rRegExp.prototype.@@replace N/jRegExp.prototype.@@search fڲRegExp.prototype.source RegExp.prototype.@@split j RegExp.prototype.test rSRegExp.prototype.global :PRegExp.prototype.ignoreCase BuRegExp.prototype.multiline #RegExp.prototype.hasIndices "RegExp.prototype.linear =kRegExp.prototype.dotAll VRegExp.prototype.sticky 5WRegExp.prototype.unicode 6Z&RegExp.prototype.unicodeSets z= RegExp.prototype.flags  Set.prototype.difference &gDSet.prototype.intersection cSet.prototype.isDisjointFrom zSet.prototype.isSubsetOf "3(Set.prototype.isSupersetOf `(!Set.prototype.symmetricDifference ~zSet.prototype.union String.prototype.at V14String.prototype.endsWith &Y=" 쓢String.prototype.link ʂhref 6String.prototype.small RL;small WString.prototype.strike F?strike R/GyString.prototype.sub sub ?String.prototype.sup  sup 柘String.prototype.includes j String.prototype.indexOf :߂String.prototype.isWellFormed !!String.prototype[Symbol.iterator] .eString Iterator.prototype.next *aString.prototype.match .~HString.prototype.search NString.prototype.padStart RԜString.prototype.padEnd jrString.prototype.repeat >P7String.prototype.replaceAll R2aString.prototype.slice :r/'String.prototype.startsWith :,String.prototype.substr ZYpString.prototype.substring ڞAString.prototype.toWellFormed Sx,String.prototype.trim BString.prototype.trimLeft (String.prototype.trimRight >Symbol.prototype.description r5c"Symbol.prototype [ @@toPrimitive ] Symbol.prototype.toString Symbol.prototype.valueOf zm}%TypedArray%.prototype.at HL start offset ^ Construct R byte length ,TypedArray's constructor $%TypedArray%.prototype.every  %TypedArray%.prototype.entries n%TypedArray%.prototype.filter `%TypedArray%.prototype.find r %TypedArray%.prototype.findIndex D4r%TypedArray%.prototype.findLast f$%TypedArray%.prototype.findIndexLast ~\ޒ%TypedArray%.prototype.forEach :j%TypedArray%.from .%%TypedArray%.prototype.keys & "%TypedArray%.of z%TypedArray%.prototype.reduce ZVm"%TypedArray%.prototype.reduceRight Vu%TypedArray%.prototype.set 2Z%TypedArray%.prototype.slice ZT%TypedArray%.prototype.some t%TypedArray%.prototype.sort f#%TypedArray%.prototype.subarray  fU!%TypedArray%.prototype.toReversed \%TypedArray%.prototype.toSorted ޯ%TypedArray%.prototype.values n%TypedArray%.prototype.with .WeakRef.prototype.deref M63Type assertion failed! (value/expectedType/nodeId) .!AFType assertion failed!  Node id: znActual value: Expected type:  GwActual value (high): :G«Actual vlaue (low): >ŬDebugPrint (word): : ODebugPrint (float64): : ta == 1 fJa == -1 F|String.prototype.toLowerCase &O Intl.ListFormat.prototype.format *0'Intl.ListFormat.prototype.formatToParts ?"String.prototype.toLocaleLowerCase nW[*() {} [Symbol.iterator] %GeneratorFunction .o[Symbol.asyncIterator] $ZAsync-from-Sync Iterator {0AsyncGeneratorFunction "AsyncGenerator " AsyncFunction  assign n9getOwnPropertyDescriptors F/getOwnPropertyNames ܄getOwnPropertySymbols J<hasOwn iis cseal NIcreate 0defineProperties /freeze .6isFrozen `isSealed zfentries Z-B fromEntries J%&values ,__defineGetter__ Tx__defineSetter__ RIhasOwnProperty =__lookupGetter__ f__lookupSetter__ N71 isPrototypeOf ΍8propertyIsEnumerable dx get __proto__  set __proto__ ~call vA[Symbol.hasInstance] ~get [Symbol.species] \LisArray rمat nconcat  copyWithin Ofill :Vfind ڐ findIndex ]findLast XqN findLastIndex ]Q7 lastIndexOf zpop zepush 2reverse JJgshift ^&unshift slice j9sort  @0Usplice Nincludes sCJindexOf CforEach mefilter ί0flat 6jflatMap 2map =Źevery &`esome ,reduce AX reduceRight >g toReversed ꨃtoSorted 9 toSpliced >~ toExponential 1toFixed  toPrecision UisFinite g isInteger N/bisNaN NM isSafeInteger rzT parseFloat 2parseInt k8 MAX_VALUE & MIN_VALUE WA\NEGATIVE_INFINITY  "POSITIVE_INFINITY DMAX_SAFE_INTEGER .Dv>MIN_SAFE_INTEGER )̛EPSILON t; fromCharCode $ fromCodePoint Vc{anchor :bold !charAt p: charCodeAt [! codePointAt !PendsWith  fontcolor vZfontsize } fixed a+ isWellFormed 2italics slink Am localeCompare N?match nݺmatchAll >zr normalize padEnd OpadStart zYrepeat f| <replace fc replaceAll search z_jsplit f7substr  substring bs startsWith  toWellFormed r%trim # trimStart =FtrimLeft .trimEnd #Q trimRight 9toLocaleLowerCase RctoLocaleUpperCase Ff- toLowerCase Ƃ] toUpperCase String Iterator VIStringIterator  rsetMonth X getSeconds fv setSeconds getTime setTime d[getTimezoneOffset 6 getUTCDate Fy setUTCDate W getUTCDay ζ[getUTCFullYear esetUTCFullYear D getUTCHours ny setUTCHours +|getUTCMilliseconds setUTCMilliseconds ƣe getUTCMinutes ά` setUTCMinutes  getUTCMonth ҈ setUTCMonth *&d getUTCSeconds N4LV setUTCSeconds (getYear ׿setYear ڧztoLocaleDateString IKtoLocaleTimeString " allSettled *Crace catch ^4Efinally :=7 get dotAll 9+ get flags XCt get global Rd.get hasIndices yget ignoreCase w get multiline .h get source ƞQ get sticky na get unicode .compile ^test _[Symbol.match] rL[Symbol.matchAll] 6[Symbol.replace] M[Symbol.search] &random round sin rsinh j*Isqrt Ftan 6ܛstanh jz$LN10 bLN2 VgLOG10E W7LOG2E 6QRPI  SQRT1_2 EZSQRT2  IIntl R̲dgetCanonicalLocales nsupportedValuesOf 3eDateTimeFormat %,supportedLocalesOf zIntl.DateTimeFormat _resolvedOptions d formatToParts &j get format B] formatRange ^formatRangeToParts z_U NumberFormat yIntl.NumberFormat kCollator NG Intl.Collator F get compare v8BreakIterator V get adoptText ^\o5 get first get next  get current B get breakType gs PluralRules J*+Intl.PluralRules Hselect @ selectRange n0 RelativeTimeFormat BIntl.RelativeTimeFormat  ListFormat BAIntl.ListFormat Locale .p Intl.Locale M8maximize bminimize rWo get language ^bI get script ڙ get region 3S get baseName  get calendar < get caseFirst Fs get collation FN get hourCycle *o get numeric :Wget numberingSystem !c get calendars get collations \get hourCycles r4get numberingSystems zAN get textInfo R get timeZones !8v get weekInfo g DisplayNames TIntl.DisplayNames  w Segmenter z6gIntl.Segmenter Nv containing 0Segmenter String Iterator j* isView q"get byteLength ~ j&arrayBufferConstructor_DoNotInitialize 6gNAtomics  :load ^Q%store `Iand *or 3lxor }Htexchange Ɵ6compareExchange mm isLockFree Z*Ғwait * waitAsync ,notify (8 get buffer get byteOffset :s3 get length [Symbol.toStringTag] s7get [Symbol.toStringTag] @subarray  BYTES_PER_ELEMENT 1DataView vgetInt8 ZsetInt8 ]zgetUint8 setUint8 }getInt16 n setInt16 ^ƴa getUint16 Jڡ setUint16 &!NgetInt32 !setInt32  getUint32 ! setUint32 .& getFloat32 vz setFloat32  $ getFloat64 je setFloat64 Vkd getBigInt64 6O setBigInt64 ' getBigUint64 f2 setBigUint64 ^Jdelete x(clear fLget size v"asUintN  asIntN L revocable ?Reflect register  unregister  cleanupSome jderef  SetIterator 6 MapIterator lCallSite >ngetColumnNumber  yCgetEnclosingColumnNumber PngetEnclosingLineNumber ^O getEvalOrigin 4 getFileName 7 getFunction  bgetFunctionName n getLineNumber Ơ{ getMethodName ? getPosition cgetPromiseIndex "getScriptNameOrSourceURL ^K getScriptHash getThis = getTypeName isAsync 2n isConstructor isEval ETisNative Fǎ isPromiseAll NL isToplevel b(@ decodeURI ZW3decodeURIComponent BL encodeURI pVencodeURIComponent zjescape lunescape V1isTraceCategoryEnabled ^trace Fmdebug oinfo 2_fwarn jRdir zOydirxml bp8table ՛groupCollapsed (groupEnd $-count .% countReset ξprofile b)9 profileEnd ^time dtimeLog :ҮmtimeEnd  P timeStamp v%context rvalidate Ff instantiate bKimports Pexports ~wcustomSections A4Instance ^2 get exports f_Table 2Ygrow +%Memory όGlobal S get value  set value |Tag JSTag  Exception getArg@[`0@[`0@[`0@[`0@[`0@[`0@[`0@[`0@[`0@[`06 @[`06 @[!`0 @[/`0  @[.`0  @[,`0@[-`0@[%`0@[&`0@['`0@[(`0@[B`0@[N`0@[`0@[`0@[`0@[`0@[`0@[`0Y`Dj IY]l IY]n IY^p IYr IYt IY^v IY]x IY@^z IY]| IY~ IY] IY^ I@[`0@@[}`0`@[@"`0`@[c@C`0`@[d`0` @[e@`0`!@[c@C`0@"@[@C`0@#@[#`0`$@[@C`0`%@[`0`&@[@`0`'@[@C`0`(@[`0`)@[@`0`*@[`&`0`+@[ `0`,@[ &`0`-@[ '`0`.@[  (`0`/@[ (`0`0@[ )`0`1@[``0`2@[)`0`3@[)`0`4@[@*`0`5@[`0`6@[*`0`7@[@`0`8@[`0`9@[`0`:@[ +`0`;@[+`0`<@[`0`=@[+`0`>@[@,`0`?@[,`0`@@[ -`0`A@[-`0`B@[ .`0`C@[.`0`D@[ /`0`E@[/`0`F@[ 0`0`G@[`0`H@[%`0`I@[0`0`J@[@1`0`K@[ `0`L@[Z`0`M@[[`0`N@[`0`O@[^1`0`P@[_`0`Q@[ 2`0`R@[`0`S@[2`0`T@[`3`0`U@[`0`V@[)`0`W@[3`0`X@[ 4`0`Y@[4`0`Z@[5`0`[@[`5`0`\@[5`0`]@[@6`0`^@[6`0`_@[# 7`0``@[7`0`a@[8`0`b@[4`8`0`c@[58`0`d@[A 9`0`e@[69`0`f@[9`0`g@[;@:`0`h@[:`0`i@[;`0`j@[`0`k@[`0`l@[+`0`m@[,`0`n@[`;`0`o@[;`0`p@[  <`0`q@[ <`0`r@[(<`0`s@[@=`0`t@[:=`0`u@[3>`0`v@[.`>`0`w@[=>`0`x@[?`?`0`y@[@?`0`z@[C(`0`{@[ `0`|@[ `0`}@[@C`0`~@[`0`@[@@`0`@[@`0`@[ A`0`@[`0`@[%`0`@[ `0`@[A`0`@[B`0`@[B`0`@[B`0`@[`C`0`@[C`0`@[M``0`@[N`0`@[O%`0`@[r`0`@[aG`0`@[``H`0`@[g`0`@[pH`0`@[m3`0`@[q`0`@[r`0`@[s@I`0`@[nI`0`@[oJ`0`@[pJ`0`@[q 4`0`@[nK`0`@[t`K`0`@[uK`0`@[v@L`0`@[}:`0`@[~;`0`@[L`0`@[w M`0`@[b 7`0`@[xM`0`@[dM`0`@[`N`0`@[cN`0`@[ O`0`@[O`0`@[P`0`@[`P`0`@[eP`0`@[ Q`0`@[Q`0`@[9`0`@[y``0`@[fR`0`@[z``0`@[{``0`@[`R`0`@[R`0`@[|``0`@[@S`0`@[k`0`@[S`0`@[@T`0`@[T`0`@[U`0`@[`V`0`@[W`0`@[W`0`@[ X`0`@[l%`0`@[@"`0`@[@C`0`@[h`0`@[iY`0`@[jZ`0`@[`0`@[%`0`@[^`0`@[@_`0`@[(`0`@[?_`0`@[@@``0`@[V`%`0`@[S`0`@[P``0`@[T a`0`@[Qa`0`@[R b`0`@[) c`0`@[Ac`0`@[*c`0`@[+@d`0`@[Bd`0`@[,@e`0`@[Ce`0`@[-f`0`@[Df`0`@[.g`0`@[Eg`0`@[/h`0`@[F`h`0`@[0h`0`@[G@i`0`@[1i`0`@[H j`0`@[2j`0`@[3 k`0`@[Ik`0`@[4 l`0`@[5l`0`@[J m`0`@[6m`0`@[K n`0`@[7n`0`@[L@o`0`@[8o`0`@[M`p`0`@[9p`0`@[N`q`0`@[:q`0`@[O`r`0`@[;%`0`@[=r`0`@[>@s`0`@[U`0`@[ `0`@[s`0`@[@t`0`@[<@_`0`@[*`0`@[2`0`@[#``0`@[$t`0`@[)`0`@[2`u`0`@[5C`0`@[ `0`@[8D`0`@[+u`0`@[0 v`0`@[1`0` @[N`0` @[av`0` @[ew`0` @[\w`0` @[_x`0`@[]x`0`@[^y`0`@[Wy`0`@[bz`0`@[cz`0`@[7{`0`@[8`0`@[Z`{`0`@[R{`0`@[O@|`0`@[T|`0`@[V`}`0`@[Y}`0`@[2`0`@[2`~`0`@[3~`0`@[2`0`@[3 `0` @[4`0`!@[`0`"@[4``0`#@[`0`$@[5`0`%@[ `0`&@[5`0`'@[``0`(@[6@`0`)@[`0`*@[6`0`+@[`0`,@[9`0`-@[``0`.@[9@`0`/@[`0`0@[(``0`1@[`0`2@[)`0`3@[`0`4@[*`0`5@[`0`6@[+`0`7@[ `0`8@[,`0`9@[@`0`:@[-`0`;@[``0`<@[. `0`=@[`0`>@[/@`0`?@[`0`@@[0``0`A@[`0`B@[P@C`0`C@[W`0`D@[X``0`E@[Y`0`F@[`0`G@[W`0`H@[W`0`I@[W `0`J@[W`0`K@[W `0`L@[W%`0`M@[W``0`N@[W``0`O@[W `0`P@[t@``0`Q@[u``0`R@[@`0`S@[`0`T@[`0`U@[``0`V@[`0`W@[ `0`X@[`0`Y@[`0`Z@[@g`0`[@[@`0`\@[`0`]@[`0`^@[``0`_@[`0``@[ `0`a@[s`0`b@[`0`c@[`0`d@[@`0`e@[`0`f@[`0`g@[``0`h@[`0`i@[ `0`j@[`0`k@[`0`l@[@`0`m@[`0`n@[`0`o@[`0`p@[``0`q@[`0`r@[ `0`s@[`0`t@[`0`u@[`0`v@[`0`w@[ `0`x@[`0`y@[`0`z@[``0`{@[`0`|@[``0`}@[`0`~@[`0`@[`0`@[`0`@[``0`@[`0`@[``0`@[`0`@[`0`@[`0`@[`0`@[`0`@[`0`@[`0`@[`0`@[`0`@[`0`@[`0`@[`0`@[``0`@[`0`@[`0`@[`0`@[`0`@[@`0`@[`0`@[`0`@[`0`@[s`0`@[``0`@[`0`@[`0`@[`0`@[s`0`@[``0`@[`0`@[`0`@[`0`@[@`0`@[`0`@[ `0`@[`0`@[ `0`@[`0`@[ `0`@[`0`@[ `0`@[`0`@[ `0`@[`0`@[@`0`@[`0`@[@`0`@[`0`@[``0`@[`0`@[``0`@[`0`@[`0`@[`0`@[`0`@[`0`@[`0`@[`0`@[`0`@[@"`0`@[@C`0`@[`0`@[J`0`@[D `0`@[9`0`@[2`0`@[`0`@[``0`@[P `0`@[Q9`0`@[2`0`@[S`0`@[T@`0`@[W`0`@[X``0`@[Y`0`@[Z`0`@[[``0`@[U`0`@[V `0`@[]`0`@[^ `0`@[_`0`@[\`0`@[km`0@@[2`0`@[`0`@[`0`@[m``0`@[n `0`@[o`0`@[p``0`@[w`0`@[+`0`@[`0`@[,`0`@[3`0`@[q4`0`@[@=`0`@[r5`0`@[;`0`@[`5`0`@[5`0`@[@6`0`@[6`0`@[`;`0`@[s:`0`@[t;`0`@[!`0`@[u 7`0`@[x<`0`@[v`8`0`@[>`0`@[`>`0`@[`0`@[9`0`@[=`0`@[9`0`@[ `0`@[>`0`@[`?`0`@[(`0`@[" `0`@[l!`0`@[l`0`@[l `0`@[l`0`@[l!`0`@[l`0`@[l`0`@[l`0`@[l"`0`@[l `0`@[l`0` @[' `0` @[``0` @[ `0` @[`0` @[`0`@[`0`@[@`0`@[`0`@[`0`@[``0`@[`0`@[@`0`@[`0`@[ `0`@[`0`@[`0`@[`0`@[`0`@[`0`@[`0`@[`0`@[`0`@[`0` @[`0`!@[@`0`"@[`0`#@[`0`$@[``0`%@[`0`&@[`0`'@[+`0`(@[`;`0`)@[`0`*@[@`0`+@[,`0`,@[2`0`-@[`0`.@[`0`/@[`0`0@[ `0`1@[`0`2@[%`0`3@[? `0`4@[@``0`5@[A`0`6@[B`0`7@[C`0`8@[D+`0`9@[F`;`0`:@[E@`0`;@[G,`0`<@[2`0`=@[ &`0`>@[`0`?@[`0`@@[`0`A@[``0`B@[&`0`C@[`0`D@[``0`E@[`0`F@[: `0@G@[A``0`H@[%`0`I@[J@`0`J@[#`0`K@[$`0`L@[I`0`M@[L`0`N@[G@`0`O@[K``0`P@[E`0`Q@[&@`0`R@[F``0`S@['`0`T@[H`0`U@[`0`V@[@`0`W@[`0`X@[ `0`Y@[&`0`Z@[`0`[@[r`0`\@[s`0`]@[b"`0`^@[$`0`_@[H@C`0``@[@C`0`a@[f%`0`b@[`0`c@[``0`d@[`0`e@[`0`f@[ `0`g@[`0`h@[ `0`i@[`0`j@[ `0`k@[`0`l@[ `0`m@[`0`n@[ `0`o@[`0`p@[@`0`q@[`0`r@[  `0`s@[ `0`t@[ `0`u@[ ``0`v@[ `0`w@[@`0`x@[`0`y@[k`0`z@[l@`0`{@[m`0`|@[n``0`}@[o`0`~@[p``0`@[q`0`@[rA`0`@[sB`0`@[`0`@[``0`@[`0`@[`0`@[ `0`@[`0`@[`0`@[`0`@[@`0`@[`0`@[``0`@[v`0`@[`0`@[`0`@[`0`@[`0`@[@`0`@[@`0`@[ `0`@[! `0`@["`0`@[#`0`@[$``0`@[%`0`@[&@`0`]UUɓ'Ok MathRound &MathSign  MathSin zC[MathSinh *uyMathSqrt MathTan  hMathTanh 2*j MathTrunc iyMathE =MathLN10 NKMathLN2 }m MathLOG10E "! MathLOG2E r߆PMathPI 0Z MathSQRT1_2 =p MathSQRT2 ƂMathSymbolToStringTag D ProxyLength Ji ProxyName RProxyRevocable }\ReflectDeleteProperty j( ReflectApply zReflectConstruct ^ ReflectGet z=ReflectGetPrototypeOf ߞ ReflectHas >ReflectIsExtensible *!ReflectPreventExtensions ]$ ReflectSet >5 cReflectSetPrototypeOf hǪReflectSymbolToStringTag v23AggregateErrorLength 1AggregateErrorName B\AggregateErrorPrototype F^"AggregateErrorPrototypeConstructor " ArrayLength nl ArrayName .q@ArrayPrototype ٽ ArrayIsArray N ArrayFrom 頻 ArrayOfApply FsGet ArrayGetSymbolSpecies gArrayPrototypeLength ~bArrayPrototypeConstructor mArrayPrototypeAt ?ArrayPrototypeConcat :ArrayPrototypeCopyWithin )#ArrayPrototypeFill /wArrayPrototypeFind VBArrayPrototypeFindIndex >ArrayPrototypeFindLast ArrayPrototypeFindLastIndex BArrayPrototypeLastIndexOf ZyArrayPrototypePop Z@5ArrayPrototypePushApply 0ArrayPrototypeReverse ArrayPrototypeShift X=ArrayPrototypeUnshiftApply .ArrayPrototypeSlice v@[ArrayPrototypeSort 2jArrayPrototypeSplice *_ArrayPrototypeIncludes b`ArrayPrototypeIndexOf ԇ9ArrayPrototypeKeys ^P+}ArrayPrototypeEntries 0ArrayPrototypeValues <0ArrayPrototypeFilter F^kArrayPrototypeFlat &1ArrayPrototypeFlatMap ArrayPrototypeEvery 6ArrayPrototypeSome 5YArrayPrototypeReduce 5ArrayPrototypeReduceRight RArrayPrototypeToReversed \ ArrayPrototypeToSorted  aArrayPrototypeToSpliced "$ArrayPrototypeWith >^0%ArrayPrototypeToLocaleString R3ArrayPrototypeSymbolUnscopables ArrayBufferLength GeArrayBufferName ArrayBufferPrototype >FArrayBufferIsView >xvArrayBufferGetSymbolSpecies ]ѼArrayBufferPrototypeConstructor RD!ArrayBufferPrototypeGetByteLength :ArrayBufferPrototypeSlice : %ArrayBufferPrototypeSymbolToStringTag noR BigIntLength JV BigIntName mBigIntPrototype P BigIntAsUintN 8p BigIntAsIntN ž5^BigIntPrototypeConstructor  WBigIntPrototypeToLocaleString zϓBigIntPrototypeToString eBigIntPrototypeValueOf ~ BigIntPrototypeSymbolToStringTag LBigInt64ArrayLength &KBigInt64ArrayName BigInt64ArrayPrototype .kBigInt64ArrayBYTES_PER_ELEMENT @!BigInt64ArrayPrototypeConstructor 'BigInt64ArrayPrototypeBYTES_PER_ELEMENT RBigUint64ArrayLength msBigUint64ArrayName Jy BigUint64ArrayPrototype fBigUint64ArrayBYTES_PER_ELEMENT !"BigUint64ArrayPrototypeConstructor F0(BigUint64ArrayPrototypeBYTES_PER_ELEMENT  BooleanLength . BooleanName r2BooleanPrototype nBooleanPrototypeConstructor X%BooleanPrototypeToString BÌ#BooleanPrototypeValueOf DataViewLength 7O DataViewName 7oDataViewPrototype DataViewPrototypeConstructor  _DataViewPrototypeGetBuffer f;DataViewPrototypeGetByteLength ?DataViewPrototypeGetByteOffset ZDatePrototypeGetYear >!3DatePrototypeSetYear Jy DatePrototypeToJSON ceDatePrototypeToLocaleString RVDatePrototypeToLocaleDateString HDatePrototypeToLocaleTimeString zɴDatePrototypeSymbolToPrimitive <2 ErrorLength # ErrorName zErrorPrototype &^ErrorCaptureStackTrace  `ErrorPrototypeConstructor poErrorPrototypeName @qErrorPrototypeMessage /$5ErrorPrototypeToString 1EvalErrorLength *q EvalErrorName 2EvalErrorPrototype EvalErrorPrototypeConstructor "CEvalErrorPrototypeName f6EvalErrorPrototypeMessage j[FinalizationRegistryLength FinalizationRegistryName NN5FinalizationRegistryPrototype  (FinalizationRegistryPrototypeConstructor z.(%FinalizationRegistryPrototypeRegister N\'FinalizationRegistryPrototypeUnregister `{.FinalizationRegistryPrototypeSymbolToStringTag RAJFloat32ArrayLength & Float32ArrayName ͔*Float32ArrayPrototype ȚFloat32ArrayBYTES_PER_ELEMENT *J Float32ArrayPrototypeConstructor 1M&Float32ArrayPrototypeBYTES_PER_ELEMENT ŒFloat64ArrayLength r oFloat64ArrayName G|#Float64ArrayPrototype >Float64ArrayBYTES_PER_ELEMENT ^5 Float64ArrayPrototypeConstructor f?&Float64ArrayPrototypeBYTES_PER_ELEMENT FunctionLength 9  FunctionName ::FunctionPrototype Ƒ'RFunctionPrototypeLength bcFunctionPrototypeName FunctionPrototypeGetArguments ӠWFunctionPrototypeSetArguments ;FunctionPrototypeGetCaller LFunctionPrototypeSetCaller FunctionPrototypeConstructor UFunctionPrototypeApply zg2FunctionPrototypeBind >FunctionPrototypeToString <"FunctionPrototypeSymbolHasInstance {Int16ArrayLength Int16ArrayName raInt16ArrayPrototype BI@Int16ArrayBYTES_PER_ELEMENT \tInt16ArrayPrototypeConstructor j_L$Int16ArrayPrototypeBYTES_PER_ELEMENT Int32ArrayLength jɭInt32ArrayName FInt32ArrayPrototype UInt32ArrayBYTES_PER_ELEMENT ? Int32ArrayPrototypeConstructor B\$Int32ArrayPrototypeBYTES_PER_ELEMENT Int8ArrayLength >x Int8ArrayName `KInt8ArrayPrototype .zInt8ArrayBYTES_PER_ELEMENT R{Int8ArrayPrototypeConstructor Jb#Int8ArrayPrototypeBYTES_PER_ELEMENT W_n MapLength F&yMapName ڑ MapPrototype .LMapGetSymbolSpecies  MapPrototypeConstructor FMapPrototypeGet r.DMapPrototypeSet Ҥw{MapPrototypeHas 'YMapPrototypeDelete ʲ MapPrototypeClear pMapPrototypeEntries WMapPrototypeForEach j(MapPrototypeKeys N.MapPrototypeGetSize VΗMapPrototypeValues xMapPrototypeSymbolToStringTag :Z NumberLength  ~ NumberName rwNumberPrototype *WNumberIsFinite ظ[NumberIsInteger ~ NumberIsNaN FڬNumberIsSafeInteger j,NumberParseFloat qNumberParseInt  NumberMAX_VALUE zxxNumberMIN_VALUE jǶ NumberNaN :v;NumberNEGATIVE_INFINITY "6 9NumberPOSITIVE_INFINITY *&NumberMAX_SAFE_INTEGER |oNumberMIN_SAFE_INTEGER  NumberEPSILON fNumberPrototypeConstructor b#uNumberPrototypeToExponential ~7NumberPrototypeToFixed NumberPrototypeToPrecision dNumberPrototypeToString NumberPrototypeValueOf >NumberPrototypeToLocaleString ! ObjectLength W ObjectName ObjectPrototype no ObjectAssign 0ObjectGetOwnPropertyDescriptor ^ObjectGetOwnPropertyDescriptors "ObjectGetOwnPropertyNames o6ObjectGetOwnPropertySymbols N/a~ ObjectHasOwn /bObjectIs InObjectPreventExtensions rqg ObjectSeal ~ ObjectCreate `;ObjectDefineProperties 70ObjectGetPrototypeOf rObjectIsExtensible fObjectIsFrozen ObjectIsSealed  ObjectKeys P~ ObjectEntries jObjectFromEntries .qh ObjectValues nObjectPrototypeConstructor ZObjectPrototype__defineGetter__ R߬ObjectPrototype__defineSetter__ .ObjectPrototypeHasOwnProperty ObjectPrototype__lookupGetter__ ZObjectPrototype__lookupSetter__ Ʒ#ObjectPrototypePropertyIsEnumerable zuObjectPrototypeToString v.ObjectPrototypeValueOf .fObjectPrototypeGet__proto__ ҉ObjectPrototypeSet__proto__ WObjectPrototypeToLocaleString zW{RangeErrorLength >+RangeErrorName  U,,RangeErrorPrototype ޱRangeErrorPrototypeConstructor NLiBRangeErrorPrototypeName =(RangeErrorPrototypeMessage ReferenceErrorLength  >ReferenceErrorName >!qReferenceErrorPrototype  "ReferenceErrorPrototypeConstructor zKQReferenceErrorPrototypeName ꚆReferenceErrorPrototypeMessage B RegExpLength n RegExpName RegExpPrototype ڰkRegExpGetInput z#.RegExpSetInput u RegExpGet$_ ~{B RegExpSet$_ j VRegExpGetLastMatch 6tRegExpSetLastMatch  RegExpGet$& w RegExpSet$& rFRegExpGetLastParen  RegExpSetLastParen . RegExpGet$+ J_I4 RegExpSet$+ rRegExpGetLeftContext 2l~RegExpSetLeftContext  RegExpGet$` Fik RegExpSet$`  QRegExpGetRightContext J^RegExpSetRightContext ) RegExpGet$' bX RegExpSet$' Z RegExpGet$1  RegExpSet$1 i RegExpGet$2 X RegExpSet$2 >` RegExpGet$3 i RegExpSet$3 W RegExpGet$4 J55 RegExpSet$4 b6K RegExpGet$5 ާ RegExpSet$5 R RegExpGet$6 >أ RegExpSet$6  RegExpGet$7 Z RegExpSet$7 N RegExpGet$8   RegExpSet$8 8x RegExpGet$9  RegExpSet$9 n:RegExpGetSymbolSpecies fRegExpPrototypeConstructor nRegExpPrototypeExec /HRegExpPrototypeGetDotAll ">RegExpPrototypeGetFlags  0HRegExpPrototypeGetGlobal ƱRRegExpPrototypeGetHasIndices Vu`RegExpPrototypeGetIgnoreCase ƌKRegExpPrototypeGetMultiline 2IRegExpPrototypeGetSource JRegExpPrototypeGetSticky  9RegExpPrototypeGetUnicode  MRegExpPrototypeCompile A6RegExpPrototypeToString <RegExpPrototypeTest ZRegExpPrototypeSymbolMatch F%RRegExpPrototypeSymbolMatchAll JHRegExpPrototypeSymbolReplace kRegExpPrototypeSymbolSearch J^RegExpPrototypeSymbolSplit _ SetLength \SetName *@ SetPrototype &߉SetGetSymbolSpecies `SetPrototypeConstructor z*~SetPrototypeHas PSetPrototypeAdd 5SetPrototypeDelete nf)SetPrototypeClear CSetPrototypeEntries M;SetPrototypeForEach !DSetPrototypeGetSize ڞSetPrototypeValues 8+`SetPrototypeKeys vxSetPrototypeSymbolToStringTag &} StringLength ! StringName XcStringPrototype XwStringFromCharCode  StringFromCodePoint  s StringRaw 6JStringPrototypeLength iStringPrototypeConstructor !StringPrototypeAnchor V4AStringPrototypeAt ^0StringPrototypeBig Re|StringPrototypeBlink *StringPrototypeBold StringPrototypeCharAt ?StringPrototypeCharCodeAt JSStringPrototypeCodePointAt BZ8StringPrototypeConcatApply ^.nStringPrototypeEndsWith StringPrototypeFontcolor eStringPrototypeFontsize :A0StringPrototypeFixed o*StringPrototypeIncludes EϝStringPrototypeIndexOf StringPrototypeIsWellFormed TϤStringPrototypeItalics ?StringPrototypeLastIndexOf RStringPrototypeLink ƟStringPrototypeLocaleCompare *vNStringPrototypeMatch hWYStringPrototypeMatchAll HStringPrototypeNormalize vj[StringPrototypePadEnd :StringPrototypePadStart n~StringPrototypeRepeat & StringPrototypeReplace XStringPrototypeReplaceAll ThStringPrototypeSearch kStringPrototypeSlice 6-StringPrototypeSmall OxStringPrototypeSplit >'StringPrototypeStrike .гStringPrototypeSub #StringPrototypeSubstr EStringPrototypeSubstring StringPrototypeSup nNStringPrototypeStartsWith v& StringPrototypeToString ÍStringPrototypeToWellFormed n[StringPrototypeTrim žsStringPrototypeTrimStart bStringPrototypeTrimLeft //StringPrototypeTrimEnd "LStringPrototypeTrimRight d StringPrototypeToLocaleLowerCase  StringPrototypeToLocaleUpperCase StringPrototypeToLowerCase =StringPrototypeToUpperCase ՈStringPrototypeValueOf v{+ SymbolLength Nu0 SymbolName Z"nSymbolPrototype 2ri! SymbolFor l% SymbolKeyFor VYSymbolAsyncIterator "SymbolHasInstance ۠SymbolIsConcatSpreadable bX SymbolMatch n SymbolMatchAll g@ SymbolReplace zc6 SymbolSearch  SymbolSpecies  SymbolSplit e lSymbolToPrimitive V#{SymbolToStringTag ]BISymbolUnscopables ~kSymbolPrototypeConstructor SymbolPrototypeToString ~SymbolPrototypeValueOf ĨGSymbolPrototypeGetDescription ` SymbolPrototypeSymbolToStringTag 2n7 SymbolPrototypeSymbolToPrimitive YSyntaxErrorLength vSyntaxErrorName ‚SyntaxErrorPrototype }LSyntaxErrorPrototypeConstructor 5^SyntaxErrorPrototypeName "SyntaxErrorPrototypeMessage zTypeErrorLength k TypeErrorName z[7TypeErrorPrototype VVǷTypeErrorPrototypeConstructor NネTypeErrorPrototypeName )NTypeErrorPrototypeMessage RScURIErrorLength Fؤ URIErrorName qURIErrorPrototype  SURIErrorPrototypeConstructor ~FURIErrorPrototypeName L;URIErrorPrototypeMessage RLMUint16ArrayLength 2Uint16ArrayName ʂTUint16ArrayPrototype ¦2WUint16ArrayBYTES_PER_ELEMENT }Uint16ArrayPrototypeConstructor V\%Uint16ArrayPrototypeBYTES_PER_ELEMENT :Uint32ArrayLength ZBZUint32ArrayName GwUint32ArrayPrototype Uint32ArrayBYTES_PER_ELEMENT SUint32ArrayPrototypeConstructor *U%Uint32ArrayPrototypeBYTES_PER_ELEMENT ^8Uint8ArrayLength 'Uint8ArrayName BUint8ArrayPrototype n*Uint8ArrayBYTES_PER_ELEMENT Β5Uint8ArrayPrototypeConstructor  $Uint8ArrayPrototypeBYTES_PER_ELEMENT SUint8ClampedArrayLength ~tyUint8ClampedArrayName  Uint8ClampedArrayPrototype 6C"Uint8ClampedArrayBYTES_PER_ELEMENT Ip%Uint8ClampedArrayPrototypeConstructor B+Uint8ClampedArrayPrototypeBYTES_PER_ELEMENT   WeakMapLength t& WeakMapName ~KWeakMapPrototype ԓWeakMapPrototypeConstructor WeakMapPrototypeDelete Z vWeakMapPrototypeGet v\WeakMapPrototypeSet gWeakMapPrototypeHas J.m!WeakMapPrototypeSymbolToStringTag zu WeakRefLength ڊ WeakRefName 6 ^$WeakRefPrototype VWeakRefPrototypeConstructor q+WeakRefPrototypeDeref l!WeakRefPrototypeSymbolToStringTag  WeakSetLength  WeakSetName "TypedArrayFrom gTypedArrayGetSymbolSpecies R˹ TypedArrayPrototypeConstructor 0u(TypedArrayPrototypeGetBuffer b?S TypedArrayPrototypeGetByteLength v{Q TypedArrayPrototypeGetByteOffset 6jTypedArrayPrototypeGetLength TypedArrayPrototypeEntries TypedArrayPrototypeKeys {!TypedArrayPrototypeValues -TypedArrayPrototypeAt &TypedArrayPrototypeCopyWithin Vp"TypedArrayPrototypeEvery RDTypedArrayPrototypeFill VyMTypedArrayPrototypeFilter TypedArrayPrototypeFind VBTypedArrayPrototypeFindIndex (TypedArrayPrototypeFindLast < TypedArrayPrototypeFindLastIndex ZőTypedArrayPrototypeForEach (TypedArrayPrototypeIncludes  TypedArrayPrototypeIndexOf &TypedArrayPrototypeLastIndexOf .TypedArrayPrototypeMap 6rTypedArrayPrototypeReverse TypedArrayPrototypeReduce nTypedArrayPrototypeReduceRight bGTypedArrayPrototypeSet ^:TypedArrayPrototypeSlice :/TypedArrayPrototypeSome R[#TypedArrayPrototypeSort TypedArrayPrototypeSubarray 1TypedArrayPrototypeToReversed "8TypedArrayPrototypeToSorted ڦ4TypedArrayPrototypeWith 6!TypedArrayPrototypeToLocaleString B׹-'TypedArrayPrototypeGetSymbolToStringTag BG!!TypedArrayPrototypeSymbolIterator HArrayIteratorPrototype J'ArrayIteratorPrototypeSymbolToStringTag fSetIteratorPrototype j/G;%SetIteratorPrototypeSymbolToStringTag z83MapIteratorPrototype b%MapIteratorPrototypeSymbolToStringTag jStringIteratorPrototype ~(StringIteratorPrototypeSymbolToStringTag f*GeneratorPrototype 2qGeneratorConstructor 2GeneratorSymbolToStringTag kGeneratorPrototypeConstructor ߍGeneratorPrototypeNext HGeneratorPrototypeReturn RGeneratorPrototypeThrow zbA#GeneratorPrototypeSymbolToStringTag aQAsyncGeneratorPrototype RT AsyncGeneratorConstructor کkAsyncGeneratorSymbolToStringTag ["AsyncGeneratorPrototypeConstructor >}AsyncGeneratorPrototypeNext KAsyncGeneratorPrototypeReturn |AsyncGeneratorPrototypeThrow &I(AsyncGeneratorPrototypeSymbolToStringTag f _iterator qwindow  nextPromiseId S promiseMap Ƈ RING_SIZE Z( NO_PROMISE J` promiseRing promiseIdSymbol JgDeno.core.internalPromiseId fsisOpCallTracingEnabled submitOpCallTrace "V eventLoopTick ^__setOpCallTracingEnabled #enabled V__initializeCoreMethods fIeventLoopTick_ ! |submitOpCallTrace_ Nj,build W}arch *os vendor 9Tenv   setBuildInfo PerrorMap jregisterErrorClass PIbuildCustomError R className F! errorClass ZregisterErrorBuilder "&bmsg Z_ errorBuilder t setPromise  promiseId ~vidx N= oldPromise Ǵ oldPromiseId *ˍwrappedPromise 1r- unwrapOpError ~9__resolvePromise ^lnres lazyLoad YinternalRidSymbol ִDeno.internal.rid ^print &חisErr  setOpCallTracingEnabled ^zrgetAllOpCallTraces  traces UgetOpCallTraceForPromise \e runMicrotasks ZhasTickScheduled IBsetHasTickScheduled n`bool z evalContext Sencode ttext b encodeBinaryString Ldecode  serialize Aoptions  errorCallback >.S deserialize <getPromiseDetails =getProxyDetails _risAnyArrayBuffer #isArgumentsObject ^F isArrayBuffer G[RisArrayBufferView :8isAsyncFunction ʿisBigIntObject ?isBooleanObject )8isBoxedPrimitive ʽ- isDataView ^AisDate isGeneratorFunction v&qisGeneratorObject U+3isMap w;s isMapIterator /isModuleNamespaceObject 6, isNativeError rt%isNumberObject F>n isPromise <$isProxy ~$fisRegExp 4isSet * isSetIterator J#isSharedArrayBuffer ^4isStringObject t.WisSymbolObject f` isTypedArray FNrF isWeakMap \ isWeakSet s memoryUsage setWasmStreamingCallback +wabortWasmStreaming bctrid .wؗdestructureError beopNames eventLoopHasMoreWork -<str 5MO!setHandledPromiseRejectionHandler 5;handler ~#setUnhandledPromiseRejectionHandler J4reportUnhandledException 'DreportUnhandledPromiseRejection fzU queueTimer jdepth  Atimeout .task VP cancelTimer >Z^refTimer i unrefTimer $O getTimerDepth vcreateCancelHandle 6{ Z internals "Unknown or disabled op ' ~"DATA_URL_ABBREV_THRESHOLD B}2formatFileName ܖ"formatLocation f4#callSite ֯result ZPformatCallSiteEval  isMethodCall ![applySourceMapRetBuf DFapplySourceMapRetBufView ȩprepareStackTrace  callSites 1 v8CallSite zQ bootstrap F~ext:core/mod.js RL makeException ..y ErrorType v toNumber 6` evenRound -GcensorNegativeZero fU integerPart r_modulo signMightNotMatch zgcreateIntegerConversion vq bitLength :typeOpts ԤisSigned :} lowerBound /L upperBound T twoToTheBitLength twoToOneLessThanTheBitLength z=opts  -xcreateLongLongConversion 2unsigned 65 asBigIntN bxBigInt Ǎ converters zval byte Roctet unsigned short 7 unsigned long .m long long }unsigned long long *float Z _opts T0$is not a finite floating-point value Oa?is outside the range of a single-precision floating-point value nunrestricted float -$_prefix ^ J_context ^[AEIOU] :Nan .kis not  object is a view on a SharedArrayBuffer, which is not allowed J!Y7ArrayBufferView  4is not a view on an ArrayBuffer or SharedArrayBuffer @I BufferSource &d&is not an ArrayBuffer or a view on one |A:is not an ArrayBuffer, SharedArrayBuffer, or a view on one ns DOMTimeStamp 0DOMHighResTimeStamp  VoidFunction  UVString? ڭ\createNullableConverter Jwsequence QcreateSequenceConverter F4sequence BPromise ΁QcreatePromiseConverter sequence  Hsequence> Zrecord ލcreateRecordConverter  `D$sequence lsequence> record jisequence jrequiredArguments n=required Hj`errMsg JcreateDictionaryConverter ־N dictionaries  6FhasRequiredKey Rf allMembers +members >@tmember X defaultValues idlMemberValue ^ /)imvType 2C( typeV z4esDict 枷%idlDict Yg esMemberValue " memberContext V converter ϏcreateEnumConverter 9iter "@ keyConverter valueConverter >OtypedKey 2j typedValue zRinvokeCallbackFunction callable rthisArg n returnValueConverter RXreturnsPromise Frv :Ibrand N.[[webidl.brand]] McreateInterfaceConverter p createBranded  Type FMN assertBranded 6 self 71illegalConstructor Z3`?define Npairs . entry jconfigureInterface q interface_ ~_aconfigureProperties ~Uobj J descriptors :`k` setlikeInner [[set]] setlike :`W objPrototype ~readonly ^VF callbackfn Gx ext:core/ops znoColor  setNoColorFn  getNoColor v]cond AssertionError n{ӣstyles 2special  C cyan Z)yellow ~tgrey f=green ~ؑdate f}mmagenta BΨ?regexp Ured .4module / underline e internalError Utemporal B defaultFG p defaultBG Jcolors !reset .(idim italic linverse JQhidden j> strikethrough bdoubleunderline v[black ~blue %Iwhite ZеbgBlack bgRed bgGreen ~ZЏbgYellow &RbgBlue z! bgMagenta PZbgCyan bY_bgWhite framed j܎ overlined rgray rn redBright A greenBright N- yellowBright ^A blueBright vX, magentaBright 2)7 cyanBright 6K whiteBright  P1bgGray Z:h5 bgRedBright n bgGreenBright vbgYellowBright BC bgBlueBright bgMagentaBright vg bgCyanBright  bgWhiteBright F|mdefineColorAlias alias 26 blackBright Nc`bgGrey 0 bgBlackBright faint  crossedout j3k strikeThrough ~ crossedOut AAPconceal Rw swapColors c_ swapcolors Rdp4doubleUnderline n4.\_getSharedArrayBufferByteLength ڼgetSharedArrayBufferByteLength pisAggregateError :  kObjectType .c kArrayType  kkArrayExtrasType 5kMinLineLength kWeak  ~ kIterator J kMapEntries 2e\x00 b9\x01  \x02 "\x03  \x04 ڞo\x05 . \x06 \e\x07 ]q\b 22\t  \x0B * 6\f \r b\x0E J&.\x0F \x10 QC\x11 •\x12 Jtn@\x13 $z\x14 ~BE\x15 N}\x16 M\x17 *W\x18 \x19 C\x1A M\x1B X\x1C &e~9\x1D ZW\x1E ,\x1F &o\' 6;"\\ n@)\x7F R~\x80 .54\x81 z\x82 F.3\x83 փ[\x84 \x85 w\x86 N\x87 >[G\x88 B]H\x89 !\x8A <\x8B  S\x8C M \x8D !\x8E *#\x8F  \x90 B;\x91 tQ\x92 F \x93 X\x94 <\x95 :6m\x96  &\x97 ֐\x98 nqM\x99 &*\x9A i\x9B Z ?\x9C W\x9D \F\x9E \x9F yisUndetectableObject "<)strEscapeSequencesReplacer Z [-'\-]  y keyStrRegExp bs^[a-zA-Z_][a-zA-Z_0-9]*$ ^< numberRegExp ڠ^(0|[1-9][0-9]*)$ >uWescapeFn gustylizeNoColor %tnodeCustomInspectSymbol Mv4nodejs.util.inspect.custom RprivateCustomInspect Deno.privateCustomInspect .tgetUserOptions ^ctx *isCrossContext <.+ret ^flavour VƯstylized <= formatValue VL{ recurseTimes ͳ typedArray :̟formatPrimitive ZZcQ proxyDetails N<2 customInspect yinspect " maybeCustom  noIterator  extrasType ' getPrefix ¦r formatArray @getKeys  formatSet zcdV formatMap bound  formatTypedArray PRp mapIterator >|YgetIteratorBraces FformatIterator . setIterator 6GregExp  inspectError Jn arrayType  formatArrayBuffer ?` formatNumber #x formatPromise &- formatWeakSet J]formatWeakCollection J formatWeakMap "TformatNamespaceObject r getBoxedBase t getCtxStyle vCconstructorName  output YaformatProperty w reference ^, comparator }Isorted -reduceToSingleString /xbudget m newLength >/dbuiltInObjectsRegExp #9^[A-Z][a-zA-Z0-9]+$ r>builtInObjects odaddPrototypeProperties 2+main 5^keySet pe isInstanceof ߃proto 8g firstProto -~tmp  ۯ protoConstr H_formatPrimitiveRegExp (?<= ) trailer 5 remaining &) quoteString  g! formatBigInt >,maybeQuoteSymbol ^^valLen jformatSpecialArray - showHidden  2+tsymbols j _ignored j# maxLength "delementFormatter ǬiteratorRegExp & Iterator] {$ 4 isKeyValue YMformatMapIterInner formatSetIterInner  handleCircular ^}AGGREGATE_ERROR_HAS_AT_PATTERN (\s+at փŜ&AGGREGATE_ERROR_NOT_EMPTY_LINE_PATTERN U ^(?!\s*$) nTKhgm causes n-refMap xA finalMessage } stackLines 7NaggregateMessage Z inspectArgs jEhexSliceLookupTable jralphabet 6k]di16 hexSlice `4buf Nstart l^end N out V.|arrayBufferRegExp vr(.{2}) 2z PromiseState vPending SI- Fulfilled 帔Rejected 6Ҥstate Oextra Fkdiff N+getStringWidth 6IZlabel wsp 1 primitive z< colorRegExp B \[\d\d?m :ȱg removeColors isBelowBreakLength g\ totalLength 61j_err ^npos A8 emptyItems Fending nc:groupArrayElements J joinedOutput X indentation ι}ln T outputLength RseparatorSpace !0dataLen j_ actualMax J:MapproxCharHeights > averageBias '7 biasedMax 7columns  maxLineLength F_d lineMaxLength order **padding f*r\maxArrayLength  ansiPattern 1[\u001B\u009B][[\]()#;?]* '(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)* /6N3|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)  6|(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-ntqry=><~]))  !ansi  09removeControlChars jU1width jC%qstripVTControlCharacters pRchar *ЙcisFullWidthCodePoint isZeroWidthCodePoint + tableChars ҄ middleMiddle Iu rowMiddle Z(topRight ^ZtopLeft ,C leftMiddle  topMiddle .3M bottomRight 6s bottomLeft * bottomMiddle  rightMiddle *left Ftright &middle d renderRow Grow  columnWidths R:columnRightAlign "cell JKfcliTable V=uhead rows F longestColumn Jcounted ~divider ndenoInspectDefaultOptions 1indentationLvl z, currentDepth rFstylize 1 showProxy J breakLength JFNescapeSequences 4sgetters *(maxStringLength 2Jkquotes 澒 iterableLimit ҥݹ trailingComma Ζ0 indentLevel N|getDefaultInspectOptions ZsaDEFAULT_INDENT ;! nh>STR_ABBREVIATE_SIZE ޢhCSI ZqkClear  VskClearScreenDown  $ 7QUOTE_SYMBOL_REG P .^[a-zA-Z_][a-zA-Z_.0-9]*$ fX$!quote qI escapePattern xreplaceEscapeSequences |ESCAPE_PATTERN g/([\b\f\n\r\t\v]) >P ESCAPE_MAP ^j\v ESCAPE_PATTERN2 ю[--] ^inspectValueWithQuotes >k[abbreviateSize ] colorKeywords vno#000000 j:silver  ? #c0c0c0 vj#808080 #ffffff >-maroon ޛ#800000 &|G#ff0000 'Xpurple c6#800080 b&fuchsia ߽#ff00ff :Lc#008000 颸lime &w#00ff00 2JGolive ( #808000 BT#ffff00 ] navy :#000080 jw9#0000ff Իgteal CV#008080 V^h-aqua #00ffff &7orange a#ffa500 { aliceblue #f0f8ff v\Y antiquewhite C#faebd7 :߫D aquamarine ΅a#7fffd4 azure ҔF#f0ffff beige #f5f5dc ?bisque *Qvi#ffe4c4 *blanchedalmond x9#ffebcd c] blueviolet b#8a2be2 b(,Ybrown B#a52a2a NTs burlywood *-#deb887 F' cadetblue (##5f9ea0 zȦl chartreuse n#7fff00 KY chocolate >r#d2691e ZT\coral BU #ff7f50 cornflowerblue @r#6495ed n&7cornsilk #fff8dc 6ocrimson rF:#dc143c @darkblue :#00008b  darkcyan #008b8b E; darkgoldenrod E\#b8860b 3darkgray J0#a9a9a9 "q darkgreen * #006400 darkgrey  3 darkkhaki ^Jd#bdb76b r darkmagenta 'Q#8b008b Mdarkolivegreen 4W#556b2f g darkorange %3#ff8c00 5S darkorchid Z[#9932cc Ѱ.darkred D#8b0000 nt darksalmon V:#e9967a  6 darkseagreen R#8fbc8f R+F darkslateblue V3Ǧ#483d8b ~ƴ darkslategray Jy#2f4f4f ݖ darkslategrey o. darkturquoise /#00ced1 rB] darkviolet F^W#9400d3 λ'&deeppink Zg#ff1493 7 deepskyblue T%#00bfff yldimgray n#696969 dimgrey  dodgerblue u#1e90ff $ firebrick v΂#b22222 : floralwhite rL#fffaf0 nZB forestgreen H/#228b22 V gainsboro .f#dcdcdc &Bw ghostwhite #f8f8ff >Ngold Ӈl#ffd700 C goldenrod  !#daa520 ҋ greenyellow i7##adff2f ֻhoneydew ⏿#f0fff0 ,hotpink VF,#ff69b4  indianred ƭ#cd5c5c Findigo O#4b0082  "ivory 6 #fffff0 khaki ~#f0e68c vNFlavender ̈́ #e6e6fa P lavenderblush 1#fff0f5 :Pq lawngreen ʆ]#7cfc00 *W0 lemonchiffon -##fffacd < lightblue ZW #add8e6 :c}h lightcoral ~$v#f08080 ~ lightcyan @i#e0ffff  lightgoldenrodyellow b$y#fafad2 \q lightgray L@#d3d3d3  l lightgreen a#90ee90 R]h lightgrey Y~ lightpink #ffb6c1 H lightsalmon F#ffa07a bS lightseagreen rRA#20b2aa 2 lightskyblue ^w#87cefa \lightslategray VQ#778899 nClightslategrey /lightsteelblue #b0c4de w] lightyellow  #ffffe0 * K limegreen ʒ1#32cd32 zxlinen i8#faf0e6 Yemediumaquamarine |#66cdaa b mediumblue `#0000cd u, mediumorchid g#ba55d3 6ӌ mediumpurple ⹃#9370db zlmediumseagreen Ɩ#3cb371 ."mediumslateblue `#7b68ee V mediumspringgreen #00fa9a 13/mediumturquoise bS#48d1cc ~mediumvioletred 6 #c71585  midnightblue ٌ#191970  mintcream A #f5fffa }I mistyrose Q$#ffe4e1 =moccasin G#ffe4b5 yV navajowhite w#ffdead Ƽoldlace r?@#fdf5e6 d? olivedrab n#6b8e23 n{ orangered R~#ff4500 +sGorchid V#da70d6 N palegoldenrod eH#eee8aa  palegreen 1#fa8072 1 sandybrown i",#f4a460 1Zseagreen #!#2e8b57 'seashell ˆ[p#fff5ee F sienna Tj#a0522d Kskyblue : #87ceeb x slateblue Ԯ#6a5acd "Kk slategray N #708090  slategrey ٨snow  #fffafa  pa springgreen ,#00ff7f  steelblue CQA#4682b4 Rk#d2b48c :thistle c#d8bfd8 ֹtomato x#ff6347 *Jf turquoise #40e0d0 &M_violet "ɸ#ee82ee [wheat ny#f5deb3  D whitesmoke vw#f5f5f5  yellowgreen <#9acd32 ^dt rebeccapurple ^V#663399 Ba HASH_PATTERN /y@^#([\dA-Fa-f]{2})([\dA-Fa-f]{2})([\dA-Fa-f]{2})([\dA-Fa-f]{2})?$ SMALL_HASH_PATTERN 4^#([\dA-Fa-f])([\dA-Fa-f])([\dA-Fa-f])([\dA-Fa-f])?$  RGB_PATTERN (m^rgba?\(\s*([+\-]?\d*\.?\d+)\s*,\s*([+\-]?\d*\.?\d+)\s*,\s*([+\-]?\d*\.?\d+)\s*(,\s*([+\-]?\d*\.?\d+)\s*)?\)$ K_ HSL_PATTERN 2; o^hsla?\(\s*([+\-]?\d*\.?\d+)\s*,\s*([+\-]?\d*\.?\d+)%\s*,\s*([+\-]?\d*\.?\d+)%\s*(,\s*([+\-]?\d*\.?\d+)\s*)?\)$ 恿 parseCssColor O colorString  hashMatch @uysmallHashMatch भrgbMatch JohslMatch z}Ir_ sxg_ ;wab_ *: getDefaultCss !* SPACE_PATTERN HF\s+ =NparseCss 8ʗ cssString V|css Gp rawEntries *1inValue >O3 currentKey 1parenthesesDepth b currentPart / lineTypes ~LlineType ! maybeColor  colorEquals rcolor1 #color2 ݋ cssToAnsi prevCss dKparsed pinspectOptions createStylizeWithColor bl appendedChars "L usedStyle % formattedArg F- groupIndent %stylizeWithColor W styleType lDcountMap `timerMap G\isConsoleInstance RVigetConsoleInspectOptions ޝGConsole  #printFunc Oz.class-field-1 (a printFunc H' condition ;hAssertion failed Ոrest 4Assertion failed: j47Assertion failed: &hm:  Count for ' 6' does not exist data  m1The 'properties' argument must be of type Array. o~Received type NFstringifyValue jtoTable Fwheader jߎRbody *' resultData *\ isSetObject M isMapObject `b valuesKey ^Values ehindexKey @ (iter idx)  3(idx) " SKey .{y%numRows ƈ. objectValues { indexKeys Τ_ hasPrimitives  uvalueObj : headerKeys r bodyValues  headerProps Timer ' ZT>' already exists YE startTime /dduration *ms VZTrace *R_label h5instance }$Deno.customInspect 0createFilteredInspectProxy M"evaluate ȢlgetEvaluatedDescriptor ąQgetDescendantPropertyDescriptor "kpropertyDescriptor b webidl p.ext:deno_webidl/00_webidl.js ext:deno_console/01_console.js ~!a_list Д _urlObject Zqz url object SET_HASH gSET_HOST D5 SET_HOSTNAME  SET_PASSWORD jH SET_PATHNAME V.-SET_PORT  SET_PROTOCOL ~ SET_SEARCH LD SET_USERNAME y opUrlReparse d`4setter K componentsBuf 9getSerialization Ͽ opUrlParse b)VD maybeBase >URLSearchParams G.class-field-2 fɻ#updateUrlSearch ek#url b_updateUrlSearch Eappend JܩURLSearchParamsPrototype >2getAll Rfound F\updateUrlSearch  -NO_PORT URL (dd #queryObject ,ɝ#serialization f?) #schemeEnd ' #usernameEnd f #hostStart b #hostEnd '#port U6 #pathStart >G #queryStart 2#fragmentStart R-{#updateComponents &canParse  URLPrototype #updateSearchParams params .zI newParams $E #hasAuthority ՠhash JShost Bhostname Rjorigin .] scheme ޘLpassword VUْpathname F)nextComponentStart port ~Zprotocol + U afterPath #O afterQuery ڔ}username Zp>?schemeSeparatorLen β searchParams v)gparseUrlEncoded &+uobytes @Jsequence> or record or USVString ªB/ _components VH. components òCOMPONENTS_KEYS VSampledLRUCache ڟ_#map G #capacity Zz #sampleRate YA #lastUsedKey r#lastUsedValue yJcapacity jE getOrInsert matchInputCache j URLPattern pJp #reusedResult UbaseURL ֧sURLPatternPrototype ꯯ component Zinputs W groupList $URLPatternInit 3URLPatternInput %Iext:deno_url/00_url.js w ASCII_DIGIT 60-9 !ASCII_UPPER_ALPHA n A-Z >oiASCII_LOWER_ALPHA La-z 2_ ASCII_ALPHA RKASCII_ALPHANUMERIC j+HTTP_TAB_OR_SPACE AHTTP_WHITESPACE HHTTP_TOKEN_CODE_POINT QVHTTP_TOKEN_CODE_POINT_RE  ^[ hA regexMatcher d]+$ ډrHTTP_QUOTED_STRING_TOKEN_POINT .a -~ - k!HTTP_QUOTED_STRING_TOKEN_POINT_RE HTTP_TAB_OR_SPACE_MATCHER v?HTTP_TAB_OR_SPACE_PREFIX_RE f]+ NuHTTP_TAB_OR_SPACE_SUFFIX_RE .5!dHTTP_WHITESPACE_MATCHER ضHTTP_BETWEEN_WHITESPACE .K ]*(.*?)[ Y]*$ 2THTTP_WHITESPACE_PREFIX_RE NpHTTP_WHITESPACE_SUFFIX_RE chars nmatchers JcollectSequenceOfCodepoints 6TLOWERCASE_PATTERN ɋ[a-z] Br byteUpperCase ~byteUpperCaseReplace  byteLowerCase 84collectHttpQuotedString  extractValue + positionStart 4MquoteOrBackslash FuforgivingBase64Encode B7forgivingBase64Decode *;addPaddingToBase64url :uba base64url EwBASE64URL_PATTERN vj^[-_A-Z0-9]*?={0,2}$ :!convertBase64urlToBase64 ,forgivingBase64UrlEncode &U; TextEncoder CsforgivingBase64UrlDecode .Pb64url joisHttpWhitespace nhttpTrim f8serializeJSValueToJSONString wPATHNAME_WIN_RE *8^\/*([A-Za-z]:)(\/|$) N {P SLASH_WIN_RE :\/ 3SP PERCENT_RE vGi%(?![0-9A-Fa-f]{2}) %[kpathFromURLWin32 path vlpathFromURLPosix J<% pathFromURL 6 pathOrUrl BU SymbolDispose ֎dispose f,&Symbol.dispose  SymbolAsyncDispose H= asyncDispose R Symbol.asyncDispose ަn=SymbolMetadata ꐅmetadata zQ/Symbol.metadata :h_name "-_message _code %q_error WINDEX_SIZE_ERR n) 0DOMSTRING_SIZE_ERR rHIERARCHY_REQUEST_ERR FjWRONG_DOCUMENT_ERR INVALID_CHARACTER_ERR BNO_DATA_ALLOWED_ERR _NO_MODIFICATION_ALLOWED_ERR қ NOT_FOUND_ERR .QNOT_SUPPORTED_ERR 2_tINUSE_ATTRIBUTE_ERR NjINVALID_STATE_ERR nU SYNTAX_ERR :YINVALID_MODIFICATION_ERR O NAMESPACE_ERR .INVALID_ACCESS_ERR >%VALIDATION_ERR b6TYPE_MISMATCH_ERR   SECURITY_ERR  NETWORK_ERR BW ABORT_ERR scURL_MISMATCH_ERR 2GXGQUOTA_EXCEEDED_ERR N5 TIMEOUT_ERR ճINVALID_NODE_TYPE_ERR dDATA_CLONE_ERR AjnameToCodeMapping .@IndexSizeError jU/JHierarchyRequestError rsWrongDocumentError l'InvalidCharacterError r#5NoModificationAllowedError Kay NotFoundError u NotSupportedError JInUseAttributeError Z9InvalidStateError \VTInvalidModificationError vNamespaceError & InvalidAccessError ZLjTypeMismatchError f} SecurityError N NetworkError c AbortError 3URLMismatchError 5 &QuotaExceededError \ TimeoutError 1[InvalidNodeTypeError DataCloneError f DOMException .class-field-3 fDOMExceptionPrototype __callSiteEvals  Hext:deno_web/00_infra.js , parseMimeType `` endOfInput jgres1 zxlrres2 :subtype _-mimeType & ~ parameterName f ,parameterValue ;essence 洕serializeMimeType j> serialization "`rparam )$eextractMimeType  headerValues &!charset ެessence_ ֥=temporaryMimeType 7l newCharset JUnisXML zPpatternMatchingAlgorithm y mask }ignored zï maskedData LCcImageTypePatternTable v image/x-icon } image/bmp t image/gif X> image/webp މ& image/png v image/jpeg %!imageTypePatternMatchingAlgorithm n%epatternMatched  sniffImage mimeTypeString 9imageTypeMatched N ext:deno_web/01_dom_exception.js =( globalThis_ —:saveGlobalThisReference E getDispatched qevent f _dispatched tgetPath b_path z9getStopImmediatePropagation j_stopImmediatePropagationFlag 9JsetCurrentTarget O _attributes J setIsTrusted f _isTrusted fn setDispatched .f setEventPhase 6CsetInPassiveListener &s_inPassiveListener M setPath D[setRelatedTarget rnd setTarget <setStopImmediatePropagation ~DP isTrusted z9[[attributes]] &G _canceledFlag vb[[canceledFlag]] _stopPropagationFlag [[stopPropagationFlag]] 1 [[stopImmediatePropagationFlag]] * [[inPassiveListener]] Ӕ[[dispatched]] ٭ [[isTrusted]] z$u\[[path]] EEEvent V eventInitDict z\yEventPrototype b= EVENT_PROPS nP srcElement . currentTarget ղ composedPath R\currentTargetIndex =currentTargetHiddenSubtreeLevel &item g,rootOfClosedTree 4slotInClosedTree ?sycurrentHiddenLevel NmaxHiddenLevel ΤNONE 'ciCAPTURING_PHASE f AT_TARGET ]BUBBLING_PHASE &[ eventPhase &stopPropagation 8 cancelBubble `/stopImmediatePropagation bubbles n cancelable o"& returnValue 3preventDefault W?defaultPrevented :composed ?s initialized ™QdefineEnumerableProps fCtor Bwprops jVprop ̆DOCUMENT_FRAGMENT_NODE <) getParent E} eventTarget xdisNode 7tgetRoot isShadowInclusiveAncestor Hancestor *3jnode #@' isShadowRoot ^getHost 謏nodeImpl fE isSlottable Dc~appendToEventPath jP eventImpl /targetOverride ~  relatedTarget > touchTargets rQitemInShadowTree B%getMode HTdispatch P targetImpl  clearTargets ^JactivationTarget NyeventRelatedTarget /Oretarget ӭisActivationEvent getHasActivationBehavior & slottable ~&getAssignedSlot  parentRoot Q%clearTargetsTupleIndex N!clearTargetsTuple jtuple bO)uinvokeEventListeners jinnerInvokeEventListeners targetListeners phandlers 7ghandlersLength Jllistener n&wcapture NXonce *Ppassive zŷ tupleIndex .)a getListeners U1reportException 2normalizeEventHandlerOptions aRoot neventTargetData setEventTargetData 2ygetDefaultTargetData  listenerCount [ addEventListenerOptionsConverter zMsignal o EventTarget $+addEventListener ^{callback :EEventTargetPrototype j3 listeners < listenerList removeEventListener  dispatchEvent "gZ+_event fE ErrorEvent m#message x #filename N#lineno /(#colno #error >filename s`lineno >4colno vlErrorEventPrototype  CloseEvent {* #wasClean BM#code FA#reason 68wasClean RCloseEventPrototype ) MessageEvent MessageEventPrototype Vd CustomEvent =#detail nBdetail xCustomEventPrototype  ProgressEvent *̸ProgressEventPrototype ‹PromiseRejectionEvent v@#promise PromiseRejectionEventPrototype Wk_eventHandlers & eventHandlers J;^makeWrappedHandler Z{isSpecialErrorEventHandler *fwrappedHandler J50evt ~0<#defineEventHandler Ρsemitter CWhandlerWrapper &reportExceptionStackedCalls RdjsError frames uframe  checkThis Q reportError aobjectCloneMemo KcloneArrayBuffer NU srcBuffer - srcByteOffset b srcLength s_cloneConstructor "~structuredClone Scloned џ9 Constructor ֛8ext:deno_web/02_event.js FF&hrU8 d8hr vopNow NLa6 timerTasks 3ktimerNestingLevel handleTimerMacrotask N% activeTimers nextId initializeTimer sprevId l#respectNesting  timerInfo  cancelRid v@runAfterTimeout r scheduledTimers =k tail Nkmillis 8 sleepPromise ) timerObject rP^ cancelled EhhremoveFromScheduledTimers 6ں currentEntry jtimerObj ҈% setTimeout ^ setInterval RsetTimeoutUnclamped  clearTimeout e- clearInterval ddefer ZBgo :D'ext:deno_web/02_timers.js N_ WeakRefSet $ރ#weakSet *v#refs  toArray l[[add]] >+T signalAbort Qi7[[signalAbort]] ׽Hremove 0# [[remove]] r z abortReason bkz[[abortReason]] M abortAlgos .[[abortAlgos]] - dependent 68r [[dependent]] *K sourceSignals > [[sourceSignals]] b~dependentSignals Z[[dependentSignals]] F [[signal]] >&timerId r* [[timerId]] ^3illegalConstructorKey  AbortSignal ^V#signals c=createDependentAbortSignal 67abort ! algorithm ɼyalgos jdependentSignalArray vdependentSignal znK aborted r65AbortSignalPrototype X throwIfAborted ~kd sourceSignalArray qa: sourceSignal μ:AbortController &݊AbortControllerPrototype MGsequence = newSignal FQ\ resultSignal JQ;Window [ WorkerGlobalScope JRgDedicatedWorkerGlobalScope .9r/dedicatedWorkerGlobalScopeConstructorDescriptor %IwindowConstructorDescriptor $&workerGlobalScopeConstructorDescriptor watob a\btoa ]#ext:deno_web/02_structured_clone.js z)ext:deno_web/03_abort_signal.js aDeferred rZ}#reject ]u#resolve VO#state :jhpending %;resolvePromiseWith rethrowAssertionErrorRejection ;setPromiseIsHandledToTrue *V,transformPromiseWith &.fulfillmentHandler rprejectionHandler S%uponFulfillment  s onFulfilled x uponPromise B uponRejection ]Queue cU?#head f6)#tail ##size >Gsenqueue  dequeue bqpeek r^cisDetachedBuffer ~canTransferArrayBuffer transferArrayBuffer /getArrayBufferByteLength qcloneAsUint8Array "p_abortAlgorithm [[abortAlgorithm]] ). _abortSteps ʛ[[AbortSteps]]  x_autoAllocateChunkSize &I[[autoAllocateChunkSize]] s _backpressure o[[backpressure]] 6o60_backpressureChangePromise [[backpressureChangePromise]] t _byobRequest e&y[[byobRequest]] c;_cancelAlgorithm fH`[[cancelAlgorithm]] / _cancelSteps D[[CancelSteps]] J_close v+close sentinel ^>8_closeAlgorithm R~[[closeAlgorithm]] U_closedPromise VE[[closedPromise]] 6 _closeRequest |[[closeRequest]] X_closeRequested 66'[[closeRequested]] f, _controller [[controller]] 査 _detached "X [[Detached]] &Q _disturbed V9[ [[disturbed]] ., _errorSteps 7[[ErrorSteps]] f(_finishPromise $c[[finishPromise]] Fc6F_flushAlgorithm  .[[flushAlgorithm]] ; _globalObject [[globalObject]] FN_highWaterMark ^[[highWaterMark]] Ưs_inFlightCloseRequest 6ҍ[[inFlightCloseRequest]] p_inFlightWriteRequest [[inFlightWriteRequest]] j_pendingAbortRequest F[pendingAbortRequest] ƈ_pendingPullIntos B~[[pendingPullIntos]] '_preventCancel 3[[preventCancel]] vu _pullAgain I [[pullAgain]] b_pullAlgorithm F[[pullAlgorithm]] :_pulling ; [[pulling]]  & _pullSteps ָNP [[PullSteps]] ^i{ _releaseSteps K[[ReleaseSteps]] _queue ˊ [[queue]]  h_queueTotalSize [[queueTotalSize]] > _readable ɸ [[readable]] _reader  [[reader]] >r _readRequests [[readRequests]] ([*_readIntoRequests ~[[readIntoRequests]] . _readyPromise [[readyPromise]] i_signal W;_started B3 [[started]] ~_state \: [[state]] 8 _storedError [[storedError]] 7y _strategyHWM B[[strategyHWM]] ._strategySizeAlgorithm U[[strategySizeAlgorithm]] eeS_stream 5B [[stream]] :ȟ_transformAlgorithm -[[transformAlgorithm]] Jr_view Ck[[view]] d _writable ~M7 [[writable]] 8_writeAlgorithm &[[writeAlgorithm]] _writer r [[writer]] v _writeRequests  [[writeRequests]] j'_brand :}noop ~ noopAsync A_defaultStartAlgorithm L_defaultWriteAlgorithm >#x_defaultCloseAlgorithm TJ_defaultAbortAlgorithm Z_defaultPullAlgorithm &_defaultFlushAlgorithm _defaultCancelAlgorithm ֿ^K"acquireReadableStreamDefaultReader Jg2stream &|reader ~|ReadableStreamDefaultReader < setUpReadableStreamDefaultReader 6 acquireReadableStreamBYOBReader r^ReadableStreamBYOBReader Ib$setUpReadableStreamBYOBReader ޣK"acquireWritableStreamDefaultWriter FWritableStreamDefaultWriter _createReadableStream 6startAlgorithm ZXi pullAlgorithm 訇cancelAlgorithm P+ highWaterMark r sizeAlgorithm BisNonNegativeNumber kReadableStream yinitializeReadableStream vC controller AReadableStreamDefaultController >ͥ$setUpReadableStreamDefaultController :createWritableStream lwriteAlgorithm RWcloseAlgorithm lIabortAlgorithm taWritableStream ҅@IinitializeWritableStream n2WritableStreamDefaultController r$setUpWritableStreamDefaultController &\w dequeueValue F container  valueWithSize  enqueueValueWithSize unextractHighWaterMark ?strategy [? defaultHWM 6extractSizeAlgorithm B8~chunk  תlcreateReadableByteStream }ReadableByteStreamController b˰!setUpReadableByteStreamController initializeTransformStream `i startPromise `awritableHighWaterMark :]4writableSizeAlgorithm r~`readableHighWaterMark JreadableSizeAlgorithm t`}(transformStreamDefaultSinkWriteAlgorithm Ξ(transformStreamDefaultSinkAbortAlgorithm {(transformStreamDefaultSinkCloseAlgorithm F.)transformStreamDefaultSourcePullAlgorithm FT+transformStreamDefaultSourceCancelAlgorithm transformStreamSetBackpressure 3isReadableStream  ,OisReadableStreamLocked ݾKisReadableStreamDefaultReader VyisReadableStreamBYOBReader YisReadableStreamDisturbed  5extractStringErrorFromError ua stringMessage ֽcREADABLE_STREAM_SOURCE_REGISTRY :#\:external UResourceStreamResourceSink n?readableStreamWriteChunkFn :Vsink  +readableStreamReadFn / reentrant cu*gotChunk JbreadableStreamDefaultReaderRead  chunkSteps S closeSteps Vo errorSteps (Xsuccess ڊ`IresourceForReadableStream LyDEFAULT_CHUNK_SIZE #RESOURCE_REGISTRY /_readAll ¤# [[readAll]] ` _original  [[original]] Rhs;readableStreamForRid 2T? autoClose ^_resourceBacking D2underlyingSource pull *[ bytesRead >0cancel 2S5setUpReadableByteStreamControllerFromUnderlyingSource 91L promiseSymbol ~ __promise >i_isUnref @ qisUnref v5readableStreamForRidUnrefable Z'_resourceBackingUnrefable gMreadableStreamIsUnrefable \ readableStreamForRidUnrefableRef K\"readableStreamForRidUnrefableUnref \' getReadableStreamResourceBacking 核5)getReadableStreamResourceBackingUnrefable v:#readableStreamCollectIntoUint8Array z^resourceBacking |readableStreamDisturb e"readableStreamThrowIfErrored readableStreamClose readableStreamError mRchunks A finalBuffer SwritableStreamForRid :DunderlyingSink 6"6setUpWritableStreamDefaultControllerFromUnderlyingSink ^j\ getWritableStreamResourceBacking kisWritableStream qisWritableStreamLocked JP3peekQueueValue 2*N,readableByteStreamControllerCallPullIfNeeded |g shouldPull *readableByteStreamControllerShouldCallPull W pullPromise 8!readableByteStreamControllerError |-5+readableByteStreamControllerClearAlgorithms k1readableByteStreamControllerClearPendingPullIntos ZP resetQueue :[1readableByteStreamControllerInvalidateBYOBRequest ;A!readableByteStreamControllerClose +firstPendingPullInto Vdא#readableByteStreamControllerEnqueue FtransferredBuffer bm:readableByteStreamControllerEnqueueDetachedPullIntoToQueue j[readableStreamHasDefaultReader  9readableByteStreamControllerProcessReadRequestsUsingQueue xl readableStreamGetNumReadRequests bOV/readableByteStreamControllerEnqueueChunkToQueue zAH0readableByteStreamControllerShiftPendingPullInto  transferredView V_9 readableStreamFulfillReadRequest :9readableStreamHasBYOBReader ߺd@readableByteStreamControllerProcessPullIntoDescriptorsUsingQueue ?,5readableByteStreamControllerEnqueueClonedChunkToQueue c cloneResult VKpullIntoDescriptor +*readableByteStreamControllerGetBYOBRequest hfirstDescriptor "view V)S byobRequest zReadableStreamBYOBRequest 枠*readableByteStreamControllerGetDesiredSize p,readableByteStreamControllerHandleQueueDrain R$readableStreamGetNumReadIntoRequests  desiredSize D6readableStreamAddReadRequest  readRequest ҲE readableStreamAddReadIntoRequest [readableStreamCancel PnreadIntoRequests ڄpreadIntoRequest  EsourceCancelPromise  readRequests C/readableStreamDefaultControllerCallPullIfNeeded -readableStreamDefaultcontrollerShouldCallPull ZfY$readableStreamDefaultControllerError z.0readableStreamDefaultControllerCanCloseOrEnqueue &J.readableStreamDefaultControllerClearAlgorithms . $readableStreamDefaultControllerClose &readableStreamDefaultControllerEnqueue ~ chunkSize -readableStreamDefaultControllerGetDesiredSize .readableStreamDefaultcontrollerHasBackpressure 10 readableStreamBYOBReaderRead p$readableByteStreamControllerPullInto j(readableStreamBYOBReaderRelease rG"readableStreamReaderGenericRelease nء-readableStreamBYOBReaderErrorReadIntoRequests FH,readableStreamDefaultReaderErrorReadRequests Bb;readableByteStreamControllerFillPullIntoDescriptorFromQueue &I4readableByteStreamControllerCommitPullIntoDescriptor D4readableByteStreamControllerFillReadRequestFromQueue *actor ߖ elementSize 3 minimumFill vW+ emptyView K& filledView JWf5readableByteStreamControllerConvertPullIntoDescriptor ʷ#readableByteStreamControllerRespond qa bytesWritten 2fK+readableByteStreamControllerRespondInternal zf2readableByteStreamControllerRespondInReadableState Y6readableByteStreamControllerFillHeadPullIntoDescriptor NJ remainderSize 0readableByteStreamControllerRespondInClosedState $readableStreamFulfillReadIntoRequest .readableByteStreamControllerRespondWithNewView r AmaxBytesToCopy rmaxBytesFilled iAtotalBytesToCopyRemaining ready &K!maxAlignedBytes "-queue V headOfQueue r bytesToCopy ҕ` destStart >@ destBuffer ^k bytesFilled 6"readableStreamDefaultReaderRelease r closedPromise ޠvPreadableStreamPipeTo ̰ preventClose b preventAbort RV preventCancel writer &p shuttingDown :1 currentWrite nҡactions &^writableStreamAbort shutdownWithAction 0action z'pipeLoop  resolveLoop Ƽ rejectLoop z-+CpipeStep de resolveRead RL, rejectRead  writableStreamDefaultWriterWrite {sQisOrBecomesErrored N57 storedError zisOrBecomesClosed Ӭ4writableStreamDefaultWriterCloseWithErrorPropagation *6#writableStreamCloseQueuedOrInFlight l\ destClosed aVwaitForWritesToFinish coldCurrentWrite "3originalIsError  originalError V+| doTheRest c finalize JnewError v;isError h"writableStreamDefaultWriterRelease Vu!readableStreamReaderGenericCancel ZB}%readableStreamReaderGenericInitialize &readableStreamTee E~cloneForBranch2 bQ#%ReadableByteStreamControllerPrototype UreadableByteStreamTee "readableStreamDefaultTee Bhreading zX readAgain „Z canceled1 Zz canceled2 reason1 f^reason2 ;branch1 ^ branch2 "4 cancelPromise ('value1 Fhvalue2 B" cloneError Z&-icancel1Algorithm qcompositeReason = cancelResult >cxcancel2Algorithm zreadAgainForBranch1 A0readAgainForBranch2 forwardReaderError ( thisReader b6#pullWithDefaultReader chunk1 Cchunk2 j2/pull1Algorithm :pull2Algorithm  pullWithBYOBReader !+ forBranch2 J- byobBranch i otherBranch &۸I byobCanceled 68 otherCanceled ~ clonedChunk 5autoAllocateChunkSize ⼜r startResult ^funderlyingSourceDict on8setUpReadableStreamDefaultControllerFromUnderlyingSource |\%setUpTransformStreamDefaultController ҝtransformAlgorithm /flushAlgorithm JTransformStreamPrototype Ґ4setUpTransformStreamDefaultControllerFromTransformer v' transformer RtransformerDict P TransformStreamDefaultController B'transformStreamDefaultControllerEnqueue  backpressure V.writableStreamDefaultControllerGetBackpressure 20 writableStreamUpdateBackpressure NfƦ3writableStreamDefaultControllerAdvanceQueueIfNeeded .1kwritableStreamDealWithRejection  *]vunderlyingSinkDict   setUpWritableStreamDefaultWriter jPY/transformStreamDefaultControllerClearAlgorithms kUreadableController f+transformStreamErrorWritableAndUnblockWrite 5 %transformStreamDefaultControllerError Jj"transformStreamError b]0transformStreamDefaultControllerPerformTransform #transformPromise B()transformStreamDefaultControllerTerminate Areadable jR flushPromise vtbackpressureChangePromise 6=3,writableStreamDefaultControllerErrorIfNeeded }ҹtransformStreamUnblockWrite 5jwasAlreadyErroring deferred BwritableStreamStartErroring #RwritableStreamAddWriteRequest jLwritableStreamClose ',$writableStreamDefaultControllerClose HwritableStreamFinishErroring +writableStreamDefaultControllerProcessClose M;+writableStreamDefaultControllerProcessWrite &~[.writableStreamDefaultControllerClearAlgorithms Y $writableStreamDefaultControllerError n9-writableStreamDefaultControllerGetDesiredSize  č+writableStreamDefaultControllerGetChunkSize R{Z&writableStreamMarkCloseRequestInFlight Z(sinkClosePromise 63!writableStreamFinishInFlightClose *L7H*writableStreamFinishInFlightCloseWithError b+writableStreamMarkFirstWriteRequestInFlight jsinkWritePromise Fu!writableStreamFinishInFlightWrite < pipeThrough &Z transform 8$7pipeTo s destination nVGtee ]errorReadableStream ":V$ReadableStreamDefaultReaderPrototype VM releaseLock closed ,l!ReadableStreamBYOBReaderPrototype >+"ReadableStreamBYOBRequestPrototype 1respond ޓjrespondWithNewView aX.class-field-8 .class-field-9 c\.class-field-10 z#.class-field-11 F9.class-field-12 0.class-field-13 Farg1 ~7%(ReadableStreamDefaultControllerPrototype 'TransformStream  \writableStrategy ^readableStrategy -r terminate R)TransformStreamDefaultControllerPrototype  \pWritableStreamPrototype % getWriter  R$WritableStreamDefaultWriterPrototype h=(WritableStreamDefaultControllerPrototype IKv createProxy J<"ReadableStreamType cUnderlyingSource C enforceRange ~`b0UnderlyingSink # Transformer flush +1 readableType r~ writableType F޹QueuingStrategy ‹QueuingStrategyInit 2vReadableStreamIteratorOptions \ defaultValue YUReadableStreamReaderMode چbyob ReadableStreamGetReaderOptions ymode s#ReadableStreamBYOBReaderReadOptions JReadableWritablePair XStreamPipeOptions  >r TextDecoder S #encoding y#fatal *E #ignoreBOM ƾqX#utf8SinglePass ʵQb#rid encoding &gTextDecoderPrototype fatal ~Ə ignoreBOM >TextEncoderPrototype rn encodeInto / encodeIntoBuf zUTextDecoderStream V;#decoder nEq; #transform 'decoded Cvfinal u=_reason wTextDecoderStreamPrototype MTextEncoderStream ~Ot#pendingHighSurrogate : lastCodeUnit ~TextEncoderStreamPrototype JfTextDecoderOptions %-TextDecodeOptions J̋ BOMEncoding fBOMSniff ڊext:deno_web/06_streams.js v]. isWindows `*collectCodepointsNotCRLF jconvertLineEndingsToNative  nativeLineEnding q} codePoint ztoken p newPosition .4 toIterator n[parts qprocessBlobParts $&endings $תprocessedParts " BlobReference p BlobPrototype "yKNORMALIZE_PATTERN k^[\x20-\x7E]*$ N\ normalizeType 2normalizedType f9getParts ϣblob =bag R[_parts nD+part ޤ_type Wn_size 2Size .8NParts lcBlob .oA9 blobParts b contentType -~ relativeStart 6y relativeEnd نxspan ''added CrelativeContentType VJٙ partIterator S9#u8Array !< arrayBuffer HBlobPart j+_sequence } EndingType 2^)u transparent 6mblobPropertyBagDictionary BlobPropertyBag b)_Name b[[Name]] MN _LastModified ]˹[[LastModified]] Z%File *?yfileBits   FilePrototype .& lastModified yFilePropertyBag }Yregistry auuid &MfromUint8Array ZblobFromObjectUrl cFblobData (o totalSize #createObjectURL vrevokeObjectURL r˱ ext:deno_web/08_text_encoding.js .Ӡext:deno_web/01_mimesniff.js b( [[result]] Rח [[error]] R [[aborted]]  handlerSymbol VS FileReader ک empty [#readOperation 5readtype H abortedState v;, chunkPromise j5 isFirstChunk n(ev .Ɣoffs "-jdecoder | mediaType #getEventHandlerFor xEFileReaderPrototype *'maybeMap [#setEventHandlerFor Q readyState BreadAsArrayBuffer mreadAsBinaryString :E readAsDataURL i readAsText .#onerror ^5 onloadstart  Aonload zJs onloadend RP onprogress ꒴onabort FEMPTY 7LOADING ((LDONE LXjlocationConstructorKey P4Location zreload $workerLocationUrls CWorkerLocation Flocation 2LworkerLocation I (setLocationHref yGgetLocationHref poalocationConstructorDescriptor J]#workerLocationConstructorDescriptor RlocationDescriptor vvoworkerLocationDescriptor &MessageChannel &@*#port1 .ES#port2 ~D/port1Id port2Id |XopCreateEntangledMessagePort zGport1 s{createMessagePort f>qport2 :WMessageChannelPrototype F3_id vc_enabled ]A MessagePort nھ postMessage  ytransferOrOptions WMessagePortPrototype &!transfer RdserializeJsMessageData - transferables GqdeserializeJsMessageData  messageerror fl messageData v /8arrayBufferIdsInTransferables 2t?transferredArrayBuffers  hostObjects "  transferable bserializedData v nserializedTransferables RW arrayBufferI h?>StructuredSerializeOptions f^CompressionFormat &BHdeflate 0) deflate-raw N7gzip ftCompressionStream  maybeEnqueue ^R[CompressionStreamPrototype _DecompressionStream 6aDecompressionStreamPrototype gAperformanceEntries }E timeOrigin UPerformanceMarkOptions  L DOMString or DOMHighResTimeStamp LSPerformanceMeasureOptions ]:&DOMString or PerformanceMeasureOptions % setTimeOrigin UfindMostRecent 4convertMarkToTimestamp  mark ofilterByNameType ҇)f[[name]]  _entryType Ƙk/ [[entryType]]  0 _startTime > [[startTime]] ;% _duration  [[duration]] *RPerformanceEntry ^ PerformanceEntryPrototype  entryType Of_detail ƚ; [[detail]] d PerformanceMark O-xPerformanceMarkPrototype EaPerformanceMeasure H0PerformanceMeasurePrototype Y Performance Q1PerformancePrototype 2h clearMarks -markName X clearMeasures $3 measureName 6 getEntries ˿getEntriesByName TgetEntriesByType . markOptions  bmeasure [startOrMeasureOptions ƱendMark  endTime bz performance R&PredefinedColorSpace r[srgb > or record)' 6`headersFromHeaderList jheaderListFromHeaders RguardFromHeaders  p,headersEntries cext:deno_web/09_file.js f(H entryList :B$ entry list  createEntry rFormData q5&form VҵvalueOrBlobValue  &`(FormDataPrototype  returnList ʟФESCAPE_FILENAME_PATTERN PM\r?\n|\r nݮ ([\n\r"]) ]V%0A &;E%0D ug%22 &:' isFilename 'ՅFORM_DETA_SERIALIZE_PATTERN ^ \r(?!\n)|(?formData C/boundary )XHCRLF QUOTE_CONTENT_PATTERN k ^"([^"]*)"$ iD)parseContentDisposition Zc+decodeLatin1StringAsUtf8 = latin1String ^ +NLF >F1ICR ΖMultipartParser jn^ #parseHeaders  headersText  \ rawHeaders  rawHeader VTssepIndex vH disposition FS decodedBody vJ lastBoundary q headerText &~ boundaryIndex z8( fileStart 5_prevByte Z isNewLine f.content hlatin1Filename  latin1Name ro parseFormData oparser :,formDataFromEntries  Afd f ext:deno_fetch/21_formdata.js r mimesniff WP chunkToU8 Z>P chunkToString bc InnerBody ~consumed unusable A consume ^f>clone 6mout1 n3out2 ` proxyStreamOrStatic RgU mixinBody ]r bodySymbol 4BmimeTypeSymbol ޭ consumeBody ) packageData 2emixin rvjson VE!0 extractBody 9BodyInit_DOMString BodyInit_DOMString? bcreateHttpClient Bl) HttpClient jHttpClientPrototype &=ext:deno_fetch/22_body.js T ext:deno_web/12_location.js ext:deno_fetch/20_headers.js F ext:deno_fetch/22_http_client.js n abortSignal B_request -request Z<'_headers FaH _getHeaders N get headers F _headersCache  headers cache 6 _mimeType  mime type 7_body faW_url *_method {!method  1processUrlList BbjurlList .EMurlListProcessed RcnewInnerRequest &g headerList 6B maybeBlob |y blobUrlEntry - currentUrl @ currentIndex DcloneInnerRequest ?skipBody >6 KNOWN_METHODS DELETE "KGET @HEAD =lOPTIONS ePATCH Ipatch N POST ތWspost PUT  put h-validateAndNormalizeMethod ke upperCase !Request U=w parsedURL )RequestPrototype j{ originalReq kr: inputBody ;ginitBody 2~p5inputOrInitBody e finalBody Fredirect J clonedReq R\ clonedSignal wfromInnerRequest fkRequestInfo_DOMString RequestRedirect 6Btfollow AQmanual e RequestInit gYclient %1ytoInnerRequest Z:< inner  āVCHAR l!-~ ƌOBS_TEXT  REASON_PHRASE vhREASON_PHRASE_MATCHER ZpREASON_PHRASE_RE "$ _response >response qnullBodyStatus FA9redirectStatus bdcloneInnerResponse r^newInnerResponse ( statusMessage vH networkError ~resp `abortedNetworkError einitializeAResponse o bodyWithType hasContentType V[EResponse ,ResponsePrototype 4rnewUrl tϧ redirected #J statusText  newRes i ResponseInit n(ResponseInit_fast R9toInnerResponse fromInnerResponse kext:deno_fetch/23_request.js n}ext:deno_fetch/23_response.js ڿREQUEST_BODY_HEADER_NAMES ]Wcontent-encoding "content-language NQ7content-location ^O content-type "J opFetchSend :acreateResponseBodyStream uresponseBodyRid ڀ terminator onAbort zA mainFetch Oreq ڢ recursive lreqBody  +,reqRid Dv requestRid cancelHandleRid q#httpRedirectFetch 6locationHeaders jv locationURL . fetch .C" opPromise NyO requestObject  abortFetch Rg5responseObject X/locallyAborted :)handleWasmStreaming r̊mext:deno_fetch/26_fetch.js HTextLineStream ϊ#allowCR f#buf *E#handle olfIndex VߩcrIndex ʲ crOrLfIndex C CONNECTING OPEN ؜CLOSED ` [[url]] ;_withCredentials '[[withCredentials]] 650 _readyState ~a[[readyState]] Fi)_reconnectionTime %c[[reconnectionTime]]  _lastEventID Z([[lastEventID]] q_abortController [[abortController]] ftf_loop BE[[loop]] k EventSource Z<EventSourcePrototype ^withCredentials &eventSourceInitDict jɊlastEventIDValue JqlastEventIDValueCopy O eventType *+ lastEventID nfield ehreconnectionTime eopen " EventSourceInit D7 CacheStorage E cacheName aCacheStoragePrototype PǪcacheId 6cache ]Cache  _matchAll Hs [[matchAll]] ntCachePrototype v# innerRequest 7reqUrl (F innerResponse *cg varyHeader v@ fieldValues >!H_options p responses > matchResult &cacheStorageStorage ZD cacheStorage 2 sequence or DOMString  WebSocketSend hpSERVER tCLIENT bgCLOSING ꕻ3_rid .cT[[rid]] Mw_role ‘[[role]] .  _extensions jK:[[extensions]] ^ _protocol ~3 [[protocol]] Rv\ _binaryType v9[[binaryType]] *d _eventLoop J [[eventLoop]] nn_server  [[server]] |_idleTimeoutDuration RC%[[idleTimeout]] ֦j_idleTimeoutTimeout [[idleTimeoutTimeout]] J׷r_serverHandleIdleTimeout q2;[[serverHandleIdleTimeout]] { WebSocket V protocols ĈwsURL KerrEvent iQerrorEv ЄcloseEv \WebSocketPrototype N} extensions r.T binaryType ξrPbufferedAmount  send ab "![ prevState createWebSocketBranded 9socket (WebSocketStreamOptions {DWebSocketCloseInfo s CLOSE_RESPONSE_TIMEOUT 2lU_opened u [[opened]] ys_closed gL [[closed]]  _earlyClose ?[[earlyClose]] 60 _closeSent R [[closeSent]] *VWebSocketStream @qWebSocketStreamPrototype Z1"opened u1 closeInfo Ɵ>9encoder K _persistent N[[persistent]] .Q/Storage rStoragePrototype ¢0setItem Da[getItem  removeItem  _=m createStorage >Ȍ persistent Kstorage އreceiver rзlocalStorageStorage b4 localStorage zsessionStorageStorage r>esessionStorage %jsupportedNamedCurves JY`P-256 v%P-384 vH&P-521 "recognisedUsages a%encrypt decrypt 7uverify J deriveKey & deriveBits jwrapKey e unwrapKey  \zsimpleAlgorithmDictionaries  AesGcmParams iv $-additionalData ORsaHashedKeyGenParams 5SHashAlgorithmIdentifier " EcKeyGenParams XHmacKeyGenParams  RsaPssParams ;# EcdsaParams AnHmacImportParams P HkdfParams .salt '7 Pbkdf2Params ZIQ# RsaOaepParams SRsaHashedImportParams >\EcKeyImportParams *B[1supportedAlgorithms digest nnSHA-1 .seSHA-256 SHA-384 gcSHA-512 Nx generateKey ,RSASSA-PKCS1-v1_5 fRSA-PSS . RSA-OAEP GECDSA WECDH BNFAES-CTR  AesKeyGenParams ֵMAES-CBC AES-GCM zfAES-KW &&vCHMAC LX25519 Ed25519 L importKey v HKDF vPBKDF2 SEcdhKeyDeriveParams QX AesCbcParams .Z AesCtrParams %get key length n6noAesDerivedKeyParams  aesJwkAlg  128 -A128CTR  192 MA192CTR  256 _(A256CTR RA128CBC z\A192CBC faA256CBC ^SWA128GCM t"A192GCM JA256GCM A128KW IA192KW ܶ}A256KW zn)onormalizeAlgorithm NJregisteredAlgorithms 2 initialAlg 9_algName 8 desiredType fAnormalizedAlgorithm dict &ɭidlType *,idlValue JŠ copyBuffer  _handle ?k [[handle]] ͻ _algorithm * [[algorithm]] % _extractable :B[[extractable]] vm+_usages 0TG [[usages]] J[[type]] 2 CryptoKey ~ CryptoKeyPrototype 1 extractable usages fI constructKey 6Bhandle RusageIntersection : KEY_STORE *% getKeyLength `j SubtleCrypto mSubtleCryptoPrototype B6EkeyData  hashAlgorithm <5 plainText < cipherText 7 plaintext  signature J: namedCurve p SIGNATURE_LEN Ŀ$ keyUsages ڵ algorithmName v-q importKeyHMAC  importKeyEC ѯ importKeyRSA \ importKeyHKDF (importKeyPBKDF2 & importKeyAES ?IXimportKeyX25519 4importKeyEd25519 g exportKey Y innerKey Ü exportKeyHMAC ves exportKeyRSA & exportKeyEC Y1exportKeyEd25519 _exportKeyX25519 a exportKeyAES sßbaseKey &derivedKeyType F1#normalizedDerivedKeyAlgorithmImport `D#normalizedDerivedKeyAlgorithmLength Ϲsecret g~ wrappingKey R wrapAlgorithm | exportedKey 3jwk *l wrappedKey B unwrappingKey jrunwrapAlgorithm  UMunwrappedKeyAlgorithm lnormalizedKeyAlgorithm ]B publicKey Gh privateKey Va!generateKeyAES &h\privateKeyData Gg publicKeyData D publicHandle >VED25519_SEED_LEN MkED25519_PUBLIC_KEY_LEN &(supportedKeyUsages J yrawData 2supportedUsages cSUPPORTED_KEY_USAGES n`UkeyType  n algNamedCurve ׹public VeB private qjwkUse B4+&sig ^)xenc Є modulusLength rcpublicExponent F#6normalizedHash 0optimizationsPresent V4)bits spkiDer ipkcs8Der U baseKeyhandle vN baseKeyData N ;publicKeyhandle JZkeyDerivationKey %kHandle HuHandle &t isIdentity R subtle ZFCrypto EjgetRandomValues z΅1CryptoPrototype sui8 JK randomUUID crypto ΍R4AlgorithmIdentifier ABufferSource or JsonWebKey ~1 JsonWebKey @KeyType ҉" KeyFormat _epkcs8 \spki nKeyUsage ѭsequence n#y dictAlgorithm E4 Algorithm z BigInteger ~VdictRsaKeyGenParams yJRRsaKeyGenParams SdictRsaHashedKeyGenParams  .dictRsaHashedImportParams l NamedCurve JIdictEcKeyImportParams  AdictEcKeyGenParams r?MdictAesKeyGenParams ^]HdictHmacKeyGenParams 2dictRsaPssParams  saltLength U-dictRsaOaepParams AdictEcdsaParams " dictHmacImportParams &ZdictRsaOtherPrimesInfo :gRsaOtherPrimesInfo )sequence }dictJsonWebKey "ֶckty fgduse Ckey_ops alg Җ^ext NJcrv F%;cdp ~ٖdq hdqi *q]oth _dictHkdfParams dictPbkdf2Params v= iterations 2agdictAesDerivedKeyParams tۈdictAesCbcParams St dictAesGcmParams N tagLength FdictAesCtrParams Xgcounter bdictCryptoKeyPair ?>F CryptoKeyPair z>dictEcdhKeyDeriveParams xchannels |recv channel 8BroadcastChannel qBroadcastChannelPrototype BgetBufferSourceByteLength *ߦ: U32_BUFFER mo U64_BUFFER %~ I64_BUFFER d UnsafePointerView … pointer >getBool .OD getPointer 9 getCString (Q getArrayBuffer EcopyInto Bߍ OUT_BUFFER :p,V OUT_BUFFER_64 >POINTER_TO_BUFFER_WEAK_MAP 6ASe UnsafePointer equals ʾuDUnsafeCallbackPrototype wUnsafeFnPointer fb definition t #structSize VܬisStruct f!2getTypeSizeAndAlignment ڪ parameters : isReturnedAsBigInt %f\isI64 cached Ʊ8 alignment ne fieldSize " fieldAlign UnsafeCallback 2 #refcount r #refpromise Bk# threadSafe 5unsafeCallback b[t:ref V;unref ODynamicLibrary N) resultType >isStructResult Ȼ structSize $pneedsUnpacking r*x isNonBlocking VHvi 9vui dlopen  resolveDns Cquery  recordType 2 abortHandler n~Conn Z& #remoteAddr }L #localAddr :ܙ#unref b}#pendingReadPromises j #readable  #writable N remoteAddr %n localAddr b{nread b< closeWrite j TcpConn , setNoDelay ҉noDelay  setKeepAlive ڏ keepAlive :x[*UnixConn VLaListener j v8#addr . Uaddr F accept ^conn DwDatagram XbufSize 1joinMulticastV4 ,multiInterface floopback vttl ,joinMulticastV6 Rreceive MlistenOptionApiName listen U transport !`createListenDatagram 1udpOpFn unixOpFn [listenDatagram r(connect Nr#ext:deno_net/01_net.js <TlsConn z8 handshake Z connectTls 66]AcertFile ^caCerts 6~ certChain *.cert }p alpnProtocols &l TlsListener Vx listenTls vaKzkeyFile M reusePort 8}startTls z encodeCursor &selector zl boundaryKey iopenKv Kv ȔkvSymbol j*\P maxQueueDelay BvalidateQueueDelay (^delay \maxQueueBackoffIntervals DmaxQueueBackoffInterval jpfMvalidateBackoffSchedule UUbackoffSchedule 6z1interval 0AKvRid VBcommitVersionstampSymbol ?VKvCommitVersionstamp ^ #isClosed yatomic V2EAtomicOperation QcommitVersionstamp * deserializeValue җ getMany ֒ranges x versionstamp >{doAtomicWriteInPlace ƀaserializeValue *3 batchSize jkKvListIterator  #pullBatch  cursor u consistency n^Q listenQueue finishMessageOps nnopayload .8DhandleId >8ߙdeserializedPayload ro-_res :%watch : *@ lastEntries ^7Qupdates Je}changed 6#checks V #mutations ~/2q #enqueues Z4check ?1checks .mutate  mutations Bimutation zuexpireIn ~sum @KvU64 d commit ( MIN_U64 mMAX_U64 0xffffffffffffffff s4AsyncIteratorPrototype n/: AsyncIterator  ) #selector V#entries "; #cursorGen z`#done u #lastBatch 2f#limit =h#count ѧ#reverse ֑O# #batchSize  #consistency ?!limit ~ pullBatch Ɛ2batch jenqueues ţformatToCronSchedule #exact ?5parseScheduleToString schedule )U dayOfMonth NZcron u handlerOrOptions1 7Uhandler2 6)<"ext:deno_websocket/01_websocket.js :ext:deno_net/02_tls.js FFc _upgraded ~X@<internalServerError  \nUPGRADE_RESPONSE_SENTINEL g immutable J upgradeHttpRaw & addTrailers Z InnerRequest "  #external /#context ֘ #methodAndUri Α #streamRid F#body f #upgraded 2,7 #urlValue 5 _wantsUpgrade &q$ upgradeType J_z originalArgs underlyingConn r޾ upgradeRid +ws 22/goAhead 5c wsPromise )wsRid  reqHeaders l\CallbackContext .xabortController *6c fallbackHost ' serverRid ʗclosing }_;ServeHandlerInfo 4#inner FofastSyncResponseOrStream "grespBody 6 mapToCallback 4onError q-serve J+ wantsHttps t wantsUnix PserveHttpOnListener z+T listenOpts "3onListen : serveHttpOn VDserveHttpOnConnection N connection  currentPromise N#5promiseErrorHandler ~Bfinished Iext:deno_http/00_serve.js ^connErrorSymbol O connError  FdeleteManagedResource w2HttpConn u#closed V"#managedResources ޥ nextRequest ؠ streamRid 2 respondWith bӄ:createRespondWith F2httpConn 5reqEvt 2BO innerResp Z@r1 B}r2 JSisStreamingResponseBody >_ws &+x[[associated_ws]] HX websocketCvf |Φ$buildCaseInsensitiveCommaValueFinder  v websocket E upgradeCvf <upgrade 'ܒupgradeWebSocket z0upgradeHasWebSocketOption kconnectionHasUpgradeOption " websocketKey :M protocolsStr >' spaceCharCode N h tabCharCode  commaCharCode  J' checkText /u charCodes ОLskipWhitespace WDhasWord *8"skipUntilComma >GcLower pcUpper z DEFAULT_BUFFER_SIZE ZSeekMode BStart YCurrent TEnd nmcopy udst 'YgotEOF VYnwritten hIiterSync ?j READ_PER_ITER "Hlmbuffers  concatBuffers I?8 readAllSync rtotalLen vUlcontents \x STDIN_RID K STDOUT_RID t STDERR_RID "oStdin F4ǰsetRaw <cbreak D isTerminal :_Stdout PSStderr Z7Pstdin "ej_stdout 7^stderr j€ext:deno_io/12_io.js m chmodSync nvGchmod ^V chownSync  uid Rqgid Dchown :7 copyFileSync B KfromPath }toPath 鞣copyFile `cwd Qchdir N؁ directory  VTmakeTempDirSync 2 makeTempDir ?makeTempFileSync 0o makeTempFile  mkdirSync B.mkdir :QE readDirSync &[readDir "a6@ readLinkSync ҤreadLink 271 realPathSync ?RrealPath *@ removeSync F# renameSync }oldpath Bؘ}newpath ֣krename GcreateByteStruct NTtypes j typeEntries >䌲optional x statStruct ҥstatBuf  HisFile  (^ isDirectory n isSymlink W u64 ]Zmtime  atime  birthtime 3rdev W"Mino b"?u64 jenlink ӏrdev vblksize }blocks |? isBlockDevice .Ǹ?bool i isCharDevice PisFifo _isSocket  Г parseFileInfo @unix TM fstatSync ^"F/fstat 2lstat r lstatSync V_Ostat statSync r{/ coerceLen Z ftruncateSync H5- ftruncate jI truncateSync k truncate B,umask zlinkSync toUnixTimeFromEpoch 樒 futimeSync [atimeSec R{< atimeNsec mtimeSec C mtimeNsec Eyfutime V< utimeSync gutime " symlinkSync Ĉsymlink ` fdatasyncSync JgpU fdatasync OR fsyncSync N5kfsync %Y flockSync ƪ exclusive hflock jq funlockSync [funlock YseekSync jFYwhence j'seek  (fopenSync ~nocheckOpenOptions V=6FsFile  createSync R#YsyncData ̚l syncDataSync Ysync +syncSync AklockSync  lock .TL unlockSync Zunlock Z%createOrCreateNewWithoutWriteOrAppend X readFileSync readFile zreadTextFileSync 6o readTextFile 4 writeFileSync :>, writeFile NhJfile cwriteTextFileSync ~ writeTextFile  denoGlobals \ nodeGlobals xu requireImpl next:deno_node/00_globals.js 9 node:module  initialize .}ausesLocalNodeModulesDir Bargv0 FBnativeModuleExports  loadCjsModule *5j moduleName isMain F inspectBrk G nodeBootstrap  _httpAgent ~(ext:deno_node/_http_agent.mjs 堦 _httpOutgoing Bext:deno_node/_http_outgoing.ts Z~ _streamDuplex )ext:deno_node/internal/streams/duplex.mjs Lb_streamPassthrough ^F.ext:deno_node/internal/streams/passthrough.mjs ʩi_streamReadable +ext:deno_node/internal/streams/readable.mjs JU_streamTransform s,ext:deno_node/internal/streams/transform.mjs &_streamWritable vH+ext:deno_node/internal/streams/writable.mjs Vx node:assert Z assertStrict bnode:assert/strict  asyncHooks 6Q:node:async_hooks < node:buffer f * childProcess Vnode:child_process Ҁ!)cluster 7 node:cluster B /q node:console ϗB constants 9node:constants f node:crypto H%dgram ^5 node:dgram b=xdiagnosticsChannel Zdinode:diagnostics_channel wY)dns }node:dns 4 dnsPromises Znode:dns/promises rҵdomain  node:domain z4events # node:events fs 25node:fs  fsPromises Phnode:fs/promises hhttp BP| node:http Fhttp2 )d node:http2 bhttps ܉p node:https  R1 inspector Zext:deno_node/inspector.ts Ku internalCp r`'ext:deno_node/internal/child_process.ts internalCryptoCertificate '^,ext:deno_node/internal/crypto/certificate.ts j6internalCryptoCipher G]'ext:deno_node/internal/crypto/cipher.ts Z&internalCryptoDiffiehellman K.ext:deno_node/internal/crypto/diffiehellman.ts  M@CinternalCryptoHash wf%ext:deno_node/internal/crypto/hash.ts vmvinternalCryptoHkdf k9%ext:deno_node/internal/crypto/hkdf.ts GinternalCryptoKeygen M'ext:deno_node/internal/crypto/keygen.ts zCinternalCryptoKeys .ɗ%ext:deno_node/internal/crypto/keys.ts v~internalCryptoPbkdf2 \|'ext:deno_node/internal/crypto/pbkdf2.ts qinternalCryptoRandom b% 'ext:deno_node/internal/crypto/random.ts :internalCryptoScrypt o@ 'ext:deno_node/internal/crypto/scrypt.ts j3MinternalCryptoSig $ext:deno_node/internal/crypto/sig.ts §0internalCryptoUtil J:d%ext:deno_node/internal/crypto/util.ts &internalCryptoX509 "%ext:deno_node/internal/crypto/x509.ts &{ˑ internalDgram 4j'ext:deno_node/internal/dgram.ts QinternalDnsPromises .&ext:deno_node/internal/dns/promises.ts einternalErrors &4 ext:deno_node/internal/errors.ts >6internalEventTarget >'ext:deno_node/internal/event_target.mjs internalFsUtils z#ext:deno_node/internal/fs/utils.mjs # internalHttp /3ext:deno_node/internal/http.ts #internalReadlineUtils 6w1)ext:deno_node/internal/readline/utils.mjs internalStreamsAddAbortSignal ұ3ext:deno_node/internal/streams/add-abort-signal.mjs BinternalStreamsBufferList SuA.ext:deno_node/internal/streams/buffer_list.mjs xinternalStreamsLazyTransform (1ext:deno_node/internal/streams/lazy_transform.mjs N(internalStreamsState z7(ext:deno_node/internal/streams/state.mjs ȠfinternalTestBinding [*&ext:deno_node/internal/test/binding.ts  ninternalTimers ::f!ext:deno_node/internal/timers.mjs P internalUtil ext:deno_node/internal/util.mjs &internalUtilInspect ¿\'ext:deno_node/internal/util/inspect.mjs 2Mnet ǡenode:net .inode:os  jf pathPosix vicanode:path/posix تU pathWin32 ^y1node:path/win32 &? node:path ( perfHooks vanode:perf_hooks z§punycode :0 node:punycode v/process s node:process C querystring ZPnode:querystring .readline 6^u node:readline ;readlinePromises FY"ext:deno_node/readline/promises.ts repl :Vb node:repl &\V node:stream ] streamConsumers v;8node:stream/consumers j7fstreamPromises C|node:stream/promises  streamWeb nnode:stream/web .T stringDecoder 5node:string_decoder Asys J;Enode:sys & node:test = node:timers ~timersPromises jLnode:timers/promises UGtls  node:tls 6ntty )node:tty :node:url %1 utilTypes QMnode:util/types "wutil ng> node:util ^:^v8 b+Ynode:v8 vm  Inode:vm Δ workerThreads +]node:worker_threads <&wasi vb^ext:deno_node/wasi.ts Tzlib z& node:zlib ꃾ=builtinModules  SsetupBuiltinModules y nodeModules ' moduleExports _n cjsParseCache 2, pathDirname &nFKfilepath > pathResolve ^ўGnativeModulePolyfill E6relativeResolveCache Ԫ requireDepth  statCache v isPreloading GS mainModule :W{hasBrokenOnInspectBrk  le hasInspectBrk n؁updateChildren 5 child qwscan ړGFchildren M tryFile p requestPath An_isMain _/rc K toRealPath *= tryPackage Texts j(l originalPath WpackageJsonPath 6wOpkg BoJ tryExtensions :actual J7! realpathCache f maybeCached vkCrp fxfindLongestRegisteredExtension ~=<currentExtension e startIndex bgetExportsForCircularRequire .Ӱ$CircularRequirePrototypeWarningProxy emitCircularRequireWarning F<moduleParentCache $_cache W  _pathCache >/ modulePaths  globalPaths *1CHAR_FORWARD_SLASH }TRAILING_SLASH_REGEX ~&e:(?:^|\/)\.?\.$ x.encodedSepRegEx eP%2F|%2C  finalizeEsmResolution B[resolved Y parentPath tpkgPath vERR_INVALID_MODULE_SPECIFIER #8ERR_MODULE_NOT_FOUND R4ЏEXPORTS_PATTERN b*ɭ+^((?:@[^/\\%]+\/)?[^./\\%][^/\\%]*)(\/.*)?$ ~=NresolveExports &< modulesPath a expansion А _findPath ^3paths wabsoluteRequest \cacheKey 0l trailingSlash r†curPath Ə exportsResolved basePath gzisDenoDirPackage P} isRelative + packageSpecifierSubPath a_nodeModulePaths ΝZ_resolveLookupPaths Җٌ denoDirPath lookupPathsResult }y_load  relResolveCacheIdentifier &q cachedModule ,loadNativeModule ?mod z!threw |i_resolveFilename Z/ nativeModuleCanBeRequiredByUsers   fakeParent Bp* lookupPaths 5 maybeResolved >w selfResolved Y requireStack j_preloadModules  Irequests z3 extension FcreateRequireEsmError ʹbrequire qwrapper `/(function (exports, require, module, __filename, __dirname, Buffer, clearImmediate, clearInterval, clearTimeout, console, global, process, setImmediate, setInterval, setTimeout, performance) { (function (exports, require, module, __filename, __dirname) { "C }).call(this, exports, require, module, __filename, __dirname); }) Fwrap FI^#!.*?\n :X/isEsmSyntaxError GenrichCJSError ?wrapSafe MNcjsModuleInstance X_compile compiledWrapper rldirname ^a7makeRequireFunction zД thisValue wBuffer nclearImmediate ſ setImmediate rB).js \stripBOM &To.json .node 2mcreateRequireFromPath *DgC proxyPath RE_START_OF_ABS_PATH ^^([/\\]|[a-zA-Z]:[/\\]) V isAbsolute 9 filenameOrUrl p createRequire nZ fileUrlStr ( _initPaths JWsyncBuiltinESMExports (runMain  6Z modExports ʎ$DnodeMod freadPackageScope VvsetUsesLocalNodeModulesDir +~ setInspectBrk  EventEmitter ^f|debuglog *{'ext:deno_node/internal/util/debuglog.ts ^d AsyncResource hM%ext:deno_node/internal/async_hooks.ts ~<async_id_symbol O/ERR_OUT_OF_RANGE CvalidateNumber u validateOneOf .validateString J%ext:deno_node/internal/validators.mjs  u kOnKeylog w[Ionkeylog kRequestOptions V``requestOptions :kRequestAsyncResource bDrequestAsyncResource qИ ReusedHandle "ZfreeSocketErrorListener 2/Agent  ෨ reqAsyncRes CasyncResetHandle \osetRequestSocket ΁# freeSockets YfreeLen ^ maybeEnableKeylog * eventName qagent N keylog  sockets >JdefaultMaxSockets F6createConnection N EgetName ֶ addRequest Nl localAddress +calculateServerName ĵsockLen f94 createSocket |oncreate jinstallListeners V#pE newSocket 2 servername ec hostHeader  onFree S!onClose ^H onTimeout  JonRemove f removeSocket ?sets ΐsk ξkeepSocketAlive  p agentTimeout Yl reuseSocket =destroy >1ՋsetName 1 globalAgent BpHgetDefaultHighWaterMark Si !ext:deno_node/internal/assert.mjs 9hEE B+Stream 9 deprecate JO kNeedDrain ) kOutHeaders b3gutcDate fKnotImplemented ext:deno_node/_utils.ts (Oz_checkInvalidHeaderChar +checkInvalidHeaderChar 7s _checkIsHttpToken y#checkIsHttpToken BchunkExpression jc RE_TE_CHUNKED ;Qext:deno_node/_http_common.ts npdefaultTriggerAsyncIdScope :8KbERR_HTTP_HEADERS_SENT BeTERR_HTTP_INVALID_HEADER_VALUE FERR_HTTP_TRAILER_INVALID / cERR_INVALID_ARG_TYPE }ѺERR_INVALID_CHAR VCLERR_INVALID_HTTP_TOKEN -ERR_METHOD_NOT_IMPLEMENTED iERR_STREAM_CANNOT_PIPE ERR_STREAM_NULL_VALUES LXXhideStackFrames J, isUint8Array 6w%$ext:deno_node/internal/util/types.ts j0HIGH_WATER_MARK :zkCorked corked Anop v~< RE_CONN_CLOSE &S(?:^|\W)close(?:$|\W) jOutgoingMessage 2yS outputData s outputSize x destroyed B_last r chunkedEncoding 'CshouldKeepAlive F^RmaxRequestsOnConnectionReached F_defaultKeepAlive .useChunkedEncodingByDefault R6.sendDate "H_removedConnection 3_removedContLen Q _removedTE 6N__contentLength ^O_hasBody V _trailer  _headerSent &_header F_keepAliveTimeout ZL_onPendingData :YwritableFinished ŮwritableObjectMode  writableLength YmwritableCorked J5 writableEnded ]AwritableNeedDrain bScork yuncork zWmsecs JsocketSetTimeoutOnConnect socketDestroyOnConnect :pv setHeader >%hvalidateHeaderName zdvalidateHeaderValue O existingValues  getHeaders J邝 hasHeader q G removeHeader getHeaderNames getRawHeaderNames  headersMap "write_ fromEnd &_chunk `9 _encoding Y{ _callback |z_ flushHeaders epipe ⇏)_implicitHeader k_finish _flush  _flushOutput _send _ _writeHeader eq' _writeRaw 6 {_renderHeaders  _storeHeader &8 firstLine q _matchHeader ʬcaptureRejectionSymbol N0OutgoingMessage.prototype._headers is deprecated ~`DEP0066 ւ _headerNames I4OutgoingMessage.prototype._headerNames is deprecated  Header name /)'Header "%s" contains invalid characters  3gheader content  %parseUniqueHeadersOption ,unique 7ū headersSent u" _crlf_buf ~B# _onError  WtriggerAsyncId RC emitErrorNt _write_ RJM_msg V_7_fromEnd F_connectionCorkNT &q: _onFinish Poutmsg J/Duplex Fext:deno_node/_stream.mjs ҤTfromWeb :F0 toWeb % PassThrough R/Readable 6 ReadableState zX _fromList ֐` Transform =Writable  WritableState  ext:deno_node/assertion_error.ts jasserts =Es"ext:deno_node/_util/std_asserts.ts z<|ERR_AMBIGUOUS_ARGUMENT xERR_INVALID_ARG_VALUE r{MERR_INVALID_RETURN_VALUE &]ERR_MISSING_ARGS jq= isDeepEqual ="*ext:deno_node/internal/util/comparisons.ts V innerFail ucreateAssertionError /toNode *!0operator zdqexpected j]throws validateThrownError  doesNotThrow  ,FgotUnwantedException ڮequal fYnotEqual ~~ strictEqual 2-notStrictEqual  deepEqual *4 notDeepEqual deepStrictEqual ڟ_notDeepStrictEqual fail d doesNotMatch rejects &{asyncFn risValidThenable  rejects_onRejected N\ doesNotReject J ifError newErr Z origStack rDtmp2 tmp1 rvIerrFrame qhreceived ӱmaybeThennable  isThenable  validateFunction R`7asyncContextStack SFpushAsyncFrame & popAsyncFrame OrootAsyncFrame :.&promiseHooksSet `F asyncContext *u currentFrame J)2AsyncContextFrame Ri- maybeFrame 8m maybeParent "Q"maybeStorageEntry ǴisRoot J propagate M existingEntry j tryGetContext "r attachContext s~getRootAsyncContext MScope >炡runInAsyncScope jJenter sexit C StorageEntry }= StorageKey z:#dead .disDead fnReg ֶAsyncLocalStorage #key Ҿ srun 2jNgetStore \:executionAsyncId :$;C AsyncHook ̎Eenable G$disable fJ createHook .Ur kMaxLength 0kStringMaxLength 2 SlowBuffer gQ!ext:deno_node/internal/buffer.mjs r ChildProcess V?normalizeSpawnArguments  setupChannel Z>g spawnSync 4 J MAX_BUFFER |fork ~M8 modulePath fS_args ZGKexecArgv >\v8Flags Jjflag zstringifiedV8Flags  spawn fG(command  "[ argsOrOptions l maybeOptions ~zvalidateTimeout zYSwvalidateMaxBuffer at' maxBuffer JsanitizeKillSignal  killSignal 09normalizeExecArgs B˂optionsOrCallback b1J maybeCallback .wexecFile v3WcustomPromiseExecFunction >orig J׀custom Z ExecFileError >argsOrOptionsOrCallback I}[ execOptions *9q spawnOptions ݮb_stdout b ?_stderr 2# stdoutLen n; stderrLen (killed >32exited ֨У timeoutId ZrNjex %cmd zv exithandler b^ ( errorhandler >kill ]~ delayedKill + onChildStdout a9 truncatedLen z8І onChildStderr ޡIcustomPromiseExecFileFunction JCcheckExecSyncError RMexecSync jZ inheritStderr rnormalizeExecFileArgs B, execFileSync j1|errArgs bsetupChildProcessIpcChannel M__setupChildProcessIpcChannel BWorker 0M& disconnected ] isPrimary isWorker aisMaster ]schedulingPolicy *MA setupMaster 2ʌ setupPrimary }fworker "workers .ext:deno_node/internal/console/constructor.mjs gwindowOrWorkerGlobalScope 0%ext:runtime/98_global_scope_shared.js 2 fsConstants g? osConstants  09errno priority :D-F_OK /R_OK LsW_OK ƯX_OK  EO_RDONLY O_WRONLY 6nO_RDWR jQKO_NOCTTY bO_TRUNC .cO_APPEND Rߙ O_DIRECTORY Kz O_NOFOLLOW uO_SYNC >k O_DSYNC GJ O_SYMLINK G O_NONBLOCK =O_CREAT tjOO_EXCL 4LWS_IRUSR m\S_IWUSR NA.S_IXUSR Z:S_IRGRP vGS_IWGRP mS_IXGRP NS_IROTH ^S_IWOTH JHS_IXOTH ] ~ COPYFILE_EXCL  COPYFILE_FICLONE HCOPYFILE_FICLONE_FORCE FUV_FS_COPYFILE_EXCL f)ΛUV_FS_COPYFILE_FICLONE YUV_FS_COPYFILE_FICLONE_FORCE r˳ RTLD_DEEPBIND G RTLD_GLOBAL  RTLD_LAZY b RTLD_LOCAL BLBRTLD_NOW ^E2BIG <EACCES .̑ EADDRINUSE dY EADDRNOTAVAIL ^- EAFNOSUPPORT [EAGAIN ҥsEALREADY ƊEBADF V5EBADMSG 2 EBUSY  ECANCELED * PECHILD *r ECONNABORTED ;? ECONNREFUSED zSf ECONNRESET "m{EDEADLK d EDESTADDRREQ kEDOM J^"cEDQUOT z> EEXIST VEFAULT 4]EFBIG z EHOSTUNREACH VEIDRM EILSEQ .. EINPROGRESS qWEINTR mEINVAL v%rEIO ^#JEISCONN xEISDIR FbүELOOP EMFILE qcEMLINK *EMSGSIZE w EMULTIHOP j) ENAMETOOLONG (ENETDOWN m ENETRESET  ENETUNREACH ENFILE ENOBUFS ΍ENODATA ^jENODEV ~ENOENT nAENOEXEC `ENOLCK "C}ENOLINK $ENOMEM !ENOMSG a0 ENOPROTOOPT 8{ENOSPC NENOSR 2AENOSTR  5ENOSYS zENOTCONN ENOTDIR .h ENOTEMPTY ڜlENOTSOCK ΋7|ENOTSUP V:ENOTTY hENXIO Xb EOPNOTSUPP V EOVERFLOW v+2EPERM \EPIPE EPROTO bgEPROTONOSUPPORT 5w EPROTOTYPE 7ERANGE Ε!EROFS .PRIORITY_HIGHEST Y PRIORITY_LOW PRIORITY_NORMAL BeSIGABRT  kSIGALRM >SIGBUS GSIGCHLD  SIGCONT _SIGFPE N0SIGHUP SIGILL ^`DSIGINT SIGIO LSIGIOT  SIGKILL H{KSIGPIPE J2SIGPOLL qΠSIGPROF SIGPWR ZwSIGQUIT jgSIGSEGV ڵ.7 SIGSTKFLT &SIGSTOP :^SIGSYS }SIGTERM %SIGTRAP gwSIGTSTP ISIGTTIN &4SIGTTOU JG SIGUNUSED jʾSIGURG SIGUSR1 FlSIGUSR2 ~A SIGVTALRM G1<SIGWINCH b1TSIGXCPU P? SIGXFSZ n^ERR_CRYPTO_FIPS_FORCED 6+ext:deno_node/internal_binding/constants.ts JgetOptionValue ֚!ext:deno_node/internal/options.ts } getFipsCrypto V5,t setFipsCrypto timingSafeEqual K(ext:deno_node/internal_binding/crypto.ts $ checkPrime checkPrimeSync YG, generatePrime 4generatePrimeSync k%C randomBytes "> randomFill /ArandomFillSync  k randomInt VoApbkdf2 v% pbkdf2Sync !Pzscrypt &( scryptSync F4A hkdf `hkdfSync F generateKeyPair EgenerateKeyPairSync Zp generateKeySync createPrivateKey JcreatePublicKey *KcreateSecretKey B KeyObject 93 DiffieHellman .r diffieHellman &rUDiffieHellmanGroup iCipheriv 2 Decipheriv ڢI getCipherInfo 撛privateDecrypt &privateEncrypt 6Y publicDecrypt B publicEncrypt ݊Sign fvy signOneShot /O!Verify L[ verifyOneShot mY createHash "d getHashes zb[Hash  Hmac X509Certificate 2Z getCiphers zy getCurves secureHeapUsed ~_ setEngine &" Certificate ƚqq webcrypto jRext:deno_crypto/00_crypto.js J3 fipsForced  cG --force-fips &2HcreateCipheriv :zcipher $createDecipheriv  createDiffieHellman o sizeOrKey ھ keyEncoding ' generator 2QYgeneratorEncoding t#createDiffieHellmanGroup z$ createECDH w?curve l" createHmac ePlhmac ny createSign 2, createVerify y/ setFipsForced vS getFipsForced B2qdefaultCipherList FG8--tls-cipher-list n.1getDiffieHellman getFips yAsetFips V+pseudoRandomBytes f;ERR_BUFFER_OUT_OF_BOUNDS :+h\ERR_INVALID_FD_TYPE fERR_SOCKET_ALREADY_BOUND #EERR_SOCKET_BAD_BUFFER_SIZE gaERR_SOCKET_BUFFER_SIZE BIERR_SOCKET_DGRAM_IS_CONNECTED άkERR_SOCKET_DGRAM_NOT_CONNECTED F$&ERR_SOCKET_DGRAM_NOT_RUNNING V/2errnoException [exceptionWithHostPort p kStateSymbol ^' newHandle B$ asyncIdSymbol T ownerSymbol 3NSendWrap 0*ext:deno_node/internal_binding/udp_wrap.ts isInt32 $e validatePort guessHandleType Ib&ext:deno_node/internal_binding/util.ts cnextTick 6VuUV_UDP_REUSEADDR ZUV_UDP_IPV6ONLY ʤLudpSocketChannel b8 udp.socket n7BIND_STATE_UNBOUND F BIND_STATE_BINDING @BIND_STATE_BOUND :CONNECT_STATE_DISCONNECTED  CONNECT_STATE_CONNECTING aCONNECT_STATE_CONNECTED ") RECV_BUFFER ֞ SEND_BUFFER ~oq0isSocketOptions " socketOption  isUdpHandle N; recvStart ֞ isBindOptions 2qSocket elookup recvBufferSize RsendBufferSize  l onAborted 5Z addMembership z.wmulticastAddress ZinterfaceAddress a; healthCheck , KaddSourceSpecificMembership .QZ sourceAddress EAL groupAddress baddress port_ address_ vuremoveListeners {' onListening &\ replaceHandle i5startListening <- lookupError 6<ip G^ stopReceiving r socketCloseNT S_connect Z disconnect BBƫdropMembership bE&dropSourceSpecificMembership 0ggetRecvBufferSize  bufferSize EZRgetSendBufferSize 'V8 remoteAddress  connected rœ& sliceBuffer ^ fixBufferList nafterDns doSend ̠ setBroadcast ☈setMulticastInterface F-setMulticastLoopback ں'YsetMulticastTTL ZsetRecvBufferSize ZdsetSendBufferSize <LsetTTL f onMessage r oldHandle rinfo NLnewList 2~a toEnqueue B onListenError nxonListenSuccess Eϵ clearQueue .F queueEntry no doConnect Y afterSend s~sent WRChannel  + _subscribers Zpublish ̍ subscriber r subscribe : subscription N unsubscribe I*hasSubscribers ext:deno_node/_next_tick.ts customPromisifyArgs ^D=validateBoolean ^isIP 2Jext:deno_node/internal/net.ts Z+emitInvalidHostnameWarning % getDefaultResolver BYtgetDefaultVerbatim շisFamily isLookupCallback J&2isLookupOptions v*isResolveCallback fהResolver h6CallbackResolver fc;setDefaultResolver setDefaultResultOrder J validateHints #ext:deno_node/internal/dns/utils.ts V promisesBase 9 dnsException Jņ AI_ADDRCONFIG h ADDRCONFIG (bAI_ALL )ZALL  AI_V4MAPPED މe<V4MAPPED JF'&ext:deno_node/internal_binding/ares.ts f getaddrinfo *CGetAddrInfoReqWrap $ QueryReqWrap ʞ,ext:deno_node/internal_binding/cares_wrap.ts j'RtoASCII  s9onlookup > addresses e onlookupall rBfamily gparsedAddresses nZ validFamilies Ehints "-[verbatim ? matchedFamily Цn onresolve 8Krecords ttls ^ parsedRecords 6g3resolver "*p bindingName ^| resolveMap /y resolveAny eANY b_queryAny v[tresolve4 ~queryA |%"resolve6  &AAAA vŶ queryAaaa v resolveCaa ICAA Rl| queryCaa ? resolveCname GCNAME 9 queryCname bc resolveMx n!)MX *queryMx vx resolveNs DNS ޴queryNs  resolveTxt 6TXT >}queryTxt K resolveSrv 1SRV zoKquerySrv ߃~ resolvePtr rPTR queryPtr s resolveNaptr  NAPTR g queryNaptr 0 resolveSoa N SOA querySoa : getHostByAddr V1_resolve *rrtype  setServers vAservers jN getServers z$NODATA b_NFORMERR EFORMERR  vSERVFAIL (v ESERVFAIL bJNOTFOUND F3F ENOTFOUND =6NOTIMP o1ENOTIMP 2UUqREFUSED ΀ EREFUSED ?>BADQUERY * EBADQUERY +(BADNAME =EBADNAME f ^ BADFAMILY ~ EBADFAMILY Z=BADRESP NEBADRESP ~yu CONNREFUSED {TIMEOUT ETIMEOUT " EOF 6EFILE O3EFILE 5NOMEM { DESTRUCTION  EDESTRUCTION *BADSTR  EBADSTR n=BADFLAGS y EBADFLAGS tNONAME 4ENONAME r{BADHINTS N4 EBADHINTS .NOTINITIALIZED ENOTINITIALIZED *~t LOADIPHLPAPI  ELOADIPHLPAPI .FADDRGETNETWORKPARAMS F\EADDRGETNETWORKPARAMS  CANCELLED  ECANCELLED =~promises fDomain 2NdefaultMaxListeners pn errorMonitor J?getEventListeners JEon &G setMaxListeners ξrext:deno_node/_events.mjs "5access  accessPromise  accessSync 4ext:deno_node/_fs/_fs_access.ts b appendFile -appendFilePromise b~appendFileSync n #ext:deno_node/_fs/_fs_appendFile.ts fs chmodPromise ext:deno_node/_fs/_fs_chmod.ts  chownPromise drext:deno_node/_fs/_fs_chown.ts aZt closeSync jext:deno_node/_fs/_fs_close.ts 2Gp"ext:deno_node/_fs/_fs_constants.ts N/qcopyFilePromise N .ext:deno_node/_fs/_fs_copy.ts Ocp v+ cpPromise zcpSync b=ext:deno_node/_fs/_fs_cp.js +Dir #ext:deno_node/_fs/_fs_dir.ts 2Dirent 'rext:deno_node/_fs/_fs_dirent.ts ϭexists  C existsSync Jzlext:deno_node/_fs/_fs_exists.ts q"ext:deno_node/_fs/_fs_fdatasync.ts 5Sext:deno_node/_fs/_fs_fstat.ts ext:deno_node/_fs/_fs_fsync.ts b3F"ext:deno_node/_fs/_fs_ftruncate.ts .Xfutimes 2q futimesSync / ext:deno_node/_fs/_fs_futimes.ts .K7 linkPromise ]ext:deno_node/_fs/_fs_link.ts  lstatPromise  rext:deno_node/_fs/_fs_lstat.ts < mkdirPromise iyext:deno_node/_fs/_fs_mkdir.ts jLmkdtemp mkdtempPromise f mkdtempSync hO ext:deno_node/_fs/_fs_mkdtemp.ts h openPromise 윙ext:deno_node/_fs/_fs_open.ts n`Yopendir :mopendirPromise ^- opendirSync =Hf ext:deno_node/_fs/_fs_opendir.ts 'ext:deno_node/_fs/_fs_read.ts 욗readdir fPreaddirPromise P readdirSync u ext:deno_node/_fs/_fs_readdir.ts NʕreadFilePromise !ext:deno_node/_fs/_fs_readFile.ts 3readlink "TreadlinkPromise . readlinkSync *g!ext:deno_node/_fs/_fs_readlink.ts Derealpath ^SrealpathPromise BuU! realpathSync z~!ext:deno_node/_fs/_fs_realpath.ts ^ renamePromise Y8!ext:deno_node/_fs/_fs_rename.ts O.rmdir *Ge rmdirPromise U rmdirSync *$ext:deno_node/_fs/_fs_rmdir.ts N` rm  2I rmPromise :5JMrmSync 7ext:deno_node/_fs/_fs_rm.ts  statPromise 4$ext:deno_node/_fs/_fs_stat.ts nZVsymlinkPromise  ext:deno_node/_fs/_fs_symlink.ts f8htruncatePromise !ext:deno_node/_fs/_fs_truncate.ts c׃unlink uu unlinkPromise .R[ unlinkSync ext:deno_node/_fs/_fs_unlink.ts  "utimes # utimesPromise ގ={ utimesSync ^"ext:deno_node/_fs/_fs_utimes.ts z- unwatchFile / watchFile ]W watchPromise j; ext:deno_node/_fs/_fs_watch.ts !ext:deno_node/_fs/_fs_write.mjs writev NX_ writevSync ZY ext:deno_node/_fs/_fs_writev.mjs 5writeFilePromise ]"ext:deno_node/_fs/_fs_writeFile.ts ]Stats &hmcreateReadStream acreateWriteStream :&{ ReadStream |k WriteStream j%ext:deno_node/internal/fs/streams.mjs 6R_normalizeArgs 1ERR_SERVER_NOT_RUNNING WvalidateInteger oҜaddAbortSignal f NodeReadable *T| NodeWritable CurlToHttpOptions ext:deno_node/internal/url.ts .pTCP }g*ext:deno_node/internal_binding/tcp_wrap.ts ޲warnNotImplemented fconnResetException rERR_INVALID_PROTOCOL RW-ERR_UNESCAPED_CHARACTERS bgetTimerDuration rvwebClearTimeout : { STATUS_CODES 8Continue SwitchingProtocols  Processing hh EarlyHints  OK nCreated  Accepted NonAuthoritativeInfo ^i NoContent n? ResetContent  PartialContent A MultiStatus 9'OAlreadyReported  uIMUsed MMultipleChoices F*8`MovedPermanently CFound ` SeeOther Lr NotModified z6AUseProxy ,TemporaryRedirect rLoPermanentRedirect K BadRequest Nя` Unauthorized XPaymentRequired f] Forbidden NotFound oacMethodNotAllowed I? NotAcceptable *ProxyAuthRequired rNORequestTimeout WmConflict eGone LengthRequired ZgtPreconditionFailed zQ.RequestEntityTooLarge  uRequestURITooLong >UnsupportedMediaType Y>RequestedRangeNotSatisfiable /4uExpectationFailed p2 Teapot .p5MisdirectedRequest &C<UnprocessableEntity Locked 3FailedDependency 'TooEarly FUpgradeRequired PreconditionRequired J^ TooManyRequests rRequestHeaderFieldsTooLarge UnavailableForLegalReasons >¬*InternalServerError lNotImplemented F BadGateway qServiceUnavailable +GatewayTimeout HTTPVersionNotSupported F?Y!VariantAlsoNegotiates x!InsufficientStorage fU LoopDetected Z2 NotExtended NetworkAuthenticationRequired [METHODS ԛvACL  ^BIND oBCHECKOUT  >CONNECT _COPY :LINK ”LOCK nM-SEARCH vMERGE z MKACTIVITY N\ MKCALENDAR MKCOL MOVE nNOTIFY ",>PROPFIND P PROPPATCH sGPURGE vC(ZREBIND REPORT z}JSEARCH -nSOURCE ~ SUBSCRIBE j TRACE ^٭UNBIND B UNLINK jxUNLOCK ? UNSUBSCRIBE Y~ENCODER ! validateHost MAINVALID_PATH_REGEX z] Z[^\u0021-\u00ff] zbb-kError *kUniqueHeaders J6J FakeSocket  W ClientRequest ~8defaultProtocol 5rhttp: NF% maxHeaderSize >insecureHTTPParser ݮ3urlStr E defaultAgent SexpectedProtocol ; defaultPort DsetHost n^!pmethodIsString 6@1; headersArray YposColon  :optsWithoutSignal  _getClient SM3onSocket #yincoming BI/IncomingMessageForClient _value P_createCustomClient <_createUrlStrFromOptions  oauth g*_processHeader 0isContentDispositionField  isCookieField kHeaders s2kHeadersDistinct  kHeadersCount o?v kTrailers ݟkTrailersDistinct kTrailersCount ,headersDistinct trailers ~trailersDistinct @_read J߻_n }_destroy ";gcleanup *M_addHeaderLines B_addHeaderLine +matchKnownFields fb_addHeaderLineDistinct Ɍ_dump v lowercased z"ServerResponse Z\o statusCode #headers pc #firstChunk V,Ȼ#enqueue JAE#bodyShouldBeNull :l writeHead 6#ensureHeaders b"9% singleChunk ZTIncomingMessageForServer F]!#req j httpVersion ~LZServer  gcrequestListener *Ֆ ServerImpl U8L#httpConnections f` #listener 7* #hasClosed Op#server P#ac J46#serveDeferred J listening K normalized zxU"_serve "&ac Nؓ1 createServer ⼩QIncomingMessage .w netConnect * tlsConnect  kMaybeDestroy  kUpdateTimer *:J/setStreamTimeout *+d-ext:deno_node/internal/stream_base_commons.ts kStreamBaseField Z]-ext:deno_node/internal_binding/stream_wrap.ts NxQERR_HTTP2_CONNECT_AUTHORITY zlERR_HTTP2_CONNECT_PATH ^fERR_HTTP2_CONNECT_SCHEME ERR_HTTP2_GOAWAY_SESSION 2#ERR_HTTP2_INVALID_PSEUDOHEADER "PERR_HTTP2_INVALID_SESSION &ERR_HTTP2_INVALID_STREAM ebERR_HTTP2_SESSION_ERROR CERR_HTTP2_STREAM_CANCEL ERR_HTTP2_STREAM_ERROR r|ERR_HTTP2_TRAILERS_ALREADY_SENT RVERR_HTTP2_TRAILERS_NOT_READY "MERR_HTTP2_UNSUPPORTED_PROTOCOL ҢERR_SOCKET_CLOSED 0#kSession Fsession  kAlpnProtocol F alpnProtocol mU kAuthority 斑 authority ]S kEncrypted fX encrypted BEkID ckInit ! kInfoHeaders :\-sent-info-headers SkOrigin nAkPendingRequestCalls 0 kProtocol 5k kSentHeaders ^ sent-headers nL kSentTrailers $J sent-trailers v)%kState ~=kType ";kTimeout Zz kDenoResponse FkDenoRid xkDenoClientRid fb kDenoConnRid rVkPollConnPromise LSTREAM_FLAGS_PENDING ~)STREAM_FLAGS_READY b4STREAM_FLAGS_CLOSED 6+STREAM_FLAGS_HEADERS_SENT F STREAM_FLAGS_HEAD_REQUEST rs-STREAM_FLAGS_ABORTED ޮ5STREAM_FLAGS_HAS_TRAILERS SESSION_FLAGS_PENDING oSESSION_FLAGS_READY ~hSESSION_FLAGS_CLOSED ySESSION_FLAGS_DESTROYED debugHttp2Enabled v谜 debugHttp2  Http2Session > originSet  connecting vT,bsetLocalWindowSize Vt _windowSize &&Eping J\_payload ;p}pendingSettingsAck rW localSettings SremoteSettings > _settings ◕goaway :Wo< lastStreamID :+M opaqueData Jxm! closeSession  Z+ emitClose B8gfinishSessionClose t5ServerHttp2Session xaltsvc  _alt :5_originOrStream v_origins 1assertValidPseudoHeader n[ClientHttp2Session Z\J#connectPromise Cf#refed D( socketOnError $ socketOnClose 6 connPromise fCconnRid_  ! clientRid ~{nconnRid n getAuthority fzK|ClientHttp2Stream 2aborter r onConnect NU| Http2Stream z̶#session J#controllerPromise fǢ#readerPromise *M^controllerPromise 1 readerPromise 'X setEncoding vresume >!žpause XendAfterHeaders rstCode ʂ sentHeaders VlOsentInfoHeaders z sentTrailers "J? sendTrailers B`clientHttp2Request sessionConnectPromise Ά pseudoHeaders 24W$#requestPromise Nڕ#responsePromise >utf8 @streamId sendInfoHeaders f< _onTimeout $\ callTimeout 2z headRequest ]_write F:_writev M_chunks LZ_final ڛ'shutdownWritable vLn trailerList S closeStream ֡}' sessionState Jk sessionCode >:[ kNoRstStream nameForErrorCode ja onStreamTrailers :kSubmitRstStream RkForceRstStream fPVrstStreamStatus 4finishCloseStream BServerHttp2Stream V] _deferred -O}#waitForTrailers  #headersSent  additionalHeaders  pushAllowed f" pushStream TVq respondWithFD ҥ_fd  respondWithFile  h! Http2Server =#options n'W#abortController v۩;controllerDeferred  _createSocket Zu clientHandle |updateSettings R& *Http2SecureServer 2"U*onRequestHandler &RcreateSecureServer _onRequestHandler tdNGHTTP2_ERR_FRAME_SIZE_ERROR F.NGHTTP2_NV_FLAG_NONE NGHTTP2_NV_FLAG_NO_INDEX NNGHTTP2_SESSION_SERVER NGHTTP2_SESSION_CLIENT Jo?NGHTTP2_STREAM_STATE_IDLE *QNGHTTP2_STREAM_STATE_OPEN bZ#NGHTTP2_STREAM_STATE_RESERVED_LOCAL ^g$NGHTTP2_STREAM_STATE_RESERVED_REMOTE +&NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL :o'NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE ,NGHTTP2_STREAM_STATE_CLOSED *ʭNGHTTP2_FLAG_NONE ,NGHTTP2_FLAG_END_STREAM R"NGHTTP2_FLAG_END_HEADERS UNGHTTP2_FLAG_ACK (1NGHTTP2_FLAG_PADDED NGHTTP2_FLAG_PRIORITY M1K"DEFAULT_SETTINGS_HEADER_TABLE_SIZE zDEFAULT_SETTINGS_ENABLE_PUSH J,g'DEFAULT_SETTINGS_MAX_CONCURRENT_STREAMS "˭2$DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE DDEFAULT_SETTINGS_MAX_FRAME_SIZE z{%DEFAULT_SETTINGS_MAX_HEADER_LIST_SIZE Z*(DEFAULT_SETTINGS_ENABLE_CONNECT_PROTOCOL p5 MAX_MAX_FRAME_SIZE z\MIN_MAX_FRAME_SIZE 8MAX_INITIAL_WINDOW_SIZE ʏ "NGHTTP2_SETTINGS_HEADER_TABLE_SIZE KXNGHTTP2_SETTINGS_ENABLE_PUSH ]'NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS PX$NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE mNGHTTP2_SETTINGS_MAX_FRAME_SIZE brf[%NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE .Qo(NGHTTP2_SETTINGS_ENABLE_CONNECT_PROTOCOL nhOPADDING_STRATEGY_NONE 6PADDING_STRATEGY_ALIGNED =KPADDING_STRATEGY_MAX LHgPADDING_STRATEGY_CALLBACK ^NGHTTP2_NO_ERROR NGHTTP2_PROTOCOL_ERROR ZTNGHTTP2_INTERNAL_ERROR BeNGHTTP2_FLOW_CONTROL_ERROR ¦NGHTTP2_SETTINGS_TIMEOUT :9NGHTTP2_STREAM_CLOSED l@ANGHTTP2_FRAME_SIZE_ERROR lbNGHTTP2_REFUSED_STREAM >NGHTTP2_CANCEL Z NGHTTP2_COMPRESSION_ERROR  dMNGHTTP2_CONNECT_ERROR {NGHTTP2_ENHANCE_YOUR_CALM ~ NGHTTP2_INADEQUATE_SECURITY XNGHTTP2_HTTP_1_1_REQUIRED A3NGHTTP2_DEFAULT_WEIGHT 5SHTTP2_HEADER_STATUS TI:status QHTTP2_HEADER_METHOD N4:method `DHTTP2_HEADER_AUTHORITY &⨩ :authority E HTTP2_HEADER_SCHEME fɜ:scheme gHTTP2_HEADER_PATH fx>:path ~@HTTP2_HEADER_PROTOCOL f7 :protocol BHTTP2_HEADER_ACCEPT_ENCODING Z5accept-encoding jHTTP2_HEADER_ACCEPT_LANGUAGE accept-language e+6HTTP2_HEADER_ACCEPT_RANGES ~T accept-ranges 9HTTP2_HEADER_ACCEPT a -HTTP2_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS vL{T access-control-allow-credentials *[)HTTP2_HEADER_ACCESS_CONTROL_ALLOW_HEADERS y3access-control-allow-headers 窎)HTTP2_HEADER_ACCESS_CONTROL_ALLOW_METHODS Saccess-control-allow-methods lN(HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN  access-control-allow-origin nh4*HTTP2_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS Y'yaccess-control-expose-headers vl+HTTP2_HEADER_ACCESS_CONTROL_REQUEST_HEADERS access-control-request-headers v4*HTTP2_HEADER_ACCESS_CONTROL_REQUEST_METHOD F#access-control-request-method HTTP2_HEADER_AGE Z<age dHTTP2_HEADER_AUTHORIZATION J1N authorization HHTTP2_HEADER_CACHE_CONTROL  cache-control *>HTTP2_HEADER_CONNECTION  HTTP2_HEADER_CONTENT_DISPOSITION 8 content-disposition XzHTTP2_HEADER_CONTENT_ENCODING HTTP2_HEADER_CONTENT_TYPE bSHTTP2_HEADER_COOKIE u'cookie HTTP2_HEADER_DATE bj{HTTP2_HEADER_ETAG Aetag j[܏HTTP2_HEADER_FORWARDED  forwarded zH\HTTP2_HEADER_HOST "HTTP2_HEADER_IF_MODIFIED_SINCE "if-modified-since HTTP2_HEADER_IF_NONE_MATCH ? if-none-match ZGjHTTP2_HEADER_IF_RANGE "if-range ­HTTP2_HEADER_LAST_MODIFIED } last-modified LHTTP2_HEADER_LINK ޏ UHTTP2_HEADER_LOCATION HTTP2_HEADER_RANGE &range .dHTTP2_HEADER_REFERER Ϭreferer Nk-HTTP2_HEADER_SERVER ~server aHTTP2_HEADER_SET_COOKIE M set-cookie Lu&HTTP2_HEADER_STRICT_TRANSPORT_SECURITY sstrict-transport-security HTTP2_HEADER_TRANSFER_ENCODING Stransfer-encoding DHTTP2_HEADER_TE te  &HTTP2_HEADER_UPGRADE_INSECURE_REQUESTS Wupgrade-insecure-requests .+HTTP2_HEADER_UPGRADE ,HHTTP2_HEADER_USER_AGENT Cw user-agent :<$HTTP2_HEADER_VARY ?Tvary 2f#HTTP2_HEADER_X_CONTENT_TYPE_OPTIONS F%sIx-content-type-options HTTP2_HEADER_X_FRAME_OPTIONS Ox-frame-options \HTTP2_HEADER_KEEP_ALIVE JY keep-alive :"dHTTP2_HEADER_PROXY_CONNECTION ң5proxy-connection FWnHTTP2_HEADER_X_XSS_PROTECTION [x-xss-protection &|5HTTP2_HEADER_ALT_SVC Vsalt-svc u$HTTP2_HEADER_CONTENT_SECURITY_POLICY Jcontent-security-policy b8HTTP2_HEADER_EARLY_DATA G early-data FۓHTTP2_HEADER_EXPECT_CT *Kq expect-ct ~Im HTTP2_HEADER_ORIGIN eQfHTTP2_HEADER_PURPOSE v}purpose BF HTTP2_HEADER_TIMING_ALLOW_ORIGIN ̲timing-allow-origin HTTP2_HEADER_X_FORWARDED_FOR  Unx-forwarded-for WS;HTTP2_HEADER_PRIORITY ZRHTTP2_HEADER_ACCEPT_CHARSET {accept-charset I?#HTTP2_HEADER_ACCESS_CONTROL_MAX_AGE (zaccess-control-max-age 1IHTTP2_HEADER_ALLOW Jpallow >HTTP2_HEADER_CONTENT_LANGUAGE "HTTP2_HEADER_CONTENT_LOCATION RHTTP2_HEADER_CONTENT_MD5 _N content-md5 b{HTTP2_HEADER_CONTENT_RANGE r content-range bJHTTP2_HEADER_DNT "2dnt J HTTP2_HEADER_EXPECT rexpect MFHTTP2_HEADER_EXPIRES 9expires FHTTP2_HEADER_FROM Z<HTTP2_HEADER_IF_MATCH Qif-match B HTTP2_HEADER_IF_UNMODIFIED_SINCE C{if-unmodified-since ZeiHTTP2_HEADER_MAX_FORWARDS .,5 max-forwards HTTP2_HEADER_PREFER prefer FFHTTP2_HEADER_PROXY_AUTHENTICATE 6proxy-authenticate ~ HTTP2_HEADER_PROXY_AUTHORIZATION Ʋ?proxy-authorization +HTTP2_HEADER_REFRESH bUrefresh b=HTTP2_HEADER_RETRY_AFTER vt retry-after IHTTP2_HEADER_TRAILER ,HTTP2_HEADER_TK Itk "`yHTTP2_HEADER_VIA 6=via  x3HTTP2_HEADER_WARNING o[warning e"HTTP2_HEADER_WWW_AUTHENTICATE www-authenticate z/HTTP2_HEADER_HTTP2_SETTINGS ~Thttp2-settings mHTTP2_METHOD_ACL FHTTP2_METHOD_BASELINE_CONTROL 6iBASELINE-CONTROL LHTTP2_METHOD_BIND - HTTP2_METHOD_CHECKIN {CHECKIN :LHTTP2_METHOD_CHECKOUT HTTP2_METHOD_CONNECT -HTTP2_METHOD_COPY aHTTP2_METHOD_DELETE j\HTTP2_METHOD_GET HTTP2_METHOD_HEAD n. HTTP2_METHOD_LABEL ;hLABEL #HTTP2_METHOD_LINK HTTP2_METHOD_LOCK (HTTP2_METHOD_MERGE "ɊHTTP2_METHOD_MKACTIVITY ^4HTTP2_METHOD_MKCALENDAR BHHTTP2_METHOD_MKCOL HTTP2_METHOD_MKREDIRECTREF  MKREDIRECTREF fOHTTP2_METHOD_MKWORKSPACE * MKWORKSPACE <HTTP2_METHOD_MOVE SHTTP2_METHOD_OPTIONS F$HTTP2_METHOD_ORDERPATCH  ORDERPATCH jhHTTP2_METHOD_PATCH  HTTP2_METHOD_POST zHTTP2_METHOD_PRI PRI HTTP2_METHOD_PROPFIND pJHTTP2_METHOD_PROPPATCH iHTTP2_METHOD_PUT 2VHTTP2_METHOD_REBIND HTTP2_METHOD_REPORT n%HTTP2_METHOD_SEARCH N/JHTTP2_METHOD_TRACE FHTTP2_METHOD_UNBIND zHTTP2_METHOD_UNCHECKOUT *q UNCHECKOUT : HTTP2_METHOD_UNLINK :HTTP2_METHOD_UNLOCK َHTTP2_METHOD_UPDATE >sUPDATE RIHTTP2_METHOD_UPDATEREDIRECTREF yUPDATEREDIRECTREF ^HTTP2_METHOD_VERSION_CONTROL *0ےVERSION-CONTROL .HTTP_STATUS_CONTINUE  'HTTP_STATUS_SWITCHING_PROTOCOLS v@HTTP_STATUS_PROCESSING HTTP_STATUS_EARLY_HINTS l7HTTP_STATUS_OK  RHTTP_STATUS_CREATED WHTTP_STATUS_ACCEPTED NR{)HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION z'(HTTP_STATUS_NO_CONTENT :HTTP_STATUS_RESET_CONTENT NHTTP_STATUS_PARTIAL_CONTENT JHTTP_STATUS_MULTI_STATUS KqHTTP_STATUS_ALREADY_REPORTED SHTTP_STATUS_IM_USED r"m5HTTP_STATUS_MULTIPLE_CHOICES .bQHTTP_STATUS_MOVED_PERMANENTLY *HHTTP_STATUS_FOUND ^HTTP_STATUS_SEE_OTHER .0zHTTP_STATUS_NOT_MODIFIED *nHTTP_STATUS_USE_PROXY THTTP_STATUS_TEMPORARY_REDIRECT Z$0HTTP_STATUS_PERMANENT_REDIRECT R HTTP_STATUS_BAD_REQUEST  vHTTP_STATUS_UNAUTHORIZED j[-HTTP_STATUS_PAYMENT_REQUIRED ƓHTTP_STATUS_FORBIDDEN 6HTTP_STATUS_NOT_FOUND ލYHTTP_STATUS_METHOD_NOT_ALLOWED HTTP_STATUS_NOT_ACCEPTABLE X)HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED KHTTP_STATUS_REQUEST_TIMEOUT J&HTTP_STATUS_CONFLICT KHTTP_STATUS_GONE ғvHTTP_STATUS_LENGTH_REQUIRED ^bHTTP_STATUS_PRECONDITION_FAILED HTTP_STATUS_PAYLOAD_TOO_LARGE 2HTTP_STATUS_URI_TOO_LONG 倫"HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE D6!HTTP_STATUS_RANGE_NOT_SATISFIABLE C HTTP_STATUS_EXPECTATION_FAILED HTTP_STATUS_TEAPOT HTTP_STATUS_MISDIRECTED_REQUEST F! HTTP_STATUS_UNPROCESSABLE_ENTITY n$HTTP_STATUS_LOCKED C_|HTTP_STATUS_FAILED_DEPENDENCY HTTP_STATUS_TOO_EARLY HTTP_STATUS_UPGRADE_REQUIRED F!HTTP_STATUS_PRECONDITION_REQUIRED B)HTTP_STATUS_TOO_MANY_REQUESTS +HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE *)HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS t?!HTTP_STATUS_INTERNAL_SERVER_ERROR 8HTTP_STATUS_NOT_IMPLEMENTED NHTTP_STATUS_BAD_GATEWAY R{hHTTP_STATUS_SERVICE_UNAVAILABLE  HTTP_STATUS_GATEWAY_TIMEOUT (&HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED >`#HTTP_STATUS_VARIANT_ALSO_NEGOTIATES :bU HTTP_STATUS_INSUFFICIENT_STORAGE B9Z4HTTP_STATUS_LOOP_DETECTED sE $HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED Z.HTTP_STATUS_NOT_EXTENDED =+HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED ,W!getDefaultSettings *getPackedSettings ZgetUnpackedSettings >w_buffer  VsensitiveHeaders "nodejs.http2.sensitiveHeaders VEIHttp2ServerRequest j]complete &K rawTrailers Http2ServerResponse :+createPushResponse C writeContinue zywriteEarlyHints ZO_hints 3 _statusCode Ƅ_statusMessage  HttpAgent * HttpServer C_additionalServeOptions 6] _encrypted  scheduling lifo ޝlHttpsClientRequest ^https: 6H certFilename r]:caCert f4connectionSymbol NʾconnectionProperty );messageCallbacksSymbol 26+(messageCallbacks :Z nextIdSymbol onMessageSymbol ySession ʰconnectToMainThread r=_params pF_port RU__host r5w_wait &P+waitForDebugger Vmext:deno_node/_util/asserts.ts eext:deno_node/_util/os.ts ERR_UNKNOWN_SIGNAL TcodeMap 6n#L$ext:deno_node/internal_binding/uv.ts IzgetValidatedPath I mapValues  Crecord o mappedValue stdio  exitCode ,pid U signalCode n2 spawnargs  spawnfile (G#process #spawned Į withResolvers ̐shell q&windowsVerbatimArguments .normalizedStdio :H9normalizeStdioOption @_channel bɢ&cmdArgs F( buildCommand 6ipc Bo stringEnv V toDenoStdio onAbortListener  pdpipeFd 2#_waitForChildStreamsToClose >l #closePipes  ˀ #_handleError & denoSignal  toDenoSignal 6 alreadyClosed bwaitForStreamToClose 0waitForReadableToClose e }supportedNodeStdioTypes ֋Wignore 22inherit DƍcopyProcessEnvToEnv N optionEnv Fo\^(?:.*\\)?cmd(?:\.exe)?$ 6)EenvPairs .KnenvKeys n#sawKey  uppercaseKey υ toDenoArgs  I_createSpawnSyncError  oMparseSpawnSyncOutputStreams 0_stdin_ stdout_ h~stderr_ B4>w kLongArgType rt kShortArgType הokLongArg *, kShortArg V}#v kNodeFlagsMap JZ--build-snapshot Z0-c --check  -C : --conditions # --cpu-prof-dir A--cpu-prof-interval --cpu-prof-name n`3--diagnostic-dir "r--disable-proto ^--dns-result-order J"-e =Qinstall HIlint &2lsp 0rmtasks ΓS uninstall B`GidenoArgs  useRunArgs ՉflagInfo bisLongWithValue pd flagValue s splitAt 3readLoop (@ handleMessage ⊞bexportChallenge ڽ_spkac ڬ8exportPublicKey n , verifySpkac v$ validateInt32 'HgetArrayBufferOrView ZYgetDefaultEncoding afisStringOrBuffer JɶeNO_TAG  toU8 -Ϫ#cache #needsBlockCache Rr#authTag BlockModeCache n CmaybeTag A getAuthTag GvsetAAD VsetAutoPadding  _autoPadding b߲update  inputEncoding NMU*outputEncoding 6#lastChunkIsNonZero ^lastChunkIsNotZero E˄ setAuthTag  nameOrNid i5 keyLength :PivLength bS prepareKey ּERR_CRYPTO_UNKNOWN_DH_GROUP D! NodeError S ellipticCurves  toBuf fW' DH_GENERATOR E verifyError o#prime vl #primeLength  #generator  #privateKey ҇8p #publicKey Rc genEncoding L#checkGenerator :|) computeSecret otherPublicKey ʌ sharedSecret fu generateKeys sM getGenerator ogetPrime ze@ getPrivateKey  getPublicKey }3 setPrivateKey bU setPublicKey ~;DH_GROUP_NAMES Zwmodp5 modp14 :modp15 2EEmmodp16 modp17 bYmodp18 nX DH_GROUPS Iprime 6A/#diffiehellman .#curve :Uh#privbuf F,C.#pubbuf b| convertKey _key fM _curve -@_inputEncoding 2n_outputEncoding A}_format + secretBuf TvencodeToBase64 encodeToBase64Url |ugetKeyMaterial R6prepareSecretKey V t unwrapErr *m coerceToBytes Ro)expected data to be string | BufferSource "XHmacImpl |#ipad n)#opad ^T#ZEROES falloc ֶfY #algorithm #hash n^(u8Key K blockSize nkeySize ޟCbufKey ˯ERR_CRYPTO_INVALID_DIGEST validateByteSource TP isKeyObject yvalidateParameters b%must not contain more than 1024 bytes okm H8IkAesKeyLengths fe4HSecretKeyObject 6l setOwnedKey βGERR_INCOMPATIBLE_OPTION_PAIR zmERR_MISSING_OPTION v=validateBuffer WvalidateUint32 g"vvalidateGenerateKey r createJob NӉkAsync publicKeyEncoding privateKeyEncoding kSync .mgf1Hash  C$mgf1HashAlgorithm :z\r divisorLength _. paramEncoding jD primeLength  kKeyObject _*ext:deno_node/internal/crypto/constants.ts ^"ERR_CRYPTO_INVALID_KEY_OBJECT_TYPE :a isCryptoKey  isCryptoKey_ jDV isKeyObject_ AEkKeyType  ~&ext:deno_node/internal/crypto/_keys.ts symmetricKeySize %otherKeyObject }export tprepareAsymmetricKey .ILdetails 1PrivateKeyObject  getKeyTypes M9allowKeyObject < bufferOnly basymmetricKeyType RkAsymmetricKeyType bqkAsymmetricKeyDetails  KAsymmetricKeyObject jVasymmetricKeyDetails *tG MAX_ALLOC keylen MgADK .V-ext:deno_node/internal/crypto/_randomBytes.ts -ext:deno_node/internal/crypto/_randomFill.mjs έi+ext:deno_node/internal/crypto/_randomInt.ts j candidate 6^validateRandomPrimeJob Q"marrayBufferToUnsignedBigInt h#rem .?XunsignedBigIntToBuffer >`HnumberToHexCharCode eGhex z1padded &t!fixOpts 2 5maxmem *]cost Bparallelization ff$blen gERR_CRYPTO_SIGN_KEY_REQUIRED r1kSignImpl 6X #digestType %m VerifyImpl 6Y keyFormat S secp256k1 "e sprivateKeySize < publicKeySize tsharedSecretSize ֺQr prime256v1 Wf secp256r1 r secp384r1 l secp224r1 N<supportedCiphers } aes-128-ecb Ȁ aes-192-ecb 4 aes-256-ecb ? aes-128-cbc &k aes-192-cbc bo aes-256-cbc Xaes128 nBaes192  aes256 ִ aes-128-cfb Į aes-192-cfb ‘ aes-256-cfb  aes-128-cfb8 Gu aes-192-cfb8 \ aes-256-cfb8 *l\ aes-128-cfb1  aes-192-cfb1 *m aes-256-cfb1 ڵ1F aes-128-ofb Y9 aes-192-ofb s< aes-256-ofb B] aes-128-ctr vM0h aes-192-ctr j5X aes-256-ctr  aes-128-gcm . l aes-192-gcm  6y aes-256-gcm defaultEncoding lsetDefaultEncoding  curveNames z_engine _flags ƭca m checkEmail ӿemail n4 checkHost J\checkIP }^_ip  >& checkIssued J{ _otherCert \checkPrivateKey  _privateKey ] fingerprint :fingerprint256 8fingerprint512  infoAccess 2d&issuer  dissuerCertificate brkeyUsage r serialNumber :j subject JvsubjectAltName toLegacyObject VB validFrom ?validTo u _publicKey eF defaultLookup J@ERR_SOCKET_BAD_TYPE pUDP 64Y/lookup4 jplookup6 '_createSocketHandle H addressType HCcreateLookupPromise createResolverPromise |#ucodes V< %ext:deno_node/internal/error_codes.ts "mapSysErrnoToUvErrno rr+ext:deno_node/internal/hide_stack_frames.ts 2v kIsNodeError 2$^([A-Z][a-z0-9]*)+$ nUkTypes CImaxStackErrorName EmaxStackErrorMessage ÕisStackOverflowError  overflowStack X}addNumericalSeparator n+captureLargerStackTrace ^ZhuvExceptionWithHostPort "!syscall ,"uvmsg :@_Y uvErrmapGet  uvUnmappedError |SUNKNOWN nOQ unknown error - uvException p additional J(NodeErrorAbstraction DNodeSyntaxError NodeRangeError nD) NodeTypeError  NodeURIError LNodeSystemError  msgPrefix makeSystemErrorWithCode !msgPrfix  ERR_FS_EISDIR 2F_Path is a directory ucreateInvalidArgType z instances Yxlast LERR_INVALID_ARG_TYPE_RANGE qinvalidArgTypeHelper >ERR_INVALID_ARG_VALUE_RANGE >V? inspected replaceDefaultBoolean ʩr ERR_ARG_NOT_ITERABLE Zu ERR_ASSERTION .iERR_ASYNC_CALLBACK RUERR_ASYNC_TYPE ~ERR_BROTLI_INVALID_PARAM jIERR_BUFFER_TOO_LARGE ^=ERR_CANNOT_WATCH_SIGINT FYoERR_CHILD_CLOSED_BEFORE_REPLY ]ERR_CONSOLE_WRITABLE_STREAM JERR_CONTEXT_NOT_INITIALIZED  ERR_CPU_USAGE >&ERR_CRYPTO_CUSTOM_ENGINE_NOT_SUPPORTED ԀERR_CRYPTO_ECDH_INVALID_FORMAT /SC"ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY ͋ERR_CRYPTO_ENGINE_UNKNOWN i1ERR_CRYPTO_FIPS_UNAVAILABLE sERR_CRYPTO_HASH_FINALIZED n<ERR_CRYPTO_HASH_UPDATE_FAILED :ȬERR_CRYPTO_INCOMPATIBLE_KEY 6#ERR_CRYPTO_INCOMPATIBLE_KEY_OPTIONS &k1ERR_CRYPTO_INVALID_STATE )2mERR_CRYPTO_PBKDF2_ERROR n#ERR_CRYPTO_SCRYPT_INVALID_PARAMETER ^tERR_CRYPTO_SCRYPT_NOT_SUPPORTED Y3ERR_DIR_CLOSED YERR_DIR_CONCURRENT_OPERATION  ERR_DNS_SET_SERVERS_FAILED n!ERR_DOMAIN_CALLBACK_NOT_AVAILABLE xU0ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE bu!ERR_ENCODING_INVALID_ENCODED_DATA ERR_ENCODING_NOT_SUPPORTED bKERR_EVAL_ESM_CANNOT_PRINT QERR_EVENT_RECURSION J#ERR_FEATURE_UNAVAILABLE_ON_PLATFORM jӦERR_FS_FILE_TOO_LARGE "ERR_FS_INVALID_SYMLINK_TYPE >6ERR_HTTP2_ALTSVC_INVALID_ORIGIN QLERR_HTTP2_ALTSVC_LENGTH 2 ERR_HTTP2_NO_SOCKET_MANIPULATION HERR_HTTP2_ORIGIN_LENGTH ERR_HTTP2_OUT_OF_STREAMS ERR_HTTP2_PAYLOAD_FORBIDDEN ^KDERR_HTTP2_PING_CANCEL E ERR_HTTP2_PING_LENGTH og"ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED ^oERR_HTTP2_PUSH_DISABLED zERR_HTTP2_SEND_FILE CERR_HTTP2_SEND_FILE_NOSEEK /ERR_HTTP2_SETTINGS_CANCEL EERR_HTTP2_SOCKET_BOUND I;ERR_HTTP2_SOCKET_UNBOUND (WERR_HTTP2_STATUS_101 NXERR_HTTP2_STATUS_INVALID ; ERR_HTTP2_STREAM_SELF_DEPENDENCY *ERR_HTTP_INVALID_STATUS_CODE pERR_HTTP_SOCKET_ENCODING SERR_INPUT_TYPE_NOT_ALLOWED vGERR_INSPECTOR_ALREADY_ACTIVATED FERR_INSPECTOR_ALREADY_CONNECTED _)"ERR_INSPECTOR_CLOSED YERR_INSPECTOR_COMMAND ERR_INSPECTOR_NOT_ACTIVE zioERR_INSPECTOR_NOT_AVAILABLE :6<ERR_INSPECTOR_NOT_CONNECTED VERR_INSPECTOR_NOT_WORKER fERR_INVALID_ASYNC_ID bERR_INVALID_BUFFER_SIZE ERR_INVALID_CURSOR_POS (ERR_INVALID_FD hERR_INVALID_FILE_URL_HOST :ERR_INVALID_FILE_URL_PATH @ERR_INVALID_HANDLE_TYPE toERR_INVALID_IP_ADDRESS VERR_INVALID_OPT_VALUE_ENCODING rERR_INVALID_PERFORMANCE_MARK &ERR_INVALID_REPL_EVAL_CONFIG VERR_INVALID_REPL_INPUT wERR_INVALID_SYNC_FORK_INPUT oWERR_INVALID_THIS sERR_INVALID_TUPLE b)ERR_INVALID_URI oERR_IPC_CHANNEL_CLOSED ① ERR_IPC_DISCONNECTED JIERR_IPC_ONE_PIPE yERR_IPC_SYNC_FORK IERR_MANIFEST_DEPENDENCY_MISSING &)#9ERR_MANIFEST_INTEGRITY_MISMATCH #ERR_MANIFEST_INVALID_RESOURCE_FIELD fERR_MANIFEST_TDZ >AERR_MANIFEST_UNKNOWN_ONERROR ީuERR_MULTIPLE_CALLBACK ڮERR_NAPI_CONS_FUNCTION ERR_NAPI_INVALID_DATAVIEW_ARGS %ERR_NAPI_INVALID_TYPEDARRAY_ALIGNMENT zsC["ERR_NAPI_INVALID_TYPEDARRAY_LENGTH K ERR_NO_CRYPTO fR ERR_NO_ICU 7ERR_QUICCLIENTSESSION_FAILED x&ERR_QUICCLIENTSESSION_FAILED_SETSOCKET bTERR_QUICSESSION_DESTROYED CeERR_QUICSESSION_INVALID_DCID ERR_QUICSESSION_UPDATEKEY ERR_QUICSOCKET_DESTROYED bY4ERR_QUICSOCKET_INVALID_STATELESS_RESET_SECRET_LENGTH ERR_QUICSOCKET_LISTENING &WERR_QUICSOCKET_UNBOUND ~E 'ERR_QUICSTREAM_DESTROYED nWERR_QUICSTREAM_INVALID_PUSH V JERR_QUICSTREAM_OPEN_FAILED .ERR_QUICSTREAM_UNSUPPORTED_PUSH pERR_QUIC_TLS13_REQUIRED H ERR_SCRIPT_EXECUTION_INTERRUPTED *ERR_SERVER_ALREADY_LISTEN ERR_SOCKET_BAD_PORT nhg allowZero ϗ6 ERR_SRI_PARSE ^nERR_STREAM_ALREADY_FINISHED v+ERR_STREAM_DESTROYED ҦEERR_STREAM_PREMATURE_CLOSE ERR_STREAM_PUSH_AFTER_EOF "ERR_STREAM_UNSHIFT_AFTER_END_EVENT 5ERR_STREAM_WRAP 30ERR_STREAM_WRITE_AFTER_END e ERR_SYNTHETIC PERR_TLS_CERT_ALTNAME_INVALID vERR_TLS_DH_PARAM_SIZE Z/ERR_TLS_HANDSHAKE_TIMEOUT vERR_TLS_INVALID_CONTEXT sERR_TLS_INVALID_STATE 禋 ERR_TLS_INVALID_PROTOCOL_VERSION "Σ!ERR_TLS_PROTOCOL_VERSION_CONFLICT ~$ prevProtocol gMERR_TLS_RENEGOTIATION_DISABLED l=ERR_TLS_REQUIRED_SERVER_NAME O?ERR_TLS_SESSION_ATTACK ¥"(ERR_TLS_SNI_FROM_SERVER {iZ"ERR_TRACE_EVENTS_CATEGORY_REQUIRED z]ERR_TRACE_EVENTS_UNAVAILABLE R˙ERR_UNAVAILABLE_DURING_EXIT *ERR_UNCAUGHT_EXCEPTION_CAPTURE_ALREADY_SET ^x9ERR_UNHANDLED_ERROR cERR_UNKNOWN_BUILTIN_MODULE BERR_UNKNOWN_CREDENTIAL ERR_UNKNOWN_ENCODING 2ҀERR_UNKNOWN_FILE_EXTENSION ƽj ERR_UNKNOWN_MODULE_FORMAT  1CERR_UNSUPPORTED_DIR_IMPORT 0ERR_UNSUPPORTED_ESM_URL_SCHEME ERR_USE_AFTER_CLOSE ERR_V8BREAKITERATOR ' ERR_VALID_PERFORMANCE_ENTRY_TYPE ްN&ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING fERR_VM_MODULE_ALREADY_LINKED 'ERR_VM_MODULE_CANNOT_CREATE_CACHED_DATA  SERR_VM_MODULE_DIFFERENT_CONTEXT  ERR_VM_MODULE_LINKING_ERRORED J9ERR_VM_MODULE_NOT_MODULE  ERR_VM_MODULE_STATUS %ERR_WASI_ALREADY_STARTED fERR_WORKER_INIT_FAILED KnERR_WORKER_NOT_RUNNING څGERR_WORKER_OUT_OF_MEMORY +ERR_WORKER_UNSERIALIZABLE_ERROR  ERR_WORKER_UNSUPPORTED_EXTENSION N_ ERR_WORKER_UNSUPPORTED_OPERATION kERR_ZLIB_INITIALIZATION_FAILED ERR_FALSY_VALUE_REJECTION nERR_HTTP2_INVALID_SETTING_VALUE nERR_INVALID_ADDRESS_FAMILY œLERR_INVALID_OPT_VALUE bERR_INVALID_RETURN_PROPERTY `՟buildReturnPropertyType O|!ERR_INVALID_RETURN_PROPERTY_VALUE ꐹsdetermineSpecificType ªrERR_INVALID_URL ntERR_INVALID_URL_SCHEME J3ERR_INVALID_PACKAGE_CONFIG *jERR_INVALID_PACKAGE_TARGET ҙisImport  relError J$! displayJoin bdERR_PACKAGE_IMPORT_NOT_DEFINED t packagePath U@ERR_PACKAGE_PATH_NOT_EXPORTED gsubpath eL#ERR_PARSE_ARGS_INVALID_OPTION_VALUE n"$ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL >ǿERR_PARSE_ARGS_UNKNOWN_OPTION option  ~allowPositionals 6:suggestDashDash oERR_INTERNAL_ASSERTION &suffix FxERR_FS_RMDIR_ENOTDIR FaERR_OS_NO_HOMEDIR  adenoErrorToNodeError 1$extractOsErrorNumberFromErrorMessage i\(os error (\d+)\) EL(aggregateTwoErrors ҋ\} innerError ( outerError EerrorProperties ~w emitWarning bP|WebEvent :WebEventTarget F*customInspectSymbol 8 kEnumerableProperty "skIsEventTarget nodejs.event_target akIsNodeEventTarget kMaxEventTargetListeners kMaxEventTargetListenersWarned kEvents kIsBeingDispatched ^-NkStop J`kTarget  kHandlers JБ khandlers  kWeakHandler :JkHybridDispatch nodejs.internal.kHybridDispatch @ kCreateEvent < kNewListener Z kRemoveListener  kIsNodeStyleListener & kTrustEvent ߦkDetail nS&kDefaultPrevented 6͠ kCancelable օ kTimestamp ~ timestamp wkBubbles n W kComposed jkPropagationStopped propagationStopped QisEvent {X isCustomEvent zNodeCustomEvent >wAweakListenersState jobjectToWeakListenerMap ~mv weakListeners 2?*previous \UUisNodeStyleListener ֺweak <same ' myListener ʐFinitEventTarget z/. _listener G]_once x_capture ?y_passive ~[_weak " isEventTarget TvalidateEventListenerOptions •gshouldAddListener Troot  nodeValue ]y createEvent (addCatch GemitUncaughtException TZinitNodeEventTarget ZNodeEventTarget "O isNodeEventTarget QgetMaxListeners ⿊ eventNames ߒoff tremoveListener :) addListener ~1emit fw hadListeners pAremoveAllListeners JDmakeEventHandler ʦ eventHandler E EventEmitterMixin  Superclass `sMixedEventEmitter ;isBigUint64Array toPathIfFileURL l pathModule ܕkStats (stats n[S_IFBLK UIS_IFCHR >r~S_IFDIR >S_IFIFO S_IFLNK f}TS_IFMT JS_IFREG ^/S_IFSOCK ieUV_FS_SYMLINK_DIR ʖUV_FS_SYMLINK_JUNCTION PvUV_DIRENT_UNKNOWN NIUV_DIRENT_FILE [ UV_DIRENT_DIR qUV_DIRENT_LINK fLUV_DIRENT_FIFO ʱeUV_DIRENT_SOCKET /JUV_DIRENT_CHAR j\UV_DIRENT_BLOCK ?EkMinimumAccessMode MkMaximumAccessMode FkDefaultCopyMode B#kMinimumCopyMode }kMaximumCopyMode 1X kIoMaxLength ?,kReadFileUnknownBufferLength %~kReadFileBufferLength {kWriteFileMaxChunkSize e kMaxUserId RassertEncoding 4isCharacterDevice "1bisSymbolicLink <isFIFO ^QDirentFromStats Z9 copyObject l bufferSep $'i pathBuffer  getDirents Z>names 7ttoFinish !n getDirent 2* getOptions ,defaultOptions handleErrorFromBinding  nullCheck propName #G throwError we pathIsString fK5pathIsUint8Array 2 1must be a string or Uint8Array without null bytes 2apreprocessSymlinkDestination  linkPath > StatsBase IqkNsPerMsBigInt q kNsPerSecBigInt W kMsPerSec Z>kNsPerMs :ԈmsFromTimeSpec awsec znsec b nsFromTimeSpecBigInt ʰWH dateFromMs 6J|R BigIntStats }atimeNs YmtimeNs 2ctimeNs  birthtimeNs >1t_checkModeProperty  P6property LOatimeMs RmtimeMs ±MctimeMs W birthtimeMs cgetStatsFromBinding "{ stringToFlags (#XstringToSymlinkType gjunction toUnixTimestamp ZJ)validateOffsetLengthRead  R bufferLength Zb>= 0 ֲ=<= *+validateOffsetLengthWrite JVv validatePath jhA fileURLOrPath "getValidatedFd  ހvalidateBufferArray &l ArrayBufferView[] 09VnonPortableTemplateWarn 1warnOnNonPortableTemplate ddtemplate fJ defaultCpOptions . dereference  errorOnExist b--force preserveTimestamps ΍ڡdefaultRmOptions jEGM retryDelay  maxRetries ~defaultRmdirOptions 6{validateCpOptions 4ͧoptions.dereference "W?Woptions.errorOnExist  options.force F8(options.preserveTimestamps roptions.recursive 2_ options.filter tvalidateRmOptions . expectDir nQ&KvalidateRmdirOptions ~pis a directory ڵhNvalidateRmOptionsSync JmBthrowIfNoEntry lrecursiveRmdirWarned ) noDeprecation z2YemitRecursiveRmdirWarning LMdefaults b!options.retryDelay ~ options.maxRetries RB getValidMode nU?def Zan integer >= Ke && <= R"validateStringAfterArrayBufferView validatePosition v>= &realpathCacheKey rը3showStringCoercionDeprecation v\%FImplicit coercion of objects with own toString property is deprecated. >(1DEP0162 wsetUnrefTimeout  utcCache NU resetCache vIemitStatistics V؂ _statistics n1\kUTF16SurrogateThreshold >FkEscape ;ckSubstringSearch &Ystrings kClearToLineBeginning [1K OkClearToLineEnd ^L[0K ~ kClearLine p[2K [0J fDcharLengthLeft pa charLengthAt ~|wRemitKeys n66ch b$escaped 6*lmodifier OcmdStart ڻ^(\d\d?)(;(\d))?([~^$])$ 皢^((\d;)?(\d))?([A-Za-z])$ "b ^[0-9A-Za-z]$ 6^[A-Z]$ N | commonPrefix Bt/?eos Z{0ext:deno_node/internal/streams/end-of-stream.mjs XpisStream ȚaddAbortSignalNoValidate » BufferList nk hasStrings y _getString : _getBuffer _{retLen ^ LazyTransform JG makeGetter Od makeSetter _readableState z_writableState t objectMode og getBinding BB%ext:deno_node/internal_binding/mod.ts  internalBinding E3 clearTimeout_ mv setInterval_ ́ setTimeout_  TIMEOUT_MAX h|~kTimerId "U03kRefed Ƅwrefed z? createTimer [Timeout !)isRepeat :IisRefed z AhasRef zrnormalizeEncoding RĀ slowCases ,-ext:deno_node/internal/normalize_encoding.mjs j2Bfcalled &}rej kCustomPromisifiedSymbol 2Onodejs.util.promisify.custom vkCustomPromisifyArgsSymbol L nodejs.util.promisify.customArgs  =o argumentNames 6+signalsToNamesMapping  YgetSignalsToNamesMapping _ signalName .inspectDefaultOptions A-8optKeys ohasBuiltInToString  proxyTarget &:HfirstErrorLine bNx9CIRCULAR_ERROR_MESSAGE Vl1 tryStringify  circularError ~:formatWithOptionsInternal UOXformatWithOptions §,formatNumberNoColor ReNformatBigIntNoColor tempStr %:*lastPos nextChar Q5tempArg *ilgtempNum  tempInteger q/ tempFloat JGCisIPv4 isIPv6 j0normalizedArgsSymbol *# newAsyncId C|kAfterAsyncWrite J_kBuffer z kBufferCb z/ kBufferGen j onStreamRead  writeGeneric µ writevGeneric  WDTRACE_NET_SERVER_CONNECTION DTRACE_NET_STREAM_END E ext:deno_node/internal/dtrace.ts N5 TCPConstants 67TCPConnectWrap 3(J PipeConstants NMPipe 8TPipeConnectWrap ގ+ext:deno_node/internal_binding/pipe_wrap.ts w[ ShutdownWrap z dnsLookup *( kLastWriteQueueSize BlastWriteQueueSize ʕq kSetNoDelay  Y kBytesRead &+t kBytesWritten ~6DEFAULT_IPV4_ADDR Ġ0.0.0.0 DEFAULT_IPV6_ADDR zf&:: Z#3_getNewAsyncId N?_noop ƥ" _arrayBuffer VE_nread knetClientSocketChannel f4net.client.socket nEnetServerSocketChannel .1net.server.socket ~? _toNumber V- _isPipeName  _createHandle }AisServer zsarr l_isConnectionListener 2_isTCPConnectWrap 55 _afterConnect i_checkBindError A_isPipe Vgv_connectErrorNT "userBuf |bufGen Z_lookupAndConnect  1dnsOpts ~O emitLookup * _afterShutdown JI _emitCloseNT 0< _peername y _sockname ! _pendingData N_pendingEncoding 򫗦_parent *8Vonread Þ,newValue jK> initialDelay writableBuffer "iSel c localFamily !C remoteFamily έf remotePort ]s destroySoon Q _unrefTimer }SwriteQueueSize %P isException VI7 _getpeername z# _getsockname ֱY _writeGeneric Vos _connecting ʇ_bytesDispatched 27_isServerSocketOptions xconnectionListener O _getFlags N{ipv6Only a_listenInCluster backlog 㻲_lookupAndListen R%#doListen "^'w_addAbortSignalOption V _createServerHandle gisTCP ɸ _emitErrorNT 6,_emitListeningNT b%8 _onconnection 62_setupListenHandle &rval ^`G allowHalfOpen g{pauseOnConnect j _connections f _usingWorkers F_workers _unref  _pipeName Xo_connectionKey ҧ backlogFromArgs MnpipeName ¼ onWorkerClose fgetConnections v connections oncount B% _listen2 Np͕_emitCloseIfDrained F _setupWorker  socketList >; sock >validateIntegerRange j6 ~osType &osUptime Kext:runtime/30_os.js z#availableParallelism : endianness ֶXfreemem 6Qhomedir «platform release e&Bversion eftotalmem uptime 3machine ~cpus  ] getPriority loadavg HϐnetworkInterfaces oW interfaces *netmask ~mac bscopeid O1cidr ~networkAddress  isIPv4LoopbackAddr ~isIPv6LoopbackAddr ` setPriority BNtmpdir v"vtemp : (?SEOL ȠdevNull Bc\\.\nul #[& /dev/null nxext:deno_node/path/mod.ts Rubasename  delimiter B+Vextname Zm2relative f0>toNamespacedPath  ]posix ܗwin32 MshimPerformance nJ5vext:deno_web/15_performance.js R !PerformanceObserver :EeventLoopUtilization H|%eventLoopUtilization from performance z startMark f\ nodeTiming ξtimerify  Rtimerify from performance _^markResourceTiming *jmonitorEventLoopDelay ZC^&monitorEventLoopDelay from performance ucs2 `?ext:deno_node/internal/idna.ts *n toUnicode Rlreport RX(ext:deno_node/internal/process/report.ts j*arch_ w _nextTick n7eversions 673!ext:deno_node/_process/process.ts @&_exiting V!ext:deno_node/_process/exiting.ts ڀucreateWritableStdioStream V initStdin 75"ext:deno_node/_process/streams.mjs B~ienableNextTick nprocessTicksAndRejections Ft runNextTicks BԹio mCommand ~<ext:runtime/40_process.js }Ĥ argv0Getter r-5deno Z*iuv `buildAllowedFlags `S-ext:deno_node/internal/process/per_thread.mjs jZPnotImplementedEvents ^z multipleResolves gargv yvglobalProcessExitCode 拮e parsedCode  reallyExit caddReadOnlyProcessAlias createWarningObject _j warningErr 6J doEmitWarning ?khrtime "9milli N0nano ^prevSec 6`iprevNano 6rss "]"_kill ::lerrCode  maybeSignal ! numericCode RuncaughtExceptionHandler execPath !Process z8ftitle nQ_val ϱconfig 62ltarget_defaults J)m variables prependListener lppid :?binding 2-getgid )Bgetuid JcIgeteuid _eval 63 setStartTime N #startTime N. #allowedFlags uallowedNodeEnvironmentFlags Jr`features bW--no-deprecation ^throwDeprecation '--throw-deprecation unhandledRejectionListenerCount ^1rejectionHandledListenerCount uncaughtExceptionListenerCount "KbeforeExitListenerCount jyoexitListenerCount \m newListener 5S!unhandledRejection :rejectionHandled V uncaughtException fD9L beforeExit P:synchronizeListeners Vx/processOnError XprocessOnBeforeUnload E7processOnUnload RT۾__bootstrapNodeProcess 4argv0Val z denoVersions "l encodeStr hkhexTable r| %ext:deno_node/internal/querystring.ts jCqsEscape cS9noEscape D. isHexTable * addKeyVal | keyEncoded F valEncoded curValue zl eq ԠdecodeURIComponent1 *gAmaxKeys dsepCodes eqCodes sepLen {eqLen zRR customDecode zCsepIdx z^eqIdx plusChar A encodeCheck "stringifyPrimitive  DencodeStringifiedCustom #\encodeStringified  Kconvert Naks j9vlen F unhexTable 'PunescapeBuffer "f decodeSpaces NoutIndex  currentChar ChexHigh k@hexLow 8hasHex NKY qsUnescape 0HS clearLine !>clearScreenDown 1createInterface ^cursorTo :emitKeypressEvents [ Interface " castEncoding &<ascii !6latin1 ĥutf16le ~B isBufferType  utf8CheckByte F4utf8CheckIncomplete [snb ^utf8CheckExtraBytes .+utf8FillLastComplete |utf8FillLastIncomplete n>utf8Text @utf8End  utf8Write 8nYnormalizedBuffer N~ base64Text z$DA base64End DH simpleWrite +R simpleEnd B1DStringDecoderBase _rlastChar lastNeed r* lastTotal vQ Base64Decoder bfillLast dGenericDecoder 8 Utf8Decoder . StringDecoder I~normalizedEncoding !PStringDecoder ޙCNodeTestContext " #denoContext & diagnostic n'mock t]runOnly xskip VH?todo z\[prepared DprepareOptions JIdenoTestContext *]nnewNodeTextContext ғC-_fn ҟP beforeEach  afterEach ބ'{ overrides q finalOptions 6kW wrapTestFn nodeTestContext 0prepareDenoTest HdenoTestOptions ꊰonly B\describe 9Vit N-4m test.mock.fn test.mock.getter ک8test.mock.method test.mock.reset B restoreAll ~test.mock.restoreAll ]ftest.mock.setter test.mock.timers.enable v^test.mock.timers.reset mAtick VZtest.mock.timers.tick /oUrunAll Ήtest.mock.timers.runAll !N)clearInterval_ ~zPtimer 1 tlsCommon rGext:deno_node/_tls_common.ts @tlsWrap  jq>ext:deno_node/_tls_wrap.ts n.y cipherMap AES128-GCM-SHA256 zoTLS13_AES_128_GCM_SHA256 6AES256-GCM-SHA384 FTLS13_AES_256_GCM_SHA384 ~bECDHE-ECDSA-AES128-GCM-SHA256 gg'TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 '#ECDHE-ECDSA-AES256-GCM-SHA384 jա'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 wECDHE-ECDSA-CHACHA20-POLY1305 F-TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 ECDHE-RSA-AES128-GCM-SHA256 g%TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256  rECDHE-RSA-AES256-GCM-SHA384 S9%TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 ZǬECDHE-RSA-CHACHA20-POLY1305 jy+TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 ޹TLS_AES_128_GCM_SHA256 € TLS_AES_256_GCM_SHA384 ~`TLS_CHACHA20_POLY1305_SHA256 TLS13_CHACHA20_POLY1305_SHA256 2rootCertificates  DEFAULT_ECDH_CURVE hDEFAULT_MAX_VERSION :2=TLSv1.3 Z!.DEFAULT_MIN_VERSION E TLSv1.2  CryptoStream V SecurePair  P=createSecurePair ? TLSSocket f checkServerIdentity PcreateSecureContext 2M#DEFAULT_CIPHERS LibuvStreamWrap E+ providerType a,ext:deno_node/internal_binding/async_wrap.ts  setReadStream nisatty fwTTY FF< setRawMode فCHAR_0  $5CHAR_9 CHAR_AT m)3CHAR_BACKWARD_SLASH HCHAR_CARRIAGE_RETURN ƹ:^CHAR_CIRCUMFLEX_ACCENT P-CHAR_DOT J( CHAR_DOUBLE_QUOTE >zKCHAR_FORM_FEED OCHAR_GRAVE_ACCENT "lV CHAR_HASH iCHAR_HYPHEN_MINUS CHAR_LEFT_ANGLE_BRACKET BCHAR_LEFT_CURLY_BRACKET (CHAR_LEFT_SQUARE_BRACKET  CHAR_LINE_FEED FCHAR_LOWERCASE_A uCHAR_LOWERCASE_Z ƹ/CHAR_NO_BREAK_SPACE j6 CHAR_PERCENT  CHAR_PLUS NxCHAR_QUESTION_MARK ~CHAR_RIGHT_ANGLE_BRACKET :?CHAR_RIGHT_CURLY_BRACKET 5gCHAR_RIGHT_SQUARE_BRACKET CHAR_SEMICOLON FIJCHAR_SINGLE_QUOTE n CHAR_SPACE `CHAR_TAB ::%CHAR_UNDERSCORE ^gCHAR_UPPERCASE_A hCHAR_UPPERCASE_Z fZtCHAR_VERTICAL_LINE CCHAR_ZERO_WIDTH_NOBREAK_SPACE  ext:deno_node/path/_constants.ts 1oforwardSlashRegEx *P9 percentRegEx ^~backslashRegEx > newlineRegEx carriageReturnRegEx bR*tabRegEx ^jprotocolPattern ~4^[a-z0-9.+-]+:  portPattern  :[0-9]*$ J2 hostPattern ^\/\/[^@/]+@[^@/]+ 8fsimplePathPattern ĒU!^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$ n~unsafeProtocol R" javascript 2֛w javascript: HhostlessProtocol 0EslashedProtocol &Bftp *ftp: R&gopher zgopher: &Fvfile: Xws: *޻wss 9zwss: C[hostnameMaxLen zb< noEscapeAuth *forbiddenHostChars |\[\0\t\n\r #%/:<>?@[\\\]^|] /forbiddenHostCharsIpv6 vuo[\0\t\n\r #%/<>?@\\^|] .`[Url $slashes e #parseHost jવ resolveObject > rel  P_tkeys ßtkey ڲtrkeys mrk [erkey L^file:?$ relPath H isSourceAbs 6xisRelAbs  mustEndAbs .# removeAllDots 2gsrcPath noLeadingSlashes  H authInHost JuhasTrailingSlash bup f isIpv6Hostname  k newPathname urlParse ZparseQueryString slashesDenoteHost  hasHash vinWs *isWs *Z simplePath 3 lowerProto lhostEnd ~atSign \*knonHost j ipv6Hostname Z getHostname D autoEscapeStr  questionIdx BhashIdx luseQuestionIdx : AfirstIdx r urlObject!HDIB$!""DBD"!"I"H D ""!D"$D""IDD"!D!!B!BA!A """BBA BBA!AAAAA !B!A!BB BB "B @ D@BABAAADBB""""BBA !AA! !""BA!ABB "BD!AD!! ! BA!BBB! DDD!"""A "!A!BB D B " !  ABBA!B  A B !B$""$"H$"""""" B $D$B$I$HH "BBBDH$!"DDDBHH!"""DB D"B " BHHD !H! "B I D"!AIIDDDHD"$!HHB$!IBD"$"D$"$I$"ID$IDHDDD$""""HD$" ""$I$I$I$I$I$I$I$I "DH HH"!DD""!BDH""""H DD$I$$""D HD$A @IDDDHDDD$" I"$BD$"$I$I$ID"$I"$DH$I$$D"I$D$DD"H$D"II$D"H$$H$D$I"H$ D"HI"$D"$I"H$$ID"D"IHD" HD$HDD"H"DDD$!$""B" "IDDI""$I HDHDDD$H"""H$!HHDD$"" !BH$HA $ $B!D!DH$HH!D!B!B!BBDD!BDD$D" I@DD!IDDD "" D$!HDDDDDD$BI$""""" IA""H$D$ " BDB"H!!IDDDA$"D$A$ID""""BHHH!D$A I!DDD$B !"BDDDDB!"DDHDD$"D$"BH"DIDD$B!H A "D!DD!@ D A ""AH A@ BB"D BD@D@DD " D@@ A"HID"!@ BDD@ "B""I"B$"DDD!B A ! " !AA@@@  @DB A!ADD$DD"! """DHD BBHD!"$!DB$D$"$IDD$! A$ID$ADD!!BH$"IB"B$ "D!"B!AB DD""""DDDDD$$!D""ID"$ "B"B"D$!"$D""BHBD"!D"B$"""!$IBI"""DDB$IBDD$BD $IH$IHDD"!H$IDH HADDDH$A$I"D!"B!BD""$HD$"DI$"""""D$I$BBDDDD"ID$!B$$"D"D$$$I$!"B$I$I"D"""HDDD$DD""!II""H" A$B!BA$I$"""$ DD"HIDDDD$D"I$I$$B H"H$DH!""HBI"D$ !"HHBB"!!D$"""HDD$IDD "B""$D$ """"$ID"HI$$H$HD$$I$H$DD$ H$D$$H$I$H"BBD"" B@D@DHDH$D"AB B B B B "B  @@!$"""D!BD$"B$"$""!DD$$"D$AHDH" ""H$"D " """D$$"I"D@"""!B"""IDD""H$D$!!!"I"DD$"ABD$""$ B!DD"DDDDDHD"H$ BD@$ $B$$"""BDHDDH$IB$""!"B !D$$$"D D$D$"" D$$I$H"$ID$$DD"II$I$"I$I$II$"IH$$I$I$$I$$! H$""""$"""H""""D"" ! A!""$""B$"""$D!BDD!DH""""DDD"AB"B"DD$@H"D$H$"D$DI$$H$I$$D$$IDH!D$!B"HD!DA D A  "HDA" AHD DDD""A!"!""BD$D$ $BDD"B$BAHD !BA$I$$$DDD$B"" ""I!HHDD$DDDD@! ! BDH$!AB!DDHBD$""$B$"I$""H""$"""""BHBBAA!B@A ! BB!A " A@ "A!ABHHH@H !B!A!B  D$$$! !$DDB"!!!$B"D!B!B BB !B!BB D!B    B $BHDDHH$B$  D$DD HD$B"$ADD! !B$!!BD$I$D$"B$H$"!DD"HD""""""$I$D$$ D$""!$!""  D$$""B$$H!D"HH$"!!!!$!DD"A@A!DA!B@ B !A!A !AB!!D@!@D !A D!D@A AA! !BA!!"H $"$!""B$"" !!DBIAHDBD""I$ !DDDDA!IDHDHBDI!B"DDD!HD$DD!D"D!" D"H  HHDDD"""I$I$A!DHA!IDDDHD!!H!DDBD""!$!$"!D"!ID$"I$H!$DH" @D "D  "!"$I$$I""HD "D$$I"IDD"IDDBD$!"""$$"$DDD$"""$!I"""D D!  BB""BH"I!!BBDB!!BDDD"@DD$ID $"I$HD"$HHb $$ formatWhatwg Z hasUsername Le hasPassword domainToUnicode J\isValid faJ escapedCodes y%09 t%20 W %27 QZW%3C &Gzip gzipSync kuInflate zinflate Np InflateRaw E" inflateRaw NainflateRawSync < inflateSync *BUnzip Iunzip † J unzipSync bIext:deno_node/_zlib.mjs m?brotliCompress j7brotliCompressSync VnW<brotliDecompress <+brotliDecompressSync ^jcreateBrotliCompress NcreateBrotliDecompress ext:deno_node/_brotli.js BOptions ' BrotliOptions Rm:BrotliCompress N=BrotliDecompress >_1-ZlibBase  debugImpls 6> testEnabled "PinitializeDebugEnv IkdebugEnv i[|\\{}()[\]^$+?.] &U debugEnvRegex BDRemitWarningIfNeeded { debuglogImpl 73Nlogger O async_wrap )ext:deno_node/internal_binding/symbols.ts J!c active_hooks \Q call_depth 1n tmp_array  tmp_fields registerDestroyHook "դasync_hook_fields y[ asyncIdFields async_id_fields }WkBefore jW܂kAfter BkDestroy "> kPromiseResolve GkTotals pkCheck IkDefaultTriggerAsyncId  kStackLength resource_symbol VZresource trigger_async_id strigger_async_id_symbol  init_symbol CIo before_symbol j after_symbol Gdestroy_symbol vpromise_resolve_symbol [a~promiseResolve llookupPublicResource GpublicResource ~emitInitNative asyncId kXrestoreActiveHooks fԔ getHookArrays [storeActiveHooks _ copyHooks NjwantPromiseHook VA enableHooks  disableHooks bgetDefaultTriggerAsyncId  edefaultTriggerAsyncId block jVoldDefaultTriggerAsyncId x<hasHooks VYenabledHooksExist LinitHooksExist uJYafterHooksExist :pbdestroyHooksExist &promiseResolveHooksExist 2)NemitInitScript ZF~emitInit ghasAsyncIdStack 1 hooks_array N hook_fields p8j prev_kTotals fLisUint32 %/octalReg C^[0-7]+$ m;9modeDesc 4must be a 32-bit unsigned integer or an octal string | parseFileMode  an integer eluseDefaultOptions ;=d allowArray v allowFunction DPnullable  positive SQ && < 4294967296 >= 1 && < 4294967296 >oneOf jqallowed ~7must be one of: v\validateEncoding n validateArray  minLength 2-must be longer than s validateUnion T^union . intoCallbackAPI EintoCallbackAPIWithIntercept g< interceptor ޘ spliceOne lmakeMethodsEnumerable klass % tokenRegExp .a^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$ bUBheaderCharRegex ^^[^\t\x20-\x7e\x80-\xff] '(?:^|\W)chunked(?:$|\W) ^x bindingTypes $'ext:deno_node/internal_binding/types.ts B"JisBigInt64Array VisFloat32Array 6isFloat64Array  isInt8Array Zhp isInt16Array :^ isInt32Array N`isUint8ClampedArray U isUint16Array i isUint32Array ( __process$ n# __buffer$ Ƞ~__string_decoder$ 6 __events$ __getOwnPropNames R __commonJS pE __require v9require_buffer Jsxrequire_primordials blib/ours/primordials.js "xexports2 Eumodule2 Oself2 ^thisArgs N۠thenFn  ~catchFn &require_validators N+lib/internal/validators.js xfString2 ^dgetOwnPropertyValueOrDefault _validateSignalName validatePlainFunction #validateUndefined ]Arequire_browser2 *:[ require_utils JXlib/internal/streams/utils.js jrSymbol2 }- kDestroyed N2 kIsErrored  kIsReadable @ kIsDisturbed ^isReadableNodeStream R&^_obj$_readableState ~[isWritableNodeStream  D_obj$_writableState b isDuplexNodeStream bM isNodeStream f isIterable hj isDestroyed rܟwState nFrState .isWritableEnded hisWritableFinished fK$isReadableEnded misReadableFinished Ra isReadable vQ isWritable {L isFinished isWritableErrored R_stream$_writableStat _stream$_writableStat2 0isReadableErrored ^_stream$_readableStat Z(_stream$_readableStat2 bisClosed isOutgoingMessage i/isServerResponse f)isServerRequest ƔI _stream$req v+G willEmitClose  isDisturbed 2\ņ_stream$kIsDisturbed . isErrored 9{_ref 2>[ _ref2 ^_ref3 j>_ref4 v;_ref5 _stream$kIsErrored vKU_stream$_readableStat3 ]Ӗ_stream$_writableStat3 n_stream$_readableStat4 ?_stream$_writableStat4 RLrequire_end_of_stream Z{q%lib/internal/streams/end-of-stream.js vPromise2 bN_willEmitClose k7 isRequest jS_options$readable _options$writable ߀onlegacyfinish VN&onfinish ~H[readableFinished onend (onclose I*errored V onrequest 2 endCallback boriginalCallback 6gWrequire_operators F%^!lib/internal/streams/operators.js F|Number2 FkEmpty ӞQkEof . concurrency J7map2 vg_options$signal _options$signal2 ~)4 signalOpt ϤonDone sipump 6_options$signal3 ^ asIndexedPairs VRasIndexedPairs2 I`_options$signal4 unused  forEachFn 2kfLoptions2 &p filterFn ^ReduceAwareErrMissingArgs 2reducer 6h(_options$signal5 B@hasInitialValue mRgotAnyItemFromStream (_options$signal6 Q_options$signal7 Z flatMap2 .0toIntegerOrInfinity Jbdrop  zdrop2 _options$signal8 _options$signal9  take take2 M_options$signal10 2Az_options$signal11 V0require_destroy :Lllib/internal/streams/destroy.js Z&e kConstruct ƒN checkError 8Mer Z onDestroy 6qerr2 @emitErrorCloseNT 5 emitCloseNT G$ emitErrorNT j#$ undestroy 6aerrorOrDestroy V`{ constructNT 6\ onConstruct *|CemitConstructNT NO%emitCloseLegacy ڷlemitErrorCloseLegacy [ destroyer FXhrequire_events 7]node_modules/events/events.js nb ReflectApply2 "RxReflectOwnKeys2 qProcessEmitWarning J NumberIsNaN2 T checkListener  j_getMaxListeners that y(doError BG6 arrayClone  X _addListener fE&prepend cexisting $ onceWrapper Ƙ: _onceWrap -wrapped &once2  5J'prependOnceListener T%5originalListener i _listeners aunwrap q evlistener #5unwrapListeners n rawListeners j_~ errorListener VeventTargetAgnosticAddListener  addErrorHandlerIfEventEmitter  wrapListener PTrequire_legacy Nɏ&lib/internal/streams/legacy.js :|ondata :Sondrain R1didOnEnd *require_add_abort_signal e6(lib/internal/streams/add-abort-signal.js ؚarequire_buffer_list KC#lib/internal/streams/buffer_list.js T= Uint8Array2 ABuffer2 'x require_state KMlib/internal/streams/state.js highWaterMarkFrom JUisDuplex ־ duplexKey FgetHighWaterMark  hwm "7require_safe_buffer F!node_modules/safe-buffer/index.js >{ SafeBuffer RΞencodingOrOffset  require_from >;Jlib/internal/streams/from.js svhadError whasThrow .l require_readable p: lib/internal/streams/readable.js & destroyImpl z,mkPaused require_duplex aW maybeReadMore ¢readableAddChunk ` addToFront Y onEofChunk maddChunk  emitReadable u)MAX_HWM 2ɢ3computeNewHighWaterMark ^g howMuchToRead nXnOrig &Z endReadable ~WdoRead FζfromList › emitReadable_ zCzflow maybeReadMore_ CwpipeOpts vdoEnd endFn  unpipe xonunpipe  unpipeInfo  cleanedUp p%0 pipeOnDrain  .pipeOnDrainFunctionResult n>dests eMnReadingNextTick nLnupdateReadableListening 6:Iresume_ paused >J% streamKeys gHstreamToAsyncIterator AcreateAsyncIterator [͕ endReadableNT K! endWritableNT D autoDestroy H{webStreamsAdapters 2PlazyWebStreams rMreadableStream S~streamReadable k_src$readableObjectMo require_writable c lib/internal/streams/writable.js Error2  \ kOnFinished &0noDecode :Joonwrite ~c(Q resetBuffer yA getBuffer  clearBuffer v| finishMaybe 7v writeOrBuffer ZdoWrite r8 onwriteError  errorBuffer 8GafterWriteTick  afterWrite  needDrain S_state$errored qonfinishCallbacks VF _state$errored2 R|buffered >D bufferedIndex vqbufferedLength  /> needFinish 0ʠ callFinal fonFinish V+finish jU>> prefinish pstream2 gstate2 >.writableStream >G streamWritable m^require_duplexify YR!lib/internal/streams/duplexify.js W bufferModule <isBlob ZڈisBlob2 S} Duplexify PO. duplexify ^Y _duplexify ` fromAsyncGen Jthen2 J _promise V onreadable { onfinished :A/lib/internal/streams/duplex.js Bujduplex ңlrequire_transform ~,!lib/internal/streams/transform.js ;Y kCallback require_passthrough 'L#lib/internal/streams/passthrough.js >ܙrequire_pipeline fR^ lib/internal/streams/pipeline.js x;writing V popCallback Blstreams FmakeAsyncIterable N fromReadable FN9 pipelineImpl +: outerSignal clastStreamCleanup x finishImpl lDdestroys .DjR finishCount [ isLastStream  onError2 _ret ^7pt v@rended Έrequire_compose "Xlib/internal/streams/compose.js qgcompose ^#" orgStreams jrequire_promises Vl"lib/stream/promises.js Opl qlastArg kQDrequire_stream cS lib/stream.js 1streamReturningOperators vpromiseReturningOperators utils fn2 BgERR_ILLEGAL_CONSTRUCTOR 6'*ext:deno_node/internal/streams/destroy.mjs c(ext:deno_node/internal/streams/utils.mjs ^t CustomStream 6x decodeStrings sYwritableClosed wreadableClosed  closeWriter f closeReader 2)#newReadableStreamFromStreamReadable ]evaluateStrategyOrFallback B+onData ~y#newWritableStreamFromStreamWritable DbackpressurePromise {SonDrain r,c!newReadableWritablePairFromDuplex O= stripColor y%ext:deno_node/_util/std_fmt_colors.ts bzgetConsoleWidth ̓ defaultColor dkReadableOperator *Expected values to be strictly deep-equal: ]%Expected values to be strictly equal: bstrictEqualObject =26Expected "actual" to be reference-equal to "expected": R)Expected values to be loosely deep-equal: :83Expected "actual" not to be strictly deep-equal to: B ,Expected "actual" to be strictly unequal to: lVnotStrictEqualObject 5":Expected "actual" not to be reference-equal to "expected": j2Expected "actual" not to be loosely deep-equal to: iO notIdentical l7Values have same structure but are not reference-equal: nhBznotDeepEqualUnequal '6-Expected values not to be loosely deep-equal: 6kMaxShortLength  copyError x) inspectValue u createErrDiff skipped HactualInspected  actualLines < expectedLines  3 indicator  actualRaw ~٨ expectedRaw ^F inputLength B)maxLines  printedLines &u( identical $ skippedMsg lines `ɕ plusMinus VC expectedLine &r actualLine D2divergingLines ! stackStartFn aĊstackStartFunction @ knownOperator fu:newOp  _recurseTimes ( tmpActual  tmpExpected ~p buildMessage >{diffstr ̩'ext:deno_node/_util/std_testing_diff.ts KFORMAT_PATTERN -nY (?=["\\]) PCAN_NOT_DISPLAY t1[Cannot display] .isKeyedCollection {seen ^EaTime bTime klconstructorsEqual .unmatchedEntries n(aKey >IaValue NbKey BbValue ^cmerged texpr  Y[ assertEquals u, actualString ƃ'expectedString  stringDiff my diffResult :|]diffMsg n6assertNotEquals *+WassertStrictEquals Rc withOffset EDassertNotStrictEquals * assertMatch ίbassertNotMatch getOwnNonIndexProperties ONLY_ENUMERABLE r SKIP_SYMBOLS vN valueType JQmemo Aval1 jval2 q\innerDeepEqual memos  pval1Tag > Sval2Tag keys1 G0keys2 ՇkeyCheck z JareSimilarRegExps %dXareSimilarFloatArrays 6areSimilarTypedArrays "keysVal1 =keysVal2 ?AareEqualArrayBuffers jXisEqualBoxedPrimitive < iterationType paKeys vUbKeys n2 symbolKeysA h symbolKeysB ^getEnumerables B val2MemoA ^? val2MemoB areEq vFU_objEquiv β[arr1 %xarr2 3buf1 BZl"buf2 >%obj1 "lobj2 ElsetEquiv &mapEquiv *OfindLooseMatchingPrimitives unsetMightHaveLoosePrim 6set1 set2 n}altValue setHasEqualElement bmapMightHaveLoosePrimitive /map1 ހcurB :FY>item1 bnitem2 mapHasEqualEntry Èkey1 qRkey2 : encodings 6P0ext:deno_node/internal_binding/string_decoder.ts 6E indexOfBuffer f!? indexOfNumber V,(ext:deno_node/internal_binding/buffer.ts *2 asciiToBytes | base64ToBytes gwbase64UrlToBytes d bytesToAscii jLbytesToUtf16le :/ hexToBytes >mkXutf16leToBytes ^(ext:deno_node/internal_binding/_utils.ts %ext:deno_web/05_base64.js ~SQ utf8Encoder *d float32Array XuInt8Float32Array L float64Array 6 auInt8Float64Array n3b bigEndian V{ MAX_UINT32 ΩxINSPECT_MAX_BYTES rc MAX_LENGTH !MAX_STRING_LENGTH  createBuffer FX _allocUnsafe K0_from 1poolSize FeU fromString  fromArrayBuffer "&1 fromObject _ assertSize 9_alloc Rchecked O* allocUnsafe allocUnsafeSlow jI fromArrayLike Ž isInstance ^J isEncoding SvalidateOffset * _copyActual z& mustMatch RbyteLengthUtf8 E֝getEncodingOps >W _isBuffer v`Pnswap rxPswap16 >swap32 Oswap64 >n thisStart P#, readUInt24LE j\c boundsError 3 readUintBE X readUIntBE ʭ' readUInt48BE ^0 readUInt40BE N3 readUInt24BE u readUint8 nq readUInt8 n}^ readUint16BE 4 readUInt16BE Am; readUint16LE :j readUInt16LE s readUint32LE F readUInt32LE  readUint32BE FTi" readUInt32BE  readBigUint64LE f؉readBigUInt64LE edefineBigIntMethod B/7Vlo ]whi <9readBigUint64BE readBigUInt64BE * readIntLE v,6 readInt48LE ~Li readInt40LE f  readInt24LE 6V readIntBE n w readInt48BE @ readInt40BE 8 readInt24BE * readInt8 ֲ`! readInt16LE +' readInt16BE l\ readInt32LE %. readInt32BE readBigInt64LE areadBigInt64BE C[ readFloatLE dreadFloatBackwards ʏreadFloatForwards 2 readFloatBE  readDoubleLE !^readDoubleBackwards "readDoubleForwards zu readDoubleBE zi writeUintLE ZΪ5 writeUIntLE  writeU_Int48LE jwriteU_Int40LE zwriteU_Int24LE fUwriteU_Int32LE writeU_Int16LE ~y writeU_Int8 '] writeUintBE  u writeUIntBE ܡ+writeU_Int48BE ύZwriteU_Int40BE writeU_Int24BE OwriteU_Int32BE .AwriteU_Int16BE r8r writeUint8 fR writeUInt8 *% writeUint16LE n,]( writeUInt16LE *4 writeUint16BE  writeUInt16BE ΍Mn writeUint32LE RNK writeUInt32LE zs_writeUInt32LE T writeUint32BE Yzl writeUInt32BE :B&_writeUInt32BE N(UwrtBigUInt64LE K checkIntBI ^wrtBigUInt64BE  iwriteBigUint64LE F\writeBigUInt64LE vv+writeBigUint64BE mwriteBigUInt64BE  writeIntLE J.| writeIntBE K; writeInt8 b writeInt16LE »\ writeInt16BE N8 writeInt32LE  ( writeInt32BE writeBigInt64LE ^iwriteBigInt64BE Ʈ2 writeFloatLE .t#writeFloatBackwards z writeFloatForwards EE writeFloatBE fe writeDoubleLE ?#writeDoubleBackwards writeDoubleForwards Z writeDoubleBE : targetStart . sourceStart ?N sourceEnd zyz1 toInteger Zv checkBounds   byteLength2 d bytesToWrite pBufferBigIntNotDefined ibase64ByteLength Abase64 گ| sourceLen /G0checkInt *Y defaultVal  \+newVal ,}CHAR_LOWERCASE_B v?y kTraceBegin faCHAR_LOWERCASE_E jx) kTraceEnd !nCHAR_LOWERCASE_N "z kTraceInstant JCHAR_UPPERCASE_C  kTraceCount r"#ext:deno_node/internal/constants.ts H-ext:deno_node/internal/readline/callbacks.mjs S#ext:deno_node/internal/cli_table.ts |.kCounts >counts 8DkTraceConsoleCategory node,node.console j2kSecond L@kMinute ʻ-kHour LkMaxGroupIndentation  ٌ kGroupIndent 2UkGroupIndentationWidth ʂOkGroupIndentWidth kFormatForStderr kFormatForStdout Vd<kGetInspectOptions j kColorMode zQC kIsConsole -kWriteToConsole )OkBindProperties  !hkBindStreamsEager tkBindStreamsLazy ~px kUseStdout ~|@ kUseStderr NT optionsMap FN ignoreErrors jp colorMode bHsgroupIndentation consolePropAttributes *-,kColorInspectOptions bikNoColorInspectOptions  createWriteErrorHandler { streamSymbol ҵ3 useStdout :; errorHandler consoleMethods  timeLogImpl bC expression ˵ tabularData f5B_inspect +opt 2E  getIndexArray vܝDmapIter 7>biterKey 64setIter ɻvaluesKeyArray I indexKeyArray ΥD formatted . formatTime ZOS(index) v (iteration index) Ccaches Vwext:deno_cache/01_cache.js >~* compression ext:deno_web/14_compression.js qext:runtime/11_workers.js M urlPattern 29ext:deno_url/01_urlpattern.js rȃ fileReader  Vext:deno_web/10_filereader.js > webSocket webSocketStream (ext:deno_websocket/02_websocketstream.js ^qbroadcastChannel 'P eventSource "v ext:deno_fetch/27_eventsource.js 2dH messagePort vJ imageData ^%6ext:deno_web/16_image_data.js F webgpuSurface Vuext:deno_webgpu/02_surface.js > unstableIds ΰext:runtime/90_deno_ns.js ڌ loadImage next:deno_canvas/01_image.js ^> ImageBitmap S<image 6^>createImageBitmap "level vT$unstableForWindowOrWorkerGlobalScope webgpu ƣjGPU Ӈ^ GPUAdapter }GPUAdapterInfo &eeGPUSupportedLimits 2KGPUSupportedFeatures LGPUDeviceLostInfo p?d GPUDevice RLRGPUQueue =l GPUBuffer :"`GPUBufferUsage K^ GPUMapMode 6VGPUTextureUsage  GPUTexture ZGPUTextureView  GPUSampler " GPUBindGroupLayout EGPUPipelineLayout 6a> GPUBindGroup uGPUShaderModule RGPUShaderStage DGPUComputePipeline  GPURenderPipeline Bi GPUColorWrite ΰGPUCommandEncoder x֫GPURenderPassEncoder vHGPUComputePassEncoder  lGPUCommandBuffer rGPURenderBundleEncoder .lt2GPURenderBundle V GPUQuerySet GPUError yHGPUValidationError .nGPUOutOfMemoryError {buildOs p darwin -wSIGINFO rlinux A6android KWSAEINTR VWSAEBADF k WSAEACCES ^z WSAEFAULT ‰X WSAEINVAL * WSAEMFILE 56WSAEWOULDBLOCK )=WSAEINPROGRESS x WSAEALREADY & WSAENOTSOCK z^lWSAEDESTADDRREQ VU WSAEMSGSIZE ƿ|F WSAEPROTOTYPE HaFWSAENOPROTOOPT "KWSAEPROTONOSUPPORT WSAESOCKTNOSUPPORT ^C WSAEOPNOTSUPP 6AaWSAEPFNOSUPPORT ^WSAEAFNOSUPPORT }$ WSAEADDRINUSE *WSAEADDRNOTAVAIL " WSAENETDOWN S|WSASYSNOTREADY 1WSAVERNOTSUPPORTED ԘWSANOTINITIALISED X WSAEDISCON Ӆ WSAENOMORE w~l WSAECANCELLED \ WSAEINVALIDPROCTABLE zCx>WSAEINVALIDPROVIDER WSAEPROVIDERFAILEDINIT B'WSASYSCALLFAILURE Y۰WSASERVICE_NOT_FOUND ^,VWSATYPE_NOT_FOUND "7W WSA_E_NO_MORE V{WSA_E_CANCELLED ٷ WSAEREFUSED f6GSIGBREAK "!UV_FS_O_FILEMAP dsS_IRWXU f6[S_IRWXG ԖS_IRWXO :ǭOPENSSL_VERSION_NUMBER :+u SSL_OP_ALL >hSSL_OP_ALLOW_NO_DHE_KEX ?(SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION rcTSSL_OP_CIPHER_SERVER_PREFERENCE  01SSL_OP_CISCO_ANYCONNECT joSSL_OP_COOKIE_EXCHANGE ,%SSL_OP_CRYPTOPRO_TLSEXT_BUG @"SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS ^SSL_OP_EPHEMERAL_RSA ^SSL_OP_LEGACY_SERVER_CONNECT j&H!SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER :ySSL_OP_MICROSOFT_SESS_ID_BUG j&SSL_OP_MSIE_SSLV2_RSA_PADDING v_MSSL_OP_NETSCAPE_CA_DN_BUG 6SSL_OP_NETSCAPE_CHALLENGE_BUG X&SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG 66'SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG .ܕSSL_OP_NO_COMPRESSION NiSSL_OP_NO_ENCRYPT_THEN_MAC bJSSL_OP_NO_QUERY_MTU /xSSL_OP_NO_RENEGOTIATION R-SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION SSL_OP_NO_SSLv2 .h'SSL_OP_NO_SSLv3 vSSL_OP_NO_TICKET "SSL_OP_NO_TLSv1 bَSSL_OP_NO_TLSv1_1 ESSL_OP_NO_TLSv1_2 =SSL_OP_NO_TLSv1_3 SSL_OP_PKCS1_CHECK_1 ,SSL_OP_PKCS1_CHECK_2 rxSSL_OP_PRIORITIZE_CHACHA 2~SSL_OP_SINGLE_DH_USE r&kSSL_OP_SINGLE_ECDH_USE "*-SSL_OP_SSLEAY_080_CLIENT_DH_BUG >ZN"SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG >SSL_OP_TLS_BLOCK_PADDING_BUG QSSL_OP_TLS_D5_BUG ¶-SSL_OP_TLS_ROLLBACK_BUG ")ENGINE_METHOD_RSA yENGINE_METHOD_DSA ENGINE_METHOD_DH W#jENGINE_METHOD_RAND +}ENGINE_METHOD_EC .A2ENGINE_METHOD_CIPHERS #mENGINE_METHOD_DIGESTS ?ENGINE_METHOD_PKEY_METHS ENGINE_METHOD_PKEY_ASN1_METHS ENGINE_METHOD_ALL :wENGINE_METHOD_NONE +DH_CHECK_P_NOT_SAFE_PRIME 2%DH_CHECK_P_NOT_PRIME ^CDH_UNABLE_TO_CHECK_GENERATOR m#tDH_NOT_SUITABLE_GENERATOR vt ALPN_ENABLED ½RSA_PKCS1_PADDING 2$RSA_SSLV23_PADDING n (RSA_NO_PADDING %RSA_PKCS1_OAEP_PADDING rRSA_X931_PADDING ͐RSA_PKCS1_PSS_PADDING V{$RSA_PSS_SALTLEN_DIGEST -uRSA_PSS_SALTLEN_MAX_SIGN  kxRSA_PSS_SALTLEN_AUTO defaultCoreCipherList TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA ~ TLS1_VERSION CF&TLS1_1_VERSION VlTLS1_2_VERSION &yPTLS1_3_VERSION BPOINT_CONVERSION_COMPRESSED ~9POINT_CONVERSION_UNCOMPRESSED )POINT_CONVERSION_HYBRID  Z_NO_FLUSH bZ_PARTIAL_FLUSH ), Z_SYNC_FLUSH  Z_FULL_FLUSH IZ_FINISH E7Z_BLOCK hZ_OK Ra Z_STREAM_END  Z_NEED_DICT &YBZ_ERRNO ڋZ_STREAM_ERROR Z. Z_DATA_ERROR B: Z_MEM_ERROR  Z_BUF_ERROR )Z_VERSION_ERROR JcZ_NO_COMPRESSION :U Z_BEST_SPEED :xZ_BEST_COMPRESSION NrZ_DEFAULT_COMPRESSION >лv Z_FILTERED [TZ_HUFFMAN_ONLY NqZ_RLE f;lZ_FIXED Z_DEFAULT_STRATEGY # ZLIB_VERNUM 8yDEFLATE .^INFLATE ^GZIP Bq\GUNZIP J DEFLATERAW j[ INFLATERAW  1 UNZIP jE BROTLI_DECODE &" BROTLI_ENCODE &1rPZ_MIN_WINDOWBITS qZ_MAX_WINDOWBITS AZ_DEFAULT_WINDOWBITS F+ Z_MIN_CHUNK . Z_MAX_CHUNK  )Z_DEFAULT_CHUNK .gDZ_MIN_MEMLEVEL Z_MAX_MEMLEVEL Z_DEFAULT_MEMLEVEL U Z_MIN_LEVEL  oc Z_MAX_LEVEL 1ՋZ_DEFAULT_LEVEL  BROTLI_OPERATION_PROCESS BtBROTLI_OPERATION_FLUSH v΍BROTLI_OPERATION_FINISH BROTLI_OPERATION_EMIT_METADATA LwBROTLI_PARAM_MODE >* BROTLI_MODE_GENERIC v4BROTLI_MODE_TEXT ^%TBROTLI_MODE_FONT :jBROTLI_DEFAULT_MODE 8)kBROTLI_PARAM_QUALITY 7BROTLI_MIN_QUALITY xBROTLI_MAX_QUALITY j!BROTLI_DEFAULT_QUALITY FBROTLI_PARAM_LGWIN aBROTLI_MIN_WINDOW_BITS TBROTLI_MAX_WINDOW_BITS j%xBROTLI_LARGE_MAX_WINDOW_BITS 곈BROTLI_DEFAULT_WINDOW 8BROTLI_PARAM_LGBLOCK <eBROTLI_MIN_INPUT_BLOCK_BITS !}BROTLI_MAX_INPUT_BLOCK_BITS =-BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING `BROTLI_PARAM_SIZE_HINT ^a;BROTLI_PARAM_LARGE_WINDOW AaBROTLI_PARAM_NPOSTFIX BROTLI_PARAM_NDIRECT BROTLI_DECODER_RESULT_ERROR F?BROTLI_DECODER_RESULT_SUCCESS ~۞"&BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT z!c'BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT +q5BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION ŭ!BROTLI_DECODER_PARAM_LARGE_WINDOW 0 BROTLI_DECODER_NO_ERROR nBROTLI_DECODER_SUCCESS fBROTLI_DECODER_NEEDS_MORE_INPUT 2: BROTLI_DECODER_NEEDS_MORE_OUTPUT ):,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE n$BROTLI_DECODER_ERROR_FORMAT_RESERVED ҁQ1BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE $3BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET H/BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME H$BROTLI_DECODER_ERROR_FORMAT_CL_SPACE )BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE &T.BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT ]*BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1 sr*BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2 .u%BROTLI_DECODER_ERROR_FORMAT_TRANSFORM X,&BROTLI_DECODER_ERROR_FORMAT_DICTIONARY jE'BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS BTƙ%BROTLI_DECODER_ERROR_FORMAT_PADDING_1  %BROTLI_DECODER_ERROR_FORMAT_PADDING_2 ~ $BROTLI_DECODER_ERROR_FORMAT_DISTANCE WM'BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET V@&BROTLI_DECODER_ERROR_INVALID_ARGUMENTS e(BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES &BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS &f&BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP `(BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1 9(BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2 >h+BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES nc BROTLI_DECODER_ERROR_UNREACHABLE >TRACE_EVENT_PHASE_BEGIN TaTRACE_EVENT_PHASE_END I5TRACE_EVENT_PHASE_COMPLETE fWTRACE_EVENT_PHASE_INSTANT s>tTRACE_EVENT_PHASE_ASYNC_BEGIN " !TRACE_EVENT_PHASE_ASYNC_STEP_INTO b K!TRACE_EVENT_PHASE_ASYNC_STEP_PAST B÷TRACE_EVENT_PHASE_ASYNC_END D2 &TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN {$TRACE_EVENT_PHASE_NESTABLE_ASYNC_END Z-(TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT MS\TRACE_EVENT_PHASE_FLOW_BEGIN  QTRACE_EVENT_PHASE_FLOW_STEP K0TRACE_EVENT_PHASE_FLOW_END XnTRACE_EVENT_PHASE_METADATA R;TRACE_EVENT_PHASE_COUNTER ʱTRACE_EVENT_PHASE_SAMPLE }TRACE_EVENT_PHASE_CREATE_OBJECT 8!TRACE_EVENT_PHASE_SNAPSHOT_OBJECT yPTRACE_EVENT_PHASE_DELETE_OBJECT  TRACE_EVENT_PHASE_MEMORY_DUMP ^j$TRACE_EVENT_PHASE_MARK wTRACE_EVENT_PHASE_CLOCK_SYNC V<vTRACE_EVENT_PHASE_ENTER_CONTEXT %TRACE_EVENT_PHASE_LEAVE_CONTEXT mTRACE_EVENT_PHASE_LINK_IDS ^݃W.ext:deno_node/internal_binding/node_options.ts pogetOptionsFromBinding Z optionName 2ext:deno_node/internal_binding/_timingSafeEqual.ts b_fips Ȓ AsyncWrap f e HandleWrap ;-ext:deno_node/internal_binding/handle_wrap.ts [isLinux fevxDenoListenDatagram αAF_INET ^h>^AF_INET6 UDP_DGRAM_MAXSIZE <| oncomplete #address N9ݍ#family IN#remoteAddress :`Q #remoteFamily IC #remotePort  #receiving n#unrefed dʚ#recvBufferSize #sendBufferSize | onmessage B[6_multicastAddress B3a_interfaceAddress rTQ_sourceAddress 91 _groupAddress ΃3#doBind ֹbind6 "$ #doConnect FDconnect6 6 getpeername peername :3 getsockname }#receive 2 &4recvStop 2ubufs >(}#doSend Hsend6 '`_bool  U_ttl ng listenOptions &/_count n$6_family + hasCallback os error (40|90|10040) /_onClose ) handleTypes .yWPIPE 2G'}ALL_PROPERTIES @; ONLY_WRITABLE ξ^RONLY_CONFIGURABLE UONLY_ENUM_WRITABLE vV SKIP_STRINGS pisNumericLookup  F@ isArrayIndex  allProperties ^ FixedQueue E<%ext:deno_node/internal/fixed_queue.ts @nextTickEnabled ޓStock ӊargs_ Fwǝ tickObject N writeBuffer 1f+ext:deno_node/internal_binding/node_file.ts _v4Seg ^<-4(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]) zPv4Str ][.]){3} N4 IPv4Reg b?v6Seg ؃s(?:[0-9a-fA-F]{1,4}) OIPv6Reg Q^( A(?: :){7}(?:  |:)| Q,:){6}(?: p|: C :){5}(?:: .P|(: Z(BV ){1,2}|:)| ]Z :){4}(?:(: Αh}){0,1}: 6D ){1,3}|:)| :٣a :){3}(?:(: f){0,2}: Nq{ ){1,4}|:)| ͎ :){2}(?:(: :){0,3}:  ){1,5}|:)| P :){1}(?:(: ){0,4}:  - ){1,6}|:)| k (?::((?:: ނS){0,5}: *|(?:: r ){1,7}|:)) j&)(%[0-9a-zA-Z-.:]{1,})?$ ~c makeSyncWrite normalizedArgs f~ ChannelWrap nstrerror ' IANA_DNS_PORT  IPv6RE N/7^\[([^[\]]*)\] y addrSplitRE &(^.+?)(?::(\d+))?$ f C validateTries tries )newSet >serv ,/ ipVersion NCaddrSplitMatch nhostIP VƉY errorNumber (setLocalAddress F)ipv4 bipv6 */7defaultResolver eainvalidHostnameWarningEmitted G5MdnsOrder 6 ipv4first 8!defaultResolverSetServers ARES_AI_CANONNAME 2ARES_AI_NUMERICHOST Z'ARES_AI_PASSIVE ARES_AI_NUMERICSERV b>(ARES_AI_NOSORT rUARES_AI_ENVHOSTS z ares_strerror o errorText FW recordTypes O޻fqdnToHostname 5qfqdn ^;\.$  compressIPv6 R \b(?:0+:){2,}  o/ finalAddress j^\d+\.\d+\.\d+\.\d+$ @\b0+ #servers j 6/#timeout Vi#tries p#query .uipAddr ҌH;resolveOptions Mcritical &M preference Jmservices S replacement ¥[mname rname ^k,serial N)retry "expire yminimum " weight  _req -ztuples - _ipVersion m_addr0 ~L_addr1 rDNS_ESETSRVPENDING 8EMSG_ESETSRVPENDING xhThere are pending queries. 2*6 kRejection Fd\nodejs.rejection p/kCapture e kErrorMonitor J\events.errorMonitor  [events.maxEventTargetListeners 1$events.maxEventTargetListenersWarned . usingDomains ?acaptureRejections 8H_events Jv< _eventsCount r _maxListeners „ eventTargets vemitUnhandledRejectionOrErr y[ee prev identicalSequenceRange xmaxLen b79enhanceStackTrace Nown ActorInfo ZerrStack M+ownStack f/< stringifiedEr `w6_listenerCount FemitterOrTarget !eventTargetAgnosticRemoveListener : abortListener LjzcreateIterResult v:unconsumedEvents  unconsumedPromises ^/toError Fz makeCallback ext:deno_node/_fs/_fs_common.ts p]fileMode xisFd RȲsrcStr *4destStr VtmodeNum JredestPath #dirPath U #syncIterator Ӳ#asyncIterator IiteratorResult bHdirent 5ȧext:deno_fs/30_fs.js V CFISBIS >; lenOrCallback 2d;H getValidTime z existingPath ^&newPath p parseEncoding  tempDirPath bԊCHARS :Y>0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ .~t randomName f[=getOpenOptions Zx FileHandle Z'#ext:deno_node/internal/fs/handle.ts rEgfilePath  οFLAGS_AX .Z FLAGS_AX_PLUS  FLAGS_WX 1f FLAGS_WX_PLUS RHconvertFlagAndModeToOptions |IexistenceCheckRequired  maybeMode Lq_validateFunction ^2optOrBufferOrCb %’offsetOrCallback ޽[`currentPosition E offsetOrOpt fۚnumberOfBytesRead ^5-asyncIterableToCallback  ltoDirent ~= getEncoding f<0 maybeDecode  optOrCallback ~ufsFile  maybeEncode uoldPath koptionsOrFalse 6convertFileInfoToStats ~FtoBigInt NjconvertFileInfoToBigIntStats R^fileInfo  bigInt ZbVetypeOrCallback JBE StatsClass >9<ext:deno_node/_util/async.ts statPromisified Z statAsync  emptyStats zasyncIterableIteratorToCallback \" errCallback JoptionsOrListener L0optionsOrListener2 F watchPath p fsWatcher convertDenoFsEventToNodeFsEvent  FSWatcher :WlistenerOrOptions R26 statWatchers ~ StatWatcher ٔkFSStatWatcherStart ]^beforeListenerCount 6kFSStatWatcherAddOrCleanRef nw#bigint  #refCount zE&ecurr as> addOrClean ޖ>stop Ҫ#closer closer &YinnerWriteSync # currentOffset ƣ innerWrite NT! innerWritev rg# checkEncoding \J isFileOptions |1C pathOrRid }?Y callbackFn > openOptions FYisRid | checkAborted owritten YfsOpen ׉fsRead .*fsWrite BefsWritev .nCfsClose BkIoDone kIsPerformingIO 8kFs zt _construct  { openWriteFs rk openReadFs @ orgEmit " HimportFd {;)ReadStream.prototype.open() is deprecated VMDEP0135 ,1 _er ^qR5 _bytesRead ۗ_buf *1*WriteStream.prototype.open() is deprecated searchParamsSymbol Z~e unreachable ʡ!ConnectionWrap S1ext:deno_node/internal_binding/connection_wrap.ts JL ceilPowOf2 iF(INITIAL_ACCEPT_BACKOFF_DELAY [81MAX_ACCEPT_BACKOFF_DELAY pp)ext:deno_node/internal_binding/_listen.ts v_ socketType vn(SOCKET UV_TCP_IPV6ONLY x#backlog : #connections b+#acceptBackoffDelay 8Zprovider z,L#bind QЦ#connect V#accept e$_noDelay _enable F?y3 _initialDelay szsetSimultaneousAccepts V}&connectOptions 湚}#acceptBackoff ;#connectionHandle *XkArrayBufferOffset ^kLastWriteWasAsync 2&streamBaseState Ak WriteWrap "9handleWriteReq  FonWriteComplete .|createWriteWrap aowner zن allBuffers #$afterWriteDispatched cnextBuf NSStreamBaseStateFields "!LkReadBytesOrError 6skNumStreamBaseStateFields SUGGESTED_SIZE N-#reading c#attachToObject "5 readStart b#read FrreadStop ~ useUserBuffer bk=_userBuf r@#write supportsWritev ZHwriteAsciiString .DwriteUtf8String n~writeUcs2String V writeLatin1String R^ ridBefore p NodeCompatAssertionError .windows nuvTranslateSysError 1ext:deno_node/internal_binding/_libuv_winerror.ts ?codeToErrorWindows >argument list too long F'opermission denied a٥address already in use jaddress not available Zaddress family not supported 8 resource temporarily unavailable ΰEAI_ADDRFAMILY V EAI_AGAIN f/Ftemporary failure  EAI_BADFLAGS @0bad ai_flags value - EAI_BADHINTS OMinvalid value for hints ~@ EAI_CANCELED 7request canceled fqEAI_FAIL permanent failure *= EAI_FAMILY &ai_family not supported ?$ EAI_MEMORY  Tq out of memory Zn6/ EAI_NODATA ҦBD no address 6 EAI_NONAME ounknown node or service & EAI_OVERFLOW RDVargument buffer overflow E8 EAI_PROTOCOL Ҹ}resolved protocol is unknown FN EAI_SERVICE Nd%service not available for socket type b[| EAI_SOCKTYPE ( socket type not supported connection already in progress ^bad file descriptor resource busy or locked sMoperation canceled ECHARSET kinvalid Unicode character E software caused connection abort =connection refused Fconnection reset by peer v0ߗdestination address required ^Ƣ>file already exists 1#bad address in system call argument Nfile too large rMhost is unreachable =interrupted system call  binvalid argument "f i/o error }socket is already connected  illegal operation on a directory V #too many symbolic links encountered *Vtoo many open files  message too long + name too long Xnetwork is down %Unetwork is unreachable (_file table overflow >Tno buffer space available no such device >lno such file or directory z`not enough memory 6ENONET NUmachine is not on the network Bprotocol not available no space left on device Җ function not implemented socket is not connected .$unot a directory V;directory not empty socket operation on non-socket  !operation not supported on socket > operation not permitted z broken pipe ~protocol error VCprotocol not supported >protocol wrong type for socket }result too large j{read-only file system r  ESHUTDOWN Hl-cannot send after transport endpoint shutdown  ra invalid seek no such process Øconnection timed out ~text file is busy u cross-device link not permitted  end of file dno such device or address too many links >+ EHOSTDOWN H host is down G EREMOTEIO Rvremote I/O error rI6inappropriate ioctl for device /EFTYPE O{!inappropriate file type or format >!illegal byte sequence B`"errorToCodeWindows &scodeToErrorDarwin  errorToCodeDarwin ΞIhcodeToErrorLinux G8errorToCodeLinux 4codeToErrorFreebsd ވ%value too large for defined data type "ESOCKTNOSUPPORT B!OerrorToCodeFreebsd codeToErrorOpenBSD  errorToCodeOpenBSD freebsd openbsd sysErrno | UV_EAI_MEMORY zUV_EBADF U UV_EEXIST  UV_EINVAL ^ UV_ENOENT b}Z^ UV_ENOTSOCK ӛe UV_UNKNOWN 83errname H,MAX_RANDOM_VALUES GMAX_SIZE HgenerateRandomBytes  generated  kMaxUint32 wkBufferMaxLength (q assertOffset c randomData Jͮ randomBuf }[ readableEnded J asyncWrap J\ caresWrap e/pipeWrap  streamWrap fFEtcpWrap 2mudpWrap s)modules v| cares_wrap j contextify 2= credentials ]fs_dir v/ fs_event_wrap Ư heap_utils vC< http_parser Bcaicu @ js_stream Z messaging J module_wrap ci native_module natives 6) pipe_wrap process_methods 3serdes n8 signal_wrap ⊿, spawn_sync  stream_wrap FE task_queue ^E2tcp_wrap tls_wrap .#htty_wrap jP*udp_wrap z.DTRACE_HTTP_CLIENT_REQUEST 6) DTRACE_HTTP_CLIENT_RESPONSE eDTRACE_HTTP_SERVER_REQUEST n-VDTRACE_HTTP_SERVER_RESPONSE :CIPC #pendingInstances setPendingInstances fchmod . desiredMode F UV_READABLE  UV_WRITABLE DwindowDispatchEvent  osRelease ?MsystemMemoryInfo ꢜQ exitHandler .setExitHandler Q setEnv z?zgetEnv oO deleteEnv utoObject ~_win32 vext:deno_node/path/_win32.ts N P_posix &Cext:deno_node/path/_posix.ts 'ext:deno_node/path/common.ts " ext:deno_node/path/_interface.ts ް9 ucs2decode vHvA ucs2encode ƾ writeReport FÂG _filename 5 todoUndefined  getReport r dumpEventTime ;<reportOnFatalError  reportOnSignal "AgreportOnUncaughtException B denoEnvGet ) 6OBJECT_PROTO_PROP_NAMES BaenvValue  Y/ v18.18.0 Վ18.17.1 -o1.43.0 vvXo1.2.11 ' brotli E[1.0.9 kares !1.18.1  108  nghttp2 )31.47.0 IGnapi :YAllhttp Z6.0.10 VNopenssl S 3.0.7+quic cldr J41.0 F71.1 ~ctz j 2022b r=e14.0 jngtcp2 2'x0.8.1 p'nghttp3 0.7.0 z4 typescript :̹dx dy z4_guessStdinType d readStream X stdinType H[isTTY Q2 _isRawMode ^8isRaw V=MopKill >zsigno capiName 0 opRunStatus `\opRun $n runStatus S stderrOutput OclearEnv ˱spawnChildInner 2opFn nwindowsRawArguments yB spawnChild B collectOutput WM_pipeFd   [[pipeFd]]  getPipeFd ^? #waitPromise LIL #waitComplete 쯦#pid 8D#stdin 4#stdout ; #stderr FstdinRid >vJ stdoutRid ⇠4 stderrRid h waitPromise S#status .#command _ outputSync zP|Y kInternal ^internal properties fNqreplaceUnderscoresRegex ^'%leadingDashesRegex vxo^--? ntrailingValuesRegex .=.*$ zdtrimLeadingDashes  nodeFlags ~=҆NodeEnvironmentFlagsSet gtx noEscapeTable " >c2 6ext:deno_node/internal/readline/emitKeypressEvents.mjs JInterfaceConstructor  . kAddHistory +MkDecoder *u kDeleteLeft HkDeleteLineLeft B!HkDeleteLineRight * kDeleteRight *RkDeleteWordLeft vJ4kDeleteWordRight BDkGetDisplayPos | kHistoryNext ~` kHistoryPrev 8 kInsertString "͊kLine  lineEnding &\r?\n|\r(?!\n) >{ekLineObjectStream line object stream }ESCAPE_CODE_TIMEOUT Dhistory  historySize EcaremoveHistoryDuplicates jg crlfDelay Eprompt 4 ontermend _X onkeypress onresize 9onSelfCloseWithoutTerminal fonSelfCloseWithTerminal nء setPrompt 2 getPrompt >% wasInRawMode "XlpreserveCursor *B( stringToWrite J~=dupIndex edispPos &BXlineCols : lineRows ¨ cursorPos *2/prevRows %fB^\n ^IrWnewPartContainsEnding beg }{ completeOn completionsWidth f, maxColumns reij lineIndex d whitespace RCC completion rleading hreversed B :f^\s*(?:[^\w\s]+|\w+)? vtrailing *>^(?:\s+|[^\w\s]+|\w+)\s* charSize z^3w^(?:\s+|\W+|\w+)\s* &' col ݗcols &¡strBeforeCursor N^7oldPos 7newPos c diffWidth % previousKey ʛ \r\n|\n|\r ʚ lineListener NMV closeListener |@kConnectOptions  mUconnect-options ׵" kIsVerified verified *G(kPendingSession pendingSession 9?kRes b onConnectEnd ~, _tlsOptions :_secureEstablished V_securePending nT_newSessionPending F[_controlReleased NCsecureConnecting ޖP _SNICallback J+ authorized vauthorizationError "rssl &u_start  tlsOptions NX_cert /l _wrapHandle ֜tlssock 92t afterConnect 8 _tlsError v_releaseControl getEphemeralKeyInfo "TisSessionReused R setSession Ɲ_session >)w setServername ҩ> _servername getPeerCertificate RѮS _detailed normalizeConnectArgs JƲlistArgs wNipServernameWarned J#listen vM9onConnectSecure ƸallowUnauthorized $getAllowUnauthorized :f)G _hostname unfqdn N\V[.]$ ^U!_asyncId =б_prop 2 YkExecutionAsyncId Z?xUkTriggerAsyncId 6z:kAsyncIdCounter  _-kUsesExecutionAsyncResource BaaasyncHookFields  UidFields 6=kUidFieldsCount 2] DIRHANDLE @X DNSCHANNEL VH% ELDHISTOGRAM ~$ˎ FILEHANDLE tFILEHANDLECLOSEREQ ,JFIXEDSIZEBLOBCOPY h FSEVENTWRAP q FSREQCALLBACK [ FSREQPROMISE cGETADDRINFOREQWRAP (GETNAMEINFOREQWRAP K HEAPSNAPSHOT NQ HTTP2SESSION R HTTP2STREAM {8 HTTP2PING U# HTTP2SETTINGS FXHTTPINCOMINGMESSAGE ʅHTTPCLIENTREQUEST ~LJSSTREAM o JSUDPWRAP ~/ MESSAGEPORT _PIPECONNECTWRAP qx0PIPESERVERWRAP ^PIPEWRAP ޽ PROCESSWRAP  PROMISE \g QUERYWRAP . SHUTDOWNWRAP &kI SIGNALWRAP F STATWATCHER checkOptionUsage իx shortAndLong Y storeOption zf F optionConfig zpoptions. [.type eK shortOption U{I.short imust be a single character Xջmultiple o3 .multiple ~Z7 positionals <~])) q0DiffType Z$removed common >REMOVED F|COMMON  ADDED Nv createCommon ZK prefixCommon ޾ݭ suffixCommon & pswapped vQIdelta %Nfp iQroutes ;3diffTypesPtrOffset ptr l-e backTrace createFP ~xpslide &$5down snake Y_offset  ([\b\f\t\v]) LINE_BREAK_GLOBAL_PATTERN k \r\n|\r|\n LINE_BREAK_PATTERN w (\n|\r\n) <WHITESPACE_PATTERN rWHITESPACE_SYMBOL_PATTERN A6([^\S\r\n]+|[()[\]{}'"\r\n]|\b) zLATIN_CHARACTER_PATTERN ,Ib^[a-zA-Z\u{C0}-\u{FF}\u{D8}-\u{F6}\u{F8}-\u{2C6}\u{2C8}-\u{2D7}\u{2DE}-\u{2FF}\u{1E00}-\u{1EFF}]+$ 5tokenize )wordDiff ʇ2 tokens  createDetails ?aLines bLines ՝ createColor $diffType &a background  messages _Z diffMessages   Encodings S'ext:deno_node/internal_binding/_node.ts +ASCII cBASE64 IA BASE64URL jBUFFER bυ HEX ޽LATIN1 +WUCS2 "}UTF8 j indexOfNeedle / needle <pin Mdmatched ^y> numberToBytes s targetBuffer *searchableBuffer [searchableBufferLastIndex *GbufferLastIndex R{lastMatchIndex matches nvaforwardDirection  byteArray 2 base64clean V INVALID_BASE64_RE I[^+/0-9A-Za-z-_] E/eqIndex units ~needed serializePermissions j8ext:runtime/10_permissions.js I,~ext:runtime/06_util.js ୡ createWorker  hasSourceCode b}4 sourceCode # permissions JĦ+ workerType 0hostTerminateWorker ~ohostPostMessage  hostRecvCtrl *fqhostRecvMessage N#id ?#name ~4RUNNING fbaseUrl . #pollControl Z #pollMessages 3Z #handleError r@ TERMINATED ~ Unhandled error in child worker. }&Host got "close" message from worker: ֶ(Unknown worker event: " jports 8WorkerPrototype @ WorkerType =classic u httpClient r{ffi V@}ext:deno_ffi/00_ffi.js ext:deno_http/01_http.js bKext:runtime/01_errors.js Zext:runtime/01_version.ts Fext:runtime/13_buffer.js ՖfsEvents {Mext:runtime/40_fs_events.js Vext:runtime/40_signals.js jB[!ext:runtime/40_tty.js vb httpRuntime o}ext:runtime/40_http.js kv ^Cext:deno_kv/01_db.ts ext:deno_cron/01_cron.ts denoNs ~ warnOnDeprecatedApi ]HDeno.metrics() watchFs z&} writeAllSync N Permissions JEPermissionStatus U serveHttp wwWaddSignalListener fremoveSignalListener ^g consoleSize *~t unsafeProto Fv workerOptions denoNsUnstableById ʠgpdenoNsUnstable &)}}stdTimingSafeEqual /kSize jkMask WUFixedCircularBuffer Fbottom ܦtop isEmpty 0YisFull >YnextItem d fileOptions ZPnotImplementedEncodings ) bufferOrOpt zo bufferOrStr qIoffsetOrPosition xlengthOrEncoding ] onconnection Ҝ%isSuccessStatus > roundPowOf2 ~槃 assertPath ѣisPathSeparator V0isWindowsDeviceRoot  normalizeString Y$ ext:deno_node/path/_util.ts [F pathSegments kresolvedDevice Ω resolvedTail *!resolvedAbsolute ;rootEnd '\ firstPart 2 pathsCount jjoined 4A needsReplace % slashCount vIfirstLen By&fromOrig DtoOrig c fromStart ڊ{FfromLen f*toStart `ytoEnd `btoLen Д lastCommonSep n5fromCode ƘtoCode X resolvedPath ru matchedSlash Fdrive  %extIdx XfirstNonSlashEnd qXstartDot 2dc startPart M! preDotState K pathObject SmisPosixPathSeparator " trailingSeparator …;hasRoot v7SEP vkqext:deno_node/path/separator.ts :q|- endOfPrefix KEYPRESS_DECODER ެKkeypress-decoder zޅESCAPE_DECODER Οescape-decoder Viface H triggerEscape KescapeCodeTimeout z\ onNewListener gVl _tabCompleter P firstShort longOptionEntry LZ_TREES ZSZ_BINARY @.Z_TEXT K$ Z_UNKNOWN r: Z_DEFLATED :TU writeResult 'in_off 6Sin_len ҷgout_off out_len  #checkError F{availOut E,availIn B0o windowBits [memLevel ZBINARY Ϊ*permissionNames PopQuery BVopRevoke &UH opRequest onchange Jpartial .y dispatched FxQ statusCache na rawStatus T cachedObj f7OisValidDescriptor F߱formDescriptor   querySync f revokeSync bq requestSync BYFserializedPermissions U2>LogLevel ukWarn  Info zڌDebug ! logSource XJS .E logLevel_ &@logLevel zlPermissionDenied n6ConnectionRefused EOConnectionReset ConnectionAborted 2b NotConnected TQ AddrInUse RAddrNotAvailable  H BrokenPipe څԋ AlreadyExists f InvalidData 7TimedOut V WriteZero 6IE WouldBlock  UnexpectedEof WXHttp \Busy "5 NotSupported jFilesystemLoop -p IsADirectory rMNetworkUnreachable . NotADirectory ހ,j setVersions ^ denoVersion *H v8Version N s tsVersion *`RMIN_READ m copyBytes ,#off L#reslice &#tryGrowByReslice (qrr Jn#grow j̞3readFrom +%ext:runtime/98_global_scope_window.js ZL%ext:runtime/98_global_scope_worker.js R3V8 supports Symbol.dispose now, no need to shim it! ̭8V8 supports Symbol.asyncDispose now, no need to shim it! 6&4V8 supports Symbol.metadata now, no need to shim it! 8windowIsClosing n verboseDeprecatedApiWarning 3deprecatedApiWarningDisabled vVGALREADY_WARNED_DEPRECATED W suggestions seisFromRemoteDependency v<firstStackLine B% suggestion ,P windowClose " workerClose I isClosing RuglobalDispatchEvent :pollForMessages d ImsgEvent  8 errorEvent +loadedMainWorkerScript R* importScripts Durls BE\ parsedUrls z scriptUrl voscripts 0opArgs 1opPid &VopPpid nǶformatException C$DOMExceptionOperationError :wDOMExceptionQuotaExceededError fDOMExceptionNotSupportedError ] DOMExceptionNetworkError *DOMExceptionAbortError *JS!DOMExceptionInvalidCharacterError DOMExceptionDataError B runtimeStart NpԚ processUnhandledPromiseRejection processRejectionHandled ݒrejectionEvent %FrejectionHandledEvent JFhasBootstrapped b2exposeUnstableFeaturesForWindowOrWorkerGlobalScope ::X unstableFlag  unstableFeatures  featureIds N featureId R;jNOT_IMPORTED_OPS z^ op_bench_now Oeop_dispatch_bench_event op_register_bench 7Bop_jupyter_broadcast ) op_test_event_step_result_failed !op_test_event_step_result_ignored 2Fop_test_event_step_result_ok "Dzop_test_event_step_wait kop_test_op_sanitizer_collect op_test_op_sanitizer_finish s&op_test_op_sanitizer_get_async_message r3op_test_op_sanitizer_report NLdOop_restore_test_permissions wop_register_test_step Aop_register_test 4op_pledge_test_permissions  &:removeImportedOps Z allOpNames ~' internalSymbol ns Deno.internal  finalDenoNs vbootstrapMainRuntime HrruntimeOptions ک location_ N%a inspectFlag .8hasNodeModulesDir maybeBinaryNpmCommandName ª!shouldDisableDeprecatedApiWarning ^L$shouldUseVerboseDeprecatedApiWarning future O?consoleFromDeno j0 jupyterNs F+бbootstrapWorkerRuntime J internalName 'enableTestingFeaturesFlag "~{a _exitCode H mainRuntime V, workerRuntime ͛\is not a finite number ‹I!is outside the accepted range of .Ȋh to :F , inclusive jbclamp J;#can not be converted to dictionary. Za0123456789abcdef eno.privateCustomInspect] }s__node_internal_ bsLc Iterator :lkCannot redefine property: ^@is not of type q[updateUrlSearch] :o\\u Υj6\u jQ֐-\\u R-\u zs[[[signalAbort]]] N [[[remove]]] m [[[add]]]  [[[PullSteps]]] N)[[[CancelSteps]]] Z[[[ReleaseSteps]]] ^[[[AbortSteps]]] .[[[ErrorSteps]]] R\ )Cannot convert a BigInt value to a number ԗconst unix = Deno.build.os === "darwin" || Deno.build.os === "linux" || Deno.build.os === "android" || Deno.build.os === "openbsd" || Deno.build.os === "freebsd"; return { biR: view[ !( ] + view[ w ] * 2**32, |a: (unix ? (view[ H] * 2**32) : (view[ 4?] * 2**32) || null), /h] === 0 ? null : new Date(view[  ] * 2**32),  : !!(view[ zq: (unix ? !!((view[ VR] * 2**32)) : !!((view[ r] * 2**32)) || null), nv }; jɐ(function anonymous(view ) { const unix = Deno.build.os === "darwin" || Deno.build.os === "linux" || Deno.build.os === "android" || Deno.build.os === "openbsd" || Deno.build.os === "freebsd"; return {isFile: !!(view[0] + view[1] * 2**32),isDirectory: !!(view[2] + view[3] * 2**32),isSymlink: !!(view[4] + view[5] * 2**32),size: view[6] + view[7] * 2**32,mtime: view[8] === 0 ? null : new Date(view[10] + view[11] * 2**32),atime: view[12] === 0 ? null : new Date(view[14] + view[15] * 2**32),birthtime: view[16] === 0 ? null : new Date(view[18] + view[19] * 2**32),dev: view[20] + view[21] * 2**32,ino: (unix ? (view[22] + view[23] * 2**32) : (view[22] + view[23] * 2**32) || null),mode: (unix ? (view[24] + view[25] * 2**32) : (view[24] + view[25] * 2**32) || null),nlink: (unix ? (view[26] + view[27] * 2**32) : (view[26] + view[27] * 2**32) || null),uid: (unix ? (view[28] + view[29] * 2**32) : (view[28] + view[29] * 2**32) || null),gid: (unix ? (view[30] + view[31] * 2**32) : (view[30] + view[31] * 2**32) || null),rdev: (unix ? (view[32] + view[33] * 2**32) : (view[32] + view[33] * 2**32) || null),blksize: (unix ? (view[34] + view[35] * 2**32) : (view[34] + view[35] * 2**32) || null),blocks: (unix ? (view[36] + view[37] * 2**32) : (view[36] + view[37] * 2**32) || null),isBlockDevice: (unix ? !!((view[38] + view[39] * 2**32)) : !!((view[38] + view[39] * 2**32)) || null),isCharDevice: (unix ? !!((view[40] + view[41] * 2**32)) : !!((view[40] + view[41] * 2**32)) || null),isFifo: (unix ? !!((view[42] + view[43] * 2**32)) : !!((view[42] + view[43] * 2**32)) || null),isSocket: (unix ? !!((view[44] + view[45] * 2**32)) : !!((view[44] + view[45] * 2**32)) || null),}; }) N~7[Symbol.dispose] `The provided value ' W]$' is not a valid enum value of type treatNullAsEmptyString PU2is a symbol, which cannot be converted to a string sutf-8 S\!Failed to construct 'TextDecoder' > Argument 1  Argument 2 >Ne Undefined .Null ZX$can not be converted to a dictionary 6 G&' of ' V ( j Ycan not be converted to ' ʳ ' because ' j^' is required in ' nN(T'.  G\$& jt.* LR$|^ [Symbol.asyncDispose] Noptions.captureRejections n--track-heap-objects V--no-track-heap-objects ʆ--node-snapshot z--no-node-snapshot &---max-old-space-size έ} --trace-exit EE--no-trace-exit 2['--disallow-code-generation-from-strings j%9--experimental-json-modules --no-experimental-json-modules &o4!--interpreted-frames-native-stack >Ɏt --inspect-brk |`S--no-inspect-brk @& --trace-tls d--no-trace-tls --stack-trace-limit 4u--experimental-repl-await ң+:--no-experimental-repl-await BÒa--preserve-symlinks &--no-preserve-symlinks {&--report-uncaught-exception x--no-report-uncaught-exception 1u--experimental-modules ƒR--no-experimental-modules L --jitless ڶ--inspect-port c--force-context-aware d --no-force-context-aware L--napi-modules --abort-on-uncaught-exception GS--verify-base-objects n--no-verify-base-objects 2=--perf-basic-prof --trace-atomics-wait bw--no-trace-atomics-wait j+ --deprecation ~) --perf-basic-prof-only-functions # --perf-prof v(A--report-on-signal ]v2--no-report-on-signal m--no-throw-deprecation  l\ --warnings f --no-warnings --no-force-fips --pending-deprecation Z--no-pending-deprecation ƽF--tls-max-v1.3 T>u--no-tls-max-v1.3 O--tls-min-v1.2 J--no-tls-min-v1.2  --inspect ҅ --no-inspect >---trace-warnings "G--no-trace-warnings }m--trace-event-categories Y--experimental-worker 61--tls-max-v1.2 *c--no-tls-max-v1.2 vo--perf-prof-unwinding-info bh--preserve-symlinks-main V 3--no-preserve-symlinks-main nC2 --experimental-wasm-modules F--no-experimental-wasm-modules lDB--node-memory-debug ~{--tls-min-v1.3 f|--no-tls-min-v1.3 w\--tls-min-v1.0 $--no-tls-min-v1.0 m^--experimental-report oc--trace-event-file-pattern /--trace-uncaught --no-trace-uncaught  6 --http-parser گ˞--trace-sigint --no-trace-sigint [Q --enable-fips Fi--no-enable-fips J 3--enable-source-maps fFU--no-enable-source-maps R--insecure-http-parser J'Y--no-insecure-http-parser ^a--use-openssl-ca e--no-use-openssl-ca ֜--experimental-top-level-await l!--no-experimental-top-level-await R>E--report-on-fatalerror >u--no-report-on-fatalerror ɳ--tls-min-v1.1 B5--no-tls-min-v1.1 z--trace-deprecation [B--no-trace-deprecation FU--report-compact J»A--no-report-compact "--experimental-import-meta-resolve &c|%--no-experimental-import-meta-resolve  z--zero-fill-buffers ;--no-zero-fill-buffers f^h--use-bundled-ca --no-use-bundled-ca JN--experimental-vm-modules FO_--no-experimental-vm-modules FJ--force-async-hooks-checks N_--no-force-async-hooks-checks F --frozen-intrinsics x--no-frozen-intrinsics 6ur--huge-max-old-generation-size y!--debug-arraybuffer-allocations j"--no-debug-arraybuffer-allocations J>%--experimental-wasi-unstable-preview1 +M5(--no-experimental-wasi-unstable-preview1 5--trace-sync-io Fc--no-trace-sync-io "V)--experimental-abortcontroller V+ --debug-port Dۄ --es-module-specifier-resolution bE[--loader L3l--trace-events-enabled --no- bd process.on(" ݯ(") BSIG :Yo,Possible EventEmitter memory leak detected. & listeners % added to p. Use Rt#+emitter.setMaxListeners() to increase limit 9MaxListenersExceededWarning "` _undestroy >PisPaused CreadableDidRead QreadableAborted .VreadableBuffer readableFlowing *Y readableLength 0}readableObjectMode >readableEncoding A pipesCount ׶[nodejs.util.inspect.custom] jwbufferedRequestCount mwritableAborted :Wfunction promisify( original, ) { validateFunction(original, "original"); if (original[kCustomPromisifiedSymbol]) { const fn = original[kCustomPromisifiedSymbol]; validateFunction(fn, "util.promisify.custom"); return Object.defineProperty(fn, kCustomPromisifiedSymbol, { value: fn, enumerable: false, writable: false, configurable: true, }); } // Names to create an object from in case the callback receives multiple // arguments, e.g. ['bytesRead', 'buffer'] for fs.read. const argumentNames = original[kCustomPromisifyArgsSymbol]; function fn(...args) { return new Promise((resolve, reject) => { args.push((err, ...values) => { if (err) { return reject(err); } if (argumentNames !== undefined && values.length > 1) { const obj = {}; for (let i = 0; i < argumentNames.length; i++) { obj[argumentNames[i]] = values[i]; } resolve(obj); } else { resolve(values[0]); } }); Reflect.apply(original, this, args); }); } Object.setPrototypeOf(fn, Object.getPrototypeOf(original)); Object.defineProperty(fn, kCustomPromisifiedSymbol, { value: fn, enumerable: false, writable: false, configurable: true, }); return Object.defineProperties( fn, Object.getOwnPropertyDescriptors(original), ); } ʡ(@options.timeout " options.tries +[kUpdateTimer] 1)get [kUpdateTimer] ȹ[kAfterAsyncWrite] Vd/[nodejs.rejection] BLkeepAliveMsecs nf maxSockets  g`maxFreeSockets *maxTotalSockets NtotalSocketCount rfifo j> 0 r5free Kagent.on(free) bY _httpMessage ]first argument 4Array-like Object ڕ ucs-2 [utf-16le nbinary R The value " ;" is invalid for option "size" *:argument N/Failed to execute 'encodeInto' on 'TextEncoder' Illegal invocation @util.promisify.custom >>r[iterable headers] [get [iterable headers] ^[body] ; get [body] T% [mime type] ysget [mime type] "/L [headers] c get [headers] v59 set [headers] *+DbodyUsed r[[[[matchAll]]] &q!Illegal constructor. _onmessageerror ^IY'get defaultValue  assignedSlot &{hasActivationBehavior $[[[eventLoop]]] JZ[[[serverHandleIdleTimeout]]] .neonopen  [[[loop]]]  [[[present]]] "Failed to construct 'Response' "yFailed to construct 'Headers' *H [_upgraded] vhget [_upgraded] R ctime :W1[kFSStatWatcherAddOrCleanRef]  T[kFSStatWatcherStart] [kMaybeDestroy] ~[init] maxCachedSessions Rb _sessionCache ʆO [onMessage] z;j[kNewListener] B ![nodejs.internal.kHybridDispatch] ޟ[kRemoveListener]  ;[kCreateEvent] B\[_deleteWordLeft] n?[_historyPrev] k[_deleteRight] p [_wordRight] >[_getDisplayPos] 2[_normalWrite] f9[_refreshLine] ~ [_moveCursor] &[_historyNext] b[_deleteWordRight]  Bh[_line] }: [_ttyWrite] n&<[_insertString] ah[_tabComplete] H[kQuestionCancel] b4 [_wordLeft] F [_deleteLeft] o [kQuestion] [_writeToOutput] gݳ [_addHistory] @[_tabCompleter] ^l- [_setRawMode] ݝ[_deleteLineRight] 6% [_onLine] Bq[_deleteLineLeft] /vsuperCtor.prototype F?super_ Ccm _http_agent Bq&_http_outgoing ?_stream_duplex RPQ_stream_passthrough BE_stream_readable i_stream_transform H_stream_writable ' assert/strict x dns/promises 8N fs/promises Ώinternal/child_process 0internal/crypto/certificate *3internal/crypto/cipher 3internal/crypto/diffiehellman binternal/crypto/hash Zlinternal/crypto/hkdf internal/crypto/keygen Ninternal/crypto/keys b2finternal/crypto/pbkdf2 ~%internal/crypto/random  *internal/crypto/scrypt ޢinternal/crypto/sig internal/crypto/util >2internal/crypto/x509 F8internal/dgram ZYginternal/dns/promises b`Ninternal/errors  Sinternal/event_target  ?internal/fs/utils |i internal/http f~internal/readline/utils *o}!internal/streams/add-abort-signal  $internal/streams/buffer_list ַ_internal/streams/lazy_transform  $internal/streams/state ڶinternal/test/binding n9internal/timers internal/util/inspect F internal/util ;~ path/posix i. path/win32 readline/promises >]stream/consumers &lystream/promises Ϛ stream/web *htimers/promises ^~ util/types B+ get punycode Ql;The `punycode` module is deprecated. Please use a userland alternative instead. 4DeprecationWarning 90DEP0040 >Warningƞ~<a: 4 &:YAK: Y: Ya: Y: Y: Ya^: Y: YA: YA: Y: Yx: Y{: Y~: Yz: YA: Y!: YS: Y: Y: Y: Y: Y I#mA!\:K\:r1qlb$J $a"%`|A :j(_1a:; "i!g:1:8ZB.Vs ::k.c9 :brZ6! :"s6 :# 1a^ :ʬB:#^<b)j :e:['nDUAh:ލa.: 7u.:aa/:r4O/:Bua0:0:jAh:nYdAh:UfAh:FhA6:F_a/:Z'KA:naAh:fLA6: Ma/:ZA:&!;:A1 :AjB Pe:e+  :pz@b .Kbe,O2ʡFH:l"N4FK"BI˚6N 7bekf*o=j7(U;hJii~Q :ja : s :Ώ? :YQl:-:ұ|H:{N*:A:*U : |A :֍q:5r:Z,A :va:~A:*0:(ɥa:k:V:ZUp:ía :2y :*'A :VR\ :6Ia :6 :py :^W$ :f :> k1a:N,:ͪ%bbs: t:Yr: Yt: YAo: Y!s: Y~: Y: Ya: Y: Y YA: Y: YA: YA: Y: n0Y :r :~$": # :.qN: aO:GaQ:lQ:HaR:ZR:6GS:5X:$ۑ!U:6$LU:]aV:7V:ZNXaW:zX:q:tA:5:CZ:ba::8r:\\:Ҋ@^:*^"D'R!"FyF"qyDX"EnBERgHvfGJ\HAn"G";b1JZZA.;v"?"<Ue<*9=^-@0'e=">1>`>BLb.J"CNQCʟ?6**+Z\K.V KkK*% BPY%a:3Q:::H:'Dv+c1´jg:b5ap:+eap:ni:r}!:&Yp"`1bp::!::a::a: : : : :A::!::a::!:::::!:::!:a(:,:/:??????????????????????????????K`1qA :q"`1qA :v %"`1qAA:A"`1q@ :>~"`1qA :'"`1bpW@Ca:R::&}("`1bpW":":R!":!":o,1"`1&@A#:@C?? `1bpWJ--0`1&@:?`1bpWA : :R!:!:+$,"`1bpWO+,`1bpa:::::::`:!d: :a::a::a::A::A:::!:::?????????????????????????????[0`1xM!$:23"ZQ:`1qA:R:< `1qA!: `1qA!:RA:'B!ada:-]:<%N!:$1a2 :s@а]BFX}B!bb/Y+:r7A:_(!:w!:6!:bم:F:FT:Ҩ#:5d:~:EbA:bn:!:rt:U! :" :ּÍ#:*>=:"c:k#:v-:j@:}1:'al:[Saj:?":d:>::Z+Օ:2:b: /:R*::A:τ:=oaj:v!^::03:|:VkA:eT:z^{1Af:vͱ2f:6X!g:2naj:B//Ak:bal:鸷m:Vt'`n:v(o:vAp:6P:66:::P:3:cZ:p:~9:lٖ:n!:::zA%: G%:BfAh:rzAh:*vAh:bTAh:JUl:0Zo:|ap:Hp:Aq:z\)q:!r:^lr: z:"!:23Ah:&r:\Za.:~e.:$:J`c:1!{ :NA.9!g:dNRvAh:F2L:611M:$ô1G:Ah:^8M:&wjAh:]uAY: !Y:B!!Z:½L`: լ!a:RM "a:6E\b:ab:hS:/b:ڊA :j"i~UN:vjq2oTqëbr4ap:✰!2 :q2 :&3 :b7 :J{.ap:5!2 :wo2 :U3 :jn :zuao :1! :pA> :&> :&u!? :Ne? :NL!@ :\!J :9J :++kK : WTaK :R)ap:&aS :2/S :!T :mT :zlaU :>8| :vU%| :?g:! : a :f[b :J! :  :yC :ZZ :F :7 :U1 :&T :$a0:ƃa :HLA:N :Ҿ :rA :U  :A6:6A : ::ϰa/:͞! : # :[BhRwBi#k"jS:1 ::8 : :~P :rg: :*HF9 :']A :/":)pA :r:R :{>u :~!:cDwH:2 :*b :Ba :w :a :z)A : :[a :Rk  :^}D :la ::ƽH :҈%a :fAh:%iaf:wm-q:%6Va :2p :f  :A :l :ߺ2 :޾fXa :Y1: Y2: Y2: Y3: YA4: Y4: YA5: Y5: YA6: Y6: YA7: Y7: YA8: Y8: Ya9: Y9: Ya:: Y:: YA;: Y;: Y<: Y<: Y!=: Y=: Y!>: Y>: Y!?: Y: Y: Y: Y: Y: Y!: Y: Y: Y: Y) Ya: Y!: Ya: Y: Y: Y: Y: YA: Ya: Y: Y: YA: Y: Y!: Y: Y: YM Y: Y!: Y: Y: Ya: Y: Ya: Y: Ya: YAv: Y!: Y: YA: Y: Y: Y: Y!: Ya: Y: Y: Y: YA: Y: Y: Ya: Y: Y: Y: Ya: Y: Y: Y: YA: Y!: Y: Y!: Ya: Y: Y: YA: Ya: Ya: Y: Ya: Y: Y: Y: Y: Ya: Y: Y: Y!: Y: Y: YA: Y: Ya: Y: Y.: Y5: YA3: Y5: Y>: Y<: Y;: Y!;: Y!,: Y: Yb Y" Yc Yc Ya: Ya: Y: Ybb Y` Y YB Y" Y Y Y : Ya : YA : YB Y: Y: Y: Y` Y> : Y : Y : Y : Y: YA: Ya: YB~ Ya: Y: Y‡ Y Y: Y Y YB YA : YB Y` Y" Y! : Y : Ya^ : Y: Ya: Y! : Y : Yb Yb Yq Y Y Y YBr Y"q Ya : Y Y Y Yb Y Yb Y Yb Y : Y Y: Ya : Y: Y: Y!: Y: Y : Y&: YAA: Y1: Y2: Y2: Y!3: Y3: YB YA4: Yq: Y4: YA5: Yg : Y5: YA6: YŽ YB Y6: YA7: YB Y Y YX : Y7: YA8: Y8: Ya9: Y9: Ya:: Y:: YA;: Y;: Y<: Y<: Y!=: Y=: Y!>: Y Yb Y : YB Y>: Y!?: Y3: Y Y` Ya3: Yy : Y3: Ys Ya : Y Y O Y@` Y!5: YA4: YC Y Y4: Y5: YA: Y: Y: Ya: Y: YAI: Y: Y!: Y!: YI: Y): YA*: YA): YL: Y: Y: Y: Y!: Y: Y: Ya: Y: YaJ: Y: Y": Y: YA: Y!: Y!: Y6: Y: Y$: Y: Ya: Ya: Y+: Y?: YC: Ya@: YC: YD: YA: Ya: Y|: Y!: Y  YL Y&: Y  Y"  Y YB Y!{ : Y: Y!: Y: Y Y: YV: Y! : Y: Y: Ya(: Y(: Y Ya": Y Y Ya: YB Y : YH: YaV: Y* : Y : Y  YB  Y  Y: Y"  YN: YG: YS: Ya]: YF: Y!i: Yf: Yg: Y!: Y!: Y: Y: Y: Y!: Y: Y: Y: Y: Y: Y: Ya: Y: Y: Y: Y!: Y: Y: Y!: Y: Ye: Y!l: YB: Yo: Y!.: Yy: Y!w: Y: Ya: YA: Ya2 : Y: Y: YA: Ya: Y: Y: YA: Ya: Y: Y: YA : Ya: YA: Y : Ya: Y": Y: Y: Y: Y!: Y: Ya: Y: Y: Y;: Ya?: Y: Yf: YX: YQ: YA: YAZ: YO: Y!H: YT: Ya : Y^: Y!_: Y!T: Y!=: YZ: YK: Y: Ya: Y: Yas: Y: YA: Y: Ya: Y: Y: Y: Y: YA: Y|: Y: Y!: Y: Y: Y: Y!: Y: Y!: Y!: Yk: Y: Ya: Y!: Ya: Y: YA: Y: Ya: Ya{: Y: YA: Y: Y~: Y!: Ya : Y: Y: Y: Y>: Y?: YD: Ya5: Y4: YAG: YQ: YQ: YAO: YU: YaN: YaM: YK: YAL: YaU: Yb: Yd: YA]: Yq: YAf: Y: Ya: Y: Y!: Y: Y!: Y!: Y!: Y: YA: Ya: Y YB Y Y Y" Y’ Ya: YB Y Y" YB0 Y Y Y YB Y Y1 Yˆ Y Y YB Y" Yb Y" YB Y Y Yb Y" Y Y‡ Y" Y Y0 Y/ Y1 Y" Y´ Y : Ya : Y! : Y: YZ : Y>: Y : Y : Y` Y! : Y: Ya: YE : YAF : YF : Y!; : Y> : YA : Y> : YA@ : YB : Y= : Ya? : Y!A : Y< : Ya= : Y@ : Y? : Y!> : Y= : Y; : YC : YD : YaB : YC : YE : YB : YAD : YaE : Y!C : YaG : YH : YH : Y; : YA< : Y: Y@ Yk Y"p Ym Yp Yo Ybn Y : Ys Y: Y: Y: Y: Y: YA: Y: Y: Y!: Y: Y: YA: Y: Y!: YA: Y[ Y\ YS `1xM%:M66"a:21a:†!:Ha:֬q9:`1xM%:b44"`1pG:$'d' `1pm'' `1pm@Co'' v1:?!:f.A:bdaf:-f:NzѭAg:Fg:"zAh:l:F,!m:uD!p:V |!m::d :S=uh :J?e :&I$>^Jhwl`Z+.`1xM$:z33":6`F:n۠1A:(a :p1A :' :"! :^ :£! :R"V :R!:v>:>:bAa:Ne:|AL: M:BKfaO:3*: y@:Knj:a:ž)!:RA:SDIA:ZY]o:&CHT:Vjha: :sA:Mm~:A:ƒ:Z?!:&D!:LA:}!:~:A:N#=!:7::K:3{: ::+A:j^j:~:ja:CA:=:`1qmhHH">A:.1:Z)NA:2G:> :8}=: a:,Fa:9:C:h:\F!:&R½a: a:&:ba:>9a:+:>Y:&( :2Kv)!:V":eQ#:$:Vb%:&:u(:9i):&A*:n0w+:,:.:n !/:зA0:.vA1:A2:jA3:eA4:\!5:s!6:A7:A!8:R!9:N0A::a;:a:> !<:21*=:\>:Z?:vD@: `A:f6kB: eC:9D:t_>E:67ӳF:+G:`1xM&:47o7">5~:,!:Xa:A:6:ה[7:'!9:&'A:FU#C:VʏD:!HAh:n=a0:0Ah:0:rAAh:+P0:`1qAh:Na0:.Z0:F+/Fo"0ֈ1~n{1&%b2z=:CA:2},::/::S1a:T!:~L:RqB:>&O:r+O\/Ah:fFrsb&t6~7B&gHyeB!B'!"  :$I$!@$$""I$I""BH$"DDDDD"!DD$BD""HHDDID!HDH"D"!""DH!!!"HDDI$""D" B@DDD""$IB $""BD$"DD!!$!B !D"ID@HD$$HDHH""H$""""BD""H" @D"HDDDDB$H$I""H$B!D$$""$""D"$D$"IDDDB @@ @DD"""D""IB$I!"DDH$IDD$I$AH$$""B!"H""""""I"DDDDD$"""B!""""""""""""""""""""""B!""""D"@@ !I"BDDB$DD$$ @DDA@BDDDDB"D$$IBDDDDDDDD$"""""!""$D! B!B! A!B!A""D$"""BHB$ID""BDD!!DB!!A@B@ @ @ @@B@  A$D!"D"ID!"""ID@$IH$D$"H"DD"!D$" !"""$I$I$$ "@DD$@DD$I""!$AB"" "!"BH$D$DDDBDB@$!IBDD$BB"I$!BBBA"DH!B !$BB B@BBBD"D@DA$B!!$HHDHD$""H I$A A$I$IH$I"DD" HDDBHH "H$DDDDDD$"""!""""I""BH"""I" HBBBIDDDD""DD$!!B$I""""!""BHDD"D"!"H!D""DDD B@I$HDHDDDDDDDDD$I$ID$IH$I"!B I$HD $I$ ""IBDDH H! !!$D""B! I"HD"DDD""$DHII$D""BD""DDD$"HBDHDD D$"A  @ BDDHHDD!B!B! A B!""DDD"" DDH!D$"B"B  H "$IB"AAB "B!D!!B!DB!BD! BA"!D !@ D !"B$DBHDDD"DD A DBDB"DDB!!B"DD =88888m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶qqqѶm۶m۶m۶m۶m۶m۶m۶m۶m6DeQFSƔ1ƔQ%FeQٶm۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m۶m888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888㈲meAFٶm۶m۶Qm۶m۶m۶m۶m۶m۶mm۶m۶m۶m۶m۶m۶m۶mm۶m۶Qڶm۶m۶m۶@@I`J`+`0@@ <`%)`:P `1@[EF H 85N4 e/1+ ,+`,,** +3;W7>`\ TM@92@RKUL @V Q Z AY@``@B`CD`S @`'( &=@ @`@ `   `@" #@$ , NP Q0edMFH@IIb d`/0G f`ffef g`ggg , - J K@LMG]N]@^^ __ ```ccdd`ee`ff@gghhi`ii@jj@kk@ll@mmn`nn@oo@pp qq`rr sss@tt uuvvv@wwx`xx yyzz{`{{`||@}}`~~@` @@ @@@@@ @ `@`@ `@ `@@@`  ` ````@ @ ` ``@``  @  ``@ `    ``` `@`  `@ `@``@`@  `@@`@ @@@ @@@  @`@ `@  @`@ `  `@  `  `     @  ```@  @@@@@ `@ @  !!"" ## $$%`%% &&&@''(((@))@*``@aab`b`-- ...@//0`00 111@223`33 444@556`66 777@889`99 : ;@< =>?@A h@i`jklmnp q@r`stuvwy z@-@{`|}~`. @` @``+ @` @` @` @ B@CCD`DD EEE@F@`pTR6op_event_loop_has_more_workRJ'op_is_arguments_objectRvX op_get_proxy_detailsRdP]op_dispatch_exceptionR?Yop_is_boxed_primitiveR*op_str_byte_lengthRʘ;op_is_any_array_bufferRop_has_tick_scheduledR &y{ op_is_reg_exp R*]1rop_panicR>iop_run_microtasksR BAh op_decodeR B op_encodeRNQ?op_set_has_tick_scheduledR^top_opcall_tracing_get_all Rfaop_printR~<op_is_typed_arrayR z op_is_setR op_is_array_buffer R!CopsR }-op_timer_queueRop_is_symbol_objectR -:op_is_weak_mapR -Dop_deserializeR⥞Wop_is_async_functionR Y op_resourcesR +op_timer_unrefR }.( op_is_mapR   op_unref_opR Zp op_serializeR iop_is_generator_objectR^aMop_opcall_tracing_enableR&op_is_map_iteratorR &M op_is_proxyR f op_is_dateRHop_is_big_int_objectR ZWop_is_number_objectR ^ٴ op_ref_opR op_memory_usageRvop_is_native_errorR ֖ op_eval_contextRFop_current_user_call_siteR6`op_get_promise_detailsR op_is_data_viewR op_cancel_handleRKop_opcall_tracing_getRop_is_string_objectR gY op_op_namesR 6l op_timer_refR:op_encode_binary_stringRB&op_destructure_errorRJLop_opcall_tracing_submitRV'op_queue_microtaskR ^op_timer_cancelR 6{)op_is_weak_setR~Czop_is_set_iteratorRjOop_is_boolean_objectR93(op_set_handled_promise_rejection_handlerRWsop_abort_wasm_streamingRop_set_promise_hooksR/ٗop_is_generator_functionR eop_lazy_load_esmR u op_is_promiseR$op_set_wasm_streaming_callbackRsop_is_shared_array_bufferR̔op_is_array_buffer_viewRRop_is_module_namespace_object RyDeno RRcoreR J callConsoleR:϶Oop_format_file_nameRop_apply_source_mapR $op_apply_source_map_filenameR B __bootstrapRop_get_constructor_nameRrop_get_non_index_property_namesRop_preview_entries a8%(% av$<% aј% a % aA,% ay,% ar% a% aZeD4% aba$% a %  aN % a % R 9op_url_get_serializationR op_url_parseRgiUop_url_parse_search_paramsR"xop_url_parse_with_baseR op_url_reparseR&&op_url_stringify_search_paramsRzdop_urlpattern_parseRF֌!op_urlpattern_process_match_inputR _op_base64_decodeR /7op_base64_encode R/op_now Rgop_sleepR Eop_sleep_intervalR  op_timer_handleR & op_base64_atobR vop_base64_btoaR~op_arraybuffer_was_detachedR ~)m op_read_allRޞ$op_readable_stream_resource_allocate R$*op_readable_stream_resource_allocate_sizedRp'op_readable_stream_resource_await_closeR0!op_readable_stream_resource_closeRXF$op_readable_stream_resource_get_sinkRJp@%op_readable_stream_resource_write_bufRfƚ'op_readable_stream_resource_write_errorRb=&op_readable_stream_resource_write_syncR&'op_transfer_arraybufferRn0Lop_encoding_decodeRy=fop_encoding_decode_singleRRop_encoding_decode_utf8Rrop_encoding_encode_intoR]op_encoding_new_decoderR>op_encoding_normalize_labelRop_blob_create_object_urlR# op_blob_create_partRIQop_blob_from_object_urlRb op_blob_read_partRaop_blob_remove_partRzS;op_blob_revoke_object_urlR2Fop_blob_slice_partRz% op_message_port_create_entangledR*op_message_port_post_messageRNop_message_port_recv_messageR2op_compression_finishRrop_compression_newR怺1op_compression_writeR_.op_webgpu_surface_configureR"rop_webgpu_surface_createR%op_webgpu_surface_get_current_textureRhGop_webgpu_surface_presentRRj3op_fetch_custom_client RN% op_fetchR >?Wy op_fetch_sendRZ}Fop_wasm_streaming_feedRiop_wasm_streaming_set_urlR:&op_utf8_to_byte_stringR f~{jop_cache_deleteR &^op_cache_matchR Ө op_cache_putRޕ/op_cache_storage_deleteRop_cache_storage_hasR9iop_cache_storage_openRF2(op_ws_check_permission_and_cancel_handleR 8U: op_ws_closeR >d op_ws_createR V؀op_ws_get_bufferRzop_ws_get_buffer_as_stringRBop_ws_get_buffered_amountR op_ws_get_errorR fH99op_ws_next_eventRjop_ws_send_binaryR rop_ws_send_binary_abR N0r+op_ws_send_pingR Zyop_ws_send_textRnop_ws_send_binary_asyncR*rop_ws_send_text_asyncR>2op_webstorage_clearR =op_webstorage_getRr6qop_webstorage_iterate_keysRjop_webstorage_keyRiop_webstorage_lengthRbqlop_webstorage_removeR&op_webstorage_setR~Zop_crypto_base64url_decodeRG{op_crypto_base64url_encodeR op_crypto_decryptRop_crypto_derive_bitsRIՉop_crypto_derive_bits_x25519Rf op_crypto_encryptRop_crypto_export_keyR:Xop_crypto_export_pkcs8_ed25519Rr-uop_crypto_export_pkcs8_x25519Ryop_crypto_export_spki_ed25519RPop_crypto_export_spki_x25519RFa"op_crypto_generate_ed25519_keypairR2i,op_crypto_generate_keyRj!op_crypto_generate_x25519_keypairRKop_crypto_get_random_valuesRop_crypto_import_keyRĄop_crypto_import_pkcs8_ed25519Rzfop_crypto_import_pkcs8_x25519RR#op_crypto_import_spki_ed25519Romop_crypto_import_spki_x25519RZ_op_crypto_jwk_x_ed25519R:5"op_crypto_random_uuidRZOop_crypto_sign_ed25519Rop_crypto_sign_keyRop_crypto_subtle_digestR0;op_crypto_unwrap_keyRjTop_crypto_verify_ed25519Rx&op_crypto_verify_keyREop_crypto_wrap_keyRr:cop_broadcast_recvRVop_broadcast_sendR&cPop_broadcast_subscribeR^Ĥop_broadcast_unsubscribeRnop_ffi_buf_copy_intoR3op_ffi_call_nonblockingR Zݕop_ffi_call_ptrR op_ffi_call_ptr_nonblockingR zw1op_ffi_cstr_readR v`op_ffi_get_bufR{7op_ffi_get_staticR U op_ffi_loadRoop_ffi_ptr_createRfop_ffi_ptr_equalsR M op_ffi_ptr_ofR^^Vop_ffi_ptr_of_exactR2gSop_ffi_ptr_offsetR op_ffi_ptr_valueR .op_net_set_multi_ttl_udpR N!Aop_set_keepaliveR E$op_set_nodelayRfbop_net_accept_tlsRop_net_connect_tlsRLop_net_listen_tlsR *vop_tls_handshakeR op_tls_startRBop_kv_atomic_writeR*gop_kv_database_openRop_kv_dequeue_next_messageR{op_kv_encode_cursorRop_kv_finish_dequeued_messageRnT,9op_kv_snapshot_readR  op_kv_watchR &lop_kv_watch_nextR }fop_cron_createR  op_cron_nextR >4op_http_cancelR Rf op_http_closeRop_http_close_after_finishR7op_http_get_request_headersR"op_http_get_request_method_and_urlRop_http_read_request_bodyR zU[a op_http_serveR Bop_http_serve_onR)op_http_set_promise_completeRop_http_set_response_body_bytesR"op_http_set_response_body_resourceRҿ*op_http_set_response_body_textRZعop_http_set_response_headerR qop_http_set_response_headersR*Oop_http_set_response_trailersR Rjop_http_try_waitRop_http_upgrade_rawR*,op_http_upgrade_websocket_nextR ԡ op_http_waitR Vzop_http_acceptR op_http_headersR VTWop_http_shutdownRrΈop_http_upgrade_websocketRnop_http_websocket_accept_headerR F op_http_writeRv-op_http_write_headersRlop_http_write_resourceR n<+op_is_terminalR + op_set_rawR < op_fs_chdirR2a op_fs_fdatasync_asyncR}op_fs_fdatasync_async_unstableRphop_fs_fdatasync_syncRop_fs_fdatasync_sync_unstableRŨop_fs_file_stat_asyncR>op_fs_file_stat_syncR5-op_fs_flock_asyncR ؎op_fs_flock_syncRUBop_fs_fsync_asyncRZ2op_fs_fsync_async_unstableR "5op_fs_fsync_syncRS(>op_fs_fsync_sync_unstableRop_fs_ftruncate_asyncR5bop_fs_ftruncate_syncRJop_fs_funlock_asyncRfSaop_fs_funlock_syncR"op_fs_futime_asyncR|op_fs_futime_syncR 3op_fs_link_asyncR hop_fs_link_syncR $V op_fs_lstat_asyncR CRop_fs_lstat_syncRop_fs_make_temp_dir_asyncR"iop_fs_make_temp_dir_syncR +Gop_fs_make_temp_file_asyncRҳop_fs_make_temp_file_syncRRop_fs_mkdir_asyncR .9)op_fs_mkdir_syncR R|op_fs_open_asyncR 5Iop_fs_open_syncR.op_fs_read_dir_asyncR6aop_fs_read_dir_syncRR''op_fs_read_file_asyncRLop_fs_read_file_syncRyop_fs_read_file_text_asyncRrUi[op_fs_read_file_text_syncRb%op_fs_read_link_asyncR6`Yop_fs_read_link_syncRJQop_fs_realpath_asyncR{Iop_fs_realpath_syncRFop_fs_remove_asyncRfwyop_fs_remove_syncRZgYop_fs_rename_asyncR:op_fs_rename_syncR Fop_fs_seek_asyncR kop_fs_seek_syncR eop_fs_stat_asyncR r-gop_fs_stat_syncRZs-op_fs_symlink_asyncRιop_fs_symlink_syncRguop_fs_truncate_asyncR*op_fs_truncate_syncR Z op_fs_umaskR" mop_fs_utime_asyncR :op_fs_utime_syncR>cop_fs_write_file_asyncRRXop_fs_write_file_syncRv#ext_node_denoGlobalsRr ext_node_nodeGlobalsR Y op_napi_openR*'op_require_as_file_pathRzS"op_require_break_on_next_statementR:;op_require_init_pathsRңop_require_is_deno_dir_packageR^| op_require_is_request_relativeRzWCop_require_node_module_pathsR2["op_require_package_imports_resolveRop_require_path_basenameRyop_require_path_dirnameR鸛op_require_path_is_absoluteRb_op_require_path_resolveRjop_require_proxy_pathR>$op_require_read_closest_package_jsonRzNop_require_read_fileRBpop_require_read_package_scopeRiop_require_real_pathRop_require_resolve_deno_dirRop_require_resolve_exportsRڔmNop_require_resolve_lookup_pathsR op_require_statRk>op_require_try_selfRJYop_require_try_self_parent_pathRJh8op_node_is_promise_rejectedRop_bootstrap_unstable_argsR6o]op_node_child_ipc_pipeR -op_npm_process_stateRfop_fetch_response_upgradeR͵op_node_http_requestRtop_http2_client_get_responseRR@$'op_http2_client_get_response_body_chunkRnQ7%op_http2_client_get_response_trailersRop_http2_client_requestRop_http2_client_reset_streamRop_http2_client_send_dataR)/op_http2_client_send_trailersR :op_http2_connectRʼ.op_http2_poll_client_connectionR _op_node_ipc_readRop_node_ipc_writeRPop_node_cipheriv_encryptRdމop_node_cipheriv_finalRBop_node_cipheriv_set_aadR.&op_node_create_cipherivRYop_node_create_decipherivRaop_node_decipheriv_decryptRzqop_node_decipheriv_finalRRzbop_node_decipheriv_set_aadRFKop_node_private_decryptRM op_node_private_encryptRZ6op_node_public_encryptRZop_node_dh_compute_secretR 1op_node_dh_generate2R>op_node_ecdh_compute_public_keyRop_node_ecdh_compute_secretR)gop_node_ecdh_generate_keysRlaop_node_gen_primeR)˴op_node_create_hashRZpop_node_get_hashesRN`op_node_hash_cloneR.op_node_hash_digestR] op_node_hash_digest_hexRPop_node_hash_updateRop_node_hash_update_strR :u op_node_hkdfReop_node_hkdf_asyncR.9op_node_dh_generateR61xLop_node_dh_generate_asyncRbW|op_node_dh_generate_groupRzj+op_node_dh_generate_group_asyncRfop_node_dsa_generateR6y|op_node_dsa_generate_asyncRj8%op_node_ec_generateR~Hop_node_ec_generate_asyncRbU1op_node_os_usernameRop_node_idna_domain_to_asciiRop_node_idna_domain_to_unicodeRҐ 7op_node_idna_punycode_decodeRop_node_idna_punycode_encodeR Jw1 op_geteuidR z[op_process_abortR X|op_set_exit_codeRop_v8_cached_data_version_tagRop_v8_get_heap_statisticsRc0op_vm_run_in_new_contextR Ĺop_node_build_osRv^op_node_unstable_net_listen_udpR!]&op_node_unstable_net_listen_unixpacketREop_node_guess_handle_typeR J;c op_node_cpR *5op_node_cp_syncRhop_node_fs_exists_syncRBoop_can_write_vectoredRF'op_raw_write_vectoredReop_node_random_intR sc op_delete_env R nop_envR /u op_exec_path RlAdop_exitR N# op_get_env R6Ƒop_gidR F op_hostnameR op_loadavgRnop_network_interfacesR > op_os_releaseR zQ op_os_uptimeR nVz op_set_envRwop_system_memory_info Rop_uid R'op_kill Rb op_runR ^y op_run_statusR ڸop_spawn_childR op_spawn_killR ^J op_spawn_syncR J op_spawn_waitR>dop_brotli_compressRS{0op_brotli_compress_asyncRѰop_brotli_compress_streamRop_brotli_compress_stream_endR#op_brotli_decompressRFop_brotli_decompress_asyncR$op_brotli_decompress_streamR#Wop_create_brotli_compressRop_create_brotli_decompressR Jop_create_workerRN`op_host_post_messageRZ op_host_recv_ctrlRB.op_host_recv_messageR~@op_host_terminate_workerRWӼop_net_listen_udpR򆌈op_net_listen_unixpacketR8Zop_runtime_memory_usageRa,op_node_sys_to_uv_errorR T op_zlib_closeRvmop_zlib_close_if_pendingR A s op_zlib_initR G op_zlib_newR ?| op_zlib_resetR v~I op_zlib_writeRҐop_zlib_write_asyncR>eop_query_permissionRZop_request_permissionRR-op_revoke_permissionR2'op_bootstrap_log_levelRDdop_fs_events_openRop_fs_events_pollR {op_signal_bindR ~"pop_signal_pollR Cop_signal_unbindR Oop_console_sizeR b op_http_startRbVop_read_line_promptRb"?op_bootstrap_languageRCop_bootstrap_numcpusR~M#op_bootstrap_user_agentR gop_bootstrap_argsRop_bootstrap_is_ttyRZ'hop_bootstrap_no_colorR 2Tfop_bootstrap_pidR op_main_module R4Wop_ppidRb op_set_format_exception_callbackR*op_snapshot_optionsR op_worker_closeRTop_worker_get_typeR2op_worker_post_messageR Kop_worker_recv_messageRbop_worker_sync_fetch Ra~i-1 Raf3 -2 RaZ [-3 RaF7-4 Ra-5 Raj7-6 Rop_closeR ҃ op_try_closeR ± op_void_syncR (=<op_error_asyncRjop_error_async_deferredR bGk op_void_asyncR.0op_void_async_deferred RRNop_addR ֣ op_add_async R6pop_read R2‡op_writeR  op_read_syncR | op_write_syncR ZK op_write_allRy;`op_write_type_errorR ' op_shutdownRɹop_webgpu_request_adapterR *op_webgpu_request_deviceR !op_webgpu_request_adapter_infoRop_webgpu_create_query_setR" eop_webgpu_create_bufferRc!op_webgpu_buffer_get_mapped_rangeR栐op_webgpu_buffer_unmapRާop_webgpu_buffer_get_map_asyncRėop_webgpu_create_textureR<op_webgpu_create_texture_viewRdop_webgpu_create_samplerR޹"op_webgpu_create_bind_group_layoutRN op_webgpu_create_pipeline_layoutR }op_webgpu_create_bind_groupRu!op_webgpu_create_compute_pipeline R+Κ0op_webgpu_compute_pipeline_get_bind_group_layoutRJ op_webgpu_create_render_pipeline RBY/op_webgpu_render_pipeline_get_bind_group_layoutRV5< op_webgpu_create_command_encoder R1)+op_webgpu_command_encoder_begin_render_pass R*,op_webgpu_command_encoder_begin_compute_pass RZ\/op_webgpu_command_encoder_copy_buffer_to_buffer RV?H0op_webgpu_command_encoder_copy_buffer_to_texture R²0op_webgpu_command_encoder_copy_texture_to_buffer$R < 1op_webgpu_command_encoder_copy_texture_to_textureRr&op_webgpu_command_encoder_clear_buffer R~'*op_webgpu_command_encoder_push_debug_group RcS)op_webgpu_command_encoder_pop_debug_group R5-op_webgpu_command_encoder_insert_debug_marker RF9)op_webgpu_command_encoder_write_timestamp R"BP+op_webgpu_command_encoder_resolve_query_setRZP op_webgpu_command_encoder_finishR"op_webgpu_render_pass_set_viewportR2&op_webgpu_render_pass_set_scissor_rectR6(op_webgpu_render_pass_set_blend_constant R f6+op_webgpu_render_pass_set_stencil_reference Rjm+op_webgpu_render_pass_begin_occlusion_query R>)op_webgpu_render_pass_end_occlusion_queryRJH%op_webgpu_render_pass_execute_bundlesRƆop_webgpu_render_pass_endR@p$op_webgpu_render_pass_set_bind_groupRB5&op_webgpu_render_pass_push_debug_groupRu%op_webgpu_render_pass_pop_debug_group R)op_webgpu_render_pass_insert_debug_markerR;!"op_webgpu_render_pass_set_pipelineR^Ϧ&op_webgpu_render_pass_set_index_bufferRk(W'op_webgpu_render_pass_set_vertex_bufferRnop_webgpu_render_pass_drawRr8ڬ"op_webgpu_render_pass_draw_indexedR.u?#op_webgpu_render_pass_draw_indirect R+op_webgpu_render_pass_draw_indexed_indirectR"#op_webgpu_compute_pass_set_pipeline Ry~*op_webgpu_compute_pass_dispatch_workgroups$R ?3op_webgpu_compute_pass_dispatch_workgroups_indirectRop_webgpu_compute_pass_endR֚~%op_webgpu_compute_pass_set_bind_groupR+vd'op_webgpu_compute_pass_push_debug_groupRe&op_webgpu_compute_pass_pop_debug_group Rf*op_webgpu_compute_pass_insert_debug_markerR&op_webgpu_create_render_bundle_encoderR3&op_webgpu_render_bundle_encoder_finish R^/V.op_webgpu_render_bundle_encoder_set_bind_group R0op_webgpu_render_bundle_encoder_push_debug_group RvEj/op_webgpu_render_bundle_encoder_pop_debug_group$R nD 3op_webgpu_render_bundle_encoder_insert_debug_marker R޿,op_webgpu_render_bundle_encoder_set_pipeline R 20op_webgpu_render_bundle_encoder_set_index_buffer$R =1op_webgpu_render_bundle_encoder_set_vertex_bufferRnm$op_webgpu_render_bundle_encoder_draw R~ߟ,op_webgpu_render_bundle_encoder_draw_indexed Rn-op_webgpu_render_bundle_encoder_draw_indirectR>s-top_webgpu_queue_submitRڻ4op_webgpu_write_bufferRvcop_webgpu_write_textureRF]op_webgpu_create_shader_moduleR op_image_processROdop_image_decode_pngRop_http_get_request_headerRop_brotli_decompress_stream_endR2op_http2_client_end_streamR aop_http2_acceptR mop_http2_listenRt_op_http2_send_responseDi "Bb( ¦u E!'br"B&BoB B5 Bb]B b i<BB Ak"u|*B  "O"Bb ½"$"MB GaU@BW!k+Tbb w  .\ bb65bmab  b"B "z B=u ":Bb[Ubo  bB2,\ b?BBs" bbi" !oH  b "bD" 8 0q B" L ba B"W !BV"i"79R"bV"_$bS : v  B@[" bS%Bb""yŒ B5"bG:". B5"b) b(`Iq"!B “Bbu"NB4Bs bx $b’ "gj Ž"HBq  ³XBc Q d"k  B :Be "8  MrbP BA"w!-E Eb‘ "L] bO bF " 9BEbUWa6`$= B6l b eB'btb$ "$bs+ 2!2BbqA+ bj BgBX UXf"KB"n Abz" ½"+Œb{wBdB9 Bab6B "e "&"b]a"BN Y b J»"E)~_ZQ 2u bY Jbzb= bzAB_"xv]&"Y[B b JB B& b?H8!´unbKn B~8 " ‘" - BF¶± [  M b&^BBb+v94 e 7A "<mGbp`n B b"ªm5B*  bB9 |·b5bq"$  B6I !dbbQB\b_" " "6"iX "> B PI% B=Œ" B b b vB"BHyB b DBb ½b,mBB8"D "Bi"B  b$"A] .b$"} "jO"A" B^Ad"Žb "j3  +"B   t "FWb b  Ab`  BCb"Q bbBUK"b5S0b  "S BBnB bbb"Fjb bb6  B b0 k B:b@B68 "6 BoBb BM1l  `b    BB3 B""B2 b?"nH` "bkNš "4bn S=F  !"HXBo%bp5 d @a\LOCb B)u) +b3bQ b=I  i B aA   "5  tbh bfBr"b[:$B%MBb"x">a5<Bbm +"Bb,}±¯i BbO B{K"HbN A[ "Xi BA»B`7B$mb u " BA"vb" W bb!"BbTf( bja bS T z“ "/ Bb`  "$Bb oa,5 ¤B~W "" !X""{] b} 5wb [B"R"X aB"  bBbWB7""  B I"O*>B XbFAdHL B b: b2/ ).B®B """^"B:&bfbaL BBP["DB|b ( ,  LA¶?bvbZH Z S bA·tG b8 BB ZBq ^"/"j bM"0GBEbF "|>‘   " B`B ™" 3N™Af ~& K"d B  y B"  " Bk† NB" B;"  m \b"g"Z4BBB,IM B‚bJBB+X \ebdž@"B UbBM – Bac "b B y{r   b0 B{"3""B"% 1 :"`"Z *y8rbBZkBw bb  z0!f E( B bk'"hV b”BH w0 Q ¡ BB;"$OX"DO¹9D/  "[b 5 bd"ba!B CCbo% b(žB<&"( . b" bbB "[bb br\ Z D  B B " BS"  "bB a1 bI"k bG B    / E" €Bjb " b XZ "L"mbM"9B* Z4" bbJBbR"1 BT"h aB bwB"B BJ BBRBbl , B c DMVw -b4ByblbBUQb? b Be™ bvo!"…? "£  rb+b,baBI"L" ¶ bb!   B  TBd "G ; N A-8 v bbb/B b •B2 b AA,b B — Br= {Q}<" b" BI! a<$B AbQEbfWb¬b»:Q;B*Ba  b'd5 }Bc AFJ JZ b9   BRbb1™[bB` ~iw ž b9McbB:  A”£BB}"b' _S B 0BBt "BB/ i,!b^ FbJ =BZ=M(b BIbB BB\}! b.k " "ap] b"%—l¥b\ b;+ M <b BG   ]"] bk " G0!5a]";  "" P“ @  Q!b"w< IBgBvb"  gBB@"D  3 "bbyW br b "GaBBxbm$ Bb:BT aB b"(" " W­ 1"/bua]( U  B_bv4 b !a b?b}bB%"EbR "H "[ B“B"n k b#[R B "q  "b ’ " rB} B"(bb{B[Bt " Bb -  "+5A|"1 5" uA! "Q" i "Z!bK b BBJ "A b% a B" ½` B 5 b~bB.  " bB :I " b \">".b1gBr b""D B B b " 9:  b& "d!!" Bubt+m g bD BaBH›BD" " " "fBB"" B BdbBb1Bt k "v !/B- @bR- _qx  " !B 9b5"bQ  "'"{B  BzbA\ \"gjb! Bb "Kqo-BDB>bt b7 w" b6"" ¿@B b$/B x!vœ" ¡b b B¬U A/ "M  bfbBBe b bQ"oaI ^ BU "b B<"e BS 3/ OBlhb¾Bgb-Bo eB""i0}    bbn=C  b "":"B baEbn b7"N""Uba:" . KI BB + Ne Bb  ®BB'bQ js da]"bB}’ M BYYBJ|B*"mbc`/ ª<b ¯beb_"?B b FA aMb {""1   b V byKH"""+ 0 $ U!VM] "mbS "B^eB* U "3B] ] <"f E VB/"t3"GB bUc 7b5b;!"bT{ T"N-bx bab "¯ "\B /1 q^ !bubp "}  Ub ""4 =#v"UQbz# ‰ ", bsB3"x"_-b "X Bib[" > b BbIb  0 ""u2" ' ";b&b1"Qm(vBaBeBBYQ"b Ftx"0 ^bbBDF MsYBAa "W0~  bUBB[ B! b^  !"xb B©"mYbbZY B&b 1BO b04B " b{ i ; "" !"BL6!N &"o—Nbqt "g BZ)Bb "v"c _ "Mb ("b.d KbA "dRB`  BTbl\GBQF{"O BA\"I<ŸaqY"HLb"MB3"Bf"b¢AocxBD aB[ B)"AbbAbX@ * ? "B) )), bI"n> <=wB"BB0rAmBNQ ~ XB4" ! bbN"bB’ ;B"® B  "q~"B|q9"4.B b B {u B"B{b[ ¿b7 #B}"!wB ~BJb bB Azbw b "x"  !" o)vB" " t ˆ!bBw B P te3 ! K" m "- "bb)"# !!bY  ?B y bBpBwbkbX="k "-?b u k?"Bq39B vb_[!  ‰ µ"]" r.""8_A""aJA"mgIBBbFBaB b "euBxq9¹ AKL!B pAB b'X 2"+AVAAabb"""BGb* xMœ"!xB[B ~b KBb Ab  " K"c "Obb/EqBE"`"c"FBb^B"wb b bBsBB`bQB"%bBwb " b,uBCM l BA K Pb" !bbƒ "=bbuH-"IP-BL0lE^ 5 Y "AK b"BB`"jm BbHŒb!XA,±  b"bu $"@Bj" % """B3"v b +m?%BE "K? b Rb\†L)bM " r_  Vbg"u": "  ©"z ") bu bF" 0A~mb"‡AB )bV&" "`Rpa"BB? h } Ux "b7+%R M„ b<4b"5;W ' *"z a}V a e! Cb(^E "b" %0B~’M"L" j gb*BRBbQM"/6 QBPb[ BA¤bvb""@ FB "" "q bb= - 1e"GbGbtV%bBB 6bq" b4cnbL""B.qB "rmˆB !lB 0 b|"* | Bp"bb-"B Bb"QB|fb -"b!Bbu+|5B- bb BSb¾b6b Y" "r"J""N0aI b b-b"" cB B&)"ObBb PBabbb" ) b9 B>a &I { %£ b|b"" %b aB1" BA b' 7$?bb A,bW b b8;Y" :!"   ¿  X wY|?b b av BkB=b!"  rT8"D"B" " eu "!vb$b ""X¸   n"" bb" "C\" }b"b BDNbœe b"sa&i 4b‡7s[B+b{T;B Pi Mb ] q [’ b bTbbb, " b*0m b+"%b] A5B,J SBR# bhb ]? buIB hn  b "kabr ^b  B"P a –Ab ]!t rQ" !)B3!" b0"_" E  B",Sa‹B_Bd{b =bn*B Cm; BbJ "mB bpB:KAf ~ babba  B "Bp "(}O"b^ "  [B"E"b""^" B8b!9*A;bL >brc h"CvB5bRBe Ž"½ _ b! , q"['Br"2l B_  bI"m "y F B ") b\ ¿"+ ?"+s""b\ BBZW   t\Q} B6abQb=  H ]ISbb  =bU B bT& Bw B!>BPsB9b  IaJ"- BC  B¡bib I l  L BzXQ"s XrBYbB5" b  aB"A' bTSb@Tb  A" b!@G$y"bBb B0"xb " "B}b9bbU   BB`B1"N &}^b9  4Bsb B be>vBbo( """N!7.&  BP >BBb8 bJsb0Y "!Ibb y <"" ( b   bK q bZ fBB&wbb"B  bB ˆ L!B) BB"BF ;"F6b!B>Q"l MbZb2B’G B  \ Iq_b 5B<B9bTCMBQ" bp"% *BY Zb r !"% `|BLb b" b7 b  x" b, BV l":" bw" ""Wbb  – "sA" b5  B"d""<b""B^%BI"z""PT7B b"3!&*" b n   B* ) ""a… 8B#" f  hbtB=a'mB" Bx " {‹a6~"b hBa4"b(]7"G a;B>!k ‘aYA="LB BNb= -bYe : ebe" b!V @^ (a^ <" b@2]Bs"oY=%b"v bd" b1b "+b ]rb b> "",9j "ˆeBb *i— T $B,"4;B"bK b ‹  BV !t  <"+AbH" " "ha_bE_b@B3b"   @B B9B# B2 Bo i B~%  aB%E"" M  t BjL"/D.B b¥fS;B9BB yy " ;_- "B "] B""]f  bbB' 2b Ib! A ª  b| bHBiB' "AB&"b.  Fbb B b+bb"Ebv"g"p"BbT" ByB:B" b9b| bY :bbE " G"9d  O ""$ 4B4Nk•bf,7 !"N…Bb)E b,. "Xb8B@bb{3 ^O eBL ­bbBG†B"|Bjbe } eBb  7O-bYc G~B%"4 " BA"b"}S'bb^"4Bbf"y  bBbQ B5c"Ey 3|bN"b1A, B`"R !!uX}%Hb- DWB"WBy"8.BF QfB   b BAxb =ABPb BD BtBEQ BF;A B2Bs"\h1hVTIbb "‹  8"Sm b1  "! B_""" + XbK b$~"  :) K +bW"b 2br) B6P M b "yB n "fB\N "a a`a"<""¶ eQb B  BE" \"s bMb b bM D" "^0 Yg B b‡8F „ B6mbPN  d6B6 AvP"I""A  bvX š*   Y CZ  5 b B¸ a\f¢ B3bf Bh/ ;BbPcb S"az b!B ‘B B blb"jAb2 7B xC "B =S!vBzk }bYBZ=ubWqR Q"BR B "h "" T Bq "mS bYBbA o"-"oBaHBbO b ""| )WfB MU b BG±"SPbg"p"(1OB u&b  bBf!s[a  b " "; w"B,"B, bebKb· ,"bB BBB yb -*D"_ ""_ j}BjAQbabB0‰ BI  ^Abe|v j"' " B"ƒB@5!B'""B;bY"bf "wegd"{  Bb"B[Bi bBqCj"t B BtBBT:BVbB b b" BP"  "lB V M"wg b(b"A>" A/¥ & 3gB " bzTbBI""q"alb<U b" """QbBKbq"w ag"LB = aE~Bb" l" "CL $~ B<bC "X" iy e!<  ˜ ob"\ ’p / B"B"bpi -BiB] "8  BS2 TBBB B:abh lBQ=bG ‚!B  "A<b(b‘VB'n b| m"Z D"B< !"b?aRq9$"Vob B˜D  9²BUbBb`b[.""  Db!®B~\ "h B["h Y B0-xH5bABbuOaSb,+B)Bdm.> ba9B "-y BB]‰bob8"bbb "f [*bN | )=:BZ $b Z B.^V""BB:B"  B2B B5  5"'""C a#B %B"`Z¦mbUbEB•m ("d b B{ b "G" 9b "!""  > -bG" "9I LaW"$BU"-b  bL" )"!:v""; iJ bLµ b m 7 "</"b`M Abb/'z fBg  b^t "JE"abh bL b"L B 11bsBg aB""b"A{ /"8 "b8>) b Q   bBAi]"-b BlbFABQD1"b "<" bebB"}":("aV B !_ T;½ bRtBM! 9bpbLBBU b"fb"KObWAoB"  bpB†? — " hbqbz *UZK  B  bG B )b;BEaab ‚` & bBBb‹"B " mBAB" IVMsB "*b  y"zHb '³B" " BbS + „"B.B c B  !"b3"@bBE a 6 6" m> Bbb+` HS1 =.1 nm¶b" 9B 5!bl"b b !¤ b !"]%i ";) ! (_B3 ?BJhb+"ObaBwbb"5|"L  b B"B"T  " B"Hblb# i~ b["  . -bb%Bbƒb4a¦ bB E Baa x(  bxA-Q!±A_BO=""B  [AB!| } "U"a?G qb z "j"" h 9"  B " b]["b,"dUyC bZ }~B5BKbH b> B a" BA. b>bB+» " "1=  ¾B:" ""#B %Bq  "B("2!&"W a B mHBb b"li "bj bC A"BB]bB:B "" bzbA$ !p b\HTE§ bUaB8b#  yT b7"IbbB> !CBb~ B" "" bB "]s btb!b&"6BV b4Ÿ ""¹B" 27E"y… BaB~ "G´ -"< B i "D Bx!$B "rBu ° B i8 B BB b. bUbb BbŸB"tq >")bo'"}ub T- b g B"o "B )b NB"BBM´ M"7Ub&  " '.Ba pl "< g<(Bb 3 BbbHbk f a~T"8" EuB"R9 z  " B › ˆ?   NBA TT BB"bBb:B_|BmK"p uB}{" ¹bxa9 b{"]KB{ H ""b Bb AbbUB|  k"b MB"o 3 B"¼bVwa" "RbB" Bwb"N" . QsR"G!" ˜ bbB"  % ?"bBD 6 B ]"mNbai VBx b7FB <Ÿi "* B¼!  b\ pB|" G d"b8B'vŸbPby"d y\ bbh †"" bbW""! J "a J d"" N bp b( `—"<"h x4"BABnB"xBAMH -Bb *  B{{B  §d"%"0B 0 "q8bh~ B\|W"$RByEb !0,B7 *bZ B  ]B aB ; b N>1b2" b bB"^ u2 A(b3IBbdQB v" jub9BOb aYb3"abrp-b"o B%_- -aXBCYc]bB" "g 9B v"b !"" ½b;BI BJ !"z ¨  AL bW# GBIB<b5B%  r " ¼Ib  LP B% "  " bD*t >b 4bbib u=}Jb) E xbb#-"m "b \ CbB1[!mE   b> %‘B"JbHbzBQ " f ”B!£BuBG 1¢Bj "9 &b) IerbmC"  aw B;Ebb.bYh? "X  bis M"'BIB$B  ) -s  "™"A h "b " >"|M BE9b w  s b)Bh' B  ZB5 axj"bXZ­"Qb"="  fbBbu"] *B B]B8¼B"? B^= B2B ‹bnBbAMb; +Bb"b˜  bbbE'n l@B"BMR 0 bK  C'b Ubvq b@" b3 bh  "b  "¢B. wBC "2 B” "A" "bT/A " ab%  %}b "b  "b*bj -  b {" 5b: Q2 B" ³B ]/B* " !"B bAb `1bx  B"Fa"B=bL"B\"bb ˆN"!OB A+-º!?Ÿ"" pm bbcy "LJ""GH =!y"B  5B‡  1 "v—B{izGB%g "4Mb/bB&N—B"b`ANubvB"C“ =Dª>bbc"- : ! @b6Zbbl cPM b"xB=" bxY}A85  ?E^AB 23`¨ eQ3Ve6bb b3BQ bJ5]i B% #+wj BB"=±Rh,B>TYb." WbBQ qa!BjBABZbB-  b8( "L fbqh d b!bJ-€  ¦U0 "Yb  BB>B "BbvP  B1 B""UB=b by e ­B"S b$ "# bU ^C"N WbbV"( 9B b BBB""e4[3Abg y"2"[  -Bb bm"tk ™‘bB/"¿BaBAb%AB Y"!h B/B -¿EN ""sqbb"  B"9"b"|B ae' b<B\B$u j"_ x iBBb_6 Y4b z"  1 CaHB~  ne%; 2aGBub0"  Ygª4="H "'B"mbM" g"bR%!oou"o 8 " " B  "qB" B"""   biR'A?oibb? bC c p e"3@ bb{ """ b"( 4 B œ"}E=s (bz(bV¾YbM ,B5,I v B ;Gbv )BB_"p b[Z "B0Br" Bt%  b H8"b6A y Boj U""  bnŠb cµ p b" "bBBzb B!"b  i"V B"K B4b] BBAb' ABgBb B|; *B Bb ; /yybbB}& bQ B BU 7 CzD5&""&"m "r By }B BpbA9#bVBx"@"a bNAzB"2BB²b BB 6PbcBBb939BY "|  B"B: 1B|eB$x57.O9 B#b b $4= bO"" "]B"b " u qDuObf 0"r " •5 B  Bz2bT"  ""b< ( b bX B} "62bk"B' "T bh"fBZbZ" B3"Z0 7Bb K ibK" `U{Mž "@:8B?UbbBB"% B" "@BB"ƒ  -",B6" [ " µBE!""F j a B^B= !" BBk u bkI bEb"T B1 bdL Bx  #w6BL!B" "ˆ i B0  B~a" ˆ obB "  Bb bI ] b f"B  V^bb} " "+  «BQ"v"Žcl  e"1C5 B b`bkb"bl)a b`g" § SB $bb beE b\Q 4 arXBU b"7|b2‘ b!v |d| Q bMbaBb{B  "µg BvBj"#žcAY&"" IB~"1 " a\KœbbhbR% ) F "">B8 b "-bjb;#=b! 8bJ#:!Fz 2 :DBhBq: " bOb_iaPBB0  b Y"8" { ""6 "!"bBkB)b bZo" ;By ) bL B e7l"O"/Bjb"G%b/b'BM" B/BM .BBR &XQD Azy ab8 " "BB "bbAbq " b3 " Bwe"ƒe B|bbze yFbN· "bVA{;b -KB Bm+"iB$cu k7 " " F –"vtq "4 b bjBW _ABbbB#  AYB.=bB6 ]B bw Be N¸"4 "B&B 3&  "b}²v’ # B*¶"& t2b1qbP " "m k"bHB 9G"" "7¿TB&B@ " s") V  /"S  b m^  z wy bBB QbAL  BhA)' """ a|Brb!m3-B%+} "bUUBUbb" b\M "nB#XBA "Bp bXM   b ?BD"R gB«b)" B"%B ""0! bPFaG" bHb%"~AbbB"P Šp"^bB{s" ¤"bt" V b`b  6bY 9B H B" Br"])  ~ "vb _B _ 8bQBNBPY !a1bB " i, o U"!bT;^wR" b+zBbGb{B  bO e!9AA =#\"Wbbbn tB>AB>L ib"] Bi B BAJ|J`" "bZžbNB8l B}G BŠ nE< y "bbAE5" 4  a PU/b±+b!P{ Ibb;' "1b Bjb bW bcB  5 7 bB "L"Gb bC  Bb <–WR^BB BBKMOBpb"½Qb%bv BebW7BXm# " bTl"bm 6c–}"b ngBBBBK"IB "BBh B bmg adbrj aDx\ a "z^ "B" "B!B@.E"YbByI HBhK[ Banb  >@V)-^b"} A"]"A6a  bAI"q6 + BM bqbc">b2 o=JbFB sBo0BB B Bhb b "="l Sb<W{" µbe_#1"® " B6"r| 1":   "X tbb bg‡ !2 B """"B%"  " l B f * B@apBU_b 0J #"B   KA'Bb u"XŠ{B 9 4"yb)B Bd",cBbZ1f"BlBR † >bV9UBb ib bBBF aa DBF"?b  "`B B-bab"Me "TBgB@karb2bN -B "3"Hj+yBYCn b " B  E Q""/ bcB>b}  ab9_zb1B`"XV  l"b N B "b A!>bU"Bb"b™^0 bJ Bc B  "bBBE"."q"b A"B:<b%"!b}="C""bsV"W9?"0B] "~c}? BBmbB U ´ m BwKbO  BY "B^BuBb (BL<bV§Bp BB b"Bb "CB"bbBbXtpB$ "C >bH"c$9X )b" B5 Ob:B;bWœbhBh("p"9  *Bb BwBqd! "@ "|b B"" ¾bBF b0F"P" "n"ob? %BBvU _ 4b  B) "Y"I bBŠbA3b2 b5E"="  3 < )] &B[ jB f"F¾ Bss B‘Bfh ""^"JBp s" " " " rb a9  b BuB "[ e Ja( 1 bQ "S" " "  b9 kd".}}"C H "Y BH BYN" ~?bz"E"=uHB"B "p· b7B yBA‹$q"a"6 ! 5b "R Bn "  BC b  /Y* b Xb&ºBW"Y R  BfU"l š" c " ‰"4AOS!LB" HpBB  b Ra"b"!BB4?B" )@Bla"B[b l"0  b+ !xzBl Bbj Bbl " Y #K  B""""<!*nA a b% " /q},N rB]:! SiBicbbbtB b]B!hXyu "[ BR B5 "+ "a` E= ABy"b311"^ B$b"aD>)soBj BSBB b  "^ uGa Vtz  B3   u"b ",;2 "LB!" b<œA"0AA BY"(A"bIbvbN bbB,Bgz b)B  b-bN  "" Bw@ 'bOBB# ap J  B6#¯! a=4 ~"Q"~» bG R4Zb?" 5"S p:o Ÿ1!+"{"i vB" B8B "b"o>\O"9  "rAŽ1"BD~ buABb  YBPBbcZ bv?bš b >b2I "W a5w g`BY!A85Bk". vBy; _  bbo/-y6B t }%ACb",pbBL #B=B*Ub" Y " [bR"0B /BwUPš~7m"a.)pNb  B "vbBB B :iB bnB E B " ¨Fb bm"l"X>zbby[%b P@AB bl"X " bc\ "v "B /bB ,  "O R bI}B  hr") ?B\ BgbGB<b a b"qaTBV"B*B oBBSb;BBY "e "'&"sBH Bka%"~ Bh"by l"yb OBhb _"X" "pa&bBx * l Q`b \ 5aSb b bo b%db BBBI Y B3b bA#*DBcy a i"3S"X"K!j- 6 "&` {B§]¦1.  BY"E! bw A " "I* b4 B1" b"Q "ˆ "wc"  q b  Baaa"HB "7""& b8B@!b}qš~ "BX1 B BB"B " \bb Ba")Bq !O  5bu- S9"" XbC | bmgzQ b'_ " Ag  BB" Z bbB BaA  9 bBO eb"n aPDB(B7 Xb4c "bwBx{  "  b "s|i" BBsb  « dC!"B bZB^ bB%^" ƒb BiBsB! BT]bt"x Yb]b" b " BB#b Œ] y AbM5 bbQb BnbO ![" A " Bs"p%N b B PK bKB"" ,B  "BbB< "x "@ E a bb% B8brb - "&B " B%BBb "b?K!3B`9 B b; = | " B!inBBi " a!l A" 9Y"8 "C B aB= "Kbo Bb.b ZBBbb!Bwb b %bBZB bI O  BbW b&yb[B  L "Bs N\"".!A c ""[bFbBeb["")1 "| b " "yb"i '_X"1%"nb A"D"l Ÿµ""hBp"""!p1"? BB+bbXab#y%b~B"b* @ WB" Bb _b 7" ª "2BF"A A" BU BB _# n #  A"d"bVi- d ")B i !cBI1b !4b?"  b (" K"-}BbK6"?b !!bIb bBbqaRB B a GbrBaa"XdW /]k«B}b7 < " 1´ "{e"\"^B —aSS Bv"(" "B" bAbUB];B2 v1bBBu"N bz " hp""+ b9 b]CIBT ³  VBBBa bB7b bg D B j]/".3P)a"b=bVTBHu5@ BL b r bXA$B^BtBL\ ""¸Bn""` AR k´"="bb V BB O B  ¥!k bbX B b1"_  'xB(BTmbB_BHBftQ U"{~»B BY ak"jbsb"B BU b" 5aKabo " bY B$"5¢BAyb B B " B;a7T%By "@=bBS ba*s2½bjM° I"4" " B` BB$"bB1( n4" bFa"""^ OBf3rb/´a" PBM"1›BbQ;B"/"_"B"B  "bBJ¿  !bb>  *b 9B"~  ®"k]¤k BYbb ›"  \BV"b _b%7b}<Bbabb"  Š|EAh b "b"DbV B b/ AB  b 4? "E' š  ($iB  " "EBb ZB" Bi cjB"BE uTDBe("W (bS B$ bR: B aW  "9b Bqf"{BeB^B?aT@" b  Rm¨B "  pm B= g<U2bbB»  By" F "y^$""uBbDb-b"i1b " Af7"BY".BbBa  1J%b  ˜"B9Bbj  ""J Bx"5 AbqZbk!|B"Ib, BbBb b." Bd@”- b"C yu  m"6 BB8b EABBBf"YV( br b3 bU" f"bdm"?"aAb "P b ;BBb"s b"bqB b P [ @"zB)b# "0Z  "> "R"a (yB I( h.R"b "%BaB&a8bboš> Bbb/"cbu"Q" b ˜  b{b"bV= "Bn b½ J@ b` @ bB bP"g B3 B)p 4"  "" ) B}##" bp BW" @ "b  B~"B7G9Bb(/B  b'M Bgy  bb)BM b\UA7!db B BO+"d "D !Be +s bB )=cMl "SbU b"]"mb 1 bf r z" b""  ‡""qb\*> : 9SJ B4 O"a²!iB 3"HBb iB4bUB<AY"b B"  DT b$  G "BB*"]AAZ7 f5l]M"gbjb& B b AS,F "TbnqB"/" "B q]B^N"BpSbQbCb˜qb U"b "UB"" b"NBWbVy-b B2!wb^b]S"""B& B["y"` "YBC BB bPH‡b bby [bSB }¨ ""\  K" b*b_b $a 4 @F^)aa5 @F^a`i`$a( p$a/! P$a/%0PF $a- gP$a- +P ` `/ `/ `+ } $a-5 @$ `aa)-`aI 0a`+$ ` a 1a1a1 a U a()V` DQb$a- PT ``/  `/ `?  `+ } $a- @  $a- P< ``/ `/ `?  aJ)- D`DaDaAD]P $a- @`H ``/ `/ `? a`? `;  )-`$ ``/ `/  Zb"$a- @P0``/`/"`# } ] ($ad @F^)a`($ad @F^a`H4Oc V$a/! @$a/! @ ^-Zb`/A"5a"GB A! b#"i>+!A "r' B·AA-Ba%3)L ` a)-`] $a- @ `0``/ `/ `; )-Z`&`%4BS   ? bzU # M  b ] D`ED VaֻDED($a /: @ $a/! p$a/! p^)-`f6D `! ` DY y`  ` Di`D]c^)-`PfD] ] D`^`]쒀Da L`DL` L`V $a- @$a-  $a-  )  -`` $a/! `^`!f89D`B`·`%`BI`` 1 HDB` "` 8D"``B` ` ­` b`B`B`"`'"```D"`(¾` 3"`& HD`D`µ`!`D`)` . D¥`D`"`*"`` 7Db`DB`¶`#B`$`Db`` /D``D`+D` -B` 4D®` ±`DB` 2"`,DB`"` 6Db` ´`D¿` 5Db` 0D] $a/! `F^`f6  B` b` D` `"`="`BI`D¨"` b¥`Q `D%"`]BS ] H`$HOc#D"DB6D-Day3DED($a /: @^)-`]5Da L`,L` L`E9!c\$a/! S@`]a ](EH`H`PG`Had'G$a/B  ],`0H`]$a/> @^)-`]/ .*()+$&-, #`i`````9`` ``!`Q` `` ` 9` E` `= `e ````` `I ``A ` `E ``Y`]`M `-`)`"`E`!`"`q `y `1``'Q`u `% `! @D$a/T @)-`]8La 4i8aP]<5 D`]@ D` ]D D`E]H D`D ]L D`E ]P D`E ]T D`E ]X D`E D`E L`9E!c77 )PfD]P]\ D` ]` D`E]d D` ]h D`E]l`3p`!tHOc#  V $a- 'P) `]x D`$a/! p^-`]c" VB V $a- P `]|(`-DD D`$a/! p^)`]c"V ] ` D`ED" V $a- @`-`]`] D`$a/! p^)`]c VDV ]4`  D`ED VV ]M D`E[ V ] ` D`EŠV $a- @)-`]h`= -D D`EadDED($a /: @ $a/! p^`PfD] ] D`P^)-`]Da,L` D0L` %U!qEL`1V $a-! P`)-`D]$ad @F^a`"t  D` $a/! p^`]V $a-! P``D]T`Ȓ^ D D` $a/! P )-`]V $a-! P``D](`b ˜ "  - D` $a/! p^`]V $a-! P``D] D` $a/! PM)-`]V $a-! P```D] D` $a/! Pi`]V $a-! P` `] D` $a/! P`]V $a-! P` `] D` $a/! P)-`]V $a-! P` `] D` $a/! p^`]V $a-! P` `] D` $a/! P)-`]V $a-! P``` D]  D` $a/! P`]V $a-! P` `] D` $a/! P)-`]V $a-! P`` `] D` $a/! P-`]V $a-! P` `!]% D` $a/! PI)-`]V $a-! P`` `)]- D` $a/! Pe`]V $a-! P` `1]5 D` $a/! P)-`]V $a-! P`` `9]= D` $a/! P`]V $a-! P` `A]E D` $a/! P)-`]V $a-! P`` `I]M D` $a/! P`]V $a-! P` `Q]U D` $a/! P)-`]V $a-! P`` `Y]] D` $a/! P `]V $a-! P` `a]e D` $a/! P))-`]V $a-! P``i]m,` q~ b~ ~  "    D` $a/! pE^`]V $a-! P``uD]y\`} D` $a/! Pe)-`]V $a-! P``D]<` Bz B} ~ b~ b   "     D` $a/! p^`]V,$a  /! #@`] ]E ]E-$a/! @)-`]aa $a- @``]V $a- GP8` H•   B ]h`• "   B  D`$a/! @^)-`VV$a/! @`]$aEB `F`^aeV ] D`EV ]$`  D D`EV ]@` D`EuV ]` D`hEV ]` D`EVP]`gb`D 0$a 1 Y@^)-`],$a ) @^`]Dfg`40$a 1 I@ ^]Yg`4 D`V ]` D`EV ]q D`EV ] D`EV ] D`EV ] D`EV $a/!5`F^)-`PfDV ]`H D`0 EV ]` D`EV ]  D`EV $%a- @)`` D] D`EV ]$`| D`ELL`HOc# Vt BVq DV"q DBVDbVVVDBVq ahGm$a/!5+PF- `}HdD ED($a /: @^)`]DapL` D,L` %)!-14L` VVVVVVVVVVV L`HaXHE$a/ @^)-`]Da]E!cHas/EDEcHaraDEDEc$$Hap)2*EDEc&&HaQ-EDEc''E c##HOc#Db%DBVDVVD~Vb{VADa$a/!5PF)- `}HdDED($a /: @^`]DapL`D L`%8L` =VVeVVVVVVVq L`(%a)DDE]DaHa\ۙ_EDE!c HaMiqEDEc%%Ec229HOc@D+V"V" VDb V`DVDDVDBVI"VDBVDDKVVIbQVblVDVDDBnVB%VIVDD± VDVBAVD"MV* VD?V&Va磝HDED($a /: @^)-`]h` DFdDaL`% >Ha9]yPEDE! !cHa'4DED]E% cHa*DEDE cG4HaNDEDE- c Hat?EDE1 cHa!hUEDE5 cKKHa bQDED]E9 cLLHa׺*kEDE= !cHa您mEDEA c Ha)8DED]EE c\\E c8HOc# "Vb% VDV" V`DbV V`D"{ VaTHDED($a /: @^)-`]` I DaL`D] L`Ha_\rDEDE !c**Ec)) HOcC OVfVTV^};VDBZVoVDX=b VDVb?V"TVD"_VQVD"lVBVa DED($a /: @^)-`]` DaL`D L` DL`   =        }  L`HarJEDE !cE c``E c5P]1 ] D`0 ]`!$a/! @ `a)-`]$a,,/! @`]P]%])]-]1]5]9]=]A]E]Ie  $a- K@`)-`]M]Q]UY]]a]e]i]m]q]u]y]}]] $a- @`]]]]] $a- W@`]= U  P]$a/! @ `a)-`]] D`  D`E ]`! ]`$a/! W@)-`] ]E ]E ]E$a- ``^`] ]E ] ]E]] ]E]]] ]E ]E ]E]] ]E$a/! @ `Aa`]P] D`h E] D`0 ]`! ]p$a/! g@)-`]" ]EB ]E ]E ] E ] E ]E ]E ]E ]E ]!E ]%E ])E ]-E ]1E ]5E ]9E ]=E$la/! @ `a`]P]A D`  E ]`! ]$a/! @ `Aa)-`]P]E D`p E ]`! ]$a/! @)`]$$a  /! @-`]$$a  /! @`]D$a/! @ `aa`]P]I D`  E ]`! ]$a/! @ `!a)-`]P]M D` E ]`! ] $a- #P)` ]QX`UA `  D`$a/! p^-`]c$8a/! @ `Aa)`]P]Y D` E ]`! ]$a/! @-`] ]]E$Ha/! @ `a)`]P]a D` E ]`!$Pa/! @ `aa)-`]P]e D` E ]`! ] $a-! P`)-` `i]m `qu   D` $a/! p ^`]$a/! @ `a)-`]P]u D`H E ]`! ]$a/! @)-`] ]yE ]}E$da/! @ `!a`]P] D`  E ]`! ] ]$`a =   D`E$`a/! @ `Aa)-`]P] D`0 E ]`! ] $a/! @ `Aa)-`]P] D`P' E ]`! ]$a/! @ `a)-`]P] D` E ]`!D$ha/! @ ` a)-`]P] D` E ]`! ]-$a/! @ `%a)-`]P] D`X E ]`! ]$a/! @ `'a)-`]P] D` E ]`! ]]$a/! @ `)a)-`]P] D` E ]`! ]$a/! @)-`]$|a/! @ `+a`]P] D`0 E ]`! ] ](`-a  D`E$a/! @ `3a)-`]P] D` E ]`! ]$Da/! @ `5a)-`]P] D`P E ] D`E ] D`E ] D`E = A E U ] x] D`    " P] D` ]X`"I Q u b ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E D`E  ] D`E ] D`E`@ ]  D`E ]  D`E ] D`E ] D`E ] D`E ] D`E ]! D`E ]% D`E ]) D`E ]- D`E ]1 D`E ]5 D`E ]9 D`E ]= D`E $a- @$a/! P0 `aY a `$a- @`)-` DcD]$a/! PH ` `Y a aia! a )-``P]A- D]qb%]E+]I,$ ia-D]Mb]D0 ``/ `/ `; )-`]Q D`E ]U D`E ]Y D`E ]] D`ED ]a D`E D`N ]e D`EP]i D`D]m D` D`F` $a- @0 ``/ `/  a)-`]q Da ea DQb$a- P D`P]u ]yD]}$a 1  @$a/! P `&& aI`+E } ]DM`+ P] DQ`+ ]D`+5 ]DY `+I ]D+a0%a.,a8 a* 3a$(4a0B=a85a6@;a"Hb5aab>aa(9a=a9a "a>a>b?a a:"a&1 a )- DcD`P] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]D]] ] M^)-`H ``/ `/ `? a a )V` DcDDDaD bD $(]ae%%Ey Qq1!9 `<'`P]Q ]R]S]T]!U]%)9 ``/! `/ `?1 b&a a '&a 'a %"(a / (a )(")a -0a +8)a @)a HB*a Pa X*a `a ha pa x"+a +a %a +a B,a ,a #)- D`DaD 4EYi 9Ee! i  } %1AEIh`P]-. ]1/]50 ]92]=4]A5]E6]I7]M8]Q9]U:]Y;]]<]a=]e>]i?]mA]qCD]u $a/!  ^)-Z`hMaD`3B $a/!  I< `B `$a-! P`T``/ `/  `?   a1a a)-`b a" a `$a-! P`H ``/ `/  `?  a a)-`$a/! UY$a/!  m$a/! @q`"$a/!  I< `"`$a/!5@^)-``b`·`$a/! y}$a/!  $a/! @`$a/!  I$ `aBbSa)$a/! @`'$a/!  <`'aA(a(a" a-$a/! $a/!  $a/! @)`B~$a/!  IH `  L`B~~bgLeB~aB~aBbaBgaBaB $a/! $a/!  $a/!  )$a/! @`"^$a/!  I< `"^a¢aBaB¤aB-$a/! )$a/!  $a/! @`$a/!  I< `aba²a"a-$a/! )$a/!  $a/! @`c $a/!  I `?>c aBV"d aBd aB`Be aBPe aB" "f aB((f aB@0f aB8g aBl@h aB Hh aBvPi aBXi aB`j aBrhbj aBtpj aBZxbk aBfk aBR"l aBTl aBLm aB8m aBBn aB,n aBBo aB<o aBBp aB.p aB6"q aBq aBBr aBhr aB>"s aB*s aB$t aBNt aBBu aB2 u aB:(v aB&0Bw aB8w aB @Bx aBFHx aBPy aBjXy aB `bz aBHhz aBBpB{ aB4x{ aBxb| aBp"} aBX} aBJ~ aBD aB\ aB" aB0 aBzB aBn aB^ aBb aB aBdD$a/! )$a/!  $a/!   $a/!   $a/!  $a/!  $a/! # )$a/! ' $a/! + !$a/! / %$a/! 3 )$a/! 7 -$a/! ; 1)$a/! ? 5$a/! C 9$a/! G =$a/! K A$a/! O E$a/! S I)$a/! W M$a/! [ Q$a/! @I ``3 } P]y`}```1`J]I D`] D`] D`] D`$a/ @ $ ``/ `/ )-`]P]j ] $a- @`T ``/  `/ `?  aJ aa)-`a.P]2 ]3]1$a/ @$a/! PH ` a"a1 am aY a )- DcD`!D]P]4 ]5]6^)-`]P] ]1 ]f]m]n]o]q]x9 ]A !% ]P]I ]]] ]]]]]]]]L]Q]S]]] $a-!-cP`- ``?- `?' `?  a`;% } P]  ] !b`; ]"] #`; ] $]%%`;) ] &]%'"`;! ](]%)`; ]*]%+…`;  ],]%-B`; ].]%/b`;# ]0]%1`; ]2]%3`; ]4]%5"`;/ ]!6]%7B`; ]%8]%9b`; ]):]%;`;  ]-<]%=`;  ]1>]%?‘`; ]5@]%A`;+ ]9B]%C`; ]=D]%E `; ]qD)-` `A]E` "-1]]]]a]I` ]M= D`E ]Q D`0E ]U D`hE ]Y D`E ]] D`E]P]ar ]]]) 1 P]e= D` $a-!-P`< ``? `? `?  a)-` `i]m` =]P]q ]]]uq] D`h$a/! @  $a/!5PF0 ` a a a)V` DcD`P]y D`h $a- @ $ ``/ a )-`]} D`B"^P]= D`x $a-!-/P` ` `?  `?  `?  aba taabua  a(Ya0 `; } P]q D)-`$`]]]])!]= D` $a/!-PFH ` a aua"vaY a )-`$`P]  ] !D]]= D` ]I D`E D`h$a/T  $a/!-pF5^)-`ff D } P] D`U ]D` ]D` ]`D ]D`  ]` } P] D` Y  ]D` E ]`b{=`DE] ` } P] D` ]D`D  ]D` ]`{]` DI ]`D 5`1 P] ` D])-` $a-!-P`H ``? `? `?  a `; } P]q@ D)- DcD `]= D`@$a/> @ $a/!-pF^`ff DP]; `b;]=`D  ]``` =i]<e D]P]c ] $a-!-P`< ``? `? `?  a)- DcD `i]m` = ]P] ? ] $a/!5pF!^)-`Pf D  ]})B"`  P]y`  !` D`E` D] 8 `D, ]` $a-!-P`< ``? `? `?  a)- DcD `i]m` = ]1] $a/!5pFe^)-`Pf D  ]}mB"`  P]y`  e`IE` ]9 ` } P]>D`% ]` $a-!-P`< ``? `? `?  a)- DcD `i]m` = ]1] $a/!5pF^)-`Pf D  ]}B"`  P]y`  `IE` D]: `DY ` `D+ ]` $a-!-P`< ``? `? `?  a)-` `i]m` = ]P]< ] $a/!5pF^)-`Pf D  ]}B"`  P]y`  `IE`D]^)-`]]]]]1]]]]M]]]]]]]q ]P]! ]]]%] Y ]] ])y D`E ]- D`E ]1 D`E ]5 D`E ]9 D`E ]= D``E ]A D``E ]E D`0ER  ]I D`E¸Ha]LL` fDa `D‰ ]M`QP]U D` D`E`"a } ]YP`]HOc#DbV $a-! P`H ``/ `/  `?  a a)- D`DaD`aP]e`iB55 D`D]m D` $a/! p $a/! p^)-f6DS ` D` D`  `` Y ` D` ]^`f6b } P]q]u`D]y D`` ]} D`` S  ] D`B`^ ]q]u`Db` `] D`` D]"V ] D`EV ] D`ED"V ] D`EDV $a-! P`H ``/ `/  `?  a a)- D`DaD`P]`44 D`D]u D` $a/! pi^)-`fY `  } P]uD`  ]D`  i`DS  ] D`B` D]VDaS S$a/!5PF` `Y a`3 bb`3"`3"`3 `3 b"`3")- cD] `}HdDED($a /: @ $a/! p^)-`PfD] ] D`^`]DaLL`D L`Y5AMD a=t$a/!57PF)-ED($a /: @^`]Da,L` L`=i %EadL`  I  - A E !cHTOcD" D b B ua|DED($a /: @^)-`]DaL`L`L` E!cllE c$a- ``^)-`fD ` " } P] F`D ` D]ub" $a-! P`< ``/`/ `?  a)-` `y]}5 D` $a/! P ` a)-` `] ]5 D`E ] D`E ] D`E ] D`E ] D`E ] D`E D`P$a/! @ -^$a/!  M `b4a4a@B5a" a aB a(/a 0"n a 8 a@" aHMaBP5aXbNa`NaBhb a pbOaxOaBD) $a/! QU$a/!  Y$a/!  ]`< ``/ `/ `?  a)-` `]`HOc#V$$a  /! @$a /! )-`]i $a-! P```D]q D` $a/! P)-`] ] D`E ] D`EX$a/! O@`] )]`DH`  ] ] ] ]`G` 9ad$a/! @`] ]q D`EVDB Vi³ V.V¡ VD VaSDED($a /: @ $a/! p^)-`PfD] ]q D`^`] Da$L`D$L`},L` i V $a-! P $a-! P`)-]H ``/ `/  `?  a a)- D`DaD`P]D] D` $a/! p9^`ff D ` ` ` D `D`DB`3` "` b ` D› `  `D `Db ` ]QVV ]`HaXYEDEe!c% D`EV ]`Ha UpDEDEy!c D`E(L` HOcC  V $a-! P`)-`]V ]EDB Q.V ]ED¡ MD® UD’ !DBc V$a/! @)`cdefgDVD$a/! ;@-`]-9-š VD³ VDb VDB B V¶ VD Va$DED($a /: @ $a/! p^)-`] ]^`]DadL` D8L` !UL`1Qi V $a-! P`)-`]EV $a-! P`]V $a-! P`]V $a-! P`]V $a-! P`)-`] V $a-! P] V $a- `^`] EV ] EV ] EYuV ] EMV ] EVV ] IEV ] EV h]  V ]! EV ]% EV ]) E}V ]- EmV]1 V]5 V ]9 EtL`  I  HTOcb ¶ DB  aDED($a /: @^)-`]DaL`xL`i EAy!M!m}@L`  I E !cmHOcC   D B b Db  b  DbNDuD  D  ADb  Dal<DED($a /: @^)-`]DaTL`(L`Ea}L`E !c}9y HTOcDn|bnDBB~DaWDED($a /: @^)-`]DaL`L`4Y)q8L`   E!ceHOc#De"DDbDDas$a/!5'PF)- ED($a /: @^`]Da(L`(L`qL`E!c E c9eI EcD $a-! P9`H ``/ `/  `?  a a)-``= P]A q D`hD]E  D` $a/! PME $ ` a a)-``P]I q D`] D`$a/! @ -^$a/!  u )$a/! y $a/!  } $a/!   $a/!   $a /!    ` a ) DcDDbD` ]M 5 D`E ]Q  D`E ]U  D`E ]Y  D`E ]]  D`E]- ]a  D`E ]e  D`E ]i  D`E$a/! C  $a/! ? $a/! ; $a/! 7 $a/! 3 $a/! / $a /! + $a /! ' $a /! # $a /!  $a /!  U) !!    U)     `-E<".a $a/!  $ `a a‰a)$a/! @ !!-`$a/!  $`aŠa$a/! @!!`$a/!  $ `a"a)$a/! @%!)!-`$a/! @ `a) Zb$a/! @1!$`aa-`$a/! @$`aa`W$a/!  $ `WabXa)$a/! @M!Q!-`$a/!  $ `aa) Zb$a/! @Y!]!-`$a/! @$ `aa)`B$a/!  $`BaBa$a/! @q!u!-` $a/!  $ ` aB a$a/! @}!!)`")$a/!  $`)a" `$a-! P`< ``/ `/ `?  a)-`$a/! @!!`[ $a/!  $ `[ aBa$a/! @!!)-`$a/!  $`aba$a/! @!!`aB$a/!  $ `Baa$a/! @!!)-`"$a/!  $`"aa$a/! @!!`I $a/!  $ `I a aB$a/! @!!)-`$a/!  $`aa$a/! @!!`".$a/!  $ `".a,a$a/! @!!)-`$a/!  $ `aaZb$a/! @!!)-`$`"aBa"` a("a Zbb$a/! qu$a/!   "$a/!   ")$a/!  "$a/!  "$a/!  "$a/! # "u$a/! ' !"$a/! + %")$a/! / )"$a/! 3 -"$a/! 7 1"$a/! ; 5"u$a/! ? 9"$a/! C =")$a/! G A"$a/! K E"$a/! O I"$a/! S M"u$a/! W Q"$a/! q< `aaaBa)-$a/!  Y"]"$a/! @a"` $a/!  I< ` aa a a)-$a/! i"m"$a/!  q"$a/! @u"`$a/! I< `aaaa)-$a/! }"" Zb$a/! "$a/! @"`$a/! < `aaaa)-$a/! @""` $a/!  I< ` ab aB a¶ `))-$a/! ""$a/!  "$a/! @"` $a/!  I` ` `$a-! P`<``/ `/ `?  a)-`b `I `e" ` "`   ` ($a-! P`< ``/ `/ `?  a)-`$`0 $a/! ""$a/!  "$a/!  "$a/!  ")$a/!  "$a/! @"`$a/!  I< `aaaa)- Zb$a/! "< `aaaa)-Zb$a/!  ""$a/! @"`$a/! "" Zb$a/!  #< `aaaa)-$a/! @ ##`$a/!  #"$a/! @#`1$a/!  I `))1aF2a2a"3a63a2 Aa0(B4a*0qa@84a@B5aHg aNP5a XB6a(`ahAap6aBxB7a$AaLaa8X a47a"B8a 8ab9a,9a:b:a&:aB;a;aD<aP<a"=a=a ">aaJaa  a>(Aa.0>aH8"?a<@)-$a/! !#%#$a/!  )#$a/!  -#$a/!  1#$a/!  5#)-$a/!  9#%#$a/! # =#$a/! ' A#$a/! + E#$a/! / I#)-$a/! 3 M#%#$a/! 7 Q#$a/! ; U#$a/! ? Y#$a/! C ]#)-$a/! G a#%#$a/! K e#$a/! O i#$a/! S m#$a/! W q#)-$a/! [ u#%#$a/!  I< `a a a a$a/! }##)-$a/!  #$a/! @#` $a/!  I< ` ab a" a a$a/! ##)-$a/!  #$a/! @#`E $a/!  I `E aB2BF aBR F aBl"; aBP> aB A aB(> aB*1B@ aB>8B aB@= aB,Hb? aBP"A aBX< aBp`b= aBh@ aBp? aBvx"> aB= aB@; aBҐC aBD aBzbB aBʨC aBE aBB aBdBD aBbE aB"C aB,bG aB"H aBH aB6; aBB< aBK aBR"L aBL aBM aB M aB&(N aB`1bN aB9N aB@"O aB>IO aBQO aBPYbP aB`P aBhBQ aBpQ aB^yBR aBR aBڈ"S aBS aBBT aBT aBXU aBFU aB*U aBHBV aBV aBL"W aB0W aBjW aB BX aBX aBY aBbY aBT Y aB^Z aB&"[ aB(![ aB)\ aB0\ aB:9\ aB@B] aB2H] aBQ^ aBYb^ aB`^ aBh"_ aBp_ aB`x_ aBB` aB0` aB\"a aBa aBa aBBb aBb aB8c aBc aB8c aBBd aBbd aB$e aB e aBf aBbf aBf aB "g aBg aB"h aB h aBF(h aB0Bi aB.9j aBZ@bj aB4Ij aBPBk aB Xk aB`B.aBh.aB:p/aBy/aB 0aB0aBX1aB1aBޠ2aB2aBN3aBJ3aBB4aBd4aBD5aB5aBVB6aB~6aBDB7aB.7aB6B8aB8aBLB9aBh9aB B:aB(:aBh1B;aB8;aBT@B<aB$H<aBaBVh>aB\p"?aBtx?aBx"@aBȈ@aBԐ"AaBAaBf"BaBrBaB"CaBlCaB"DaBHDaBfbEaBEaB"bFaBFaB@GaB<"HaBHaBbIaBJaB(JaB "KaBN)KaBB1q aB48br aB@r aB Hbo aBnPBq aBXs aB`u aBJibw aBbp"LaBxb{ aBbn aBl aBn aB|"l aBjbm aBZm aBD$a/! ##)-$a/!  #$a/!  #$a/!  #$a/!  #$a/!  ##)-$a/! # #$a/! ' #$a/! + #$a/! / #$a/! 3 ##)-$a/! 7 #$a/! ; #$a/! ? #$a/! C #$a/! G ##)-$a/! K #$a/! O #$a/! S #$a/! W #$a/! [ ##)-$a/!  I0 ``$a/! @ $a/! P $a-! P`H``/ `/  `?  a a)-``m P]q `u $a/! @$a/! $$))$`] $]]`]]`"]]` D D``D]y %$ D`$a/! @ $^-$a/!  U$$ ` aa) $H` ab aB aB a `+ } P]} %$ D`F- D`DaD""`$]  D`]  D`]  D`]Y$]$)`"` $ `-$B $a/!  I0 `aBbaBŒaB$a/! $$)$a/! @$`$a/!  I< `a~ aBb aB aB-$a/! $$)$a/!  $$a/! @$`[ $a/!  I$ `[ aBa$a/! @$$)`$a/! @`a`N$a/! @`Na` -$a/!  I< `-a`aBaaaaa-$a/! $$)$a/!  $$a/! @$`~$a/!  IH `~aBaBbaBaBbaB $a/! $$) Zbb$a/!  $$a/!  $$a/! @$`"$a/!  < `~aBaB"aQ a$a/! @% %)`z$a/!  I$`zaa$a/! @%%`$a/!  0 `aaa$a/! %!%)$a/! @%%`"r$a/! @I`"ra`$a/! @`a`$a/! @`aB`i$a/!  $`iaja$a/! @E%I%` $a/! @  `a)Zb>$a/! Q%<`a>aB?aBb?aB-$a/!  ]%a%$a/! @e%`$a/!  I< `aaba"a)$a/! m%q%-$a/!  u%$a/! @y%`B$a/! @I `B`3 } P]y`}```yHa]LL`!]B]  D` fDa B`D‰ ]M`QP]  D`8E`"a } ] p` H4Oc DBV $a-! P`H ``/ `/  `?  a a)-`` P] (` %E"FFBGFG D`D] % D` $a/! p%^)-`f6DP]  D``DM } ] F` S  ] % D`B`D %`Db ] F` D ] F` ]Da:$a/!5 PF$ `Y aB`3)- cD# `}HdD%ED($a /: @ $a/! p^)-`PfD] ] % D``Q&^`]a&Da`L` D L`%XL`eV h]  $a(" @$a/! p^)-`PfD }&`]c^`V fD ` `D ` D] `" h]  $a(" @$a/! p^)-`]c&^` D`EV fD ` `D ` D] `" h]  $a(" @$a/! p^)-`]c&^` D`EV h]  $a(" @$a/! p^)-`PfD &`]c^`V h]  $a(" @$a/! p^)-`PfD &`]c^`V h]  $a(" @$a/! p^)-`PfD  '`]c^`V fD ` `D ` D] `" h]  $a(" @$a/! p^)-`]c1'^`IEV fD ` `D ` D] `" h]  $a(" @$a/! p^)-`]cQ'^` D`EV fD ` `D ` D] `" h]  $a(" @$a/! p^)-`]cu'^`a'EqV ]  D`E(L`   E%!cP]   ] = D`]]]P]  ]]] ]]%]`E"FFFBGG & D`F`D]!]] `! yb D`E`%]D%]`F)-`b$a/!  I< `baaaa$a/! ''$a/!  ')-$a/!  'Zb $a/!-@'< `baaaa`$a/!  I<`aaaa)-$a/! ''$a/!  '$a/! @(`"8b$a/!  Iq `3+baB4"aBaB2"aB aB* "aB.(„aBL0baB8aB:@baB HaBPaB"X"aB0`aBPh"aBpaB6x"aBFaBBaBRaB8BaBŒaBBaBaB<BaBNaB "aBBaB$aBaBJaB>aB(aBaBaBbaBD“aB@ BaB(aB0"aBH8aBT@"aB&HaB,P D)$a/!  ( ($a/!  ($a/!  ($a/!  ($a/!  ($a/!  !()$a/! # %( ($a/! ' )($a/! + -($a/! / 1($a/! 3 5($a/! 7 9()$a/! ; =( ($a/! ? A($a/! C E($a/! G I($a/! K M($a/! O Q()$a/! S U( ($a/! W Y($a/! [ ]( $a/! @I ` a)`$a/!  <``$a-! P`<``/ `/ `?  a)-`? a"aa$a/! m(q($a/!  }($a/! @(`¹$a/!  I< `¹a"aµaa)-$a/! (($a/!  ($a/! @(`b $a/!  I `   a b>a 9>a b?a ?a #  a ("a !01 a 58Q a@)V` D`DaD$a/! PT ` aY a1 a m aB^`+ } P]-  DM a )V` DcD$a/# P ` a-DQb$a/" P$`Y a a)V` D`DaD$a/$ P$ `aaV`D`DaD$a/( P$`aaV`D`DaDDa$a/! @ ^-$a/! )$`Y a a)$a/! @))`$a/! P $a-! P`H ``/ `/  `?  a a)-``1 P]5 I D`D]9  D`$a/! @  ) `)]^)-$a/!  ))Q `a aa 1a"a a"(Ba0a8ba @IaHa(Pa,Xa`ahBa$p axa"a*aabaa&BaD)-$a/! )))$a/!  )$a/!  )$a/!  ))V`$a /!  ))$a /!  )))$a /! # )$a /! ' ))$a /! + ))$a/! / )))$a/! 3 )$a/! 7 ))$a/! ; ))$a/! ? )))$a/! C )$a/! G *)$a/! K *)$a/! O ) *)$a/! S  * ` a)) D`DaD$a/' OP ` aEa `+ } DU`+ aD`+ iD`+  D`+ } D`+! YD`+ uD`+% DY `+ } D{a1 ab{a E a ( a0 a 8I a@ a"H)V` DcD$a/! p=^V`D`Da D$a/! p $a-! P`H ``/ `/  `?  a a)- D`DaD`= P]A $`E "Z Z Z B[ [  D`xD]I y* D`$a /! @  ]*f6Dh } ]M  D`D` DS  ]Q  D`B` Di P]U  D`D` ".]Y  D`` Y e`  m*`Dj ]] y* D`D` ]^)-$a /!  **T `"Z aZ aZ aB[ a[ a "R a ($a /! **)-$a /!  **$a /!  *$a /!  *$a  /! @**)V``^* D`Da D$a/! SP ` a " a b4a4aB5a  a(ka0bma8la@B aHXa'PBaXaa`blahlapBna xa!aaba%ka#-DQb$a/! [P $a-! P`H``/ `/  `?  a a)-``a P]e  `i «" *4` +]m + D`]q  D`]u  D`8]y  D`]}  D`]  D`]  D`]  D`]  D`] D`HD]  D`$a$/! @ +^)-$a$/!  m+ `!!b4a 4a@(B5a" a*"Ma$ a(W`0U!"a&8a8@ a0H" aPa,XNa`BahBF a.p± aa&a BA`$a/! O@$a/! K $a/! G $a/! C $a/! ? $a/! ; $a/! 7 $a/! 3 $a/! / $a /! + $a /! ' $a /! # $a /!  $a /!  $a/!  ++)-+++++++)-+++}+y+`KaB[a«aJ"`4$a/>,@ $a/!-p $a-!-P`< ``? `? `?  a)-` ` ] ` $` E bu]La'`''a]8La $i$a]8La %i%aa]iL`                               ! % ) - 1 5 9 = A E I M Q U Y ] a e i m q u y }                                         ! % ) - 1 5 9 = A E I M Q U Y ] a e i m q u y }                               ". ` D`$a/> @ ^)-$a/>  + `b`V`Zb +^, D`DaD&&ff DP] + D``b;]  D``D ]  D`` D]  D``D,),` ]  D`` } P] + D`F`%` D]  D``D +`D+]  D``D]+ `b`)-`]`6"a@Y a V`$a$/! +q+u+a,$a$/!  e,)$a$/!  i,$a$/!  m,-$a$ /!  +q,u+$a$ /!  u,)$a$ /! # y,$a$ /! ' },-$a$ /! + +,u+$a$/! / ,)$a$/! 3 ,$a$/! 7 ,-$a$/! ; +,u+$a$/! ? ,)$a$/! C ,$a$/! G ,- ` a %`+# } P] + D`F`+' ]!  D`F"?`+ ]%  D`FV`+ ])  D`]-  D`B`++ ]1  D`]5  D` `+ ]9  D`]=  D`B a la bma Xa  b `+ ]A  D`FbY`+  ]E  D`FB%`+ ]I  D`Fla (bla )0Ya !8"a @V`+ ]M  D`]Q  D`[a %H&a P"]`+ ]U  D`F)a, DcDDb D$a/) 3P `  aY aaaa a (+a0b;a 8`+ } D,a@%aH aP)V` DQb+Db D$a/! P $a-! P`H ``/ `/  `?  a a)- D`DaD`Y P]] ,` a HOcC  V ]e - D`ED V ]i  D``EDB V ]m  D`ED V ]q  D`E V ]u  D`E V ]y  D`E V ]}  D`ED" V ]  D`Eb V ]  D`EDB V ]  D`EDB Vy-" V ]  D`ED"V ]  D``EDV ]  D`EaޢDED($a /: @ $a/! p^)-`PfD] ] - D`1.^`]A.Da0L` D@L` .%.------- .---.DL`V` V`V $a-! P $a-! P`H ``/ `/  `?  a a)- D`DaD` P] ` HOc#cV P??0$a 1 e@$a/+ PE$ ` aa^)- DcD] $a- @`H ``/ `/ `? a^ aJ)-`bD]   .`D.^`],U]DfPPgP`4 abV ] . D`EDcV h0M],]Dfhhgh`4V$a/! @$a/! $a/! $a/! $a/!  ()....`'  !"#$%&'()*L`+b"""„bb"""BBŒBB"b“B""cbV(,i  LL`b deaeeAffB~~bggEcbV ] . D`EbVu.D"VaDLL`B~~bgEcaV p$a/!5'PFx ` Y ab`3 ""`3c`3 c`3bb`3"b`3`3 ab`3b)- cD& `}HdD.ED($a /: @ $a/! p^)-`PfD] ] . D`A/^`]Q/Da(L`D(L`//... /..]E.!cMM` D`D] . D`$a/! @ $a/! Pu.0 ` a a a )- DcD`P] . D`8]  D`]u.^``H ``/ `/  `?  a a)-`` P] (` $` HTOcDa. V $a-! Pu.`H ``/ `/  `?  a a)-`` P] / D`D]  D` $a/! P}// ` a)-` `]Db V $a-! Pu.`H ``/ `/  `?  a a)-`` P] / D`(D]  D` $a/! P}// ` a)-` `]BV ] / D`EB V ]  D`EDa2] $a/!5pF^ `DaD&f6Db b`B`B "`D`Y }` `DHdD/ED($a /: @ $a/! pܔ^)-`PfD] ] / D` A0^`]Q0DahL` DL`a.//!00$L`/V ] ` HOc# "i0D  Y.V`DV`V`"V` ].bV`DV`Da*DED($a /: @ $a/! p^)-`PfD] ]q0 D`X0^`]0DaL`D0L` Y.].0000}00i0]Eu0!cOO D`E. L`A . - E/!cNN ]/ D`E ]  D`E`b.B$a- @$a/! P$ `Y a `$a- @`<``/ `/ `?  aJ)-` DcD]% 0a+D] e 0D0$ ``/ `/ )-`]/ D`0] D` D`D] D`$a /! @  $a/! KP}// ` a B a  a #" a  a   a (" a 0b a 8b a @" a H a P a X a !`" a hB a pb a xa ba )- DcDP`P]/ D`]! D`]% D`]) D`]- D`]1 D`]5 D`]9 D`]= D`]A D`]E D`]I D`]M D`]Q D`]U D`]Y D`]] D`]u.^$a /!  !11T `"a@naaaBa a ()-$a /! 11$a /!  !11$a /!  1$a /!  1)-$a  /! @11`V $a-! P`< ``/ `/ `?  a)-` `a]e D` $a/! P1 ` a)-` `]aI0VfD` D ` D]i D`$L` u0/E !cg`5u]8La ia]8La ia$a/! @ i-`y-P]m- D`]q D`]u D`]y D`]$a/! @ 2^)-2 `Ba`]$1]`}/]`aH D`8D]- D`E2H ` abaB ab aa )V` D`Da D$a/ P``a B@a @a "Aa 1 a  m a ("a 0V`D`DaD$a/! p $a-! P`< ``/ `/ `?  a)- D`DaD `]`5HOc#@V$a- ``^)-`fD` D ` D]2 D`DBV2fD` D` D] D`DV ] D`ED"V ] D`ED‡V ] D`E’V $a- @ $a- p^)-`fD `  `D ` D]2 D`$a/! #Pl ` a a aBaa "a(a0a8)- DQb$a/! P0 ` a aa)V`DcDDbD%'` ]2 D`E ] D`E ] D`E ] D`E]2 ] D`E ] D`E ] D`E`0 ``/ `/ `; )-`]2 D`$a/! p!3^`Pf ] D`E`D e3`]cDœV2fD` D ` D]2 D`DV ] D`EVfD` D` D] D`V ] D`E"VfD` D` D] D`DBVfD` D` D] D`V $a- @$a- p^)-`fD ` D ` D]2 D``0 ``/`/ `; )-`]$`x` $a- @`` ``/  `/ `?  aJ_aB`a i a)-` a8'P] ]D]$a /G @$a/! PM `00 a:1 a`a"aaBaaJ "ba (ba40"ca(8caP@ca$HBdaXPdaXBeaV`eahfapfaNxga6ga8habhaLhaBia&ia@"jaja "kaka0"la^laH"ma2ma>"nana.Boa"oaTbpa*pa< bqa\(qa0braR8m a@raHBsa,P- aZX"aF`saDhBta pM ax)- DcD`-P] ]54] ] ]]]]]!]%])]-]1]5]9]=]A]E]I]M]Q]U]Y]]]a]e]i]m]q]u]y]}]]]]]]]]]]]D] 4]]]^)-`]94]]M4]]]4]]e4]]m4]]P] ]% ]]K]1]O%]P] ]]]]1 ]3 D`Ea]`  ] D`E]<e D"µ3H3 D`EDV ]2 D`EDV2fD` D ` D] D`"VfD` D` D] D`bVfD` D` D] D`V V 2] D`$a/! @ 3]5Q3 ]2 D`E`^)-$a/!  55 `aBbcaB¶aBbaB¤aB "aB(aB0aB8aB @aBHaB PBaB"XaB`aBh´` p4b`xf`"`)3$a/! 555$a/!  5$a/!  5$a/!  5)3$a /!  555$a /!  5$a /! # 5$a /! ' 5)3$a /! + 555$a/! / 5$a/! 3 5$a/! 7 5)3$a/! ; 555$a/! ? 5V ]2 D`EV2fD` D ` D] D`ˆV ] D`EV ] D`EVD) V2DBV ]2 D`EV$a%%/! @$a%$/! $a%#/! $a%"/!  $a%!/! { $a% /! w $a%/! s $a%/! o $a%/! k $a%/! g $a%/! c $a%/! _ $a%/! [ $a%/! W $a%/! S $a%/! O )-]6Y6U6Q6M6I6E6)-A6=6965616-6)6)-%6`] $a/! @$a/!  $a/!  $a/! $a/!  $a/! @ ^Zb"+$a/!  }6H `+a$`$a-! P`T``/ `/  `?  aB&a a)-`b`$a-! 'P`x ` `/  `/ `?  a)a aaa a()-`b`$a-! #P`l ``/  `/ `?   aBa aBa a )-`` $a-! P`H ``/ `/  `?  a a)-`$a/! 66$a/!  6$a/!  6$a/! @6`$a/!  }6H `a aB aB a ` $)-$a/! 66$a/!  6$a/!  6$a/! @6`F$a/!  }6H `F`0N`$a-! P`H``/ `/  `?  a a)-`G`$a-! P`H ``/ `/  `?  a a)-`b]`$a-! P`H ``/ `/  `?  a a)-`S` $a-! P`H ``/ `/  `?  a a)-`$a/! 66$a/!  6$a/!  7$a/! @7`-$a/!  }6H `a"a` 6aBa )-$a/!  77$a/!  7$a/!  7$a/! @7`$a/!  }6H ``0b~`I`"'`"-` )-$a/! %7)7$a/!  -7$a/!  17$a/! @57`y6$a/! }6H `aaaaa )- Zb$a/! =7A7$a/! I7$a/! M7$a/! @Q7`$a/! H `aaaaa )-$a/! Y7]7$a/! a7$a/! @e7`$a/!  }6H ``0a`"a"a )-$a/! m7q7$a/!  u7$a/!  y7$a/! @}7`$a/!  }6H `aAa aa!a )-$a/! 77$a/!  7$a/!  7$a/! @7` $a/!  }6)-$a/! 7$a/!  7 $a/!  H ` `$a-! P`H``/ `/  `?  a a)-` a a a" a $a/! 77$a/!  7$a/!  7$a/! @7`_$a/!  }6H `_aB`aBaabca )-$a/! 77$a/!  7$a/!  7$a/! @7`$a/!  }6H `aaba"aa )-$a/! 77 Zb$a/!  7H`aa`$a/! @$a/! $a/!  77`b`µ` $a/!  77)-$a/! @8`b$a/!  77$a/!   8$a/! @8`$a/!  }6H `a"7a`$a-! P`H``/ `/  `?  a a)- D`DaD<aba $a/! 88$a/!  -8$a/!  18$a/! @58)-`".$a/!  }6H `".a,a a>a=` !$a/! =8A8)-$a/!  E8$a/!  I8$a/! @M8`" $a/!  }6H `" aB+ab: `$a/! BU`K a"L aL aWM aM a N aE(bN a_0N a8"O a/@O a5HO aPbP aXP aY`BQ a9hQ apBR axR a]"S aGS aCBT aT aU aǨU aaU aBV aiV a"W aW aW aBX aX aY abY aY aZ a"[ a[ a \ a)\ a1\ a8B] a @] a)H^ aPb^ aX^ aA`"_ ah_ ap_ axB` aӀ` aS"a aa aIa aѠBb aŨb acc ac asc aBd a[d ae ae af abf af a"g ag a"h ah aq h aK(Bi aM0j a8bj a@j aHBk aPk awXB.a?`.ah/ap/aox0ak0a1a 1a 2a2a#3a3a4a=4a5a5aB6a 6a'B7au7aB8ay8aB9a9aB:a :a(B;a30;a78B<a@<aHB=aP=a1XB>a`>a+h"?aQp?ax"@a%@ag"AaUAa"BaBa"CaCa{"DaeDabEaEa-bFamFaOGa "Ha!HabIaJa}Ja"Ka; Ka()-``$a  /! +@$a  /! ' $a  /! # $a  /!  $a  /!  $a /!  u8q8m8i8e8`: ` $a  /! @$a /!  $a /!  $a /!  $a /! $a /!  8)-888}8`$a/! U8Y8$a/!  8)-$a/!  8$a/! @8`H `aBaBaBaBaB u68q6)-m6i6`]` b3e332E56 ] 2 D`E22fD` D ` D] D`fD` D` D] D`35q56"532Q5522232fD` D ` D]2 D`35a52fD` D ` D]!2 D`3fD` D` D]% D` ]) D`E V8V8DV8bV8DbV8"V8²V8DV"V8aDED($a /: @ $a/! p^)-`PfD] ]-2 D`;9^`]-9DalL`DL`#!626}53 93A569253885 6m56932M52223935]5939 9L` i V $a-! P`< ``/ `/ `?  a)-` `1]5`9   D` $a/! P $a/! p $a/! p $a-! P`H ``/ `/  `?  a a)- D`DaD`=P]A D`8D]E D`^`)fD y9`1 ]I D``D]^)-`fD`P]M D``D]Q9 ` a)-` `]V $a-! P`<``/ `/ `?  a)-` `Q]U D` $a/! P9 ` a)-` `]EaV$a::/! @$a:9/! $a:8/! $a:7/! $a:6/! $a:5/! $a:4/! $a:3/! $a:2/! $a:1/! $a:0/! $a://! $a:./! $a:-/! $a:,/! $a:+/! ::)-:: : :::9)-999999`]@ `@ @8 !1V ]Y9 D`EVP]]I D`V ]a`eH4Oc "A:DV ]iI: D`Eb2 V Ef6Da D"`  `D e:` D]m`q E:D D`$a/! p^)-`PfD `]car@RDED($a /: @ $a/! pܑ^`PfD] ]uI: D`X:^)-`]:DaL`DL`A:a:U:L`V ]y`}HOc#DYV ]: D`EH V Ef6Da D`  `D :` D]m`q  ]: D`$a/! p^)-`PfD :`]cDq::"F:VDbV ]: D`EDXV ] D`EDai DED($a /: @ $a/! p^)-`PfD] ]: D` ;^`];DaL`D L`::::::L`V ] D`EL`E:!c ]: D`E D`EL`EM:c D`y:U:V 8]`I]D ]8! def g hi jkl$m!no*pqrs&tuvwx'y z{|}(~) "''''&'('3'4'5'6'7'8'9':';'<'='>'?'@'A'B'C'D'E'F'G'H'I'J'K'L'M'N'O'P'Q'R'S'T'U'V'W'k'l'm'u'v'w'x'y'z'{'|'}'~''']4e8]i $}8]e V@$a/! ?@$a/! ; $a/! 7 $a/! 3 $a/! / $a /! + $a /! ' $a /! # $a /!  $a /!  $a/!  $a/!  $a/!  $a/! $a/!  $a/! @ ^)- `3ab3ay a3a-a b a(a0"Oa8B`a @B4aH aPaaX4a`5a h"5ap;;)-;;;;;;;)-;;;;};y;;)-u;``;@`;D] ]`HOcC B`V ]; D`Eb V ] D`Eb3V"4V ] D`E V ] D`EDV ] D`ED"OV ] D`EV@};];" ] D`E ] D`E ] D`E;<<; ]; D`E<;3V5DV` DbV`<BV` D"V`0B =DV`^V`V`!DBV`]D="V`V`@D"B=V``=Dag0DED($a /: @ $a/! p^)-`PfD] ]`%= D`=^)-`]==DaL`DL`'=1=y== =-==I=<a=]==U=<=E=9==Y=======u=5=e=}=Q==A=i=M==m===q==]E%=!cAAE->= ]!= D`E>%>3VE>D3V=DB4VU>Dy V=>-VM>aV%DanWIlDED($a /: @ $a/! p^)-`PfD] ]%= D`Hu>^`]>DaL`D@L`5>a> >i>]>m>=%>)>=e>>q> >4L`  =I=<e=E<<<<<L`%=< E=!c@@ D`E=>E>M>>->=U>>%>::V ])u D`EV $a- ``^)-`fD-`  `D ` D]1 D`EVfD` D ` D]5 D`@L`I y M::- = E !cb` @ $a-! P2`< ``/ `/ `?  a)-` `9]=2 D` $a/! #P }2f6 BP]A D``]E D``]I D``D]M D``]Q D``D"]U D``D 2`D]Y D``]>l `a aaBaa "a(a0a8)V``0`  ]]`a2 D`E ]]`aI?E ]]`aBE ]]`aE ]]`a"E ]]`aE ]]`aED] \0$a 1 I@$a/! Q `aa a `3Q }  ]e D`EF`3O  ]i D`EFa{aaa1Ba= 1 ac("a0aq8a@BS amHa[P:aX;a`"7ahapasxa3aaa?a"aaaba+aeba‘aUba- a9aba-a5ba aa%bai a(bay0aw8ba@aHbaPaXbaS`ahbapBax»a¼aE¾aaY"aaM"aa"aWa"a#aCbag"a "a_a]"a}a a"a9aK "a(a/0"a8ak@"aoH"auPa;X"a`ah"apa!xa"a7a"aa"aGa)"aa"a'aAba"aIa5a)- DcDu`[ ]m D`E ]q D`E? ]u D`E ]y D`E? ]} D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D` E ] D`E ] D`E ] D`Eu@ ] D`E}@ ] D`E@ ] D`E@ ] D`E@ ] D`E@ ] D`E@ ] D`E@ ] D`E@ ] D`E ] D`E ] D`E ] D`E ] D`E ]  D`E ]  D`E ] D`E ] D`E ] D`E ] D`E ]! D`E ]% D`E ]) D`E%A ]- D`E-A ]1 D`E5A ]5 D`E=A ]9 D`EEA ]= D`EMA ]A D`EUA ]E D`E]A ]I D`EeA ]M D`E ]Q D`E ]U D`E ]Y D`E ]] D`E ]a D`E ]e D`E ]i D`E ]m D`E ]q D`E ]u D`E ]y D`E ]} D`E ] D`E ] D`E]G ] D`E ] D`E^)-`],U]Dfg`4 ]2 D`E2 a@B aʚ;a@B ] D`E ] D`E ] D`EG$$a  /! @$a /!  $a /!  $a /!  $a /! $a /!  T `¡a Ba;a¢a"a "^a()-5B=B1B-B)B%B`]HDGH]Had$a/! @$a/! $a/!  0 `BaB¤aB"^a)-MBUBIB`]adHH D`>^5? D`DaD$a/! p $a-! P`< ``/ `/ `?  a)- D`DaD `]=`MHTOcDVuBbV $a-! P`H ``/ `/  `?  a a)- D`DaD`P]$`}B<B;:;: D`xD]B D` $a/! pB^)-`f6D } P] D`D`DS  ]B D`B`b ] D`D`D ] D`D` ] D`D` B`DY b` D]DBV $a-! P`< ``/ `/ `?  a)- D`DaD `]}B D` $a/! p C^V`D`Da$a/! @ ^)-$a/! @!C `"R aC`q,u,f6DP]}B D`` DS  ] D`B` D } ] D`D` DY B`   C`D] D`` D]V%C]"R DaQ$a/!5PFH `a B`3b`3`3b`3")- cDy, `}HdDBED($a /: @ $a/! p^)-`PfD] ]}B D`yC^`]CDaL`. $ DL`BBBYCL`!eV h] $a(" @$a/! p^)-`PfD C`]c^`V h] $a(" @$a/! p^)-`PfD C`]c^`V fD` `D ` D] `" h] $a(" @$a/! p^)-`PfD C`]c^`IEV fD` `D ` D] `" h] $a(" @$a/! p^)-`PfD D`]c^`IEVP] V fD ` `D ` D] `" h]  $a(" @$a/! p^)-`PfD 1D`]c^`IEV h] $a(" @$a/! p^)-`PfD ID`]c^`V h] $a(" @$a/! p^)-`PfD aD`]c^`V h] $a(" @$a/! p^)-`PfD yD`]c^`V h] $a(" @$a/! p^)-`PfD D`]c^`V h]! $a(" @$a/! p^)-`PfD D`]c^`VP]% V fD)` `D ` D]-`" h]1 $a(" @$a/! p^)-`PfD D`]c^` D`EVP]5 V]9V h]=$a(" @$a/! p^)-`PfD E`]c^`VP]A V]EV]IV]MV h]Q$a(" @$a/! p^)-`PfD 9E`]c^`V ]U $a(" @$a/! p^)-`PfD QE`]c^`VP]Y V fD]` `D ` D] `" h]a $a(" @$a/! p^)-`PfD }E`]c^`IEV fDe` `D ` D] `" h]i $a(" @$a/! p^)-`PfD E`]c^`IEV h]m $a(" @$a/! p^)-`PfD E`]c^`VP]q V fDu` `D ` D] `" h]y $a(" @$a/! p^)-`PfD E`]c^`IEV h]} $a(" @$a/! p^)-`PfD E`]c^`qL` EB!c}]]P] ]]]w]]]_]]]]]]]]T]U]^ ])']P] ] $a- @`< ``/ `/ `?  aJ)-`aD]N $a/K @$a/! P0 ` aaYa)- DcD]]F ID$ ` a`+ } )-`9']-]]P]C ]]]D]a]`]`<$a/! 3@$a/! / $a /! + $a /! ' $a /! # $a /!  $a /!  $a/!  $a/!  $a/!  $a/! $a/!  $a/! @ ^)-0Zb b2 $a/!  F ` b2 `$a-! P`<``/ `/ `?  a)-`2 a aB3 a3 a "4 a(4 a0Ba85 a @5 aH6 a Pb6 aX$a/! FF$a/!  F$a/!  F$a/!  F$a/!  F ` a aabaµa "a(a0ba8·a@"aHaPaX)-$a/! FF$a/!  F$a/!  G$a/!  GB`$a/!  F ` B`a-a aa  a a(a a0 a8"] a@b`H$a-! P`H``/ `/  `?  a a)-`B ` P$a-! #P`l ``/  `/ `?   a a a aa ) DcDB`X$a-! P`H ``/ `/  `?  a a)- D`DaD$a/!  GG$a/!  5G$a/!  9G$a/!  =G)-¨F ` ¨`!"`ba `ba `(b` 0`8$a/! @$a/! $a/!  0`aba"aMGUG)-IG`®`@!B`H¯`PbaXFEGFFF)-FFFEGFFF)-F`]!]"t"t$}-----a/! @ `a`]ªI]DaG]ª]D]ª]ªIG]ª"t"t!]ª"t$p-a/! @`b#a)-`]"t]ª]D8$a/! /@$a /! + $a /! ' $a /! # $a /!  $a /!  $a/!  $a/!  $a/!  $a/! $a/!  $a/! @ ^0Zb $a/!  G ` aZ a" aa ba >a( a0³ a8 `@$a-! P`H``/ `/  `?  a a)- D`DaDb ` H$a-! P-`H ``/ `/  `?  a a)- D`DaD" `PGD$a/! GG$a/!  G$a/!  G)-$a/!  G$a /!  GB0 $a/!  G ` B0 a a" a a" a  a ("X a0< a8a @d aH"[ aPD$a/! H H)-$a/!   H$a/!  H$a/!  H$a /!  HB$a/!  G ` BaB"iaB aBaBbaB "aB(% aB0"aB8b aB @BaBH aBPD)-$a/! !H%H$a/!  )H$a/!  -H$a/!  1H$a /!  5H)-G ` ``$a/! 3@$a/! / $a /! + $a /! ' $a /! # $a /!  FQH)-MHIHEHAH``8¥`B` $a/! ;@$a/! 7 $a/! 3 $a/! / $a /! + $a /! ' $a /! # )-mHiHeHaH]HYH``((`0}%b` 8"`@$a  /! @$a  /!  $a /!  $a /!  $a /!  $a /! $a /!  )-HHH}HyHuH`"` H`PDG=H)-GGGGGG=H)-GGG`]]F<AH]"""bbF 8]FbF ]FbFDYH]¯¯¯bbbF(]®}%]B"¨]B"¨(uH]bF$..a/! @ `·a)-`]FH]F]]Hea"`D``D]Hea`D`b`D]Hea"`D``D]HeaB`D``D ]}B D`E ] D`E::B;;<B ] D`E ] D`E$a3? @ $a/!-pF $a-!-P $a- P< ``/ `/ `?  a )- D`DaDazD]A $a3? @$a/! PT ` aaaaa Y a()- DcD`P]E q D]%I]BFF^)-``< ``? `? `?  a)-` `]= D`@ I^`f6EI`F`DII`DY q ` QI`F`D]%I^)-`]4Uc DDDDDDDD ]}B D`E eBff D0] D`` ] D``Db] D`` D] D``DB] D`` D"] D``¥] D``]  D``D]  D`` ] D`` ] D``DS  ] D`B`D"] D`` uB`DY ` D]]!}B D` ]% D`E ]) D`E ]- D`E ]1 D`E ]5 D`E ]9 D`E  8]7]a]=`]A`]]E`]I`]]M`]Q`]]U`]Y`]]`]]` ]a D`E ]e D`E ]i D`E ]m D`E ]q D`E ]u D`E ]y D`E ]} D`E0] D`] D`] D`$a/! @uI$a/! @ ^)-J `"R aV``]"R D-C D`uI^J D`DaJC$a/! p $a-! P`` ``/  `/ `?  a 1a Ba"'a )- DcD`P]`P` ]]E]8La ia0"11"R  ]J D`E ] D`EJ D`P]J D`] D`] D`$a/! @  Jff "Y Q` B] } ] `l`P]I D`}-F5F=F! 9'F$a/!5pF^)- `DaD/f6Dr`~`DtB`Bo`Y }`D"s`DHdDHTOctV ]X`aK9J $a-!-P`< ``? `? `?  a)-` `i]m` =]P]d ]]]+] $a/!5pF}K^)-`Pf D  ]}KB"`  P]y`  }K`]] ]'']y] ]qK D`E ] D`Ea](L`]L` 0]],U]Dfg`4 0],]Dfg`40],]Dfd`4abz`]L` 0],]Dfg`4 0],]Dfg`40],]Dfd`4abz`]L` BM0],]Df g`4 0],]Df g`4 0],]Dfd`4az`]L` GIF87a0],]Df g`4 0],]Df g`4 0],]Dfd`4ab{`]L` GIF89a0],]Df g`4 0],]Dfg`40],]Dfd`4ab{`]L` RIFFWEBPVP0],]Dfg`4 0],]Dfg`40],]Dfd`4a{`]L` PNG  0],]Dfg`4 0],]Dfg`40],]Dfd`4ab|`]L` 0],]Dfg`4 0],]Dfg`40],]Dfd`4a|`` ] D`E D`EBoV ] D`E"sV ] D`EDrV ] D`E~V ] D`EDaDUKED($a /: @ $a/! p^)-`PfD] ]qK D` M^`]MDa,L` DL`LiKLLM,L` VE]8La iaVa]XL`"BbE`V]8La iaV]8La iaaqL`EaK!c ]AK D`E ]  D`E ]  D`E11-K0]=K D` D`F`b~ ] D`E`D } P] D`F` ] D`E`"' ]! D`E` R ]%J D`D`D ]) D`E`D"- ]- D`E`!D1  ]1 D`BZF`  ]5 D`D`1  ]9 D`B[F` S  ]= D`B`"]A D``D ]E D`D` ]I D`D` J`bS } P]MJ D`D`B ]Q D`D`D ]U D`D`]^)-$a/!  -K)K0 `"R a0`$a  /! #@$a  /!  $a  /!  $a /!  $a /!  $a /!  $a /! $a /!  $a /! @ ^@Zb $a /!  eNl` a aE`" `0 a . a ( `07 a8)-$a /! mNqN$a /!  uN$a /!  yN$a /!  }N$a  /!  N)-$a  /!  NqN$a  /! #@N`$a /!  eNl `` $a  /! @$a /!  $a /!  $a /!  $a /! $a /!  )-NNNNN`B`?`y `b` =`( `0Œ` 8$a /! NN)-$a /!  N$a /!  N$a /!  N$a  /!  N$a  /!  NN)-$a  /! #@N`" $a /!  eNl `" a  a" a a ` $a-! P`H``/ `/  `?  a a)-`" `($a-! P`H ``/ `/  `?  a a)-`: a0 a8$a /! NN$a /!  N$a /!  N$a /!  N$a  /!  N)-$a  /!  NN$a  /! #@N`"$a /!  eN$a /! O$a /!  O)-$a /!   O$a /!   O$a  /!  OaNB}$a /!  eNl `B}`$a- @ $a-! P $a- P0``/ `/ `; )- D`DaD]Y(`]HaώyDEDE !cadu]"OaB` D`$a/! p^)-`PfD 5O`]c`< ``/ `/ `?  a)- D`DaD `a]e9O D` $a/! pMO]O^)-`!f%@G ]i9O D`l`/Db. } P]mF` D ]q D`bm`<D ]u D`m`- D ]y D``D]} D`` ] D`bn`) ] D`n`>b ] D`bo` ] D`o`I] D``@ ] D`bp`AD ]O`V] D`` " ] D`p`:b ] D`bq`1DB ] D`r`8z] D``7 ] D`br`CS] D``D ] D`r`!" $a- @00)-`]9O D`bs`# ] D`s`DB ] D`t`' ] D`u`+ ] D`u`DbP] D`` ] D`v` ] D`v` ] D`w`%"W] D``  ] D`w` B ] D`x`5" ] D`x`D ] D``=  ] D`#`ED ] D`"y`3]`0 ``/ `/ `; )-`zaB{a{a B|a |a(}a 0 `8$a/! @$a/! $a/!  0 `B}`$a-! P]O`<``/ `/ `?  a)-``$a-! P`H ``/ `/  `?  a a)-`{aPPP`$a /! OO$a /!  P)-$a /!  P$a /!  P$a  /!  P$a  /!  PO$a  /! #@P)-`l `a a 5a4aaB Ma(ba0a8]NPYNUN)-QNMNINENP`"1`$a/! @ $a/! p $a-! P`H ``/ `/  `?  a a)- D`DaD`P]`+, D`D]P D`$a/! @ P^)-$a/!   Q0 `+a,a"R a$a/!  QQP^V` D`DaD000ff DP] P D``Db; ] ,` ya+P)]]5Q D`D ] D`E D`E`D  ]! D`E`P]%P D``]) D``+ }  ]- D`BYF` D]1 D``D, ]55Q D`E`D% ]9 D`E`P]=P D`` S  ]A D`B`]E D``DY `  P`D+QQ`D]QQ)Q`V`$a/! -K=NANQ$a/! @Q`^ D`DaDP$a/! P $a-! p`^)-`f6 DU  ]I`M`QEKP]UI D`}E]Y D`]] D`]a D`9:]e D`]i D`]m D`]q D`]u D`]y D`]} D`] D`] D`] D`] D`] D`] D`]]P]^ ]%Fu]]d]]]e]]]y]]]g]]]]P] ]']u4]]14]]]I]}]]]K]]P], ]]].]]V1 P]u 9 = A E 4]P] ]%  - ]P]J ]1E]P1]R5J]m]9]]}K5 $a-!-P`< ``? `? `?  a)-` `i]m` =]]]1] $a/!5pFR^)-`Pf D  ]}RB"`  P]y`  R` $a-!-P`< ``? `? `?  a)-` `i]m` =]P] ]]]] $a/!5pFS^)-`Pf D  ]}SB"`  P]y`  S`%'q )]P] ]']]]]]]]]]]]]]]]]]]5]]]]]]K']P] ]]]] ]5)]]] ]]] ]Y ']`CH4Oc Da DE]Da($a /: @ $a/! p^)-`PfD] ]S D`6S^`]SDaa)-`] ]%`)]TTTTEE$Ta/! @ `"`Y)-`]YEDDSV8$a/! /@$a /! + $a /! ' $a /! # %H}[y[u[)-`]j a鈲)DED($a /: @ $a/! p^`PfD] ])-T D`\[^)-`][DaxL` DL`S9T[q[L`VTVTV h]- $a(" @$a/! p^)-`PfD [`]c^`hL` eEXWH4Oc D5Vl$a/! c@$a/! _ $a/! [ )-[[`] $a-! P`< ``/ `/ `?  a)-` `1]5`9[ D` $a/! P[)-` `] $a-! P`< ``/ `/ `?  a)-` `=]A\ D` $a/! P\` `] $a-! P`< ``/ `/ `?  a)-` `E]I\ D` $a/! P=\` `] $a-! P`< ``/ `/ `?  a)-` `M]Q\ D` $a/! P]\` `] $a-! P`< ``/ `/ `?  a)-` `U]Y\ D` $a/! P}\` `] $a-! P`< ``/ `/ `?  a)-` `]]a\ D` $a/! P\` `] $a-! P`< ``/ `/ `?  a)-` `e]i\ D` $a/! P\` `] $a-! P`< ``/ `/ `?  a)-` `m]q\ D` $a/! P\` `] $a-! P`< ``/ `/ `?  a)-` `u]y\ D` $a/! P\` `] $a-! P`< ``/ `/ `?  a)-` `}]\ D` $a/! P]` `] $a-! P`< ``/ `/ `?  a)-` `]\ D` $a/! P=]` `] $a-! P`< ``/ `/ `?  a)-` `]\ D` $a/! P]]` `]q $a-! P`< ``/ `/ `?  a)-` `]\ D` $a/! P}]` `] $a-! P`< ``/ `/ `?  a)-` `]\ D` $a/! P]` `] $a-! P`< ``/ `/ `?  a)-` `]\ D` $a/! P]` `] $a-! P`< ``/ `/ `?  a)-` `]\ D` $a/! P]` `] $a-! P`< ``/ `/ `?  a)-` `]\ D` $a/! P]` `] $a-! P`< ``/ `/ `?  a)-` `]\ D` $a/! P^` `] $a-! P`< ``/ `/ `?  a)-` `]\ D` $a/! P=^` `] $a-! P`< ``/ `/ `?  a)-` `]\ D` $a/! P]^` `] $a-! P`< ``/ `/ `?  a)-` `]\ D` $a/! P}^` `] $a-! P`< ``/ `/ `?  a)-` `]\ D` $a/! P^` `]Da)m$a/!5 PF$ `Y a5`3"o)- cD8 `}HdD[ED($a /: @ $a/! p^)-`PfD] ]\ D` ^^`]^DaL` $D L`[L`q L`E[!cH4Oc D&V$a/! @$a/! $a/!  )- __`]ILV ]`^) D`EaJS$a/!5PF0 `Y aL`3o&`3p)- cD8 `}HdD^ED($a /: @ $a/! p^)-`PfD] ]_ D`=_^`]M_DaL`DL`__ L`q L`E^!cHTOcD V $a-! P`H ``/ `/  `?  a a)-``P]`"4}_ D`D]_ D`" V $a-! P`< ``/ `/ `?  a)-` `]  D`($a/! @ $a/! P_`$`]^`BV ]  D`EDV _]Da)$a/!5PFH `Y a `3bq" `3"r`3 rB`3s)- cD9 `}HdDi_ED($a /: @ $a/! p^)-`PfD] ] D`@ _^`]_DaHL`DL`q____$L`Y]V h] $a(" @$a/! p^)-`PfD ``]c^`V h] $a(" @$a/! p^)-`PfD -``]c^`V h] $a(" @$a/! p^)-`PfD E``]c^`qL` Ei_!c1 HTOc"V ]!L`%]`]uT]]9'1 %`) ]-m` D`E D`EV0]1 D`DV]5 D`DV ]9 D`E"{ V $a-! P`H ``/ `/  `?  a a)-``=P]A(`Em`YZBY D`D]I` D` $a/! ;P` ` a aa`+"!`+¿aa a(a0a 8ba@aHQaPQaX)-`8` P]M`]Q]U]Y]]]a]e]i]m0]q]u]a6$a/!5PFT `Y a "{ `3bt`3"u"`3 u`3v`3bw)- cDm9 `}HdD]`ED($a /: @ $a/! p^)-`PfD] ]ym` D` a^`]-aDaXL` DL```e```L`aqL`E]`!cTHOcC DVV ]}(`Ia]]F ]Ya D`E D`E(V ] D`E" V ] D`EDbV ] D`EDb(V ] D`EV ] D`Eb"V ] D`EDV ] D`EDV i7]aaP] D` ] D`E] D` ] D`EV ] D`EV ] D`ED¤V ] D`E DaF1$a/!57PF ` Y a `3"xV`3x" `3y¤`3bz`3 "{b(`3{(`3|`3b}b"`3"~`3~`3b`3 b)- cD}9 `}HdDIaED($a /: @ $a/! p^)-`PfD] ]Ya D`%b^`]5bDa(L`D8L` aQayabaamaaaaaaPL`Y]VP] V h]$a(" @$a/! p^)-`PfD Yb`]c^`V ] $a(" @$a/! p^)-`PfD qb`]c^`VP] V h]$a(" @$a/! p^)-`PfD b`]c^`V ] $a(" @$a/! p^)-`PfD b`]c^`V h] $a(" @$a/! p^)-`PfD b`]c^`V h] $a(" @$a/! p^)-`PfD b`]c^`V h] $a(" @$a/! p^)-`PfD b`]c^`V h] $a(" @$a/! p^)-`PfD  c`]c^`VP] V]V h]$a(" @$a/! p^)-`PfD 1c`]c^`V ] $a(" @$a/! p^)-`PfD Ic`]c^`qL` EIa!c;;H4Oc DBV ],` aceT % $a-! P`)-``D] ` qcbZ D` $a/! pyc^`] D`EDaf$a/!5 PF$ `Y aB`3")- cD9 `}HdDacED($a /: @ $a/! p^)-`PfD] ]qc D`c^`]cDaHL`D L`ic L`SV h] $a(" @$a/! p^)-`PfD c`]c^`V fD` `D ` D] `" h] $a(" @c^)-`IEqL` Eac!c5 H4Oc  V ]!D`% dR%! ])d D`E ]- D`E ]1 D`EI]D ]5 D`E ]9 D`E0]= D` D`EB V ]A D`EDaxq$a/!5PF0 `Y a `3B `3b)- cD9 `}HdD dED($a /: @ $a/! p^)-`PfD] ]Ed D`yd^`]dDaL`DL`dUdL`VP]I V fDM` `D ` D] `" h]Q $a(" @d^)-`IEVP]UqL` E d!cH4Oc D V ]Y`]d 0M],U]Dfg`4 D`EV ]ad D`EamRR$a/!5PF0 `Y a `3"`3)- cD9 `}HdDdED($a /: @ $a/! p^)-`PfD] ]ed D`e^`]!eDaL`DL`ddL`VP]i VqL` Ed!cH4Oc D" V ]m`qEe D`EDa2A$a/!5 PF$ `Y a" `3)- cD9 `}HdDEeED($a /: @ $a/! p^)-`PfD] ]uUe D`Hue^`]eDaL`D L`MeL`WVP]y L` WEEe!c!ZZE1Tc$a/!5/PF ` Y a.`35`3 bB3`3"5`3>`3<`3b;`3"";`3 ",`3`3 b)- cD9 `}HdDU D` $a-! P`< ``/ `/ `?  a)-` `}]l`5 Aq  P]= D`9 ]e D`E ] D`E ] D`E0] D`b  ] D`E ] D`E ] D`E›  ] D`E ] D`E D` $a/! PeT ` aa"a"a a * a()-` `P]e D`0] D`] D`] D`] D`] ] D`Edmc]-T D`_ P] D`] D`0] D`] D`[ ]Q D`Ea}aUa``i```0]4` 1 uTq`'a ]f D`E D` ]] D`E $a- @ $a- @`< ``/ `/ `?  aJ)-`aCD]a f0 ``/ `/ `; )-`]f D`E$a/! @$a/! $a/!  0 `—aB"aBaBff)-f`]LL`—"EbP]-T D`] D`] D`] D`$a/! @ $a/! p $a-! P`H ``/ `/  `?  a a)-`` P] `fB   D`D]-g D`$a/! @ !g^)-$a/!  9g$ `B aJ ag^`::f6 P]-g D``B] D``D]! D``DbA } ]% D`F` ]) D``D !g`D" ]- D`F` ]1 D``D]=gAg)-`]`D$a/! @ $a/! p $a-! P`H ``/ `/  `?  a a)-``5P]9`=f b  D`D]Ag D`$a/! @ g^)-$a/!  g$ ` aJb ag^`::f6DbP]Eg D``]I D``D } ]M D`F` DbA ]Q D`F` ]U D``D g`]Y D``D]gg)-`]`D$a/! @ $a/! p $a-! P`H ``/ `/  `?  a a)-``]P]a`ef’ "  D`D]i%h D`$a/! @ h^)-$a/!  1h$ `’ aJ" a h^`::f6DbP]m%h D``]q D``D } ]u D`F` DbA ]y D`F` ]} D``D h`] D``D]5h9h)-`]`DP]-T D`] D`0]]T D` ] D`Ea]$`9 % D` ]h D`E0] D`P]-T D`] D`] D`__}_Qe]]T D`W ]e D`EdYdaaaaqadba $a-! P`H ``/ `/  `?  a a)-``P]4` e"   › B   b ž  D`D]h D` $a/! ph^)-`f6 D"0] D`` } P]h D`F` b  ] D`F` B ] D`F` g  P] D`B` ] D`F` B'] D``'] D`` h`* ] D``D ] D`F` ]9T[[V ]Q D`EV ] D`EV ] D`EV@$a/! 7@$a/! 3 $a/! / $a /! + $a /! ' $a /! # $a /!  $a /!  $a/!  $a/!  $a/!  )-iiiiiii)-iii`]$a/! @$a/! $a/!  0 `aaa)-Zbiii`] $a-! P`< ``/ `/ `?  a)-` `]D`HOc#DVi§Vi] $a-! P`< ``/ `/ `?  a)-` ` ] i D` $a/! 7Pj `  a`#B`#`#b`# `#"`#"`#`#Q`#1 aY aS a )-``j ]iE ]E]GDV$a/! @$a/! @$a/! $ `aa)- ZbAjIjZb=j0 `aaa)-`]P]i D`] D`GV ]! D`EDV ]% D`EBV$a/! @0 `aaa)-`]P])i D`GDay$a/!5PF` `Y a `3bC `3"D `3 D `3E §`3 bF B`3"G )- cD; `}HdDiED($a /: @ $a/! p^)-`PfD] ]-i D`8j^`]jDa4L` D L`mjj9jyjjjL`qL`Ei!c!FF"+i I]4Uc DDDDDDDDjD D` $a/! P$ ` aY a)-``iBD]GYj(]GH $a-! P`< ``/ `/ `?  a)-` `1]5`9HOc#D"V $a-! P`< ``/ `/ `?  a)- D`DaD `=]Ak D` $a/! p-k^)-`Pf DY  }  ]EkF`  -k`]V kDBV(]GHGDV $a-! P`< ``/ `/ `?  a)-` `I]Mk D` $a/! p=kek^`Pf DY  }  ]QkF`  `]DVjV(]GHekGDa#uE$a/!5PF` `Y a`3 G `3 H "`3bI `3 "J `3J B`3K )- cD < `}HdDkED($a /: @ $a/! p^)-`PfD] ]Uk D`k^`]kDa0L` D L`YkMkkkkQkL`]qL`Ek!c D` $a/! p k^)-`Pf DY  }  ]Yk D`F`   k`]G"]P]]4` aH4Oc `V ]ek D`E"diDa=KIDED($a /: @ $a/! p^)-`PfD] ]ik D`l^`]!lDaHL`DL`il L`V ]m`qID D`EV h]u $a(" @$a/! p^)-`PfD Ml`]c^`VP]y V h]}$a(" @$a/! p^)-`PfD ml`]c^`q,L`  ikH4Oc "V ]L`lA-P]M R5b $a/! P)-`] ]lED D`EVDBV ] D`Eaw$a/!5PF< `Y a`3bL "`3"M B`3M )- cDI< `}HdDlED($a /: @ $a/! p^)-`PfD] ]l D`l^`]lDaDL`DL`lll(L`VP] V h]$a(" @$a/! p^)-`]c m^`V ]$a(" @$a/! p^`]cm^`V ] $a(" @$a/! p^`]c1m^`VP]V]V]qL` El!cH4Oc \V ](`]ma  ]mmE D`ESV ] D`ED[V ] D`Eaef+$a/!5PF< `Y a[`3N \`3bO S`3"P )- cDq< `}HdD]mED($a /: @ $a/! p^)-`PfD] ]mm D`m^`]mDa L`DL`memymL`V h] $a(" @$a/! p^)-`]cm^`qVgL` 1 E]m!cH4Oc "9lDa3'cDED($a /: @ $a/! p^)-`PfD] ]`m D`m^)-`]n nDaL`D L`9l L` L`Em!cEkc $a/!5OPF `Y aL`3"W`3W`3 X`3bY"`3"Z`3Z`3#[b`3b\`3"]bJ`3 ]`3%^"`3b_`3"`B`3`"`3!a"`3bb6`3 "c`3c)- cD}< `}HdD$a/! @ $a/! p $a-! P`< ``/ `/ `?  a)-` `]k D`^V` Dc$a/! @ ^=n<<f6c } P]k D`F` c ] D`F`"b ] D`F` DS  ] D`B`  ] D`F`Db ] D`F` D Mn`D]an `"R a)Yn`]"R DP]`k] D`F D`]`] D`Fn]`]  D`Fen D`] I D`G"]P] D`] nG#]MnGHG]]k D`] G]mG]imG]}mG"]lP] InG]l] G#]GHGlV h] $a(" @$a/! p^)-`PfD Ao`]c^`VP] V]!V]%V h])$a(" @$a/! p^)-`PfD qo`]c^`VP]- V h]1$a(" @$a/! p^)-`PfD o`]c^`V ]5 $a(" @$a/! p^)-`PfD o`]c^`VP]9 V h]=$a(" @$a/! p^)-`PfD o`]c^`V ]A $a(" @$a/! p^)-`PfD o`]c^`V fDE` `D ` D]-`"P]I DEV h]M$a(" @$a/! p^)-`PfD  p`]c^`qV ]QQ D`EV ]U D`PEVI]TL`E$@a/! @ ``#)-`]] $a-! P`H``/ `/  `?  a a)-``YP]]`aH`eH4Oc DV]paC[H$a/!5 PF)- `}HdDqpED($a /: @^`]mpDaLL`D L`ypaP>aX?a `D)-yzzuzqzmzizez)-azz]zYzUzQzMz)-`] 5 9 = A E I M Q U Y ] a e ]i#Q D`E ]m# D`E ]q# D`E\$a/! S@ $a/! O $a/! K $a/! G $a/! C $a/! ? $a/! ; $a/! 7 $a/! 3 $a/! / $a /! + $a /! ' $a /! # $a /!  $a /!  $a/!  zzz)-zzzzzzz)-z$a/! G $a/! K z `DaBBEaBEaaGaB a&("Fa0FaB8"Ga@aBHaPGa$X0aB`HaB hapHa xHaB bIa"aIaBDzz)-zz`]axH`H`PG`HaddGa]u#``dHf`K`dE]8La OiOa ]y#Q D`E]8La QiQa$$a  /!-@$a  /!  $a /!  $a /!  $a /!  $a /! $a /!  T `baa "aBaa a()-!{){{{{{Zb  {T `baa "aBaa a()-`]"bRE]8La SiSa ]}#Q D`E ]# D`E]P!G?x @{1fW=5Jd290VtavE:nISylk7MeXcOr}>z_pCqwg[o|U(iFQ~®U`VbV`V`"W`WW`bBX`XY`bYY`"Z`ZZ`B[[`"\`b\\`""]`]]`B^^`_b_`_B`` `"a`ab`bbb`"cc`cBd`d"e`ef`bff`"gg`hh`hbi`iBj`jk` bkk`Bll`mbm`¥^`m"n`nn`Boo`"pp`pbq`qp`"rr`ss`sbt`tBu`)u"v`vv`Bww` "xx`yy`ybz` zbz`B{{`"||`*}b}`4}B~`~`b`B`"``b`/Bƒ`"`b`…B`"`V``,B``BB``b‹`"`b`#B`"``Db`LB‘`"’`"``%`b`3B–`"``b`R™b`Bš`H"`.`B`Y`"``+b`AB `"`^``b`¤B`"`6`Kb`jB``hB`$"`b`Zb¬`m"``b`¯B`<"`;`-b²`"`B`"``sb`TB·`8"`\b`¹"```B`b`¼B`"`'"`ub`¿B`"` "`B``Nb`]B`b`YB`""`&` D]8La ia]8La ia]8La biba]8La ia ]# D`E ]# D`E]8La ia ]# D`E ]# D`E ]# D`E]LeD]LeDY  ]# D`EbY Y  D`"2` D P]#Q D``  ` D `  ` #`D]# D`$a/! @  Q `Q]^)-$a/!  {{Q `bY a*Y aa a "a a0(Ba,0a81a@ a HaPBaXa$`ahapbaxIa(aaa.ba&a"aaIaB"D)-$a/! {{{$a/!  {$a/!  {$a/!  {)-$a /!  {{{$a /!  {$a /! # {$a /! ' {)-$a /! + {|{$a/! / |$a/! 3  |$a/! 7  |)-$a/! ; {|{$a/! ? |$a/! C |$a/! G |)-$a/! K {!|{$a/! O %|$a/! S )| ` a )V` DcD$a/! p^V`D`Da3$a/! P<`aaYa1 aV`DcDAnvDDaD,09=}  iq!)9])AIQm}=Y]aeimquy} !)19AIQYaiqy Qy}M !)-159=AEI5        ! ) - 1 5 9 = A E I M Q U ] e m u }                !! ! !!!!!!!%!)!-!1!5!9!=!A!E!U!]!e!m!u!}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" " """""!"%")"-"1"5"9"="A"E"I"M"Q"U"Y"]"a"e"i"m"q"u"y""""""""""""""""""""# ###!#)#1#9#A#I#Q#Y#a#i#q#y###################$ $9$=$A$E$I$M$Q$U$Y$a$i$q$y$$$$$$$$$$$$$$$$$% %%%!%%%)%-%1%5%9%=%E%M%U%]%e%m%u%}%%%%%%%%%%%%%%%&& & &&&&&!&%&)&-&1&5&&&&&&&&&''!'1'E'I'M'Q'U'Y']'a'e'i'm'q'u'y'}''''''''''''''''(( ( (((((!(%()(-(1(5(9(=(A(E(I(M(Q(U(Y(](a(e(i(m(q(u(y(}((((((((((((((((((((((((()) ) )))))!)%)))-)1)5)9)=)A)E)I)M)Q)U)u)y)}))))))))))))))))** * *****i*m*}****************9,=,A,E,I,M,U,Y,],e,i,m,},,,,,,,,,,,,,,,,,,,,-- - -----!-%-)---1-5-9-=-A-I-M-Q-U-Y-a-i-m-q-u--------------------------.. . ....!.%.).1.5.9.=.A.E.M.Q.U.Y.].a.e...........5/9/=/A/E/I/M/Q/U/Y/e/i/m/q/u/y/}////////////////////////0 000%010Y0]0a0i0m0q0u0y0}00000 11111!1%1)1-11151i1m1q1u1y111)456M67)7-717U7Y7]7a7e7i7q77778888999599999999999999::::::);-;1;5;9;=;A;E;I;M;Q;U;;;;;;;;;;<<1<M<U<]<u<<<<<<<<<<%=)=-=1=5=9===A=E=I=u=aBeBiBmBqBuByBBBBBBBBBBBBBBBC)D-D1D9D=DADEDIDMDQDUDYD]DaDeDiDmDqDuDyD}DDDDDDDDDDDDDDDDDEE E EEE,` P]#G ]#HR 5]#L]#OD]]#D]#E]#F ` `h)- DQb DDaD] ]# $a( @||^)-`D h]#$a( p$a/! PY| ` ``]|D^)-`^V` DcDeWM `H& $a- @`H ``/ `/ `? a^ aJ)-`bD]   $a 1 i@$a/+ PE$ ` aa^)- DcD]|`D^`Wb`HC-DWI `HWB`HX $a-! P !8`#P]# `#89b99 D`@D]#| D` $a/! pY||^)-`f6D } P]# D`D`D- ]#| D``S  ]# D`B`D ]# D`D` Y `  |` } P]# D`D`Db ]#| D`D`D]`H ``/ `/  `?  a a)- D`DaD`#P]#`#": D`XD]#i} D` $a/! p }]}^)-`f6DS  ]$ D`B` - P]$i} D`` DY B`  ]}` } ] $ D`D` D ] $ D`D` D])DW`H $a- @`H ``/ `/ `? a^ aJ)-`b D]  $a 1 M@$a/+ PE$ ` aa^)- DcD]}`D^`W`H$a/! @Y|0 `B`abaY a)-`]=FAFDWy `H. $a- P< ``/ `/ `?  a )- D`DaDa{D]$F $a3@ @$a/! PY|H ` aaaaY a )- DcD`y D]}P]$G ]$H]$I^)-`W^`HlDWb`@} ]!$ D`EDW!`H+W %`@= $a/! `F^)-`f`D `  $a/! `F^`f6DB ]%$ D`E`"`D`D$a/! @ $a/! p $a-! P`< ``/ `/ `?  a)- D`DaD `)$]-$ D`$a/! @ ^$a/!  u~$ `k `7"R a)V`U~^~ D`DaDIEQEff DB } P]1$ D`D` ]5$ D``Db]9$ D``D]=$ D`` ]A$ D`` D]E$ D``D- ]I$ D``S  ]M$ D`B`D_]Q$ D`` i~`B]U$ D`` Y ` ]Y$ D`` D]y~}~)~`] 7]HF )PfD]I"R ` $a/! `=|Pf&FD]c^)-`!f@DP]]$`a$Qp$a/! g@{$a/! c $a/! _ $a/! [ {!)-5|`]P]e$Eq D`G]i$ D`]m$ D`]q$ D`]u$ D`M]y$ D`]}$ D`]$ D`]$ D`]$ D`]$ D`]$ D`]$ D`]$ D`]$ D`]$ D`]$ D`]$ D`]$ D`]$ D`` D``D``DBu` U`Db`D=`DI`D` }` "`b` e` DY G`BM`D`D`1]`D"E`D5` D`IaDY ` `Dm` D]`D ]$ D`E`D]`BK`  $a/! `F^)-`PfD]`]W"T`HmWB`Hg )G`$P]$ `$`#$]]$x ]  a "b h ]$ D`E ]$ D`E ]$ D`Eb  ]$ D`E` 0M],U]Df g `4a "b P]$ D`b  D`D]$ D` $a/! pY|^)-`ff DP]$ D``Db; ] ,` yaa B)]$]YAQD ]IQEMQE`D  ]!UQE`DP]$ D``D ]$ D``]$ D``9]$ D``, ]5YQE` D]$ D`` } ]% D`D` D]% D``D% ]9QE`  `1 P] % D`` Y B` +i` D])DWb`HF $a-! P`H ``/ `/  `?  a a)- D`DaD` %P]%`%3 D`XD]%Հ D` $a/! pY|ɀ^)-`fS  ]% D`B` DY b`  `D" } P]!%Հ D`D`  ]%% D`D` D])W`HL $a-! P`H ``/ `/  `?  a a)- D`DaD`)%P]-%(`1%qk Bl l m bm Y  D`D]5%) D`)DW `HWQ`HW`H7P]9% W`H $a- @`< ``/ `/ `?  aJ)-`aD]=%J $a/K @$a/! P0 ` aaYa)- DcD]QID$ ` a`+ } )-`WT`HdDWq `H-%IW`HVi~W`H[ $a-! P`H ``/ `/  `?  a a)-``A%P]E%`I%qY  D``D]M% D`)WX`H\EDWb`H6]Q% W"`H) $a- @`< ``/ `/ `?  aJ)-`a7D]U%  $a *  @$a/! gPY|9 ` a$Y aI`+ } DM`+ 1FDQ`+/ 9FDaaBa a*(a0ba&8a,@BaHa0P"aXa`a"ha pa xaaaa aa()- DcDP`P]Y% ]]%]a%]e%]i%]m%]q%]u%]y%]}%]%]%]%]% ]%!]%"]%#]%$]"]%]%^`DW`HRP)W"`Hf $a-! P`H ``/ `/  `?  a a)- D`DaD`%P]%`%b<> D`D]%Y D` $a/! pY|M^)-`ff D } P]%Y D`D`DQ ]% D`D`DS  ]% D`B`Db{]% D``DE]% D``D ]% D`D` D" ]% D`D` ]% D`D`  ]% D`D` " ]% D`D`DY "`  M`D } P]%Y D`D` ])DW9`H W`HAWE`H $a- @`< ``/ `/ `?  aJ)-`a D]M $a/K @$a/! P0 ` aaYa)- DcD]EID$ ` a`+ } )-`DW`H|uBDW"w`Hx $a-! P`< ``/ `/ `?  a)- D`DaD `%]% D` $a/! pY|5^`f60]% D`` DBv]% D`` DS  ]% D`B` D]% D`` DY "w`  `D])DWA `H  $a- @`H ``/ `/ `? a^ aJ)-`bD]  $a 1 Q@$a/+ PE$ ` aa^)- DcD]y`D^`W1`H/W"R `H"R DWB`Ha=W`HW|DWb`HHB)DWb?`HGW!`HDWb2 `Hk $a-! P`H ``/ `/  `?  a a)-``%P]&0` &b66"7] &Ƀ D`77Y 6 D`D] & D` $a/! p^)-`f6b } P]q`&qYDH]u`D^ ]q`&³DH]u`DS  ]&Ƀ D`B` DbVP]& D`` D `]& D`` D } ]q`&q1DH]u)` D])DW`H9 DWQ `< DW`HW)`H(%YDW"l`HbDWb`HjW;`HDWe`H`m*)WB `HeWo`HcWBZ`HrDW`@uDWR`@!] ]!&S D`E ]%& D`EDWA`H:P])& )DWQ`H1 $a- P< ``/ `/ `?  a )- D`DaDa}D]-&Y $a ,M @$a/! PY|< ` aY aBaa)- DcD]QP]1&Z ]5&[^)-`DW`\9W`HUaDW `H]FW`H)DWb`H8P]9& DW"`HMDW `H  W `@>e(]DDW`Dz]CW`HP $a-! #P`l ``/ `/ `?   a aaV aV BaV )- DcD$`=&P]A&4` E&?b??"@]I& D`]M& D`]Q& D`@ D`8bD]U& D` $a/! p^)-`!f@'D" } P]Y& D`D` D]]& D``D ]a& D`]e& D``D]i& D``D]m& D``a$D ]q& D`]u& D``DB ]y& D`]}& D``D `D" ]& D`]& D``DBa&D1 ]& D`D`DŸ ]& D`]& D``Db]& D``DB]& D``N ]& D`D`S  ]& D`B`!Da%D" ]& D`]& D``Y ` #D])W"`@QDWb`Av } P]& `&I ]m`qDElE]&Eq D`HD D`]&  D`)DW-`H'W`H5P]& WE`H*DW`H# YWe `H $a- @`< ``/ `/ `?  aJ)-`aD]P $a/K @$a/! P0 ` aaYa)- DcD]Ie ID$ ` a`+ } )-`W`H3P]&} W`HOW= `HW`H$a/! @Y| `,,Baa$a ba(™aR "a (a 0a&8a>@BaHaTPaLXba`œah"aBp)axaa.Ba<a:a@ba"Ÿa"aa8aFBa*a6aHaPba2¢a4"aNa0aBaVa BaJ(a,0a8baD@¥aH"aPY aX)-``*P]&Z ]&[]&\]&]EF]&_]&`]&a]&b]&c]&d1 ]&g]&h]&i]&j]&k]'lP]'p ] 'r] 's]'tR]'v]'w'!'%')'-'1'5'9'D]R]='W]A'X]E'Y)WbC`H]I'WQ`HpDWO`H]W>`H^ $a-! P`H ``/ `/  `?  a a)- D`DaD`M'P]Q' `U'b-.".. D`0D]Y'! D` $a/! pY|^)-`ff %/ }  ]]'! D`BZF` B] P] `AKB//10]MMMF`b~ ]ME`!D } P]MF` ]ME`"D ])MME` D3 ]a'! D`D`B/  ]e' D`B[F` D"- ]-ME`$DB } P]i' D`D`DS  ]m' D`B`-  ]q' D`B\ ]u' D`\` "]y' D``DY >`  `"' ]!MME`#B ]}'! D`D` } P]' D`D` ]' D`D`])DWB`H;]' DWB`H{ CWB`HJ $a-! P`H ``/ `/  `?  a a)- D`DaD`'P]'`'b3 D`XD]' D` $a/! pY|^)-`fS  ]' D`B` DY B`  `D" } P]' D`D`  ]' D`D` D])DW`H q W`\1W`@ ]'q D`EWb `HsDW`H,)DWu `H2 $a- P< ``/ `/ `?  a )- D`DaDa|D]'] $a2h @$a/! PY|0 ` aY aa)- DcD]iu P]'^ D^)-`DWC`HE DWb`HY $a-! P|`H ``/ `/  `?  a a)- D`DaD`'P]'`'": D`XD]' D` $a/! p }^)-`f6DS  ]' D`B` - P]' D`` DY b`  ` } ]' D`D` D ]' D`D` D])DW`H $a- @`< ``/ `/ `?  aJ)-`aD]K $a/K @$a/! P0 ` aaYa)- DcD]ID$ ` a`+ } )-`DW`HI $a-! P`H ``/ `/  `?  a a)-``'P]'`'qn Y  D`D]'1 D`)Wl`HKWf`HoW"`@tW`HE $a-! P`H ``/ `/  `?  a a)-``'P]'`'qm "n n  D`D]'a D`W`H  4)WY`H$ $a- @`H ``/ `/ `? a^ aJ)-`bD]  $a 1 a@$a/+ PE$ ` aa^)- DcD]}`D^`DW"`HS $a-! P`H ``/ `/  `?  a a)-``'P]' `'LBMLM D`0D]( D` $a/! pY|^)-`f6D } P]( D`F` S  ] ( D`B`Db6 ] ( D`F`  `" ]( D`F`  ]( D`F` D])DW`HDW=`H9P]( DW`H$a/! ;@Y| `Y aaBa aba a(a0ba8a@"aHaP"aXa`ah)-`8` P]( ]!(]%(])(]-(]1(]5(]9(]=(]A(D]]E(]I(]M(DW9`HWi`H`)DWE `H"WB`H4]Q(~W/`@?9W`IT } P] `I ]U(Eq D`HDs]ys)DW`HW"`HQ $a-! P`H ``/ `/  `?  a a)- D`DaD`Y(P]](`a(b* D``D]e( D` $a/! pY|^)-`ff DP]i( D`` Db; ] ,` yb*")]m(P]͊AQD ]IQEMQE`D  ]!UQE`DP]q( D``D ]u( D`` ]y( D``D, ]5͊QE`D]}( D`` S  ]( D`B`D]( D`` D% ]9QE` `DY "` +݊`D])W]`H%.W"_`HnWQ`H_JDWB`HqDW`H! $a- @`H ``/ `/ `? a^ aJ)-`bD]  $a 1 U@$a/+ PE$ ` aa^)- DcD]5`D^`DWb`HBDW`H0$a/! ;@Y| `Y aaaaa a(a 0a8a @aHaPaXa`ah)-`8`  5R1R5P](T ](V](W](XD]-l)DW`H ff  " $a- @`H ``/ `/ `?   aJa)-`aZP](| D]({$a /H @$a/! PY|` ` aY a aba-`+ } P]( Dba a()- DcD`](](D]B](}](~^``Db $a- @`H ``/ `/ `?   aJa)-`a[P]( D]($a/I @$a/! PY|< ` aY aaa)- DcD]ыP]( ](^``  $a- @`< ``/ `/ `?  aJ)-`a^D]( $a/O @$a/! [PY| ` aY a 1 a"a$Ba `+ } P]( D`++ ](D5`+ ](D`+ ](DY`+ ](D`+' } P]( D`+ ](Du`+ ](D!`+) ](D`+ ](D`+ } P]( D`+ ](Dy`+! ](D`+  ](D`+ ])D`+  } P]) D`+ ] )D)- DcD`] )D]bP]) ])^`` DE` $a- @`H ``/ `/ `?   aJa)-`abP]) D])$a/X @$a/! PY|< ` aY aaQa)- DcD]P]!) ]%)^``  $a- @`H ``/ `/ `?   aJa)-`aYP])) D]-)$a/E @$a/! PY|< ` aY aa`+ } P]1) D)- DcD]]5)D^`` 0D]9)y`D $a- @`H ``/ `/ `?   aJa)-`a`P]=) D]A)$a/R @$a/! PY|H ` aY aaaBa )- DcD`P]E) D]%b]I)]M)^``DY ` ]Q)z`³ $a- @`H ``/ `/ `?   aJa)-`aaP]U) D]Y)$a/V @$a/! PY|H ` aY aa-aba )- DcD`P]]) D]ab]a)]e)^`` D $a- @`H ``/ `/ `?   aJa)-`a]P]i) D]m)$a/Q @$a/! PY|` ` aY a aba-`+ } P]q) Dba a()- DcD`]u)]y)D]]})])^`` $a- @`H ``/ `/ `?   aJa)-`a_P]) D])$a/N @$a/! PY|H ` aY aa-aba )- DcD`P]) D]ݍ])])^`` ]W`HZ $a-! P`H ``/ `/  `?  a a)- D`DaD`)P])`)qBo o Y  D`D])) D`)DWy`Hy $a-! P`H ``/ `/  `?  a a)- D`DaD`)P])`)2 D`XD])Q D` $a/! pY|E^)-`f6bN0]) D`` B2 P])Q D`]` B=]) D`` DS  ]) D`B`D]) D`` DY y`  E`D])W`HNDW"`@@ ])`)H4Oc Da{VDE]Da($a /: @ $a/! p^)-`PfD] ]) D`^`]Da L`D]L`VL`H4Oc DbVE~юDa0H,DED($a /: @ $a/! p^)-`PfD] ])`)َ D`^)-`]DaL`DL`ю]Eَ!c Ecy]P])-`I)=FA-Y|19q )'MSUSeS )! fYZD= $Xa/! @Y| `G`$a-! P`<``/ `/ `?  a)-``] ) `)])`)H4Oc V1DGV5DakDED($a /: @ $a/! p^)-`PfD] ])= D`(Q^`]aDa$L`DL`IM]EA!c D` $a/! PY|5 ` a)-` `]`V!] ])`)H4Oc V VB V ]* D`EDaK*DED($a /: @ $a/! p^)-`PfD] ]* D`^`]DaL`DL`L`i V fD *` `D ` D] *`" h]* $a(" @$a/! pY|^)-`PfD `]c^` D`EV h]* $a(" @$a/! pY|^)-`PfD `]c^`L`I  E!cP]* D` D`E`'b`] ]*`"!*H4Oc V)b V `%*P])*`-*1r D`D]1*Q D` $a/! _PE! ` a a ab a1a, a(>a*0 a8B a$@ a(H aP aXB'a`B a hba p ax a" a a&B a" a  a'a)-`d`P]5*Q D`]9* D`]=* D`]A* D`]E* D`]I* D`]M* D`]Q* D`]U* D`]Y* D`]]* D`]a* D`]e* D`]i* D`]m* D`]q* D`]u* D`]y* D`]}* D`]* D`]* D`]* D`]™ V-DaRNDED($a /: @ $a/! p^)-`PfD] ]*1 D`x!^`]1DaL` ,DL`=AL`i V " `*]* D` $a/! PM ` a)-` `]EV $a-! P`< ``/ `/ `?  a)-` `*]* D` $a/! Pu ` a)-` `]V $a-! P`<``/ `/ `?  a)-` `*]* D` $a/! P ` a)-` `]V $a-! P`<``/ `/ `?  a)-` `*]* D` $a/! P9ő ` a)-` `]V $a-! P`<``/ `/ `?  a)-` `*]* D` $a/! P ` a)-` `]V $a-! P`<``/ `/ `?  a)-` `*]* D` $a/! P ` a)-` `]V $a-! P`<``/ `/ `?  a)-` `*]* D` $a/! P= ` a)-` `]V $a-! Pu.`H ``/ `/  `?  a a)-``*P]*$`*H4Oc D V $a-! P $a-! Pu.`< ``/ `/ `?  a)- D`DaD `*]*`*H4Oc DVDa DDED($a /: @ $a/! p^)-`] ]*^`]Da0L` D L`L`/V ]*EL` .E!cUU D` $a/! p}/^)-`f6DP]* D``D']* D``DB']* D``"]* D``D `D]`H ``/ `/  `?  a a)-``*P]*T`+qBb"B]+ D`] + D`] + D`0]+ D`" D`D]+ D` $a/! kPݒ E ` a" a2 a1aa " a(>a0ba 8 a0@B aH a$PaXa.`Bva,hb apa xB'a&baa( a a" a a* a 'a"a)-`p`P]+ D`]+ D`]!+ D`]%+ D`])+ D`]-+ D`]1+ D`]5+ D`]9+ D`]=+ D`]A+ D`]E+ D`]I+ D`]M+ D`]Q+ D`]U+ D`]Y+ D`]]+ D`]a+ D`]e+ D`]i+ D`]m+ D`]q+ D`]u+ D`]y+ D`]" YDa?$a/!5pF^)- `DaDQGPfD " `Y }`" b `HdDuED($a /: @ $a/! p^)-`PfD] ]}+q D`-^`]=DaL`" 4DL`Y} @a]+`a]+`a]+`a]+`a]+`a]+`aH]+`aG]+`aF]+`a;]+`aE]+`aD]+`aC]+`aB]+`aA]+`a@]+`a?]+`a:]+`a>]+`a=]+`a ]+`a ]+`a]+`a]+`a]+`a]+`a ]+`a],`a],`a] ,`a] ,`a<],`a],`a],`a],`a]!,`a]%,`a]),`a]-,`a#]1,`a]5,`a ]9,`a!]=,`a"]A,`a'#]E,`a$]I,`a%]M,`a&]Q,`a']U,`a(]Y,`a*=]],`a)]a,`a*]e,`a+]i,`a",]m,`a4-]q,`a6.]u,`a+/]y,`a20]},`a1],`a2],`a3],`a)4],`a>],`a(5],`a6],`a7],`a,8],`a9],`a1:],`a;],`a;],`a],`a?],`aH@],`aDA],`aB],`a?C],`aD],`aE],``E DVHV h], $a(" @$a/! pY|^)-`PfD ٕ`]c^`VP], .0L`  .H4Oc "  DaQ=$a/!5pF^)- `DaDqGPf" ` b`Y }`DHdDED($a /: @ $a/! p^)-`PfD] ],`, D`^)-`]%)DaL`DL`]E!cXXA  I - EucZZ ]%`)]TٕTEb  D`D],q D` $a/! P}/e ` a)-` `]1V ], D`HEVrV ],`,HTOcV$a/! @Y|$a/! $a/!  0 `" a aŸ a)-`]rq ],u D`E" i mDŸ VDa/DED($a /: @ $a/! p^)-`PfD] ],u D`^`]DaL`DL`im$L`V $a-! P`< ``/ `/ `?  a)-` `,]- D` $a/! Pٖ ` a)-` `]}] L`uA E !c ]-u D`E ] - D`E D`EiU;8L` I  yu= E !c`DE$eGHP] -1 D`]- D`]- D` ]- D`E ]- D`E ]!- D`E ]%- D`E ])- D`E ]-- D`E ]1- D`E ]5- D`E ]9- D`E ]=- D`E ]A- D`E ]E- D`E ]I- D`E ]M- D`E ]Q- D`E ]U- D`E ]Y- D`E D`EE`($a  /! @Y|$a  /!  $a /!  $a /!  $a /!  $a /! $a /!  ` `"`aa Ba| a a({ a 0)-ɗїŗ)-`] $ Ga- @< ``/ `/ `;  a)-```闀D]]-(`a-HOc#V՗DBV ]e- D`E"VᗀDV ]i- D`EV ]m- D`ED{ V| V ]q- D`$a/! pY|^)-`PfD 1`]cV ]u- D`$a/! pY|^)-`PfD I`]cDaŌIDED($a /: @ $a/! pܖ^`PfD] ]y- D`]^)-`]mDa(L`D$L`)-E  L`V ]}- D`$a/! pY|^)-`f6 DM  ]- D`E`D' ]- D`E`b ]- D`E`BS  ]- D`E`ˆ  ]- D`E`B' ]- D`E`D `D ]- D`E`D]cV]LeDqL`E !cdM~ ]- D`E D`D]- D`EI1!`M" !7] ]-5 D`E ]- D`E ]- D`E ]- D`E`8E] %`-P]-,` - `-HTOcV" V -`-P]-`--m D`D]-M D` $a/! PY|A` ` aA a "C aC a"D a D a (E a0)-`$`P]-M D`]- D`]- D`]- D`]- D`]- D`]D" VµV 5`-]-`--Bnno D`]- D`D]- D` $a/! PY|T ` aA a "C aD aE a E a()-` `P]. D`]. D`] . D`] . D`]. D`] V ].- D`EDaGDDED($a /: @ $a/! p^)-`PfD] ]. D`^`]-DaDL`DL`9=PL`i V $a-! P`< ``/ `/ `?  a)-` `.]!. D` $a/! P9 ` a)-` `]EVVa]L`$]b~ b A ]b b A ] b A ]b b0a0] b9`V ]%. `).HOcC  V ]-. D`E"X V$a- ``^)-`fD` D ` D]1. D`D" V ]5. D`ED V ]9. D`EV] Db< Y" V ]=. D`Ed V] DV8$a/! /@Y|$a /! + $a /! ' $a /! #  H)-嚔ᚔݚ`]} ]A. D`E͚ ]E. D`E] ] ]I.`D"[ VDB0 yD VD< Va5A&$DED($a /: @ $a/! p^)-`PfD] ]M. D`^`]!DaL`D4L` ٚYɚy  (L`i E!VEK1Ś՚L` I H4Oc d DafDED($a /: @ $a/! p^)-`PfD] ]Q.`U.A D`I^)-`]Y]DaL`DL`Ś՚]EA!cEca]Y.`I]L`b~ b  b  ` D`E91V h]]. $a(" @$a/! pY|^)-`PfD `]c^`V h]a. $a(" @$a/! pY|^)-`PfD `]c^`VP]e. V h]i.$a(" @$a/! pY|^)-`PfD `]c^`VP]m. V h]q.$a(" @$a/! pY|^)-`PfD ݛ`]c^` $L`  I E1!c`a]u.`$$a  /! @Y|$a /!  $a /!  $a /!  $a /! $a /!  T `G `!bG ` G `"H `H ` H `()- `]!]]N0AA@T!AaA`Q̘A A'ALA0]A͉A@RAA`6A`cHA6AKA@[MA@pTAAA ]A`AlAրA` A@gA AA@JAgA@Aw,AIAUAEA뙤A`lAuAVbA]BA A@%AS A&A.AdnDAAA`0`]] N@AA@T!AaA`Q̘A A'ALA0]A͉A@RAA`6A`cHA6AKA@[MA@pTAAA ]A`AlAրA` A@gA AA@JAgA@Aw,AIAUAEA뙤A`lAuAVbA]BA A@%AS A&A.A/CA#/HAgAsAA@tdAQAA@A~yAAA\RA&ҵA@AZrAMUAAA`@`]]N`AA@T!AaA`Q̘A A'ALA0]A͉A@RAA`6A`cHA6AKA@[MA@pTAAA ]A`AlAրA` A@gA AA@JAgA@Aw,AIAUAEA뙤A`lAuAVbA]BA A@%AS A&A.A/CA#/HAgAsAA@tdAQAA@A~yAAA\RA&ҵA@AZrAXUAbAAA`5 ALApA6A*N]A@AArAA@AR6A@tAНA@VAp)aAZA{A$A$A U ASvA AAA@r }AAAA``]] NAA@T!AaA`Q̘A A'ALA0]A͉A@RAA`6A`cHA6AKA@[MA@pTAAA ]A`AlAրA` A@gA AA@JAgA@Aw,AIAUAEA뙤A`lAuAVbA]BA A@%AS A&A.A/CA#/HAgAsAA@tdAQAA@A~yAAA\RA&ҵA@AZrAXUAbAAA`5 ALApA6A*N]A@AArAA@AR6A@tAНA@VAp)aAZA{A$A$A U ASvA AAA@r }AIBAZaAOA@:A AΣ.AAAaʳAgAkLA}J A A'A#QA`}GAbA.3A`cAoA`A(AA@=A_iA@`A]rAB]A`C.AZA?AΫA A AcA_yA`A?A_DfAn:AX AAUAA;A^̴AoAAe|SA,VANAGACA 9cAzbA=JAKyAk?AA=Aw0A[-AA#A sAAA``]] NAA@T!AaA`Q̘A A'ALA0]A͉A@RAA`6A`cHA6AKA@[MA@pTAAA ]A`AlAրA` A@gA AA@JAgA@Aw,AIAUAEA뙤A`lAuAVbA]BA A@%AS A&A.A/CA#/HAgAsAA@tdAQAA@A~yAAA\RA&ҵA@AZrAXUAbAAA`5 ALApA6A*N]A@AArAA@AR6A@tAНA@VAp)aAZA{A$A$A U ASvA AAA@r }AIBAZaAOA@:A AΣ.AAAaʳAgAkLA}J A A'A#QA`}GAbA.3A`cAoA`A(AA@=A_iA@`A]rAB]A`C.AZA?AΫA A AcA_yA`A?A_DfAn:AX AAUAA;A^̴AoAAe|SA,VANAGACA 9cAzbA=JAKyAk?AA=Aw0A[-AA#A@VoA(AA[;A[&AAnLA[A`AA_AI{A AαUAZ=A:AAeAsAA [AAoAWA#A29A:A!AAoSAXA ZA@{AAOtAJA|A!A*A@&eA A@1aG"@a Ba[ a)a1a8ba@"a!Ia1P aX aWa" aUi aq a7yB aaabaߘZ ac¦ ab a"a_ a" a a¨ ag aB aSBaca aao a "ama) a(a0a-8aABaHaPaqXbabaiiaqbayaa͉Baaϙaۡb a"!a!aa a?"au#agB$a$a]%a3B&a a'ak'aM(aS")a)aI *a)b+a 2",a{8-a=@-aI.aP"/akY/a`b0ai1aKq1ayB2a3a3a94a ; aib aϨ a# a aY aIay" ab` asbGaoB a aa aE a" a§ aw!b a)" aI1)-`%`  $a-! P`<``/ `/ `?  a)-` `/]/ D` $a/! P  ` a)-` `] $a-! P`<``/ `/ `?  a)-` `/]/ D` $a/! P- ` a)-` `] $a-! P`<``/ `/ `?  a)-` `/]/ D` $a/! PQ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `/]/ D` $a/! Pu ` a)-` `] $a-! P`<``/ `/ `?  a)-` `/]/ D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `/]/ D` $a/! P ` a)-` `]M $a-! P`< ``/ `/ `?  a)-` `/]/ D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `/]/ D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `/]/ D` $a/! P) ` a)-` `] $a-! P`<``/ `/ `?  a)-` `/]/ D` $a/! PM ` a)-` `] $a-! P`<``/ `/ `?  a)-` `/]/ D` $a/! Pq ` a)-` `] $a-! P`<``/ `/ `?  a)-` `/]/ D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `/]0 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `0] 0 D` $a/! Pݢ ` a)-` `] $a-! P`<``/ `/ `?  a)-` ` 0]0 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `0]0 D` $a/! P% ` a)-` `] $a-! P`<``/ `/ `?  a)-` `0]!0 D` $a/! PI ` a)-` `] $a-! P`<``/ `/ `?  a)-` `%0])0 D` $a/! Pm ` a)-` `] $a-! P`<``/ `/ `?  a)-` `-0]10 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `50]90 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `=0]A0 D` $a/! P٣ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `E0]I0 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `M0]Q0 D` $a/! P! ` a)-` `] $a-! P`<``/ `/ `?  a)-` `U0]Y0 D` $a/! PE ` a)-` `]y $a-! P`< ``/ `/ `?  a)-` `]0]a0 D` $a/! Pi ` a)-` `] $a-! P`<``/ `/ `?  a)-` `e0]i0 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `m0]q0 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `u0]y0 D` $a/! Pդ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `}0]0 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `0]0 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `0]0 D` $a/! PA ` a)-` `]1 $a-! P`< ``/ `/ `?  a)-` `0]0 D` $a/! Pe ` a)-` `] $a-! P`<``/ `/ `?  a)-` `0]0 D` $a/! P ` a)-` `] $a-! Py9`H``/ `/  `?  a a)-``0P]0 D`8D]0 D` $a/! P9 ` a)-` `] $a-! P`<``/ `/ `?  a)-` `0]0 D` $a/! P٥ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `0]0 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `0]0 D` $a/! P! ` a)-` `] $a-! P`H``/ `/  `?  a a)-``0P]0 D`8D]0 D` $a/! PE ` a)-` `] $a-! P`<``/ `/ `?  a)-` `0]0 D` $a/! Pq ` a)-` `]Q9 $a-! P`< ``/ `/ `?  a)-` `0]0 D` $a/! P ` a)-` `]9 $a-! P`< ``/ `/ `?  a)-` `0]0 D` $a/! P9 ` a)-` `] $a-! P`<``/ `/ `?  a)-` `0]0 D` $a/! Pݦ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `0]0 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `0]1 D` $a/! P% ` a)-` `] $a-! P`<``/ `/ `?  a)-` `1] 1 D` $a/! PI ` a)-` `] $a-! P`<``/ `/ `?  a)-` ` 1]1 D` $a/! Pm ` a)-` `] $a-! P`<``/ `/ `?  a)-` `1]1 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `1]!1 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `%1])1 D` $a/! P٧ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `-1]11 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `51]91 D` $a/! P! ` a)-` `] $a-! P`<``/ `/ `?  a)-` `=1]A1 D` $a/! PE ` a)-` `] $a-! P`<``/ `/ `?  a)-` `E1]I1 D` $a/! Pi ` a)-` `] $a-! P`<``/ `/ `?  a)-` `M1]Q1 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `U1]Y1 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `]1]a1 D` $a/! Pը ` a)-` `] $a-! P`<``/ `/ `?  a)-` `e1]i1 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `m1]q1 D` $a/! P ` a)-` `] $a-! P`H``/ `/  `?  a a)-``u1P]y1 D`D]}1 D` $a/! PA ` a)-` `] $a-! P`<``/ `/ `?  a)-` `1]1 D` $a/! Pm ` a)-` `] $a-! P`<``/ `/ `?  a)-` `1]1 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `1]1 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `1]1 D` $a/! P٩ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `1]1 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `1]1 D` $a/! P! ` a)-` `] $a-! P`<``/ `/ `?  a)-` `1]1 D` $a/! PE ` a)-` `] $a-! P`<``/ `/ `?  a)-` `1]1 D` $a/! Pi ` a)-` `] $a-! P`<``/ `/ `?  a)-` `1]1 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `1]1 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `1]1 D` $a/! Pժ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `1]1 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `1]1 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `1]1 D` $a/! PA ` a)-` `] $a-! P`<``/ `/ `?  a)-` `1]1 D` $a/! Pe ` a)-` `] $a-! P`<``/ `/ `?  a)-` `1]1 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `2]2 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` ` 2] 2 D` $a/! Pѫ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `2]2 D` $a/! P ` a)-` `] $a-! P`H``/ `/  `?  a a)-``2P]2 D`8D]!2 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `%2])2 D` $a/! PE ` a)-` `] $a-! P`<``/ `/ `?  a)-` `-2]12 D` $a/! Pi ` a)-` `] $a-! P`<``/ `/ `?  a)-` `52]92 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `=2]A2 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `E2]I2 D` $a/! Pլ ` a)-` `] $a-! P`< ``/ `/ `?  a)-` `M2]Q2 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `U2]Y2 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `]2]a2 D` $a/! PA ` a)-` `] $a-! P`<``/ `/ `?  a)-` `e2]i2 D` $a/! Pe ` a)-` `] $a-! P`<``/ `/ `?  a)-` `m2]q2 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `u2]y2 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `}2]2 D` $a/! Pѭ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `2]2 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `2]2 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `2]2 D` $a/! P= ` a)-` `] $a-! P`<``/ `/ `?  a)-` `2]2 D` $a/! Pa ` a)-` `] $a-! P`<``/ `/ `?  a)-` `2]2 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `2]2 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `2]2 D` $a/! Pͮ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `2]2 D` $a/! P ` a)-` `] $a-! P`H``/ `/  `?  a a)-``2P]2 D``D]2 D` $a/! P ` a)-` `]Mi $a-! P`< ``/ `/ `?  a)-` `2]2 D` $a/! PA ` a)-` `] $a-! P`<``/ `/ `?  a)-` `2]2 D` $a/! Pe ` a)-` `] $a-! P`<``/ `/ `?  a)-` `2]2 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `2]2 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `2]2 D` $a/! Pѯ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `2]2 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `3]3 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` ` 3] 3 D` $a/! P= ` a)-` `] $a-! P`<``/ `/ `?  a)-` `3]3 D` $a/! Pa ` a)-` `]  $a-! P`< ``/ `/ `?  a)-` `3]3 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `!3]%3 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `)3]-3 D` $a/! PͰ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `13]53 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `93]=3 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `A3]E3 D` $a/! P9 ` a)-` `] $a-! P`<``/ `/ `?  a)-` `I3]M3 D` $a/! P] ` a)-` `] $a-! P`< ``/ `/ `?  a)-` `Q3]U3 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `Y3]]3 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `a3]e3 D` $a/! Pɱ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `i3]m3 D` $a/! P ` a)-` `] $a-! P`< ``/ `/ `?  a)-` `q3]u3 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `y3]}3 D` $a/! P5 ` a)-` `] $a-! P`<``/ `/ `?  a)-` `3]3 D` $a/! PY ` a)-` `] $a-! P $a-! Py9`<``/ `/ `?  a)- D`DaD `3]3 D` $a/! p9^)-`PfD `]`< ``/ `/ `?  a)-` `3]3 D` $a/! P ` a)-` `] $a-! P`H``/ `/  `?  a a)-``3P]3 D`8D]3 D` $a/! PŲ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `3]3 D` $a/! P ` a)-` `] " `3]3 D` $a/! P  ` a)-` `] $a-! P`<``/ `/ `?  a)-` `3]3 D` $a/! P1 ` a)-` `] $a-! P`<``/ `/ `?  a)-` `3]3 D` $a/! PU ` a)-` `] $a-! P`<``/ `/ `?  a)-` `3]3 D` $a/! Py ` a)-` `] $a-! P`<``/ `/ `?  a)-` `3]3 D` $a/! P ` a)-` `] $a-! P $a-! Py9`<``/ `/ `?  a)- D`DaD `3]3 D` $a/! p9ɳ^)-`PfD `]`< ``/ `/ `?  a)-` `3]3 D` $a/! Pٳ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `3]3 D` $a/! P  ` a)-` `] $a-! P`<``/ `/ `?  a)-` `3]3 D` $a/! P- ` a)-` `] $a-! Pɳ`<``/ `/ `?  a)-` `3]3 D` $a/! PٳQ ` a)-` `] $a-! P`< ``/ `/ `?  a)-` `3]4 D` $a/! Pu ` a)-` `] $a-! P`<``/ `/ `?  a)-` `4] 4 D` $a/! P ` a)-` `] $a-! P`< ``/ `/ `?  a)-` ` 4]4 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `4]4 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `4]!4 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `%4])4 D` $a/! P) ` a)-` `] $a-! P`<``/ `/ `?  a)-` `-4]14 D` $a/! PM ` a)-` `] $a-! P`<``/ `/ `?  a)-` `54]94 D` $a/! Pq ` a)-` `] $a-! P`< ``/ `/ `?  a)-` `=4]A4 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `E4]I4 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `M4]Q4 D` $a/! Pݵ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `U4]Y4 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `]4]a4 D` $a/! P% ` a)-` `] $a-! P`<``/ `/ `?  a)-` `e4]i4 D` $a/! PI ` a)-` `] $a-! P`<``/ `/ `?  a)-` `m4]q4 D` $a/! Pm ` a)-` `] $a-! P`<``/ `/ `?  a)-` `u4]y4 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `}4]4 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `4]4 D` $a/! Pٶ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `4]4 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `4]4 D` $a/! P! ` a)-` `] $a-! P`<``/ `/ `?  a)-` `4]4 D` $a/! PE ` a)-` `] $a-! P`<``/ `/ `?  a)-` `4]4 D` $a/! Pi ` a)-` `] $a-! P`<``/ `/ `?  a)-` `4]4 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `4]4 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `4]4 D` $a/! Pշ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `4]4 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `4]4 D` $a/! P ` a)-` `]uٖő $a-! P`< ``/ `/ `?  a)-` `4]4 D` $a/! PA ` a)-` `]= $a-! Pɳ`< ``/ `/ `?  a)-` `4]4 D` $a/! Pٳe ` a)-` `]-Ie $a-! P`< ``/ `/ `?  a)-` `4]4 D` $a/! P ` a)-` `] $a-! P`< ``/ `/ `?  a)-` `4]4 D` $a/! P ` a)-` `] $a-! P`H``/ `/  `?  a a)-``4P]4 D`D]4 D` $a/! PѸ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `5]5 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` ` 5] 5 D` $a/! P! ` a)-` `] $a-! P`<``/ `/ `?  a)-` `5]5 D` $a/! PE ` a)-` `] $a-! P`<``/ `/ `?  a)-` `5]5 D` $a/! Pi ` a)-` `] $a-! P`<``/ `/ `?  a)-` `!5]%5 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `)5]-5 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `15]55 D` $a/! Pչ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `95]=5 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `A5]E5 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `I5]M5 D` $a/! PA ` a)-` `] $a-! P`<``/ `/ `?  a)-` `Q5]U5 D` $a/! Pe ` a)-` `] $a-! P`<``/ `/ `?  a)-` `Y5]]5 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `a5]e5 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `i5]m5 D` $a/! PѺ ` a)-` `]% $a-! P`< ``/ `/ `?  a)-` `q5]u5 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `y5]}5 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `5]5 D` $a/! P= ` a)-` `]  $a-! P`< ``/ `/ `?  a)-` `5]5 D` $a/! Pa ` a)-` `] $a-! P`<``/ `/ `?  a)-` `5]5 D` $a/! P ` a)-` `]) $a-! P`< ``/ `/ `?  a)-` `5]5 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `5]5 D` $a/! Pͻ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `5]5 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `5]5 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `5]5 D` $a/! P9 ` a)-` `] $a-! P`<``/ `/ `?  a)-` `5]5 D` $a/! P] ` a)-` `] $a-! P`<``/ `/ `?  a)-` `5]5 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `5]5 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `5]5 D` $a/! Pɼ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `5]5 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `5]5 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `5]5 D` $a/! P5 ` a)-` `] $a-! P`<``/ `/ `?  a)-` `5]5 D` $a/! PY ` a)-` `] $a-! P`<``/ `/ `?  a)-` `6]6 D` $a/! P} ` a)-` `] $a-! P`<``/ `/ `?  a)-` ` 6] 6 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `6]6 D` $a/! PŽ ` a)-` `] $a-! P`<``/ `/ `?  a)-` `6]6 D` $a/! P ` a)-` `] $a-! P`<``/ `/ `?  a)-` `!6]%6 D` $a/! P  ` a)-` `] $a-! P`<``/ `/ `?  a)-` `)6]-6 D` $a/! P1 ` a)-` `] $a-! P`<``/ `/ `?  a)-` `16]56 D` $a/! PU ` a)-` `]y9ɳ"`M ] MiY5; >fD`  `D ` D]96 D`E >fD=6`  `D ` D]A6 D`E >fDE6`  `D ` D]I6 D`E% ]M6 D`E> >fDQ6`  `D ` D]U6 D`E]`- !f@D`DM``DBu` U`Db`D=`DI`D` }` "`b` e`DY G`BM`D` D`1]`D"E`D5` D`IaD $!a- @< ``/ `/ `; U a)-``P]Y6`#]6HTOcVe"]B)( ]a6; D`EV(VB)BVᾄDVaPDED($a /: @ $a/! p^)-`PfD] ]e6; D`#^`] DaDL`DL`پdL`i VVaV ]i6$`m6HTOc}V ]q61 D`EB{)zV ]u6 D`EDB|V ]y6 D`Ea}]DED($a /: @ $a/! p^)-`PfD] ]}61 D` a^`]qDaL`DL`I)U=L`V $a- #@$a-  $a-  $a-  l ``/  `/  `; a»a¼a aMa )8` ` 6666D]6`6HOc#V$$a  /! @Y|)-`] ]6E ]6E f]6E ]6E DVͿV DLDbVVſDVɿa DED($a /: @ $a/! p^)-`PfD] ]6 D`^`]DaL`D$L`ٿݿѿտ]E!cII`  D`EaVL`E5cHH6666 D`EVP]6`6H4Oc DaDED($a /: @ $a/! p^)-`PfD] ]6! D`-^`]=DaL`D L` L` L`9E%!c@Mz] 5 9 = A E I M Q U Y ] a eP]6! D` D`UVQVRV1RV9RVVV`bV`CV`eV`nV h]6 $a(" @$a/! pY|^)-`PfD `]c^`1,L`  I 9HOc-DV`[DBV`#V`:D"V` V`{DV`"bDV`ADV`|bV`%DV`&DV` DbV`<BV` b DV`!DBV`]DV`Z"V`bD"V`.BV`zV``V`aDV` DV`9V`+DV`-"V` V`;DV V`/DV`}V`_0V"V`=V`'bV`? DV`> D"V`0BV`\DV$a///! @Y|$a/./! $a/-/! $a/,/! $a/+/! $a/*/! $a/)/! $a/(/! $a/'/! )-iea]YUQ)-M`]AaZzCben./\|:?_ !# []<>{}-+"'%;^`@&=09V`^V`DV`@DbDa5`DED($a /: @ $a/! p^`PfD] ]6`6 D`(^)-`]DaL`DL`-IA }E u1!y9=%5)- L` L`- E!c5%EѾcP]6; D` ]6 D`E"%c`6%%B&&'b''"(()*-I]4Uc DDDDDDDD$a/! @ Y|$a/! $a/!  0 `aaa)-]GHG$a/! @Y| `a)-`]GI]D ]6; D`E ]6 D`E ]6 D`EB"P]6 D` ]6 D`E D`D]6 D`$a/! pY|^)-`!f@DB) ]6; D`E`DP]6 D`` ]6 D``DB& ]6 D`E`DB]6 D``]6 D`` Db]7 D`` D' ]7 D`E`] 7 D``DI] 7 D``D]7 D`` b ]7 D`E`]7 D``D ` ]7 D``DBi`"( ]!7; D`E`D( ]%7 D`E`DP])7 D``D]-7 D``1Q`D"`D` D& ]17 D`E` Dq`D]57 D``( ]97 D`E`]c`D`Dm` D]` D`D‚$a/! @Y|$a/! $a/!  0 ` `$a-! P`H``/ `/  `?  a a)-`B a a“`] `=7P]A7`E7 `I7HTOcVB V ]M7 D` $a/! p $a-! P`H ``/ `/  `?  a a)-``Q7P]U7$`Y7o"pppBq D`D]]71 D`^`PfD]a7 D``D %`D"6 ]e7 D``D]b V ]i7 D`E V ]m7 D`ED V€Da60DED($a /: @ $a/! p^)-`PfD] ]q7 D` q^`]ÐDa0L` DL` m aUHL`i 55q}-VP]u7 V h]y7$a(" @$a/! pY|^)-`PfD `]c^`VP]}7 V h]7$a(" @$a/! pY|^)-`PfD `]c^`V h]7 $a(" @$a/! pY|^)-`PfD `]c^`VP]7 V]7%$L`  I E !c ]7 D`EP]7 D`%bo D`XD]7 D` $a/! P< ` aa"6 aa)-``P]7 D`]7 D`]7 D`]e`!H$a/! ?@Y|$a/! ; $a/! 7 $a/! 3 $a/! / $a /! + $a /! ' $a /! # $a /!  $a /!  $a/!  $a/!  $a/!  $a/! $a/!  $a/! @ ^)-0Zb $a/!   ``$a-! P``"`$a-! #Poa` $a-! Pi` $a-! P`a (ba0Bia8Ua@bVaHXaPVaXbQa`"Taheap$a/! Y|)-$a/!  ĖX$a/!   `X` AQ`$a-! P`)-B`$a-! PO`$a-! Pf` $a-! PBZ`($a-! PT`0$a-! Pb `8$a-! P^`@"T`H$a-! P"_`P$a-! P;`X$a-! Pb?``$a-! Po`h$a-! P"l` p$a-! P$a/! Y|đ$a/!  Ė$a/!   ``$a-! P`)-`"`$a-! P` a"`$a-! P`a >a(Ba 0a8³ a@" aHaPaXa`a hap$a/! Y|Ė$a/!  œD} `Da aEaFa b`` ]`(Upb2 `0$a-! P`H``/ `/  `?  a a)-`ABa8Ba@CaH!9aBP>aX9a`>ah=apy Ŗuđqđmđiđeđ)-a ŗ]ĒYĒUĒQĒMĒ)-I ŐEē`] ]7<` 7HOcC DCV"DbD!9V`DVŀD>VFDFV ]7 D`EDVb2 V  `7P]7`7 D`D]7Y D` $a/! PM$ ` abVa)-``P]7Y D`]ABV ]7 D`EaEV ]7 D`EDBV ]7 D`ED9VDDYypD=VD>VFatPDED($a /: @ $a/! p^)-`PfD] ]7 D` ^`]ŒDa,L` DVV h]7 $a(" @$a/! pY|^)-`PfD `]c^`V>$L`    qpE!!cY]LeD`$$a  /! @Y|$a /!  $a /!  $a /!  $a /! $a /!  T `a"aaaBa ba ()-Ɨƒ ƒ ƒƒ`]a !33b  ]7 D`E ]7 D`E ]7 D`E ]7 D`E8 D`E=i]pM"`FDFD`Wy"] ]7 `7D ]7Q D`E ]7 D`E D`E ]7 D`E`0Dx$a/! o@Y|$a/! k $a/! g $a/! c $a/! _ $a/! [ $a/! W $a/! S $a/! O $a/! K $a/! G $a/! C $a/! ? $a/! ; $a/! 7 $a/! 3 $a/! / $a /! + $a /! ' $a /! # )-)-)-}yuq`] $a- ``^)-`f6Da D `  `D ` D]m`q  ]8`8H4Oc  V V ] 8 D`EB VƀDaRFDED($a /: @ $a/! p^)-`PfD] ] 8 D`X^`] ǐDaL`DL` L`938V ]8`8HOc#D?!bAV ]8 D`ED! V ]8) D`EblV ]!8 D`EDkV ]%8 D`EDKV ])8 D`EUV ]-8 D`Ea5%%DED($a /: @ $a/! p^)-`PfD] ]18 D`}^`])ǀDaL`D L`YqeM!A,L` V`V`V`V`V`V`V`L`HOc!@B ? V`< ; V`> H V`Db? V`Db= "; V`B@ V`@DbG V`bE V`"C V`@> V`DC V` D"> H V`= V`DC V`DB V`= D V`DE V`BF V`"A V`DF V`; V`B< V`@ V` DA bB V`DBD V`E V`atU|$a/!5PF `""Y aAE `3/"# BF `3# F `3$ "; `3Cb% > `3 "& A `39& > `3)' B@ `3b( B `3") = `3) b? `3-* "A `33b+ < `3 ", b= `35, @ `3!- ? `3b. "> `3"/ = `3/ ; `3;0 C `3b1 D `3"2 bB `32 C `3=3 E `3 b4 B `3"5 BD `315 bE `3'6 "C `3?b7 bG `3"8 H `3%8 H `3+9 ; `37b: B< `3#"; )- cDQ `}HdDED($a /: @ $a/! p^)-`PfD] ]58`98 D`8 M^)-`]]aȀDaL`DL`! % )1-! L`9 L`= E!c E-Ǘc D`EL`A 2E c D`$a/! pY|^)-`PfD `]cDq:A f6Da D¦`  `D ` D]m`q  ]=8`A8H4Oc ¦VȀDV ]E8 D`E"% Va6w$DED($a /: @ $a/! p^)-`PfD] ]I8 D`X^`]ȑDaL`DL` L`938!L`-2= A E !c D`$a/! pY|^)-`PfD `]cDq: f6Da Db& `  `D ` D]m`q  ]M8`Q8H4Oc B' V ]U8 D`E& Vb& V ɀDa}"DED($a /: @ $a/! p^)-`PfD] ]Y8 D`X1^`]AɖDaL`DL`-)L`8V fD]8` `D ` D] `" h]a8 $a(" @$a/! pY|^)-`PfD i`]c^`a'EVP]e8 2L` 2E !c D`$a/! pY|^)-`PfD  `]cDq: ]i84` m8H4Oc D7 VBvV ]q8 D`E"V ]u8 D`Ea?\DED($a /: @ $a/! p^)-`PfD] ]y8 D`^`]ɖDaL`DL`8L` EV $a-! P`H ``/ `/  `?  a a)-``}8P]8`8`8H4Oc V$a/! @Y| `L`)-`]ɀDLɀDagFDED($a /: @ $a/! p^`PfD] ]8  D`%^)-`]5ʔDa8L` DL` L`i VV ]8`8H4Oc QʀDV ]8Y D`EDaDED($a /: @ $a/! p^)-`PfD] ]8Y D`pq^`]ʗDaL`DL`Qe L`i EVfD` D ` D]8 D`35 L`I 1 T2E !cU D`EV ]8`8H4Oc DbV ]8 D`Ea9DED($a /: @ $a/! p^)-`PfD] ]8 D`p^`]ʀDaL`DL`,L` i 81A3V ]8 D`E99$L`I 1 T2-E !cU D`EL` I HOceB V`D"ɂDb( V $a-! P`H ``/ `/  `?  a a)-``8P]8`8`8Bbbc D`D]85 D` $a/! pY|)^)-`f6P]8 D`` D= $$a  - @q)-`]85 D`E#`P]8 D`` # ]8 D`` D )`D]8 D`` I } ]8F` ]DW V ]80` 8HTOcDW W VD"X VX Va DRDED($a /: @^)-`]ˀDa(L`DL`˔`L`i E3VuVQV28>3DL`]Ha:DEDE !cHaK.DEDEcI 2yEcbff"g ]8 D`E ]8 D`E $a- @ $a- P)-]8`0 ``/ `/ `; )-`]$`3vuH=5 $a- @ $a- P)-]8`0 ``/ `/ `; )-`]$`3vwH =5 D`ED/ V ]8`9H4Oc / VD/ a1DED($a /: @^)-`]̀DaL`DL`) L`T L`TE!!c ]9 D`E D`EDb= V`"; V`DF V ] 9` 9H4Oc F VDbG VF Ya71DED($a /: @^)-`]àDaL`DL`mqL`1;]59L`2E !c D`$a/! pY|^)-`PfD ]`]c> V`DT V ]9`9U D`ED5 V ]9(`9H4Oc D5 4 VB5 Va6DED($a /: @^)-`]̀DaL`DL`̓(L`EV5VVVL` Ha/kDDEDE!cHaJ!DEDE cEc ]!9 D`E ]%9 D`EI ])9 D`E ]-9 D`E D`E4 B8 V ]19`59H4Oc "9 VD8 VB8 !aJZ<DED($a /: @^)-`])̀DaL`DL`95$L`1;28L`2E !c ]99) D`E D`$a/! pY|^)-`PfD %`]cʀDeP V ]=98` A9HOc#D"Q V^VDTVWVQ VDP m̀Da=@DED($a /: @^)-`]ùDahL` D L`͕,L` }5V=V8:(L`   2:HaZ DEDE!cVVE c f6Da D`  `D ` D]m`q :Dq::0]E9u D`T$a/! K@5$a/! G 5)3͑`]m04]`D`0]`D`0]`D`0]`D`Y]LeDc"d $a-! P`H ``/ `/  `?  a a)-``I9P]M9D]Q9 D` $a/! p^`f6"d` Dc` '`Dh` B'`D `D] $a-! P`H ``/ `/  `?  a a)-``U9P]Y9D]]9 D` $a/! P``] ]a9u D`E D`ED= V`D"; V ]e9`i9H4Oc < V"; I; VDa}!DED($a /: @^)-`]Q΀DaL`DL`a]$L`V51;8 L` yHa;DEDE!c2E c ]m9Q D`E ]q9 D`E D`$a/! pY|^)-`PfD M`]c"A V`DBV ]u9`y9H4Oc B΂D»VaiDED($a /: @^)-`]΀DaL`DL`ΐL`:TL`:TE!c D`ED; V`D¾V ]}9`9H4Oc D¾BVa62DED($a /: @^)-`]΀DaL`DL` L`T L`TE!c D`E? V ]9`9H4Oc ? V> VD? aiDED($a /: @^)-`]πDaL`DL`-)ϒL`5VL`  E!!c ]9 D`E ]9 D`E D`E@ V $a- @< ``/ `/ `; a)8``mπD]9`9H4Oc BA VA VD@ aac-DED($a /: @^)-`]uπDaL`DL` L` L`Ey!c D`$a/! pY|^)-`PfD m`]cDV ]9`9H4Oc B= VDVa{DED($a /: @^)-`]πDaL`DL`ϐ L`i TqV L`-I 1  TE !c ]9 D`E D`EDV ]9`9H4Oc VπDI Va&P+DED($a /: @^)-`]πDaL`DL`  L`L`E!c D`$a/! pY|^)-`PfD `]cDb:A V`DV ]9`9H4Oc =ЀDbVDabyDED($a /: @^)-`]EЀDaL`DL`QЖ L`T L`TEI!c D`ED< V`; V`D< ]ΎDbG q̀DA ςDbV ]9`9H4Oc VDbyaw[DED($a /: @^)-`]ЀDaL`DL` L`T L`TE!c D`ED"> V`D= V`DV }5B' ɀD# V ]9`9 D`ED) y΀DV ]9`9H4Oc ЀDMV"1 VaZQ_DED($a /: @^)-`]ЀDaL`DL`ЕL`L`E!c D`EDV ]9`9H4Oc BU VDbVaG>DED($a /: @^)-`]рDaL`DL`ї -πD"Q ̈́DbO ]ẀD" ъD? V`+ ̀D> V`¿X b? V`D%ҀD b& -"A:DB@ V`@QbQbV ]:`:H4Oc DVb"C VasL'DED($a /: @^)-`]ҀDaL`DL`ғL`L`E!c D`E:D DBvɊD* V $]/a/a- @< ``/ `/ `;  a)-``P]:`!: D`D]%:5 D`EDBE V ]):`-:H4Oc BE AӀDD VbD Va4fFDED($a /: @^)-`]IӀDaL`DL`YUӓ,L` V1;A58V>]593L`2 E !c D`ED@ V` V$agg/! AY|$agf/!  $age/!  $agd/!  )-`]A !))`A}E:Y:m@ %Ui`MmE]:5:YqI``bL iςD҄DW bVAȄDS bD YaZqDED($a /: @ $a/! p^)-`PfD] ]1:`5: D`+^)-`]ӀDaL`D\L`U9qQEuML`jy}5 !%-)Q=y)A:a:U:V f6Da D`  `D ` D]m`q Dq:$a/! pY|^)-`PfD `]c!95QeIa]-)aYmqYUA:::  imUmEY]L`)I!M:-]U!yMe:aQy 2E !cEcbc D`XD]9: D` $a/! PT ` aB`+ } P]=: D`Faa baa )-``]A: D`]E: D`]I: D`]M: D`]e8=$L`-2 E !c ]Q: D`Ec  ]U: D`E ]Y: D`E D`Ee::` D$$a  /! @Y|$a /!  $a /!  $a /!  $a /! $a /!  T `a`$a/! _@)$a/! [ )))mԗ`Bvab ` $a-! P`H ``/ `/  `?  a a)-`a  a(aiԐ]ԓYԓUԓQԓ`] ]]:`a:HOc#V}ԀDBvV ]e: D`EVԀDV ]i: D`EDV<m8` P]m: ]q:]u:]y:]}:]:]:]:]:]:]:D]$a/B @$ ``/ `/ )-`] h]: $a(" @$a/! pY|^`PfD `]c^)-`L`P]: ]:I D`Ԁ]ԖL`]:]: D`]L`]:]: D`]L`]:]: D`]:]:]:]:]:]:]:]: V ]: D`EDb V u`:P]:`:b D`D]: D` $a/! p^)-`f6 P]: D``D ]: D`` <]: D``D" ]: D`i`D `>]; D`` D]a؆DED($a /: @ $a/! p^)-`PfD] ]; D`p^`]՗DaXL`D$L`uL`L`  E!c D`Ey`D<$a/! 3@Y|$a/! / $a /! + $a /! ' $a /! # $a /!  F)-֑ ֑ ֑֑֑`] F ` ;] ;`;HOcC "4 VDDB3 VDD5 V ];% D`E2 V ]; D`E3 VDb6 VD4 VDBVDD5 V ]; D`EDVb2 VրD V ]!; D`ED6 VD Da^DED($a /: @ $a/! p^)-`PfD] ]%;% D`h^`]֓Da L`D]}; D``D]; D``/ ]; D`F` 7D ]; D`F` $ ]; D``*D  ]; D`F` " ]; D``2"  ]; D`F` D ]; D`F`  ]; D``) ]; D``,b ]; D``D4]; D``B ]; D``-D3]; D``  ]; D`F` #DB]; D``&]; D``0D ]; D`F` 8B  ]; D`F` !D ]; D``D ]; D`L`3]$ `aa)-``P]; D`]X V  `;]; D` $a/! P ` a)-` `]at9DED($a /: @ $a/! p^`PfD] ]; D`P^)-`]ؔDa$L`DL`$L`VѯV $a-! P`H ``/ `/  `?  a a)- D`DaD`;P];,` ;`;`®"];  D`0]; D`]; D`b D``D]< D` $a/! pݒ^)-`ff DP]<  D``"] < D`` D] < D`` D]< D``D]< D``]< D``]< D`` ]!< D``D `]%< D`` DS ])< D``B]-< D``]Vq.V ]1<$`5<)  ]9< D`E ]=< D`E D`PE$L` .E !c $a-! P`< ``/ `/ `?  a)-` `A<]E< D` $a/! P9 ` a)-` `] D`E`P DP$a/! @Y|$a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/!  $a/! { $a/! w $a/! s $a/! o $a/! k $a/! g $a/! c -)-)%!)-  )-`t`- ]I<(`M< ]Q<A D`E ]U< D`E]Y<` ]]< D`E )ff D  $a- ``^)-`fD" `  `D ` D]a<`e<A"  D`E`Db  ifD `  `D ` D]a<`e<A yE`  ifDB `  `D ` D]a<`e<AB yE`D"  ifD `  `D ` D]a<`e<A yE`  ifDb `  `D ` D]a<`e<Ab yE`DB  ifD `  `D ` D]a<`e<A yE`D  ifD" `  `D ` D]a<`e<A" yE` D ifD `  `D ` D]a<`e<A yE`  ifD `  `D ` D]a<`e<A yE` b  ifD `  `D ` D]a<`e<A yE` D  ifDb `  `D ` D]a<`e<Ab yE`   ifD" `  `D ` D]a<`e<A" yE`D] D`EB]  B "    b B " BQ b   _   b B    " B D] ]i<0` m<HOcC  V ]q<  D`E V ]u< D`E V ]y< D`Eb V ]}< D`E V ]< D`EDB V ]< D`ED V ]< D`ED V ]< D`E V ]< D`Eb8V ]< D`EDVP$a/! G Y|$a/! C $a/! ? $a/! ; $a/! 7 $a/! 3 $a/! / $a /! + $a /! ' $a /! # $a /!  $a /!  $a/!  $a/!  )-)-$a/! K Y|)-$a/! O $a/! S $a/! W $a/! [ ] $a-! Py-`< ``/ `/ `?  a)-` `<]<  D` $a/! ?P2 ` ab a ab a  a  a(B a0 a8 a@ aHB aP aX a`b8ah ap)V``H` ifDB `  `D ` D]<`< B  D`E ifD `  `D ` D]<`<  E ifD" `  `D ` D]<`< " E ifD `  `D ` D]<`<  E ifD `  `D ` D]<`<  E ifD" `  `D ` D]<`< " E ifDb `  `D ` D]<`< b E ifD `  `D ` D]<`<  E ifD `  `D ` D]<`<  E ifD" `  `D ` D]<`< " E ifDb `  `D ` D]<`< b E ifD `  `D ` D]<`<  E ifD" `  `D ` D]<`< " E ]< D`ED] ]< D`E= ]< D`E ]< D`E ]< D`E1 ]< D`EmaUIy%ۆD» Vb V܀DB VB VB V܂D V V܀DaVM݀D=D".V=݀D !݈Da DED($a /: @ $a/! p^)-`PfD] ]<) D`H^`]ݐDaL`DL`5!L`V h]< $a(" @$a/! pY|^)-`PfD `]c^`V h]< $a(" @$a/! pY|^)-`PfD `]c^`V h]< $a(" @$a/! pY|^)-`PfD `]c^`V h]< $a(" @$a/! pY|^)-`PfD `]c^`iL` aE-!cii D`E- L`-/-E !ch ]<  D`E ]= D`E ]= D`E] =` ] = D`E ]= D`E )ff D %`Db =`  `D" 1` U`DB a`D y` D` m` b ` D `  I`D] D`E=1maUIy%`Db, ,P] !O]=`=HOc#{V ]=} D`EB{)zID VP] P `!=]%=`)=HTOc{V ]-= D`EDV P`1=P]5=`9=$`==H4Oc VނDa3DED($a /: @ $a/! p^)-`] ]A=^`]ޕDaDa/DED($a /: @^)-`]DahL`]E!c00Eސc6666" D`D]M= D` $a/! PY|` ` a B|a }azaB{a ]a(BLa0)-`$`P]Q= D`]U= D`]Y= D`]]= D`]a= D`]e= D`]DB}VaSiDED($a /: @ $a/! p^)-`PfD] ]i= D`u^`]ߑDa$L`DL`q$L`V]OVVL`=OE !c  D` $a/! PmO$ ` aƒa)-``P]m= D`]ހDB|UB}Vy}=D|V ]q=$`u=H4Oc D|߀DawiDED($a /: @ $a/! p^)-`PfD] ]y= D`^`]ߗDaL`D L`$L`]ٿV L`HOc@D*VD0VB2V"+V-VB3V-V5VbD,VB.VDb2VD4VDb1VD.Vb"4VB/VDB9VDB7VDB6VD0V3V6V"7VD"+V",VB5 0V8VD/V"1VbDB8VBDas۱GDED($a /: @ $a/! p^)-`PfD] ]}=`= D``^)-`]DaL`DL`u%y9)1M=U}eIA!-iQE 5am]qY]E!c  E c  b` D`EDa BNDED($a /: @ $a/! p^)-`PfD] ]=} D`5^`]Da(L`DL`L`-V5OI)Uu%y9)1M=U}eIA!-iQE 5am]qY=(L`5=OE !c  ]=} D`E D`$a/! pmO^)-`!f78 } P]=} D`F`@O`%HO`4DFqP`0  ]= D`]= D`` D ]= D`F`"EuO`-D y`b } P]=} D`F`" ]= D`F`B ]= D`F`HO`3A P`'D ]= D`F` D" ]= D`F`DB ]= D`F` ]= D`F`GO`2D"D1P`+"FP`/JO`6 } P]=} D`F`D"< ]= D`]= D`` D; ]= D`]= D``D ]= D`F`ƒ $ a- @< ``/ `/ `;  a)8`` ]=} D`ED]= D`E`= } P]= D`]= D`` "C)P`)D"; ]= D`]= D`` ]= D`F`D ]= D`F`D< ]= D`]= D``D= ]= D`]= D``D ]> D`F`"GO`1"?yP`"b ]> D`F` ] > D`F` ] > D`F`D: ]> D`]> D``>iP`!AO`&DB ]>} D`E`( D } P]> D`F`DEO`.IO`5JO`7D ]!> D`F` B ]%> D`F`?IP`#D ])> D`F` DDO`," ]->} D`F` CO`*D@QP`$]cM-YA`CDI` ¨`YD 97]0]1>`5>HOc#VDb~V]9> D`DVIV0]=> D`"-V]A> D`"'V]E> D`DaT/dDED($a /: @ $a/! p^)-`PfD] ]I> D`8^`]-㗀DaL`D L`L`i L` I E!c D` `GB{"]fD` D ` D]M> D`-`| `D`,D"`B$a/! @Y|$a/! $a/!  0 `Bq aB ab a)-ai㕖]㐕`]`? ]Q>`U>HTOcVmD Vqb V ]Y>u D`EBq V`?aqDED($a /: @ $a/! p^)-`PfD] ]]>u D`^`]㒀Da L`DL`L`i V h]a> $a(" @$a/! pY|^)-`PfD `]c^`V fDe>` `D ` D]`" h]i> $a(" @$a/! pY|^)-`PfD `]c^`EL` I Ey!c D`E`%D I`!] ]m>`q>H4Oc V" V ! `u>]y>  D` $a/! PY|! ` a)-` `]D)V axIYDED($a /: @ $a/! p^`PfD] ]}>  D`HA^)-`]Q䔀Da L`DL`= L` L` E!c D`E!`* `@$$a  /! @Y|$a /!  $a /!  $a /!  $a /! $a /!  T `Bb a"a" aaa aB ()-䐑}䓐y䓐u䓐q䓐`]aB!``70e] ]>,` >HOc# V VVP]> D`b V ]> D`E V ]> D`E V ]>`>H4Oc Da>9:cDED($a /: @ $a/! p^)-`PfD] ]> D`^`]䓀DaL`D L` L`VP]>  L` E!c D`Eb V ]> D`ED V ]> `>H4Oc ) V ]>1 D`EDazDED($a /: @ $a/! p^)-`PfD] ]>1 D`I^`]Y吀DaL`DL`)=$L`i E91V>VP]> V fD>` `D ` D]-`" h]> $a(" @$a/! pY|^)-`PfD `]c^`DEL` H4Oc BV`qDV ]>`> ]> D`E D`EaKMzDED($a /: @ $a/! p^)-`PfD] ]> D`p^`]唀DaL`DL`q L`i  L`I E!cH4Oc V$a/! @Y|$a/! $a/! $a/! $a/! $a/! $a/! %#)-攕攕 攕 攕攕%#)-``'E ]>9 D`EQ-:QQ9: ]>9 D`E ]> D`EQP]>I D` ]> D`E ]> D`E ]> D`EQR RRR!RP]>I D`)R1R9RAR]> D` ]>9 D`E ]? D`E ]? D`E ] ? D`EIRQRD]EKQ}5D19"31awx#}DED($a /: @ $a/! p^)-`PfD] ] ?`? D`H^)-`]DaL`D L`] L`E!crrE5c` ]?1 D`E ]? D`E D`ED D =Das_uDED($a /: @ $a/! p^)-`PfD] ]? D`(^`]斀DaL`D L`XL`E91VP]!? V fD%?` `D ` D] `" h])? $a(" @$a/! pY|^)-`PfD  `]c^`IEV h]-? $a(" @$a/! pY|^)-`PfD %`]c^`V fD1?` `D ` D] `" h]5? $a(" @$a/! pY|^)-`PfD I`]c^`IEٛV fD9?` `D ` D]-`" h]=? $a(" @$a/! pY|^)-`PfD m`]c^`DEq)=,L`   5E!c5]P]A? ] ]E? D`E]I? D` ]M? D`E ]Q? D`E D`E!-A`&Db}`D $a-! #P`l ``/ `/  `?  a B- a". a. a" ` )-`$`U?P]Y?`]?`a?H4Oc V" VDa"DED($a /: @ $a/! p^)-`PfD] ]e? D`^`]疀Da0L` DL` L` L` E!c D`P]i? D`]m? D`D]q? D` $a/! PY| ` a)-` `]`D’;`=DBe6`/D~ E!f@D  ]u? D`E` D ` D  ]y? D`E`D  ]}? D`E` HD ` I`I`D  ]? D`E` D $a-! P`< ``/ `/ `?  a)-` `?]?P`? ]?i D`E%-I4$a  /! +@Y|$a  /! ' $a  /! # $a  /!  $a  /!  $a /!  $a /!  $a /!  $a /! $a /!  $a /! @ ^)-0Zb ³ $a /!   ` ³ a  a >ab`$a/! Ce `B aS aI  aB a a  a(B aw0 aW8 a@ aH aP aaXB a3` a-i aq" ax aB a߉ a a9 ab a+B a a= a{ a b ag ak a aB a" a! a! a " a_# a)"$ aY!$ a#(b% a0"& a9& aAB' aH' a/Q( aYB) a`) aUi* awq"+ a y+ ab, a- a- ag. aB/ a+/ ak0 a1 a3 a4 a5 a"6 a}b7 a8 aY9 a: a_B< a> a? a bA a[ "C ay(D a0F a-8G a@H aHJ aPJ aYL a`L aciN aWqN a%xO aKbP abQ aR a"S acT aoU aqV aAX amX aBY aBZ aQB[ asB\ a;b] a_ ab` aBa aCb ac ad a!e a')"g a0bh a8i aU@j aHl aMPm aXn aEao aip aqbq axbr aӀs au aEu av abx aby a"z az a| a[B} a"~ a" a" a€ a; a?" aKb ab a† a" a!" ae(B am1 a8‹ aq@ a5H aP a!Y" a` aai aq ax a" a” ab a a9 a" a۰" a=˜ ab a a! aB a a" aB a] a a a3B a a ¢ a7(b a0 a9 a)@" aI¥ aGQb asX aa a1h¨ aOqb ax aS aوb aA aB a  a aB a7° ab a a  a ab au" aµ a% a" a a aB aO  a( aQ0" a9 aG@ ayIB aiQ aX a}aB ai ap aeyb aob a" a a#B a/ a  aű a" a a{ aI aB aC a a1b a" a a]  ab a" a " a(" au1 a8 a?Ab aiH" aP a'X a5a ahb ap" aMy a a` a B a( a0 a8" `@$a-! P`<``/ `/ `?  a)-` `H$a-! P`< ``/ `/ `?  a)-`$a /! Y|蔕$a /!  葔$a /!  葔" $a /!   ` " a  aMa a a Ma(Ba 0Ba8 `@aH)-$a /! Y|萑$a /!  蕐$a /!  蕐b q $a /!  )-$a /! Y|$a /!   ` b ab a bIab a a  a(BNa0 a8BQa @RaH)-蓔蓔蓔蓔蓔})-y蔕u蔕`]GHJ"K"LBMN"PQS`  D` $a/! pa^`Pf 1 P]?i D`` DBS  ]? D`"2`  `]`  ]? D`E` B  ]? D`E`b  ]? D`E`Db  ]? D`E`Db 1`DbN ]? D`E` Du1`D  ]? D`E`  A`D `   ]? D`E`Db A`  ]? D`E` D]? D`E` D% 8$a/! /@Y|$a /! + $a /! ' $a /! # G)-e闐a闐]闐`] ]? D`E ]? D`E ]?`?u]8La ?i?a]8La ?i?a D`E ]? D`E ]? D`E  ]? D`E G`?P]?`? D`D]? D` $a/! p^)-`ff D  } P]? D`F` D]? D`` Db ]? D`` Db ]@ D``D ]@ D``•  ] @ D`BM`] @ D`` b]@ D``']@ D``D;]@ D`` B']@ D``D `D]`:D<$a/! 3@Y|$a/! / $a /! + $a /! ' $a /! # $a /!  G)-EꐑAꐑ=ꐑ9ꐑ5ꐑ`] ]!@|`%@HOcC a V ])@U D`EB`VQ V ]-@ D`ED V ]1@ D`EDB VDbV G`5@P]9@`=@]A@ D` D`D]E@ D` $a/! PY|H ` a aa-aBa )-``P]I@ D`]M@ D`]Q@ D`]U@ D`]DBVVMD V ]Y@U D`E"] V ]]@ D`EDV ]a@ D`ED-V ]e@ D`EV ]i@ D`EDau`!DED($a /: @ $a/! p^)-`PfD] ]m@U D`P%^`]5뒀Da4L` D/! $aB=/! $aB/! $aL=/! $aL L`  E !c ]F D`Ea ]F D`E D`EB V ]F  D`ED" M b U V" = ) V ]F D`E" ɚ" D‡ ID D V ]F  D`ED m  Db "   I D¥V ]F`FHOc#V#] ]Fq D`Em ]F D` $a/! p$a/! p^)-`!f@D"  } P]F`$F% - y    ]FE ]F ]FE ]FE ]FE ]FE ]FE ]FE ]FE ]FE ]FE ]FE ]GE ]GE ] GE ] GE ]GE ]GED ]GE D`F`  } P]G D`F` V ]L D`EDa  DED($a /: @ $a/! p^)-`PfD] ]L D`(?^`]DaL`% DDTL`*:F.z ."L`,i %V%VIVmVVVVmVAVVEVVVլ5MVVV fDL` `D ` D] `" h]L $a(" @$a/! pY|^)-`PfD R`]c^`IEV fDL` `D ` D] `" h]L $a(" @$a/! pY|^)-`PfD v`]c^`IEV fDL` `D ` D] `" h]L $a(" @$a/! pY|^)-`PfD `]c^`IEV fDL` `D ` D] `" h]L $a(" @$a/! pY|^)-`PfD `]c^`&EV fDL` `D ` D] `" h]L $a(" @$a/! pY|^)-`PfD `]c^`a'EV fDL` `D ` D] `" h]L $a(" @$a/! pY|^)-`PfD `]c^`a'EV fDL` `D ` D] `" h]L $a(" @$a/! pY|^)-`PfD *`]c^`a'EV fDL` `D ` D] `" h]L $a(" @$a/! pY|^)-`PfD N`]c^`a'EV fDL` `D ` D] `" h]L $a(" @$a/! pY|^)-`PfD r`]c^`IEV ]L@`LHOc#V($a  /! @Y|$a  /!  $a /!  $a /!  $a /!  $a /! $a /!  ` `"`>a³ a aa  a(|a 0)-)-`] `LP]L `L|"||{ D`D]L D` $a/! 'Px `  apabsa sabta ua(ua 0bva8bwa@)-`,` P]L D`]L D`]L D`]L D`]L D`]M D`]M D`] M D`] ] M D`E ]M D`EM ]M D` $a/! p $a-! P`H ``/ `/  `?  a a)-``MP]!M`%M}0])MZ D`B} D`D]-M D`^)-`]f6DP]1M D``D;]5M D``D N`Db ]9M D``D] ]=M D`ED>V³ V*DV2® VDVM"VD V:a!ɉNDED($a /: @ $a/! p^)-`PfD] ]AM D`^`]DaXL`D(L`PL`UV ]EM`IMH4Oc V$a/! @Y| `Ba)-`]BDa2uyEDED($a /: @ $a/! p^`PfD] ]MM D`X^)-`] DaL`DL`]E!c D`EI91>DL` E !c{"|||fD ` " } P] (`]QM D`B7  ]e: E]iDP]mF`D ` D]u ]UM D`E ]YM D`EH ]]M D`E ]aM D`E D`EDL`   I HOcC DBVV ]eM`iMz  )f6  »` b"` Dµ`Db"`º`±`b"`D¶`DB`"`½` ] D`EVBDV  `mM]qM  D` $a/! PY|  ` a)-` `]DVM" V ]uM  D`EDVH$a/! ?@Y|$a/! ; $a/! 7 $a/! 3 $a/! / $a /! + $a /! ' $a /! # $a /!  $a /!  $a/!  )-      )-    `]   `yM]}M  D` $a/! PY|  ` a)-` `]:2 * DMBBD³ VD"V VBVDDVDV"V>D V:aDED($a /: @ $a/! p^)-`PfD] ]M  D`0 B ^`]R Da L`DHL`   6  * & > : 2   "  . L`L` E !c Ec~b~~"Bb"Bb„"j $a/! @ Q*f6,P]M D`` h } ]M D`D` DS  ]M D`B` DY B`  =`"k]M D`P` D] `"R a)U*`]"R H ]M D`E ]M D`E ]M D`E ]M D`E ]M D`E ]M D`E0]M D` ]M D`E ]M D`Eb ]M D`E ]M D`E ]M D`E ]M D`E ]M D`E D`E~2"&BJ``J`+D`S; L$a/! C@Y|$a/! ? $a/! ; $a/! 7 $a/! 3 $a/! / $a /! + $a /! ' $a /! # $a /!  $a /!  $a/!  $a/!  $a/!  $a/! $a/!  $a/! @ ^)-V  `a a!a!a!"a"a a#a($a0$a8%a@.aH/a P%`X$a-! P`<``/ `/ `?  a)-`!&``$a-! P`< ``/ `/ `?  a)-`&`h$a-! P`< ``/ `/ `?  a)-`A'`p$a-! P`< ``/ `/ `?  a)-` ` xDR ^ N J F B )-> : ^ 6 2 . * )-& " ^   `] ]M`MHOcC !"V ]M  D`ED&V r  `M]M D` $a/! PY|  ` a)-` `]D.V ]M  D`ED$V ]M D`ED V]P]M D`]M D`]M D`]M D`D/V ]M D`EV D!V ]M D`E$V ]N D`ED!V ]N D`ED%V ] N D`EDa V "V ] N D`E!&V j  `N]N  D` $a/! PY|V  ` a)-` `]A'V z  `N]N  D` $a/! PY|v  ` a)-` `]D%V b  `!N]%N  D` $a/! PY|  ` a)-` `]a#V ])N  D`EaudDED($a /: @ $a/! p^)-`PfD] ]-N  D`h  ^`] Da L`DLL` r  R  B  *   F      6 L`VP]1N V h]5N$a(" @$a/! pY|^)-`PfD  `]c^`L`  E !c p0.],U]Dfppgp`4 D`E.   J  "  :    V  v  `TD) 9`AD`D{-`"`(h$a/! _@Y|$a/! [ $a/! W $a/! S $a/! O $a/! K $a/! G $a/! C $a/! ? $a/! ; $a/! 7 $a/! 3 $a/! / $a /! + $a /! ' $a /! # $a /!  $a /!  $a/!  $a/!  )-^ Z V R N J F )-B > : 6 2 . * )-& "    `] $)a- @< ``/ `/ `; M a)8``P]9N`=NHOc@D&V j `]AN~  D`D]EN D`ED$V `]IN D`D]MN D`E$V `]QN D`D]UN D`E0VV `]YN D`D]]N D`E-V ]aN D`EDb/V ]eN D`EDV `P]iN D`D]mN D`EDb#Vr 'V ]qN D`EV `]uN D`D]yN D`E'V ]}N D`E(V ]N D`E"-V ]N D`ED1Vb1b(V ]N D`Eb&V `]N D`D]N D`ED"'V `]N D`D]N D`EB%V `]N D`D]N D`EDVf D$V j `]N~  D`D]N D`EDbVY;D%V `P]N D`D]N D`E&V `]N D`D]N D`EammDED($a /: @ $a/! p^)-`PfD] ]N~  D`H^`]"DaL`DhL` ."j F  nR^ z  8L` i V $a-! P`< ``/ `/ `?  a)-` `N]N D` $a/! P9F ` a)-` `]V h]N $a(" @$a/! pY|^)-`PfD f`]c^`VP]N V]NV h]N$a(" @$a/! pY|^)-`PfD `]c^`U;aV ]N D`E(L`  - = Ia E !c: ]N~  D`E ]N D`E D`D]N D`E2& J  rVb ~   Y;b1`;`I~`b{ $a- @$a-  T ``/ `/ `; baœaa )8`` ]N(`NHOc# VV ]N D`EDV ]N D`E V ]N D`EDBV ]N D`EDb V ]O D`EV($a  /! @Y|$a  /!  $a /!  $a /!  $a /!  $a /! $a /!  ` `a!a 3aa a a(`0m)-FNB>:62)-`]P]O D`] O D`] O D`]O D`]O D`]O D`m]]O D`]!O D`]%O D`])O D` V ]-O D`EV ]1O D`EDb{VaKDED($a /: @ $a/! p^)-`PfD] ]5O D` ^`]DaTL`D0L` ". L` L` E!c ]9O D`E $a-! P`H ``/ `/  `?  a a)-``=OP]AO`EOb D`XD]IO D` $a/! 7PY| `  a`+ } P]MO D`F`+ ]QO D`F"a`+  ]UO D`Fabaœa b{a(b a 0 a8a@aH)-`0` ]YO D`]]O D`]aO D`]eO D`]iO D`]mO D`]qO D`]uO D`]yO D`] ]}O D`E ]O D`E ]O D`E D`E ]O D`E ]O D`E]O D`E`LDb+ `BB7  `O D!] ]O`OH4Oc VVI]DVDaQDED($a /: @ $a/! p^)-`PfD] ]O D`^`]DaL`DL` L` L`9 E!c D`E`6 D‡`) $a-! P`< ``/ `/ `?  a)-` `O]O`OH4Oc V"DaGlDED($a /: @ $a/! p^)-`PfD] ]O* D`h:^`]JDa\L` D L`6L`i L`I 9E.!c D` $a/! pY|"^)-`ff DP]O* D`` DBS  ]O D`"2`D $$a  - @f0 ``/ a `; )-`]O* D`EB"`DP]O D`` Db]O D``D8]O D`` D"9]O D`` !]O D``]O D``""]O D`` "`"4]O D``D8]O D`` D]`3DH$a/! ?@Y|$a/! ; $a/! 7 $a/! 3 $a/! / $a /! + $a /! ' $a /! # $a /!  $a /!  $a/!  )-)-`]  `O]O`!OHOcC V ]O D`EbVVBDUVD"TV"VVBiV ]O D`EDV oVP]O D`bV ]O D`EV"VDiV `OG` D]P`P D` $a/! p $a/! p^)-`f6 Y `DB ] P` P D`Bj`  ]P D`j`DP]P D``BS  ]P D`"2` ]P D`k` ]!P D`` `]%P D`` ])P D`Bl`D]r^)-`ff k]-Pz D``bl]1P D``Db]5P D``Dl]9P D`` ]=P D``DBn]AP D`` Dl]EP D`` DB ]IP D``B]MP D`` Dk]QP D``D`Dbm]UP D`` ]eV ]YP D`EDbQVBDXVbDVac=RDED($a /: @ $a/! p^)-`PfD] ]]P D`1N^`]^DatL` DHL`JJjNfn"Z>62B.:F6DL`V!EV5Y]VBS IV )PfDG`D](L` E !c B b"Bb ]aP D`E ]eP D`E $a-! P`< ``/ `/ `?  a)-` `iP]mP D` $a/! P $a/! p^`ff žP]qP`uP D``  } ]yP D`D` ]}P D`D`B ]P D`]P D``œ]P D`` B ]P D`D`b ]P D`D`B ]P D`D`  ]P D`D` ›]P D``BS  ]P D`"2` D]P D``Ÿ ]P D`D`DB ]P D`D` D ]P D`D`Y "` ` P]P D`D`D } ]P D`D`D] `a)-` `]F ]P D`E $a-! P`< ``/ `/ `?  a)-` `P]P D` $a/! PY|0 ` aaaBa)-``P]P D`]P D`] ]P D`E ]P D`E ]P D`E ]P D`E ]P D`E ]P D`E D` $a/! p^)-`fDY `  ` } P]P D`D`D]Rr&^BBbB":`.DB`DDb!!] ]P\`P E Y ] a e m q }  ]P& D`EP]P D` D`E ]P$`Q  D`E`H!] ]Q` QH4Oc VJ[ VNDBV ] QR D`Ea+#DED($a /: @ $a/! p^)-`PfD] ]QR D`r^`]DaL`DL`^bfL`EuL`EV!cP]QR D` ]Q D`E D`Ej`2 D‘4$a  /! +@Y|$a  /! ' $a  /! # $a  /!  $a  /!  )-`]BS   ]Q D`E`9N`F TD> $a,,/! @Y|$a,+/! $a,*/! $a,)/! $a,(/! $a,'/! $a,&/! $a,%/! $a,$/! $a,#/! $a,"/!  $a,!/! { $a, /! w $a,/! s $a,/! o $a,/! k $a,/! g $a,/! c $a,/! _ $a,/! [ )- )-)-`] $a-! P`< ``/ `/ `?  a)-` `!Q]%Q`)QHOc*@DaHV ]-Q8` 1QHOc@DaHBaJV ]5QJ D`EDMV ]9Q D`ED"V ]=Q D`EDAMV $a- @< ``/ `/ `; bza)-`` ~`D]AQJ D`$a/! p^`f6  ]EQ D`E` ]IQ D`E`D] ]MQ D`E` ]QQ D`E`D ]UQ D`E`D `b ]YQ D`E`D  ]]Q D`E`]cD]aQ D`$a/! p^)-`PfD`]cIV ]eQJ D`EDAKV ~`D]iQ D`$a/! p^)-`PfD `]cPV ~`D]mQJ D`$a/! p^)-`PfD `]cDV ]qQJ D`EDJV ~`D]uQ D`$a/! p^)-`PfD B`]cQV ]yQJ D`EaGV ]}Q D`EDNV ]Q D`E" VT$a/!-?@Y|$a/! ? $a/! ; $a/! 7 $a/! 3 $a/! / $a /! + $a /! ' $a /! # )-)-Zb  `baV‡aVBaVˆaV"aV aV("aV0aV8"aV @ aH a P aX a` ah ap`]LL`b‡BEhˆ"""DDAOV ~`D]QJ D`$a/! p^)-`PfD `]cHV ]QJ D`EDPV ]Q D`ERV ~`D]Q D`$a/! p^)-`PfD `]cKV ]QJ D`EDOV ]Q D`EDNV ]Q D`ERV ]Q D`EaIV ]Q D`ENV ~`D]Q D`$a/! p^)-`PfD F`]cGV ]QJ D`EDALV ]Q D`EaRV ]Q D`EDLV ]Q D`EDQV ]Q D`EapDED($a /: @ $a/! p^)-`PfD] ]QJ D`^`]Da$L`D|L`>zB~f^B6Vnjbr2Zv*,L` i qA91e VAV$ann/! AY|$anm/!  $anl/!  $ank/!  $anj/!  $ani/!  $anh/!  $ang/!  $anf/!  )-)-`]  @Q@    (L`I HOc&@DBV`DV`DV`DˆV`D"V`DV` "V`V`"V`V`BV`V`V`B0V`V`DV`’V`D1V`D‡V`BV`DV`DbV`D"V`BV`BV`D"V`"V`/V`´V $a-! P`H ``/ `/  `?  a a)-``QP]Q `Q`Q 0M],U]Df g`4 ]Q D`P]Q D` D`XD]Q D` $a/! PY|z` ` aaaba  a a(a0)-`$`P]Q D`]Q D`]Q D`]Q D`]Q D`]Q D`]V`D0V`bV`V`D"V`DV`D1V`DbV`DV`Dad0$$a/!5PF `''Y a `3IB`3Cb`3E"`3%"`3) ’`3b b`3/" B`3 `3 "`3?b B0`35" `39 `3+ `3=b B`3" `3' 1`3 ˆ`37b `3G" `33 B`3  "`31b b`3" "`3K B`3 `3-b `3" b`3M "`3 `3b ‡`3 " "`3A `3 0`3b /`3;" 1`3 "`3# ´`3!b )- cD=_ `}HdDED($a /: @ $a/! p^)-`PfD] ]Q D`0 *^`]:Da2:&B "JVRZ.N b*Fjfn$L`VP]R V]RV] RV] RV]RV]RV fDR` `D ` D]R`" h]!R $a(" @$a/! pY|^)-`PfD `]c^` D`E L` E!c= E c%R ])RJ D`E ]-R D`E ]1R D`E ]5R D`E ]9R D`E ]=R D`E D`EaJVDR*D!VV ]AR$`ERHOc#DaYV $a-! P`H ``/ `/  `?  a a)-``IRP]MR`QRB D`XD]UR D` $a/! P ` a)-` `]XV $a-! P`H``/ `/  `?  a a)-``YRP]]R`aR D`XD]eRB D` $a/! P6 ` a)-` `]UV ]iR D`ESV ]mR D`EUV ]qR D`E!VVV ]uR D`EaTV ]yR D`EDa`*yDED($a /: @ $a/! p^)-`PfD] ]}R D`H^`]Da$L`D(L`*j^v@L`i 5qVP]R V fDR` `D ` D] `" h]R $a(" @$a/! pY|^)-`PfD `]c^`&EVP]R V]RV h]R$a(" @$a/! pY|^)-`PfD `]c^`V fDR` `D ` D]-`" h]R $a(" @$a/! pY|^)-`PfD &`]c^`DEVP]R V h]R$a(" @$a/! pY|^)-`PfD F`]c^`VP]R  L` =  I E !cn ]"R P]R D` ]R D`E ]R D`E D`EMb"nDAMzIYV $a-! P`< ``/ `/ `?  a)-` `R]R6 D` $a/! PY| ` a)-` `]XV.DVaYV $a-! P`< ``/ `/ `?  a)-` `R]R6 D` $a/! PY| ` a)-` `]XV $a-! P`< ``/ `/ `?  a)-` `R]R6 D` $a/! PY| ` a)-` `]U^DJ>AKaTaGfDPDNr" ~D2DAOHSjUvRKPDODNV"aI6NBG^DALjaXV $a-! P`< ``/ `/ `?  a)-` `R]R6 D` $a/! PY| ` a)-` `]QZaRvDbDLDQawDED($a /: @ $a/! p^)-`PfD] ]R6 D`.^`]>Da L`D L`L`%>zBj^v~f^B6Vnjbr2Zv*L` = NE !c D` $a/! PY|. ` a)-` `]BFjbF:Znbzr nfv6"^z.`XD$a22/! @Y|$a21/! $a20/! $a2//! $a2./! $a2-/! $a2,/! $a2+/! $a2*/! $a2)/! $a2(/! $a2'/! $a2&/! $a2%/! $a2$/! $a2#/! $a2"/!  $a2!/! { $a2 /! w $a2/! s )-)-)-~zvrn`]b@  $1a- @< ``/ `/ `;  a)-``a]R`D]RA D`E ]R D`E ]R D`E ]R D`E ]R D`E ]R D`E ]R D`E ]R D`E ]S D`E ]S D`E ] S D`E ] S D`E ]S D`E ]S D`E ]S D`E $a-! Py-`< ``/ `/ `?  a)-` `S]!SA D` $a/! ?P2R ` ab a ab a  a  a(B a0 a8 a@ aHB aP aX a`b8ah ap)e2`H`m} ifD" `  `D ` D]a<`e<A" yE ]%S D`ED] ])S D`E=-5B]  B "    b B " BQ b   _   b B    " B `D; 0] `-SP]1S`5SHOc# V*V ]9S D`EA-V ]=S D`EA/V ]AS D`E)V ]ES D`EDA,V ]IS D`ED-V ]MS D`E}V.V ]QS D`E!)V ]US D`EDaqr@ZDED($a /: @ $a/! p^)-`PfD] ]YS D` ^`] Da0L` D0L`  L`V h]]S $a(" @$a/! pY|^)-`PfD : `]c^`L`  E!c D`8D]aS D` $a/! PY|H ` a!)a)a*a+a )-``P]eS D`]iS D`]mS D`]qS D`] `U. (] u( `uS]yS`}SHTOcV D? Va]S`*V ]S  D`EV D"V Daى DED($a /: @ $a/! p^)-`PfD] ]S  D`  ^`] Da L`DL`      L` L` E !c D` $a/! PY|  ` a)-` `]  `EDzI`B;`<D`D Y]S`SH4Oc V!Da'< $DED($a /: @ $a/! p^)-`PfD] ]S! D`!^`]&!Da8L` D L`!L`yVL`E !c D`$a/! p^)-`PfD }  ]S`S! D`E ]S`S D`E`B  ]S`SBb!E ]S`SBn!E` !`]c`4Db$a/! BY|$a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  #)-!!!!!!#)-!!!!!!#)-!!!!!!#)-!`@  @ def g hi jkl$m!no*pqrs&tuvwx'y z{|}(~) "''''&'('3'4'5'6'7'8'9':';'<'='>'?'@'A'B'C'D'E'F'G'H'I'J'K'L'M'N'O'P'Q'R'S'T'U'V'W'k'l'm'u'v'w'x'y'z'{'|'}'~'''  D]c`-`#DI;`>] ]S D`E ]S D`E]LeD )PfD]`FH ]S D`E ]S D`E ]S D`E ]S D`E]LeD ]S D`E ]S D`E ]S D`E ]S D`E ]S D`E$aE `F^)aI]D=!]P]S D`]S D` I]4Uc DDDDDDDD]``/u]8La X iX a]8La Y iY a]8La "] i"] a ]S D`E ]S D`E ]S D`E ]S D`E ]S D`E ]S D`E ]S D`E ]S D`E]8La  i a ]S D`E ]T D`E ]T D`E ] T D`E D`] T D`H D`E)DWŒ`Hh $a-! #P`l ``/ `/  `?  a"ia^ ia^Ba^ja^ )- D`DaD$`TcD]T D` $a/! p#^`ff ! } P]T D`D`" ]T D`D` Di ]!T D`D` Db]%T D``j ])T D`D` D ]q`&q1DH]ur#`C P]-T D```D"i ]1T D`D` bE ]5T D`ba`b } P]q`&qYDH]u#` ]q`&DH]u#`D ]9T D`D`]=T D``S  ]AT D`B` } P]ET D`D`DB ]IT D`D` D"b ]q`&qBvDH]u#` #`b ]MT D`]QT D``Y Œ` D } P]UT D`D`])W`Aw  ]YT D`EFDW`HiiWq`@~ $a-! #P`l ``/ `/  `?  a a "ia^ia^ ja^ )-`$`]TP]aT(`eTKKbKJIBJ D`HbD]iTF$ D` $a/! p:$^)-`ff D" } P]mTF$ D`F` Di ]qT D`F` "r ]uT D`F` Dj ]yT D`F` D"b ]q`&qBvDH]u$` ]q`&1DH]u$`D"i } P]}TF$ D`F` Db ]q`&qYDH]u$`D]T D``DS  ]T D`B`D :$`D"L P]TF$ D`b`D } P]T D`F` ])D]Y`D`D]T% ]T& 5}y5 Y}.|%Y$a 1 u@^)-`$a 1 y@}}^`$a 1 }@y^`$a 1 @M5^`$a 1 @^)-`$a 1 @Y Y^`$a 1 @}^`$a 1 @..^`$a 1 @||^)-`$a 1 @QY^`$a 1 @5Y%Y^`$a/! @Y|< `aaaa)-`DUP]T L`ED$a/D @$a/! P< ` aia! aY a)-`]P]T( ]T)]T*"$F^`0$a /; @F^`P]T` ]T_ (]Tf$a/! @$a/! _PY|! ` abaa a"a a*("a0a,8"a"@aH"aPaX"a`ahBa(pa x"aa&abaa Ba$1 a)- DcD\`P]Tj ]Tk]Tl]Tm]Tn]To]Tp]Tq]Tr]Ts]Tt]Tu]Tv]Tw]Tx]Ty]Tz]T{]T|D]^%]Ug]Uh] Ui^` (] UU$a/F @$a/! PY| ` a)- D`DaD]%D^`$a/! @Y|< `aaaa)-` 4DD`$a/! @F0 `aba`$a/! @ $a/! PY|^)- D`DaD]D ] UU %^``]P]U]U $a/! `@& &- `  dL`1"BbIB "bBdLwa a"a aa a"(Ba0a8ba @aHa(Pa,Xa`ahBa$paxa"a*aa.baaBa&Y a)-`h`!IU 5Y]aeimq]D$a/A9@ Y| ] U!U $a/A @ :&0 `a]a `+ )-`0`aa`+` L`P]%U ])U]-U $a- #@`l ``/ `/ `? a`? `? a aBa )-``P]1U ]5U]9U]=U$a/m @$a/! PY|$ ` `$a- @ `H``/ `/ `? a`? `?  )-`Y a`]b&AUD^`j&n&r& &]EU $a(((Pk @$a/! PY|0 ` aY a`# } P]IU F)-`]&MUD^`& &]QU$a /o @$a/! PY|T ` aY a`#  } P]UU Faaa )-``]YUD]&]UP]aU ]eU^`&&&& &]iU$a/l @$a/! PY|< ` aY aaI`# } P]mU F)-`]&qU]uUD^`&& &]yU $a /j @$a/! PY|< ` aY am a`# } P]}U ]U)-`]&U]UD^`' '' &]U $a/p @$a/! PY|$ ` aY a)-`]'UD^` &]U $a/i @$a/! PY|< ` aY aba")a)-`].'UP]U ]U$ `% a) a)-`B'F'| h]U $a(" @ $a( P| ` `)-``N'D]^` R'] |]P]U ]U]U]U]U h]U$a(" @$a/! pY|^)-`PfD '`]c^`P]U  h]U$a(" @$a/! pY|^)-`PfD '`]c^`P]U ]U h]U$a(" @$a/! pY|^)-`PfD '`]c^` h]U $a(" @$a/! pY|^)-`PfD '`]c^` h]U $a(" @$a/! pY|^)-`PfD '`]c^` h]U $a(" @$a/! pY|^)-`PfD '`]c^`P]U ]U h]U$a(" @$a/! pY|^)-`PfD (`]c^` h]U $a(" @$a/! pY|^)-`PfD "(`]c^` h]U $a(" @$a/! pY|^)-`PfD 6(`]c^` h]U $a(" @$a/! pY|^)-`PfD J(`]c^` h]U $a(" @$a/! pY|^)-`PfD ^(`]c^` h]U $a(" @$a/! pY|^)-`PfD r(`]c^`P]V  h]V$a(" @$a/! pY|^)-`PfD (`]c^` h] V $a(" @$a/! pY|^)-`PfD (`]c^` h] V $a(" @$a/! pY|^)-`PfD (`]c^` h]V $a(" @$a/! pY|^)-`PfD (`]c^`P]V ]V h]V$a(" @$a/! pY|^)-`PfD (`]c^`P]!V  h]%V$a(" @$a/! pY|^)-`PfD (`]c^` h])V $a(" @$a/! pY|^)-`PfD )`]c^` h]-V $a(" @$a/! pY|^)-`PfD ")`]c^` h]1V $a(" @$a/! pY|^)-`PfD 6)`]c^` h]5V $a(" @$a/! pY|^)-`PfD J)`]c^` h]9V $a(" @$a/! pY|^)-`PfD ^)`]c^` h]=V $a(" @$a/! pY|^)-`PfD r)`]c^` h]AV $a(" @$a/! pY|^)-`PfD )`]c^` h]EV $a(" @$a/! pY|^)-`PfD )`]c^` h]IV $a(" @$a/! pY|^)-`PfD )`]c^` h]MV $a(" @$a/! pY|^)-`PfD )`]c^`P]QV  h]UV$a(" @$a/! pY|^)-`PfD )`]c^`P]YV  h]]V$a(" @$a/! pY|^)-`PfD )`]c^` h]aV $a(" @$a/! pY|^)-`PfD *`]c^` h]eV $a(" @$a/! pY|^)-`PfD *`]c^` h]iV $a(" @$a/! pY|^)-`PfD .*`]c^` h]mV $a(" @$a/! pY|^)-`PfD B*`]c^`P]qV  h]uV$a(" @$a/! pY|^)-`PfD Z*`]c^` h]yV $a(" @$a/! pY|^)-`PfD n*`]c^` h]}V $a(" @$a/! pY|^)-`PfD *`]c^` h]V $a(" @$a/! pY|^)-`PfD *`]c^`P]V  h]V$a(" @$a/! pY|^)-`PfD *`]c^` h]V $a(" @$a/! pY|^)-`PfD *`]c^`P]V ]V]V]V h]V$a(" @$a/! pY|^)-`PfD *`]c^`P]V ]V]V]V h]V$a(" @$a/! pY|^)-`PfD  +`]c^` h]V $a(" @$a/! pY|^)-`PfD +`]c^`P]V  h]V$a(" @$a/! pY|^)-`PfD 6+`]c^` h]V $a(" @$a/! pY|^)-`PfD J+`]c^` h]V $a(" @$a/! pY|^)-`PfD ^+`]c^` h]V $a(" @$a/! pY|^)-`PfD r+`]c^` h]V $a(" @$a/! pY|^)-`PfD +`]c^` h]V $a(" @$a/! pY|^)-`PfD +`]c^` h]V $a(" @$a/! pY|^)-`PfD +`]c^` h]V $a(" @$a/! pY|^)-`PfD +`]c^` h]V $a(" @$a/! pY|^)-`PfD +`]c^` h]V $a(" @$a/! pY|^)-`PfD +`]c^` h]V $a(" @$a/! pY|^)-`PfD +`]c^` h]V $a(" @$a/! pY|^)-`PfD ,`]c^` h]V $a(" @$a/! pY|^)-`PfD &,`]c^` h]V $a(" @$a/! pY|^)-`PfD :,`]c^` h]V $a(" @$a/! pY|^)-`PfD N,`]c^` h]V $a(" @$a/! pY|^)-`PfD b,`]c^` h]W $a(" @$a/! pY|^)-`PfD v,`]c^` h]W $a(" @$a/! pY|^)-`PfD ,`]c^` h] W $a(" @$a/! pY|^)-`PfD ,`]c^` h] W $a(" @$a/! pY|^)-`PfD ,`]c^` h]W $a(" @$a/! pY|^)-`PfD ,`]c^` h]W $a(" @$a/! pY|^)-`PfD ,`]c^` h]W $a(" @$a/! pY|^)-`PfD ,`]c^` h]W $a(" @$a/! pY|^)-`PfD -`]c^` h]!W $a(" @$a/! pY|^)-`PfD -`]c^` h]%W $a(" @$a/! pY|^)-`PfD *-`]c^` h])W $a(" @$a/! pY|^)-`PfD >-`]c^` h]-W $a(" @$a/! pY|^)-`PfD R-`]c^` h]1W $a(" @$a/! pY|^)-`PfD f-`]c^` h]5W $a(" @$a/! pY|^)-`PfD z-`]c^` h]9W $a(" @$a/! pY|^)-`PfD -`]c^` h]=W $a(" @$a/! pY|^)-`PfD -`]c^` h]AW $a(" @$a/! pY|^)-`PfD -`]c^` h]EW $a(" @$a/! pY|^)-`PfD -`]c^` h]IW $a(" @$a/! pY|^)-`PfD -`]c^` h]MW $a(" @$a/! pY|^)-`PfD -`]c^` h]QW $a(" @$a/! pY|^)-`PfD .`]c^` h]UW $a(" @$a/! pY|^)-`PfD .`]c^` h]YW $a(" @$a/! pY|^)-`PfD ..`]c^` h]]W $a(" @$a/! pY|^)-`PfD B.`]c^` h]aW $a(" @$a/! pY|^)-`PfD V.`]c^` h]eW $a(" @$a/! pY|^)-`PfD j.`]c^` h]iW $a(" @$a/! pY|^)-`PfD ~.`]c^` h]mW $a(" @$a/! pY|^)-`PfD .`]c^` h]qW $a(" @$a/! pY|^)-`PfD .`]c^` h]uW $a(" @$a/! pY|^)-`PfD .`]c^` h]yW $a(" @$a/! pY|^)-`PfD .`]c^` h]}W $a(" @$a/! pY|^)-`PfD .`]c^` h]W $a(" @$a/! pY|^)-`PfD .`]c^` h]W $a(" @$a/! pY|^)-`PfD  /`]c^` h]W $a(" @$a/! pY|^)-`PfD /`]c^` h]W $a(" @$a/! pY|^)-`PfD 2/`]c^` h]W $a(" @$a/! pY|^)-`PfD F/`]c^` h]W $a(" @$a/! pY|^)-`PfD Z/`]c^` h]W $a(" @$a/! pY|^)-`PfD n/`]c^` h]W $a(" @$a/! pY|^)-`PfD /`]c^` h]W $a(" @$a/! pY|^)-`PfD /`]c^` h]W $a(" @$a/! pY|^)-`PfD /`]c^` h]W $a(" @$a/! pY|^)-`PfD /`]c^` h]W $a(" @$a/! pY|^)-`PfD /`]c^` h]W $a(" @$a/! pY|^)-`PfD /`]c^` h]W $a(" @$a/! pY|^)-`PfD /`]c^` h]W $a(" @$a/! pY|^)-`PfD 0`]c^` h]W $a(" @$a/! pY|^)-`PfD "0`]c^` h]W $a(" @$a/! pY|^)-`PfD 60`]c^` h]W $a(" @$a/! pY|^)-`PfD J0`]c^` h]W $a(" @$a/! pY|^)-`PfD ^0`]c^` h]W $a(" @$a/! pY|^)-`PfD r0`]c^` h]W $a(" @$a/! pY|^)-`PfD 0`]c^` h]W $a(" @$a/! pY|^)-`PfD 0`]c^` h]W $a(" @$a/! pY|^)-`PfD 0`]c^` h]W $a(" @$a/! pY|^)-`PfD 0`]c^` h]W $a(" @$a/! pY|^)-`PfD 0`]c^` h]W $a(" @$a/! pY|^)-`PfD 0`]c^` h]W $a(" @$a/! pY|^)-`PfD 0`]c^` h]W $a(" @$a/! pY|^)-`PfD 1`]c^` h]W $a(" @$a/! pY|^)-`PfD &1`]c^` h]W $a(" @$a/! pY|^)-`PfD :1`]c^`P]W ]W h]X$a(" @$a/! pY|^)-`PfD V1`]c^` h]X $a(" @$a/! pY|^)-`PfD j1`]c^` h] X $a(" @$a/! pY|^)-`PfD ~1`]c^` h] X $a(" @$a/! pY|^)-`PfD 1`]c^` h]X $a(" @$a/! pY|^)-`PfD 1`]c^` h]X $a(" @$a/! pY|^)-`PfD 1`]c^` h]X $a(" @$a/! pY|^)-`PfD 1`]c^` h]X $a(" @$a/! pY|^)-`PfD 1`]c^` h]!X $a(" @$a/! pY|^)-`PfD 1`]c^` h]%X $a(" @$a/! pY|^)-`PfD  2`]c^` h])X $a(" @$a/! pY|^)-`PfD 2`]c^` h]-X $a(" @$a/! pY|^)-`PfD 22`]c^` h]1X $a(" @$a/! pY|^)-`PfD F2`]c^` h]5X $a(" @$a/! pY|^)-`PfD Z2`]c^` h]9X $a(" @$a/! pY|^)-`PfD n2`]c^` h]=X $a(" @$a/! pY|^)-`PfD 2`]c^` h]AX $a(" @$a/! pY|^)-`PfD 2`]c^` h]EX $a(" @$a/! pY|^)-`PfD 2`]c^` h]IX $a(" @$a/! pY|^)-`PfD 2`]c^` h]MX $a(" @$a/! pY|^)-`PfD 2`]c^` h]QX $a(" @$a/! pY|^)-`PfD 2`]c^`P]UX ]YX h]]X$a(" @$a/! pY|^)-`PfD 3`]c^` h]aX $a(" @$a/! pY|^)-`PfD 3`]c^` h]eX $a(" @$a/! pY|^)-`PfD *3`]c^`P]iX ]mX h]qX$a(" @$a/! pY|^)-`PfD F3`]c^`P]uX  h]yX$a(" @$a/! pY|^)-`PfD ^3`]c^`P]}X ]X h]X$a(" @$a/! pY|^)-`PfD z3`]c^`P]X  h]X$a(" @$a/! pY|^)-`PfD 3`]c^` h]X $a(" @$a/! pY|^)-`PfD 3`]c^` h]X $a(" @$a/! pY|^)-`PfD 3`]c^` h]X $a(" @$a/! pY|^)-`PfD 3`]c^` h]X $a(" @$a/! pY|^)-`PfD 3`]c^` h]X $a(" @$a/! pY|^)-`PfD 3`]c^` h]X $a(" @$a/! pY|^)-`PfD  4`]c^` h]X $a(" @$a/! pY|^)-`PfD 4`]c^` h]X $a(" @$a/! pY|^)-`PfD 24`]c^` h]X $a(" @$a/! pY|^)-`PfD F4`]c^` h]X $a(" @$a/! pY|^)-`PfD Z4`]c^` h]X $a(" @$a/! pY|^)-`PfD n4`]c^` h]X $a(" @$a/! pY|^)-`PfD 4`]c^` h]X $a(" @$a/! pY|^)-`PfD 4`]c^`P]X ]X]X]X]X]X]X]X]X h]X$a(" @$a/! pY|^)-`PfD 4`]c^` h]X $a(" @$a/! pY|^)-`PfD 4`]c^` h]X $a(" @$a/! pY|^)-`PfD 4`]c^` h]X $a(" @$a/! pY|^)-`PfD  5`]c^` h]X $a(" @$a/! pY|^)-`PfD 5`]c^`P]X ]Y h]Y$a(" @$a/! pY|^)-`PfD :5`]c^` h] Y $a(" @$a/! pY|^)-`PfD N5`]c^` h] Y $a(" @$a/! pY|^)-`PfD b5`]c^` h]Y $a(" @$a/! pY|^)-`PfD v5`]c^` h]Y $a(" @$a/! pY|^)-`PfD 5`]c^` h]Y $a(" @$a/! pY|^)-`PfD 5`]c^` h]Y $a(" @$a/! pY|^)-`PfD 5`]c^`P]!Y ]%Y h])Y$a(" @$a/! pY|^)-`PfD 5`]c^`P]-Y ]1Y]5Y h]9Y$a(" @$a/! pY|^)-`PfD 5`]c^` h]=Y $a(" @$a/! pY|^)-`PfD 6`]c^` h]AY $a(" @$a/! pY|^)-`PfD 6`]c^`P]EY ]IY]MY]QY]UY]YY]]Y]aY]eY]iY]mY]qY h]uY$a(" @$a/! pY|^)-`PfD Z6`]c^` h]yY $a(" @$a/! pY|^)-`PfD n6`]c^` h]}Y $a(" @$a/! pY|^)-`PfD 6`]c^` h]Y $a(" @$a/! pY|^)-`PfD 6`]c^` h]Y $a(" @$a/! pY|^)-`PfD 6`]c^` h]Y $a(" @$a/! pY|^)-`PfD 6`]c^` h]Y $a(" @$a/! pY|^)-`PfD 6`]c^` h]Y $a(" @$a/! pY|^)-`PfD 6`]c^` h]Y $a(" @$a/! pY|^)-`PfD 6`]c^` h]Y $a(" @$a/! pY|^)-`PfD 7`]c^` h]Y $a(" @$a/! pY|^)-`PfD "7`]c^` h]Y $a(" @$a/! pY|^)-`PfD 67`]c^` h]Y $a(" @$a/! pY|^)-`PfD J7`]c^` h]Y $a(" @$a/! pY|^)-`PfD ^7`]c^` h]Y $a(" @$a/! pY|^)-`PfD r7`]c^` h]Y $a(" @$a/! pY|^)-`PfD 7`]c^` h]Y $a(" @$a/! pY|^)-`PfD 7`]c^`P]Y ]Y h]Y$a(" @$a/! pY|^)-`PfD 7`]c^` h]Y $a(" @$a/! pY|^)-`PfD 7`]c^` h]Y $a(" @$a/! pY|^)-`PfD 7`]c^` h]Y $a(" @$a/! pY|^)-`PfD 7`]c^` h]Y $a(" @$a/! pY|^)-`PfD 8`]c^`P]Y ]Y]Y]Y]Y]Y]Y h]Y$a(" @$a/! pY|^)-`PfD 68`]c^` h]Y $a(" @$a/! pY|^)-`PfD J8`]c^` h]Y $a(" @$a/! pY|^)-`PfD ^8`]c^` h]Y $a(" @$a/! pY|^)-`PfD r8`]c^` h]Z $a(" @$a/! pY|^)-`PfD 8`]c^` h]Z $a(" @$a/! pY|^)-`PfD 8`]c^` h] Z $a(" @$a/! pY|^)-`PfD 8`]c^` h] Z $a(" @$a/! pY|^)-`PfD 8`]c^` h]Z $a(" @$a/! pY|^)-`PfD 8`]c^` h]Z $a(" @$a/! pY|^)-`PfD 8`]c^` h]Z $a(" @$a/! pY|^)-`PfD 8`]c^` h]Z $a(" @$a/! pY|^)-`PfD 9`]c^` h]!Z $a(" @$a/! pY|^)-`PfD &9`]c^` h]%Z $a(" @$a/! pY|^)-`PfD :9`]c^` h])Z $a(" @$a/! pY|^)-`PfD N9`]c^` h]-Z $a(" @$a/! pY|^)-`PfD b9`]c^` h]1Z $a(" @$a/! pY|^)-`PfD v9`]c^` h]5Z $a(" @$a/! pY|^)-`PfD 9`]c^` h]9Z $a(" @$a/! pY|^)-`PfD 9`]c^`P]=Z  h]AZ$a(" @$a/! pY|^)-`PfD 9`]c^` h]EZ $a(" @$a/! pY|^)-`PfD 9`]c^` h]IZ $a(" @$a/! pY|^)-`PfD 9`]c^`P]MZ  h]QZ$a(" @$a/! pY|^)-`PfD 9`]c^` h]UZ $a(" @$a/! pY|^)-`PfD  :`]c^`P]YZ  h]]Z$a(" @$a/! pY|^)-`PfD ":`]c^` h]aZ $a(" @$a/! pY|^)-`PfD 6:`]c^`P]eZ ]iZ h]mZ$a(" @$a/! pY|^)-`PfD R:`]c^` h]qZ $a(" @$a/! pY|^)-`PfD f:`]c^` h]uZ $a(" @$a/! pY|^)-`PfD z:`]c^`P]yZ  h]}Z$a(" @$a/! pY|^)-`PfD :`]c^`P]Z ]Z h]Z$a(" @$a/! pY|^)-`PfD :`]c^` h]Z $a(" @$a/! pY|^)-`PfD :`]c^`P]Z  h]Z$a(" @$a/! pY|^)-`PfD :`]c^` h]Z $a(" @$a/! pY|^)-`PfD :`]c^`P]Z  h]Z$a(" @$a/! pY|^)-`PfD ;`]c^` h]Z $a(" @$a/! pY|^)-`PfD ;`]c^` h]Z $a(" @$a/! pY|^)-`PfD .;`]c^` h]Z $a(" @$a/! pY|^)-`PfD B;`]c^`P]Z  h]Z$a(" @$a/! pY|^)-`PfD Z;`]c^` h]Z $a(" @$a/! pY|^)-`PfD n;`]c^` h]Z $a(" @$a/! pY|^)-`PfD ;`]c^`P]Z  h]Z$a(" @$a/! pY|^)-`PfD ;`]c^`P]Z  h]Z$a(" @$a/! pY|^)-`PfD ;`]c^`P]Z  h]Z$a(" @$a/! pY|^)-`PfD ;`]c^`P]Z  h]Z$a(" @$a/! pY|^)-`PfD ;`]c^` h]Z $a(" @$a/! pY|^)-`PfD ;`]c^` h]Z $a(" @$a/! pY|^)-`PfD  <`]c^` h]Z $a(" @$a/! pY|^)-`PfD <`]c^` h]Z $a(" @$a/! pY|^)-`PfD 2<`]c^`P]Z  h]Z$a(" @$a/! pY|^)-`PfD J<`]c^`P]Z  h]Z$a(" @$a/! pY|^)-`PfD b<`]c^` h][ $a(" @$a/! pY|^)-`PfD v<`]c^` h][ $a(" @$a/! pY|^)-`PfD <`]c^` h] [ $a(" @$a/! pY|^)-`PfD <`]c^` h] [ $a(" @$a/! pY|^)-`PfD <`]c^`P][  h][$a(" @$a/! pY|^)-`PfD <`]c^`P][  h][$a(" @$a/! pY|^)-`PfD <`]c^` h]![ $a(" @$a/! pY|^)-`PfD <`]c^` h]%[ $a(" @$a/! pY|^)-`PfD  =`]c^` h])[ $a(" @$a/! pY|^)-`PfD =`]c^` h]-[ $a(" @$a/! pY|^)-`PfD 2=`]c^` h]1[ $a(" @$a/! pY|^)-`PfD F=`]c^` h]5[ $a(" @$a/! pY|^)-`PfD Z=`]c^` h]9[ $a(" @$a/! pY|^)-`PfD n=`]c^` h]=[ $a(" @$a/! pY|^)-`PfD =`]c^` h]A[ $a(" @$a/! pY|^)-`PfD =`]c^` h]E[ $a(" @$a/! pY|^)-`PfD =`]c^`P]I[  h]M[$a(" @$a/! pY|^)-`PfD =`]c^`P]Q[  h]U[$a(" @$a/! pY|^)-`PfD =`]c^`P]Y[  h]][$a(" @$a/! pY|^)-`PfD =`]c^`P]a[  h]e[$a(" @$a/! pY|^)-`PfD  >`]c^`P]i[  h]m[$a(" @$a/! pY|^)-`PfD ">`]c^`P]q[  h]u[$a(" @$a/! pY|^)-`PfD :>`]c^`P]y[  h]}[$a(" @$a/! pY|^)-`PfD R>`]c^`P][  h][$a(" @$a/! pY|^)-`PfD j>`]c^`P][  h][$a(" @$a/! pY|^)-`PfD >`]c^`P][  h][$a(" @$a/! pY|^)-`PfD >`]c^`P][ ][ h][$a(" @$a/! pY|^)-`PfD >`]c^`P][ ][][][ h][$a(" @$a/! pY|^)-`PfD >`]c^`P][ ][][][ h][$a(" @$a/! pY|^)-`PfD >`]c^` h][ $a(" @$a/! pY|^)-`PfD ?`]c^`P][  h][$a(" @$a/! pY|^)-`PfD *?`]c^` h][ $a(" @$a/! pY|^)-`PfD >?`]c^` h][ $a(" @$a/! pY|^)-`PfD R?`]c^`P][  h][$a(" @$a/! pY|^)-`PfD j?`]c^` h][ $a(" @$a/! pY|^)-`PfD ~?`]c^` h][ $a(" @$a/! pY|^)-`PfD ?`]c^` h][ $a(" @$a/! pY|^)-`PfD ?`]c^` h][ $a(" @$a/! pY|^)-`PfD ?`]c^` h][ $a(" @$a/! pY|^)-`PfD ?`]c^` h][ $a(" @$a/! pY|^)-`PfD ?`]c^`P]\  h]\$a(" @$a/! pY|^)-`PfD ?`]c^`P] \  h] \$a(" @$a/! pY|^)-`PfD @`]c^` h]\ $a(" @$a/! pY|^)-`PfD &@`]c^` h]\ $a(" @$a/! pY|^)-`PfD :@`]c^` h]\ $a(" @$a/! pY|^)-`PfD N@`]c^` h]\ $a(" @$a/! pY|^)-`PfD b@`]c^` h]!\ $a(" @$a/! pY|^)-`PfD v@`]c^` h]%\ $a(" @$a/! pY|^)-`PfD @`]c^` h])\ $a(" @$a/! pY|^)-`PfD @`]c^` h]-\ $a(" @$a/! pY|^)-`PfD @`]c^` h]1\ $a(" @$a/! pY|^)-`PfD @`]c^` h]5\ $a(" @$a/! pY|^)-`PfD @`]c^` h]9\ $a(" @$a/! pY|^)-`PfD @`]c^` h]=\ $a(" @$a/! pY|^)-`PfD A`]c^` h]A\ $a(" @$a/! pY|^)-`PfD A`]c^` h]E\ $a(" @$a/! pY|^)-`PfD *A`]c^` h]I\ $a(" @$a/! pY|^)-`PfD >A`]c^` h]M\ $a(" @$a/! pY|^)-`PfD RA`]c^` h]Q\ $a(" @$a/! pY|^)-`PfD fA`]c^` h]U\ $a(" @$a/! pY|^)-`PfD zA`]c^`P]Y\  h]]\$a(" @$a/! pY|^)-`PfD A`]c^` h]a\ $a(" @$a/! pY|^)-`PfD A`]c^`P]e\  h]i\$a(" @$a/! pY|^)-`PfD A`]c^`P]m\  h]q\$a(" @$a/! pY|^)-`PfD A`]c^`P]u\ ]y\ h]}\$a(" @$a/! pY|^)-`PfD A`]c^` h]\ $a(" @$a/! pY|^)-`PfD B`]c^` h]\ $a(" @$a/! pY|^)-`PfD B`]c^` h]\ $a(" @$a/! pY|^)-`PfD .B`]c^` h]\ $a(" @$a/! pY|^)-`PfD BB`]c^` h]\ $a(" @$a/! pY|^)-`PfD VB`]c^` h]\ $a(" @$a/! pY|^)-`PfD jB`]c^` h]\ $a(" @$a/! pY|^)-`PfD ~B`]c^`P]\ ]\]\ h]\$a(" @$a/! pY|^)-`PfD B`]c^` h]\ $a(" @$a/! pY|^)-`PfD B`]c^`P]\  h]\$a(" @$a/! pY|^)-`PfD B`]c^` h]\ $a(" @$a/! pY|^)-`PfD B`]c^` h]\ $a(" @$a/! pY|^)-`PfD B`]c^` h]\ $a(" @$a/! pY|^)-`PfD C`]c^` h]\ $a(" @$a/! pY|^)-`PfD C`]c^` h]\ $a(" @$a/! pY|^)-`PfD .C`]c^`P]\ ]\]\]\ h]\$a(" @$a/! pY|^)-`PfD RC`]c^`P]\ ]\]\ h]\$a(" @$a/! pY|^)-`PfD rC`]c^` h]\ $a(" @$a/! pY|^)-`PfD C`]c^`P]\ ]\ h]\$a(" @$a/! pY|^)-`PfD C`]c^` h]] $a(" @$a/! pY|^)-`PfD C`]c^`P]] ] ]] ] h]]$a(" @$a/! pY|^)-`PfD C`]c^` h]] $a(" @$a/! pY|^)-`PfD C`]c^` h]] $a(" @$a/! pY|^)-`PfD C`]c^` h]] $a(" @$a/! pY|^)-`PfD D`]c^` h]!] $a(" @$a/! pY|^)-`PfD &D`]c^` h]%] $a(" @$a/! pY|^)-`PfD :D`]c^` h])] $a(" @$a/! pY|^)-`PfD ND`]c^` h]-] $a(" @$a/! pY|^)-`PfD bD`]c^` h]1] $a(" @$a/! pY|^)-`PfD vD`]c^` h]5] $a(" @$a/! pY|^)-`PfD D`]c^` h]9] $a(" @$a/! pY|^)-`PfD D`]c^` h]=] $a(" @$a/! pY|^)-`PfD D`]c^` h]A] $a(" @$a/! pY|^)-`PfD D`]c^` h]E] $a(" @$a/! pY|^)-`PfD D`]c^`P]I] ]M] h]Q]$a(" @$a/! pY|^)-`PfD D`]c^`P]U]  h]Y]$a(" @$a/! pY|^)-`PfD E`]c^`P]]]  h]a]$a(" @$a/! pY|^)-`PfD &E`]c^`P]e]  h]i]$a(" @$a/! pY|^)-`PfD >E`]c^` h]m] $a(" @$a/! pY|^)-`PfD RE`]c^` h]q] $a(" @$a/! pY|^)-`PfD fE`]c^` h]u] $a(" @$a/! pY|^)-`PfD zE`]c^`P]y]  h]}]$a(" @$a/! pY|^)-`PfD E`]c^`P]]  h]]$a(" @$a/! pY|^)-`PfD E`]c^` h]] $a(" @$a/! pY|^)-`PfD E`]c^` h]] $a(" @$a/! pY|^)-`PfD E`]c^` h]] $a(" @$a/! pY|^)-`PfD E`]c^`P]]  h]]$a(" @$a/! pY|^)-`PfD E`]c^`P]]  h]]$a(" @$a/! pY|^)-`PfD F`]c^` h]] $a(" @$a/! pY|^)-`PfD *F`]c^` h]] $a(" @$a/! pY|^)-`PfD >F`]c^` h]] $a(" @$a/! pY|^)-`PfD RF`]c^` h]] $a(" @$a/! pY|^)-`PfD fF`]c^` h]] $a(" @$a/! pY|^)-`PfD zF`]c^` h]] $a(" @$a/! pY|^)-`PfD F`]c^` h]] $a(" @$a/! pY|^)-`PfD F`]c^`P]] ]] h]]$a(" @$a/! pY|^)-`PfD F`]c^` h]] $a(" @$a/! pY|^)-`PfD F`]c^` h]] $a(" @$a/! pY|^)-`PfD F`]c^` h]] $a(" @$a/! pY|^)-`PfD F`]c^` h]] $a(" @$a/! pY|^)-`PfD G`]c^`P]]  h]]$a(" @$a/! pY|^)-`PfD &G`]c^` h]] $a(" @$a/! pY|^)-`PfD :G`]c^` h]] $a(" @$a/! pY|^)-`PfD NG`]c^` h]] $a(" @$a/! pY|^)-`PfD bG`]c^` h]] $a(" @$a/! pY|^)-`PfD vG`]c^` h]] $a(" @$a/! pY|^)-`PfD G`]c^` h]] $a(" @$a/! pY|^)-`PfD G`]c^` h]] $a(" @$a/! pY|^)-`PfD G`]c^` h]^ $a(" @$a/! pY|^)-`PfD G`]c^`P]^ ] ^ h] ^$a(" @$a/! pY|^)-`PfD G`]c^` h]^ $a(" @$a/! pY|^)-`PfD G`]c^` h]^ $a(" @$a/! pY|^)-`PfD  H`]c^` h]^ $a(" @$a/! pY|^)-`PfD H`]c^` h]^ $a(" @$a/! pY|^)-`PfD 2H`]c^` h]!^ $a(" @$a/! pY|^)-`PfD FH`]c^`P]%^ ])^]-^ h]1^$a(" @$a/! pY|^)-`PfD fH`]c^` h]5^ $a(" @$a/! pY|^)-`PfD zH`]c^` h]9^ $a(" @$a/! pY|^)-`PfD H`]c^` h]=^ $a(" @$a/! pY|^)-`PfD H`]c^` h]A^ $a(" @$a/! pY|^)-`PfD H`]c^` h]E^ $a(" @$a/! pY|^)-`PfD H`]c^` h]I^ $a(" @$a/! pY|^)-`PfD H`]c^` h]M^ $a(" @$a/! pY|^)-`PfD H`]c^` h]Q^ $a(" @$a/! pY|^)-`PfD I`]c^`P]U^  h]Y^$a(" @$a/! pY|^)-`PfD I`]c^` h]]^ $a(" @$a/! pY|^)-`PfD 2I`]c^`P]a^ ]e^]i^ h]m^$a(" @$a/! pY|^)-`PfD RI`]c^`P]q^ ]u^]y^ h]}^$a(" @$a/! pY|^)-`PfD rI`]c^`P]^  h]^$a(" @$a/! pY|^)-`PfD I`]c^`P]^ ]^ h]^$a(" @$a/! pY|^)-`PfD I`]c^` h]^ $a(" @$a/! pY|^)-`PfD I`]c^`P]^ ]^]^ h]^$a(" @$a/! pY|^)-`PfD I`]c^` h]^ $a(" @$a/! pY|^)-`PfD I`]c^` h]^ $a(" @$a/! pY|^)-`PfD J`]c^`P]^ ]^ h]^$a(" @$a/! pY|^)-`PfD J`]c^` h]^ $a(" @$a/! pY|^)-`PfD 2J`]c^`P]^ ]^]^ h]^$a(" @$a/! pY|^)-`PfD RJ`]c^`P]^ ]^]^ h]^$a(" @$a/! pY|^)-`PfD rJ`]c^`P]^  h]^$a(" @$a/! pY|^)-`PfD J`]c^`P]^ ]^ h]^$a(" @$a/! pY|^)-`PfD J`]c^` h]^ $a(" @$a/! pY|^)-`PfD J`]c^` h]^ $a(" @$a/! pY|^)-`PfD J`]c^` h]^ $a(" @$a/! pY|^)-`PfD J`]c^`P]_ ]_ h] _$a(" @$a/! pY|^)-`PfD J`]c^` h] _ $a(" @$a/! pY|^)-`PfD K`]c^` h]_ $a(" @$a/! pY|^)-`PfD &K`]c^` h]_ $a(" @$a/! pY|^)-`PfD :K`]c^` h]_ $a(" @$a/! pY|^)-`PfD NK`]c^`P]_ ]!_ h]%_$a(" @$a/! pY|^)-`PfD jK`]c^`P])_ ]-_]1_]5_]9_]=_]A_]E_]I_]M_]Q_]U_]Y_]]_]a_]e_]i_]m_]q_]u_]y_]}_]_]_]_]_]_]_ h]_$a(" @$a/! pY|^)-`PfD K`]c^` h]_ $a(" @$a/! pY|^)-`PfD L`]c^` h]_ $a(" @$a/! pY|^)-`PfD L`]c^` h]_ $a(" @$a/! pY|^)-`PfD *L`]c^` h]_ $a(" @$a/! pY|^)-`PfD >L`]c^` h]_ $a(" @$a/! pY|^)-`PfD RL`]c^` h]_ $a(" @$a/! pY|^)-`PfD fL`]c^` h]_ $a(" @$a/! pY|^)-`PfD zL`]c^` h]_ $a(" @$a/! pY|^)-`PfD L`]c^` h]_ $a(" @$a/! pY|^)-`PfD L`]c^` h]_ $a(" @$a/! pY|^)-`PfD L`]c^` h]_ $a(" @$a/! pY|^)-`PfD L`]c^` h]_ $a(" @$a/! pY|^)-`PfD L`]c^` h]_ $a(" @$a/! pY|^)-`PfD L`]c^` h]_ $a(" @$a/! pY|^)-`PfD M`]c^` h]_ $a(" @$a/! pY|^)-`PfD M`]c^` h]_ $a(" @$a/! pY|^)-`PfD .M`]c^` h]_ $a(" @$a/! pY|^)-`PfD BM`]c^` h]_ $a(" @$a/! pY|^)-`PfD VM`]c^` h]_ $a(" @$a/! pY|^)-`PfD jM`]c^` h]_ $a(" @$a/! pY|^)-`PfD ~M`]c^` h]_ $a(" @$a/! pY|^)-`PfD M`]c^` h]_ $a(" @$a/! pY|^)-`PfD M`]c^` h]_ $a(" @$a/! pY|^)-`PfD M`]c^` h]_ $a(" @$a/! pY|^)-`PfD M`]c^` h]_ $a(" @$a/! pY|^)-`PfD M`]c^` h]` $a(" @$a/! pY|^)-`PfD M`]c^` h]` $a(" @$a/! pY|^)-`PfD  N`]c^`P] `  h] `$a(" @$a/! pY|^)-`PfD "N`]c^` h]` $a(" @$a/! pY|^)-`PfD 6N`]c^`o h]` $a(" @$a/! pY|^)-`PfD JN`]c^` h]` $a(" @$a/! pY|^)-`PfD ^N`]c^` h]` $a(" @$a/! pY|^)-`PfD rN`]c^` h]!` $a(" @$a/! pY|^)-`PfD N`]c^` h]%` $a(" @$a/! pY|^)-`PfD N`]c^` h])` $a(" @$a/! pY|^)-`PfD N`]c^`P]-` ]1` h]5`$a(" @$a/! pY|^)-`PfD N`]c^`P]9`  h]=`$a(" @$a/! pY|^)-`PfD N`]c^` h]A` $a(" @$a/! pY|^)-`PfD N`]c^` h]E` $a(" @$a/! pY|^)-`PfD  O`]c^` h]I` $a(" @$a/! pY|^)-`PfD O`]c^` h]M` $a(" @$a/! pY|^)-`PfD 2O`]c^` h]Q` $a(" @$a/! pY|^)-`PfD FO`]c^` h]U` $a(" @$a/! pY|^)-`PfD ZO`]c^` h]Y` $a(" @$a/! pY|^)-`PfD nO`]c^` h]]` $a(" @$a/! pY|^)-`PfD O`]c^` h]a` $a(" @$a/! pY|^)-`PfD O`]c^` h]e` $a(" @$a/! pY|^)-`PfD O`]c^`P]i`  h]m`$a(" @$a/! pY|^)-`PfD O`]c^`P]q`  h]u`$a(" @$a/! pY|^)-`PfD O`]c^`9P]y`  h]}`$a(" @$a/! pY|^)-`PfD O`]c^` h]` $a(" @$a/! pY|^)-`PfD P`]c^`P]` ]`]`]` h]`$a(" @$a/! pY|^)-`PfD *P`]c^`P]` ]`]`]` h]`$a(" @$a/! pY|^)-`PfD NP`]c^` h]` $a(" @$a/! pY|^)-`PfD bP`]c^`P]`  h]`$a(" @$a/! pY|^)-`PfD zP`]c^` h]` $a(" @$a/! pY|^)-`PfD P`]c^` h]` $a(" @$a/! pY|^)-`PfD P`]c^` h]` $a(" @$a/! pY|^)-`PfD P`]c^` h]` $a(" @$a/! pY|^)-`PfD P`]c^` h]` $a(" @$a/! pY|^)-`PfD P`]c^` h]` $a(" @$a/! pY|^)-`PfD P`]c^` h]` $a(" @$a/! pY|^)-`PfD Q`]c^` h]` $a(" @$a/! pY|^)-`PfD Q`]c^` h]` $a(" @$a/! pY|^)-`PfD .Q`]c^` h]` $a(" @$a/! pY|^)-`PfD BQ`]c^` h]` $a(" @$a/! pY|^)-`PfD VQ`]c^` h]` $a(" @$a/! pY|^)-`PfD jQ`]c^` h]` $a(" @$a/! pY|^)-`PfD ~Q`]c^` h]` $a(" @$a/! pY|^)-`PfD Q`]c^` h]` $a(" @$a/! pY|^)-`PfD Q`]c^` h]` $a(" @$a/! pY|^)-`PfD Q`]c^` h]` $a(" @$a/! pY|^)-`PfD Q`]c^` h]` $a(" @$a/! pY|^)-`PfD Q`]c^` h]a $a(" @$a/! pY|^)-`PfD Q`]c^` h]a $a(" @$a/! pY|^)-`PfD  R`]c^` h] a $a(" @$a/! pY|^)-`PfD R`]c^` h] a $a(" @$a/! pY|^)-`PfD 2R`]c^` h]a $a(" @$a/! pY|^)-`PfD FR`]c^` h]a $a(" @$a/! pY|^)-`PfD ZR`]c^` h]a $a(" @$a/! pY|^)-`PfD nR`]c^` h]a $a(" @$a/! pY|^)-`PfD R`]c^` h]!a $a(" @$a/! pY|^)-`PfD R`]c^` h]%a $a(" @$a/! pY|^)-`PfD R`]c^` h])a $a(" @$a/! pY|^)-`PfD R`]c^` h]-a $a(" @$a/! pY|^)-`PfD R`]c^` h]1a $a(" @$a/! pY|^)-`PfD R`]c^` h]5a $a(" @$a/! pY|^)-`PfD R`]c^` h]9a $a(" @$a/! pY|^)-`PfD S`]c^` h]=a $a(" @$a/! pY|^)-`PfD "S`]c^` h]Aa $a(" @$a/! pY|^)-`PfD 6S`]c^` h]Ea $a(" @$a/! pY|^)-`PfD JS`]c^` h]Ia $a(" @$a/! pY|^)-`PfD ^S`]c^` h]Ma $a(" @$a/! pY|^)-`PfD rS`]c^` h]Qa $a(" @$a/! pY|^)-`PfD S`]c^` h]Ua $a(" @$a/! pY|^)-`PfD S`]c^` h]Ya $a(" @$a/! pY|^)-`PfD S`]c^` h]]a $a(" @$a/! pY|^)-`PfD S`]c^` h]aa $a(" @$a/! pY|^)-`PfD S`]c^` h]ea $a(" @$a/! pY|^)-`PfD S`]c^` h]ia $a(" @$a/! pY|^)-`PfD S`]c^` h]ma $a(" @$a/! pY|^)-`PfD T`]c^` h]qa $a(" @$a/! pY|^)-`PfD &T`]c^` h]ua $a(" @$a/! pY|^)-`PfD :T`]c^` h]ya $a(" @$a/! pY|^)-`PfD NT`]c^` h]}a $a(" @$a/! pY|^)-`PfD bT`]c^` h]a $a(" @$a/! pY|^)-`PfD vT`]c^` h]a $a(" @$a/! pY|^)-`PfD T`]c^` h]a $a(" @$a/! pY|^)-`PfD T`]c^` h]a $a(" @$a/! pY|^)-`PfD T`]c^` h]a $a(" @$a/! pY|^)-`PfD T`]c^` h]a $a(" @$a/! pY|^)-`PfD T`]c^` h]a $a(" @$a/! pY|^)-`PfD T`]c^` h]a $a(" @$a/! pY|^)-`PfD U`]c^` h]a $a(" @$a/! pY|^)-`PfD U`]c^` h]a $a(" @$a/! pY|^)-`PfD *U`]c^` h]a $a(" @$a/! pY|^)-`PfD >U`]c^` h]a $a(" @$a/! pY|^)-`PfD RU`]c^` h]a $a(" @$a/! pY|^)-`PfD fU`]c^` h]a $a(" @$a/! pY|^)-`PfD zU`]c^` h]a $a(" @$a/! pY|^)-`PfD U`]c^` h]a $a(" @$a/! pY|^)-`PfD U`]c^` h]a $a(" @$a/! pY|^)-`PfD U`]c^` h]a $a(" @$a/! pY|^)-`PfD U`]c^` h]a $a(" @$a/! pY|^)-`PfD U`]c^` h]a $a(" @$a/! pY|^)-`PfD U`]c^` h]a $a(" @$a/! pY|^)-`PfD V`]c^` h]a $a(" @$a/! pY|^)-`PfD V`]c^` h]a $a(" @$a/! pY|^)-`PfD .V`]c^` h]a $a(" @$a/! pY|^)-`PfD BV`]c^` h]a $a(" @$a/! pY|^)-`PfD VV`]c^` h]a $a(" @$a/! pY|^)-`PfD jV`]c^` h]a $a(" @$a/! pY|^)-`PfD ~V`]c^`P]a ]a h]a$a(" @$a/! pY|^)-`PfD V`]c^` h]a $a(" @$a/! pY|^)-`PfD V`]c^` h]a $a(" @$a/! pY|^)-`PfD V`]c^` h]b $a(" @$a/! pY|^)-`PfD V`]c^` h]b $a(" @$a/! pY|^)-`PfD V`]c^` h] b $a(" @$a/! pY|^)-`PfD V`]c^` h] b $a(" @$a/! pY|^)-`PfD W`]c^` h]b $a(" @$a/! pY|^)-`PfD &W`]c^` h]b $a(" @$a/! pY|^)-`PfD :W`]c^` h]b $a(" @$a/! pY|^)-`PfD NW`]c^` h]b $a(" @$a/! pY|^)-`PfD bW`]c^` h]!b $a(" @$a/! pY|^)-`PfD vW`]c^` h]%b $a(" @$a/! pY|^)-`PfD W`]c^`}&&&1'&& ' h])b $a(" @$a/! pY|^)-`PfD W`]c^`P]-b ]1bQ'u' h]5b$a(" @$a/! pY|^)-`PfD W`]c^`P]9b Em1mUm mMmmmDD}EEDEID1DCEQEEECCDD1E!ED)EEiEEDaD9EDyD h]=b $a(" @$a/! pY|^)-`PfD W`]c^` h]Ab $a(" @$a/! pY|^)-`PfD W`]c^` h]Eb $a(" @$a/! pY|^)-`PfD W`]c^` h]Ib $a(" @$a/! pY|^)-`PfD X`]c^` h]Mb $a(" @$a/! pY|^)-`PfD "X`]c^` h]Qb $a(" @$a/! pY|^)-`PfD 6X`]c^` h]Ub $a(" @$a/! pY|^)-`PfD JX`]c^` h]Yb $a(" @$a/! pY|^)-`PfD ^X`]c^`Tٕ h]]b $a(" @$a/! pY|^)-`PfD rX`]c^` h]ab $a(" @$a/! pY|^)-`PfD X`]c^` h]eb $a(" @$a/! pY|^)-`PfD X`]c^` h]ib $a(" @$a/! pY|^)-`PfD X`]c^` h]mb $a(" @$a/! pY|^)-`PfD X`]c^` h]qb $a(" @$a/! pY|^)-`PfD X`]c^` h]ub $a(" @$a/! pY|^)-`PfD X`]c^` h]yb $a(" @$a/! pY|^)-`PfD X`]c^` h]}b $a(" @$a/! pY|^)-`PfD Y`]c^`P]b ]b h]b$a(" @$a/! pY|^)-`PfD .Y`]c^` h]b $a(" @$a/! pY|^)-`PfD BY`]c^` h]b $a(" @$a/! pY|^)-`PfD VY`]c^` h]b $a(" @$a/! pY|^)-`PfD jY`]c^` h]b $a(" @$a/! pY|^)-`PfD ~Y`]c^`P]b ]b]bT]b]b h]b$a(" @$a/! pY|^)-`PfD Y`]c^` h]b $a(" @$a/! pY|^)-`PfD Y`]c^` h]b $a(" @$a/! pY|^)-`PfD Y`]c^` h]b $a(" @$a/! pY|^)-`PfD Y`]c^` h]b $a(" @$a/! pY|^)-`PfD Y`]c^``f$a/! @ ^)-`$a/! @}^`$a/C @Q)]D (] Ub Z^)-`Z}a)]IKD]Y|q)]DQ-$a/[ @$a/* P$ `Y a a)- D`DaD]X%SD (] Ub &Z^)-`6Z )`6q P]b ]b]b]b]b-IS]b']b]b]bQSYS5P]b aS]b]biS]bqSyS5SSKP]c ]c] c] c]c]c]c]c]!c5S]%cZ])cZP]-c ]1c'QFS-SD]I1I}ыDݍ%a$a/Y @$a/! PY|$ `a a)- DcD]P]5c ]9cD (] U=cZ^)-`$a/W @$a/! P$ `Y a a D`DaD]P]Ac D (] UEcZ^)-`De!a$a/B)@< ``? Aa a! a)-`Y$a/! @F `Y a`Di%I}iD}D$ad @F^)a$ad @F^a$ad @F^a$ad @F^a$ad @F^a$ad @F^a$a *  @^-` M`I}6eN9GF;$a/! @ Y|^)-(ZbB $a/!  [$a/! "[$a/!  &[$a/!  *[$a/!  Y|.[)-$a /!  2[$a /!  6[$a /! # :[$a /! ' >[$a /! + Y|B[)-$a/! / F[$a/! 3 J[9$a/!  [ `9aaB:aa:a Ba(;a0/a 8b;a@;aH"<aP<aX<a `B=ahD$a/! Y|R[V[)-$a/!  Z[$a/! ^[$a/! b[$a /! Y|f[V[)-$a /! j[$a /! #n[$a /! 'r[$a /! +Y|v[V[)-$a/! /z[$a/! 3~[$a/! 7[$a/! ;@Y|[V[)-`$a/!  [$a/! [$a/!  [$a/!  Y|[$a/!  [)-$a /!  [Z $a/! @ Y|^ Zb $a/!  [ ` aA{a}aB a !a  a(^ a0 a 8"/ a@"[ aH a P aX" a` ah ap^ axaD)-$a/! [[$a/!  Y|[$a/!  [$a/!  [)-$a /!  [[$a /!  Y|[$a /! # [$a /! ' [)-$a /! + [[$a/! / Y|[$a/! 3 [$a/! 7 [)-$a/! ; [[$a/! ? Y|[$a/! C [$a/! G@[)-`» $a/!  [$a/! [$a/! @ Y|^ Zbb$a/!  [$a/! \)-$a/!   \$a/!  \$a/!  Y|\$a /!  \$a/!  [ `aaaAaa a"(a 0!a8a @!aHAaPAaXaa`ahapaxaa)-$a/! Y|\"\$a/!  &\$a/!  *\$a/!  .\)-$a /!  Y|2\"\$a /!  6\$a /! # :\$a /! ' >\)-$a /! + Y|B\"\$a/! / F\$a/! 3 J\$a/! 7 N\)-$a/! ; Y|R\"\$a/! ? V\$a/! C Z\$a/! G ^\)-$a/! K@Y|b\"\`$a/! @ ^Zb$a/!  j\$a/! r\)-$a/!  Y|v\$a/! @ ^ZbD$a/!  ~\$a/! \$a/!  \$a/! @ ^)- Zb>$a/!  Y|\$a/! \$a/!  \$a/!  \$a/!  \)-$a /!  Y|\$a /!  \$a /! # \$a /! ' \$a /! + \)-$a/! / Y|\$a/! 3 \$a/! 7 \$a/! ; \$a/! ? \)- $a/!  Y|\$a/! \$a/!  \$a/!  \$a/!  \)-$a /!  Y|\$a /!  \$a /! # \$a /! ' \$a /! + \)-$a/! / Y|\$a/! 3 \$a/! 7 ]$a/! ; ]$a/! ?  ])-$a/! C Y|]$a/! G ]$a/! K ]$a/! O ]$a/! @ ^)-$a/!  Y|"]$a/! &]$a/! @ ^$a/!  .]$a/! 2]$a/!  6])-$a/!  Y|:]$a/!  >]$a /!  B]$a /!  F]$a /! # J])-$a /! ' Y|N]$a /! + R]$a/! / V]$a/! 3 Z]$a/! 7 ^])-$a/! ; Y|b]$a/! ? f]$a/! C j]$a/! G n]$a/! K r])-$a/! O Y|v]$a/! S z]$a/! @ ^Zb!$a/!  ]$a/! ])-$a/!  Y|]$a/!  ]$a/!  ]$a /!  ]$a /!  ])-$a /! # Y|]$a /! ' ]$a /! + ]$a/! / ]$a/! 3 ])-$a/! 7 Y|]$a/! ; ]$a/! ? ]$a/! C ]$a/! G ])-$a/! K Y|]$a/! O ]$a/! S ]$a/! W ]$a/! [ ])-$a/! _ Y|]$a/! @ ^$a/!  ]Q `aB aBBaB aB2aB aB(baB0BaB 8aB@aBHaBPaBXbaB.`"aB,haB"paBxbaBaB0aB*aB&baB"aBaBaB$BaB(aBD)-$a/! Y|]]$a/!  ]$a/!  ]$a/!  ])-$a /!  Y|]]$a /!  ^$a /! # ^$a /! '  ^)-$a /! + Y|^]$a/! / ^$a/! 3 ^$a/! 7 ^)-$a/! ; Y|^]$a/! ? "^$a/! C &^$a/! G *^)-$a/! K Y|.^]$a/! O 2^$a/! S 6^$a/! W :^)-$a/! [ Y|>^]$a/! _ B^$a/! c F^$a/! g J^)-$a/! k@Y|N^]`$a/! @ ^$a/!  V^$a/! Z^)-$a/!  Y|^^$a/!  b^$a/!  f^$a /!  j^$a$/! @ ^)-$a$/!  Y|r^$a$/! v^$a$/!  z^$a$/!  ~^$a$/!  ^)-$a$ /!  Y|^$a$ /!  ^$a$ /! # ^$a$ /! ' ^$a$ /! + ^)-$a$/! / Y|^$a$/! 3 ^$a%/! @ ^ Zbb$a%/!  ^$a%/! ^)-$a%/!  Y|^$a%/!  ^$a%/!  ^$a% /!  ^$a% /!  ^)-$a% /! # Y|^$a% /! ' ^$a% /! + ^$a%/! / ^$a%/! 3 ^)-$a%/! 7 Y|^$a%/! ; ^$a%/! ? ^$a%/! C ^$a%/! G ^)-$a%/!  Y|^$a%/! ^$a%/!  ^$a%/!  ^$a%/!  ^)-$a% /!  Y|_$a% /!  _$a% /! #  _$a% /! ' _$a% /! + _)-$a%/! / Y|_$a%/! 3 _$a%/! 7 _$a%/! ; "_$a%/! ? &_)-$a%/! C Y|*_$a%/! G ._$a%/! K 2_$a%/! O 6_$a%/! S :_)-$a%/! W Y|>_$a%/! [ B_$a%/! _ F_$a%/! c J_$a,/! @ ^)- ZbX$a,/!  Y|R_$a,/! Z_$a,/!  ^_$a,/!  b_$a,/!  f_)-$a, /!  Y|j_$a, /!  n_$a, /! # r_$a, /! ' v_$a, /! + z_)-$a,/! / Y|~_$a,/! 3 _$a,/! 7 _$a,/! ; _$a,/! ? _)-$a,/! C Y|_$a,/! G _$a,/! K _$a,/! O _$a,/! S _)-T$a,/!  Y|R_$a,/! _$a,/!  _$a,/!  _$a,/!  _)-$a, /!  Y|_$a, /!  _$a, /! # _$a, /! ' _$a, /! + _)-$a,/! / Y|_$a,/! 3 _$a,/! 7 _$a,/! ; _$a,/! ? _)-$a,/! C Y|_$a,/! G _$a,/! K _$a,/! O _$a,/! S _)-$a,/! W Y|_$a,/! [ _$a,/! _ _$a,/! c `$a,/! g `)-$a,/! k Y| `$a,/! o `$a,/! s `$a//! @ ^ Zb$a//!  `)-$a//! Y|"`$a//!  &`$a//!  *`$a//!  .`$a/ /!  2`)-$a/ /!  Y|6`$a/ /! # :`$a/ /! ' >`$a/ /! + B`$a//! / F`)-$a//! 3 Y|J`$a//! 7 N`$a//! ; R`$a//! ? V`$a//! C Z`)-$a//! G Y|^`$a//! K b`$a//! O f`$a//! S j`$a//! W n`)-$a//! [ Y|r`$a//! _ v`$a//! c z`$a//! g ~`$a//! k `)-$a//! o Y|`$a//! s `$a//!  ` `?8a BIafBaTa:"a a(a00ba.8­a>@Ba^H®aHPbanXaJ`"aZh"aDpax¥a"aha,Baala\ba±adBaaja`baabBa ´a Baµa6Ba*¶a2BaX·a& "a4(a$0"a8a@"aHaNP"aX`+9 } P]Ic`McQ D`]Qc` D``+G ]Ic`Mc`]Qc```+= } P]Ic`McQ·]Qc`b`+ ]Ic`Mc·]Qc``+W ]Ic`McB`]Qc``B`+ } P]Ic`McQ­]Qc`¾`+Q ]Ic`Mc­]Qc aB`+S ]Ic`Mc­`]Qca`¿`+M } P]Ic`McQb]Qc*a"`+C ]Ic`Mc]Qc:a`+A ]Ic`Mc`]QcJa`"`+) } P]Ic`McQB]QcZa D)-$a//! Y|``$a//!  ba$a//!  fa$a//!  ja)-$a/ /!  Y|na`$a/ /!  ra$a/ /! # va$a/ /! ' za)-$a/ /! + Y|~a`$a//! / a$a//! 3 a$a//! 7 a)-$a//! ; Y|a`$a//! ? a$a//! C a$a//! G a)-$a//! K Y|a`$a//! O a$a//! S a$a//! W a)-$a//! [ Y|a`$a//! _ a$a//! c a$a//! g a)-$a//! k Y|a`$a//! o a$a//! s a$a2/! @ ^)- Zb^$a2/!  Y|aq `3/^aIa baWa"ba aR(ba:0a85a@aDHaPBaXaN`BaXhaZpaLx"aVa4"a@aT"aF/aa2aa<a8"?a*aa6ba$a0aH"a\baa>a&BaJ "a (a(0` 8$a/!5sPF]`Y a 1`3 2`3%b2`3!"3`3B4`34`3/bB5`3"5`3B6`356`31bB7`3'"7`3#B8`38`3bb9`3"9`3)b:`3:`33bB;`37";`3<`3<`3 b"=`3"=`3">`3->`3b"?`3+")- a `}HdDHOc@D7VQDB8VR;V1RB5VQD<V9RDb9VR3VED>VIR<VD2V}B6V9:">V"=VARD9VRB7V=DB;V)RDb:V!RD1VEK2VQD4VQ"?VQR8V RD=VeB4VQ5VD6VQ D:V]am3aED($a /: @ $a/! p^)-`PfD] ]Uc`Yca D`jb^)-`]zb~bDaL`DtL`BbFb"bbZbJb b^b&bbb6babRbb2b>bfb:bbbb.bVb*bbNb L` L`Ea!ccDa@a.H": aPJaBX; aP`6 a,h> apD)-$a2/! Y|aa$a2/!  b$a2/!  b$a2/!  b)-$a2 /!  Y|ba$a2 /!  b$a2 /! # b$a2 /! ' b)-$a2 /! + Y|ba$a2/! / b$a2/! 3 b$a2/! 7 b)-$a2/! ; Y|ba$a2/! ? b$a2/! C b$a2/! G b)-$a2/! K Y|ba$a2/! O b$a2/! S b$a2/! W b)-$a2/! [ Y|ba$a2/! _ b$a2/! c b$a2/! g b)-$a2/! k Y|ba$a2/! o b$a2/! s bB $a2/!  a)-$a2/! Y|c$a2/!   c$a2/!  c$a2/!  c$a2 /!  c)-$a2 /!  Y|c$a2 /! # c$a2 /! ' "c$a2 /! + &c$a2/! / *c)-$a2/! 3 Y|.c$a2/! 7 2c$a2/! ; 6c$a2/! ? :c$a2/! C >c)-$a2/! G Y|Bc$a2/! K Fc$a2/! O Jc$a2/! S Nc$a2/! W Rc)-$a2/! [ Y|Vc$a2/! _ Zc$a2/! c ^c$a2/! g bc$a2/! k fc)-$a:/! @ Y|^$a:/!  nc$a:/! rc$a:/!  vc$a:/!  zc)-$a:/!  Y|~c$a: /!  c$a: /!  c$a: /! # c$a: /! ' c)-$a: /! + Y|c$a:/! / c$a:/! 3 c$a:/! 7 c$a:/! ; c)-$a:/! ? Y|c$a:/! C c$a:/! G c$a:/! K c$a:/! O c)-$a:/! S Y|c$a:/! W c$a:/! [ c$a:/! _ c$a:/! c c)-$a:/! g Y|c$a:/! k c$a:/! o c$a:/! s c$a: /! w c)-$aB/! @ Y|^$aB/!  c$aB/! c$aB/!  c$aB/!  c)-$aB/!  Y|c$aB /!  c$aB /!  c$aB /! # d$aB /! ' d)-$aB /! + Y| d$aB/! / d$aB/! 3 d$aB/! 7 d$aB/! ; d)-$aB/! ? Y|d$aB/! C "d$aB/! G &d$aB/! K *d$aB/! O .d)-$aB/! S Y|2d$aB/! W 6d$aB/! [ :d$aB/! _ >d$aB/! c Bd)-$aB/! g Y|Fd$aB/! k Jd$aB/! o Nd$aB/! s Rd$aB /! w Vd)-$aJ/! @ Y|^$aJ/!  ^d$aJ/! bd$aJ/!  fd$aJ/!  jd)-$aJ/!  Y|nd$aJ /!  rd$aJ /!  vd$aJ /! # zd$aJ /! ' ~d)-$aJ /! + Y|d$aJ/! / d$aJ/! 3 d$aJ/! 7 d$aJ/! ; d)-$aJ/! ? Y|d$aJ/! C d$aJ/! G d$aJ/! K d$aJ/! O d)-$aJ/! S Y|d$aJ/! W d$aJ/! [ d$aJ/! _ d$aJ/! c d)-$aJ/! g Y|d$aJ/! k d$aJ/! o d$aJ/! s d$aJ /! w d)-$aL/! @ Y|^$aL/!  d$aL/! d$aL/!  d$aL/!  d)-$aL/!  Y|d$aL /!  d$aL /!  d$aL /! # d$aL /! ' d)-$aL /! + Y|d$aL/! / d$aL/! 3 e$aL/! 7 e$aL/! ;  e)-$aL/! ? Y|e$aL/! C e$aL/! G e$aL/! K e$aL/! O e)-$aL/! S Y|"e$aL/! W &e$aL/! [ *e$aL/! _ .e$aL/! c 2e)-$aL/! g Y|6e$aL/! k :e$aL/! o >e$aL/! s Be$aL /! w Fe)-$ag/! @ Y|^$ag/!  Ne$ag/! Re$ag/!  Ve$ag/!  Ze)-$ag/!  Y|^e$ag /!  be$ag /!  fe$ag /! # je$ag /! ' ne)-$ag /! + Y|re$ag/! / ve$ag/! 3 ze$ag/! 7 ~e$ag/! ; e)-$ag/! ? Y|e$ag/! C e$ag/! G e$ag/! K e$ag/! O e)-$ag/! S Y|e$ag/! W e$ag/! [ e$ag/! _ e$ag/! c e)-$ag/! g Y|e$ag/! k e$ag/! o e$ag/! s e$ag /! w e)-$an/! @ Y|^$an/!  e$an/! e$an/!  e$an/!  e)-$an/!  Y|e$an /!  e$an /!  e$an /! # e$an /! ' e)-$an /! + Y|e$an/! / e$an/! 3 e$an/! 7 e$an/! ; e)-$an/! ? Y|e$an/! C f$an/! G f$an/! K  f$an/! O f)-$an/! S Y|f$an/! W f$an/! [ f$an/! _ f$an/! c "f)-$an/! g Y|&f$an/! k *f$an/! o .f$an/! s 2f$an /! w 6f)-$a{/! @ Y|^$a{/!  >f$a{/! Bf$a{/!  Ff$a{/!  Jf)-$a{/!  Y|Nf$a{ /!  Rf$a{ /!  Vf$a{ /! # Zf$a{ /! ' ^f)-$a{ /! + Y|bf$a{/! / ff$a{/! 3 jf$a{/! 7 nf$a{/! ; rf)-$a{/! ? Y|vf$a{/! C zf$a{/! G ~f$a{/! K f$a{/! O f)-$a{/! S Y|f$a{/! W f$a{/! [ f$a{/! _ f$a{/! c f)-$a{/! g Y|f$a{/! k f$a{/! o f$a{/! s f$a{ /! w f)-$a/, @ Z (] U]c f^`$a/- @f^)-`$a/. @Z^``Kb N@ M`@D՜D$a/B`^`D DD~ D9 Y|D$aE `F`^)aN"$a/! @$ `-ama-`D,a&&e*m$a  /B @ ` ``;  aa a a a  a ()-`$a  /B #@l ``;  aaa  a a  a(a 0)-`$a/B @$ ``; a)-`y$a/U @$a/! P$ `Y a a)- D`DaD]"P]acF D (] Uecf^)-`PacC PD ` DZ`aDD|L`( 5raK kq Yriqrrm }rerrq%lBqpEX!ZZW1 Tَ 9HTOcV-Db VeV VDarDED($a /: @ $a/! p^)-`PfD] ]ic`mc*g D`Bg^)-`]RgVgDaL`DL`2g:g6g>g L`% L`E !cxH4Oc V]DaH&DED($a /: @ $a/! p^)-`PfD] ]qc`ucrg D`~g^)-`]ggDaL`D L`zg L`U L`E !cyHOc#V  VDb VDv VDeV V VakaDED($a /: @ $a/! p^)-`PfD] ]yc`}cg D`g^)-`]ggDaL`D$L`ggggggg L` L`E !czH4Oc VDaFnDED($a /: @ $a/! p^)-`PfD] ]c`ch D`h^)-`]h"hDaL`D L` h L`q L`E !c{HOcC   D B b Db  b  DV1bNDuD  D  ADb  DazD<DED($a /: @ $a/! p^)-`PfD] ]c`c>h D`Jh^)-`]Zh^hDaL`D L`Fh L` L`E !cI q)HOc@DVDVMVDBVuVUDbVDV=DIVDV"VV}bV VeDBVMDVDV1V]D"VEDV5DVDIV`VDDVDVmDao9=DED($a /: @ $a/! p^)-`PfD] ]c`czh D`h^)-`]hhDa(L`DhL`hhhhhhhhhhhhhhhhhhhhhhhhL`QqL`ѾIqEzh!cHOc"L V` "W V`a V`(e V`DB V`"Z VDd V`v VDx VDL V`dO V`a V`}h V`"; V`b= V`bK VD"p VDq V`> V`BT V`e V`u VDBy VDDy VDz VD"| VDDbG V`J VD= V`Ds VDD"A V`` V`DM V`eDO V`ibj V`D^ V`'D; V`Dc V`DA V`bB V`DB` V`{R V`m\ V`bm V`< V`n V`; V`p VDH V`g V`Dr VDDm V`DBi V`"> V`Z V`&b^ V`H V`W V`l V` D= V`bw V`B V`t VDs V` E V`V V`_ V`zDbY V`_ V` DB] V`xbN V`gi VDh V`bn V`Df V`D"v VDw VDD^ V`Bb V`~D"l V`DBR V`$DP V`jBV V`pDX V`rS VD"C V`@DBd V`C V` M V`fDS V`U V`nx VDK V`z VDI VDDD V`BF V`j V`{ VDk V`c V`)Bt VDF V`"[ V`t\ V`w] V`DN V` "a V`|j V`U V`oDB< V`DE V`BQ V`kBX V`? V`"s VD> V`Db? V`"_ V`yDbP V` Dw VDB@ V`@bo V`DbE V`D"O V`hbu VDW V`q"g V`Dbr V`u V` bI VDf V`Q V`lD"h V`""x VDDU V`*Bk V`D"z VDC V`Y V`sY V`bJ VD\ V`vT V`p VDBq V`N V` V!b{ V`@ V` c V`"S V`![ V`ub V`Dbf V` Dr V`BD V`o VDDaԡiDED($a /: @ $a/! p^)-`PfD] ]c`ci D`.k^)-`]kkDa L`DL`fkjjjji>iizjbk2jj kBiij^jj*kZjivkjj~jfiVkjj6kbjjiikjfjJk&jFk.iijzkRkij.jjNjiij*j"jiijFi"iRj~kjirkrj2i&iji&kkBjki.k:jJii6jjij:kjNijibij*ijjiiRinkjiiVjjii>ji"kjNkiViikkZiZki^k^ikkijjijjnikkFj6ij jJj2kj:irivi>kzijjkj~ivjjiBkjjkknjiiiijL`L` E !c 5HOc,D V% VB  V_ D V D V Db8V D V" D V"  VB B V Vb D V VB] D V V1ێD VB  Vm VyۀDB V D" V D Vb » Vb V܂Db V= V D VB  V"  VBQ D VIۀDb V=B VUیDb V D" V B VۀDB V V  V܄D Vb D Va D V-DV5ڊD" V DB V  V DaA-DED($a /: @ $a/! p^)-`PfD] ]c`ck D` zl^)-`]llDaL`DL`,jl2lkkVl^lnlkrll6llklJlkkk.lkvl*lFlNlklklkZl"l>lklRl:lkBllbl lkfl&l L`V5 L`E !c HOc@DN VD¿VD Vb& V VƄD"Ve:DbVDVӂDF VDV:D4 VVB8 VDBvV"VD"; VMVDVV> V@ VbL VDVVDWVDbVAȀD¦VȂDbD VafCMDED($a /: @ $a/! p^)-`PfD] ]c`cl D`X &m^)-`]6m:mDaL`DxL`lllllmmlllllllllmmml"mlml mlml L`M L`E !cu1=!yu=y 2V. !9 HOcC B`V;b V;b3V"4V; Vm3VE>D35V;B4VU>DV ]c`cH4Oc Dma}:UDED($a /: @ $a/! p^)-`PfD] ]cm D`n^`]nDaL`D L`m L`V% L`H4Oc D(*nDYVu]8La BZiBZaaU*DED($a /: @ $a/! p^)-`PfD] ]c`c2n D`Fn^)-`]VnZnDaL`DL`*n:n L` L`- E2n!cEEEmcDD D`Ey V=>-VM>aV%DaVDED($a /: @ $a/! p^)-`PfD] ]c`cm D`Pn^)-`]nnDa L`DHL`mmznm~nmmmmnumL`%<5>L`- =;mH4Oc Dan4xDED($a /: @ $a/! p^)-`PfD] ]c`cn D`hn^)-`]nnDaL`D]E!cFFEmc??EVmcHOcC B`V=b V>b3V4V> V>DVD"OV->V;3VE>D3V=DB4VU>Dy V=>-VM>aV%Da&TDED($a /: @ $a/! p^)-`PfD] ]c`cn D`X"o^)-`]2o6oDaL`D@L`oono oonnononon L`m L`mEn!c m- HOc# VuB{)zI{ހD ހDB}B|U}=D|߀Da!,"mDED($a /: @ $a/! p^)-`PfD] ]c`cRo D``^o^)-`]noroDaL`D L`Zo(L`I)U= L`E !c  H4Oc VŠV>DV"aDED($a /: @ $a/! p^)-`PfD] ]c`co D`Xo^)-`]ooDaL`DL`ooo L`! L`E !c H4Oc DaxDED($a /: @ $a/! p^)-`PfD] ]c`co D`ho^)-`]ooDaL`D] L`E !cHTOcVќD| VٜV圀D"Va<8ADED($a /: @ $a/! p^)-`PfD] ]c`dp D`p^)-`]*p.pDaL`DL` ppppL`L`E !cz Y !A:  ѾIq=  u-u0/I!M:-]U!yMe:aQy y - A Aɞ59 Iama ! % ) 5 E m=O.%=9NaHOc0DBV ]dD` dJp5SHG ] dZp D`E ]d D`E ]d D`EE]8La dida D`EV ]d D`EDV ]!d D`EBIV ]%d D`EDV ])d D`EDV ]-d D`EDBV ]1d D`EDV ]5d D`EV ]9d D`E"V ]=d D`EBV ]Ad D`EV ]Ed D`E­V ]Id D`E"V ]Md D`EDBV ]Qd D`EV ]Ud D`E"V ]Yd D`EV ]]d D`EDV ]ad D`EDV ]ed D`EDV ]id D`EDBV ]md D`EV ]qd D`EDV ]ud D`E D¥V ]yd D`EDV ]}d D`EV ]d D`EV ]d D`E"V ]d D`EDbV ]d D`EDV ]d D`EBV ]d D`E¾V ]d D`EBV ]d D`ED¿V ]d D`EbV ]d D`EDV ]d D`EV ]d D`EDBV ]d D`ED®V ]d D`E±V ]d D`EBV ]d D`EDBV ]d D`EBV ]d D`EBV ]d D`EDbV ]d D`EV ]d D`EDV ]d D`E DaoDED($a /: @ $a/! p^)-`PfD] ]dZp D`r^`]rDa L`DL`0pqq>rpbrrppqRppVrnrqp&r*qJr6qpzrqrqpNqrqpqrq~qprpq2rrBqfqZqrqrqqq L`q L`EJp!cHTOc"bV ]d`$druaRiRZyRSSb ]dr D`EE]8La ia']"bR]8La ia]8La ia]8La ia]8La ia]8La BiBa ]d D`E ]d D`E D`E"V ]d D`EDbV ]d D`EDV]b"DaDoQDED($a /: @ $a/! p^)-`PfD] ]dr D` fs^`]vsDa L`DL`^srFsRs(L`pnrp~qpqrqL`JpEr!cH4Oc V$&$a/A=@Y|:&0 `a]a `+ )-`$a/A @Y|:&0 `a]`? } 0 `+ )-`)$a/! `Y|^` c/D`)pD`B h]e $a(" @$a/! p^)-`PfD nx`]c^`` ]e$a(" @$a/! pY|^`PfDx`]c^)-`` h]f $a(" @$a/! pY|^`PfD x`]c^)-`D` h]f $a(" @$a/! pY|^`PfD x`]c^)-``8 h] f $a(" @$a/! pY|^`PfD x`]c^)-``P] f D`W`_D`I``j`9`` 1c`=eD` h]f $a(" @$a/! pY|^)-`PfD x`]c^`D`W` h]f $a(" @$a/! pY|^)-`PfD x`]c^``0 h]f $a(" @$a/! pY|^)-`PfD x`]c^``݂D`  h]f $a(" @$a/! pY|^)-`PfD y`]c^`D`P]!f `*o`f` h]%f$a(" @$a/! pY|^)-`PfD *y`]c^```qo``P])f D`2 h]-f$a(" @$a/! pY|^)-`PfD By`]c^`D`bD`w%D`P]1f ` h]5f$a(" @$a/! pY|^)-`PfD Zy`]c^``R h]9f $a(" @$a/! pY|^)-`PfD ny`]c^``՛`)`lP]=f ``r`]Af`cD`X h]Ef$a(" @$a/! pY|^)-`PfD y`]c^`D`vD`  h]If $a(" @$a/! pY|^)-`PfD y`]c^`D``P]Mf `D`D`&D`\ h]Qf$a(" @$a/! pY|^)-`PfD y`]c^``bD`bD`!``D` h]Uf $a(" @$a/! pY|^)-`PfD y`]c^````F` h]Yf $a(" @$a/! pY|^)-`PfD y`]c^``r h]]f $a(" @$a/! pY|^)-`PfD y`]c^`` h]af $a(" @$a/! pY|^)-`PfD z`]c^``` h]ef $a(" @$a/! pY|^)-`PfD z`]c^`` h]if $a(" @$a/! pY|^)-`PfD .z`]c^`` Ic`QbD` h]mf $a(" @$a/! pY|^)-`PfD Bz`]c^``D` P]qf `!]uf`$`D`Z h]yf$a(" @$a/! pY|^)-`PfD ^z`]c^``D` h]}f $a(" @$a/! pY|^)-`PfD rz`]c^``N h]f $a(" @$a/! pY|^)-`PfD z`]c^`D`"MlD` h]f $a(" @$a/! pY|^)-`PfD z`]c^``P]f ` h]f$a(" @$a/! pY|^)-`PfD z`]c^`D`4 h]f $a(" @$a/! pY|^)-`PfD z`]c^``io` h]f $a(" @$a/! pY|^)-`PfD z`]c^`D`< h]f $a(" @$a/! pY|^)-`PfD z`]c^``RD`E`H h]f $a(" @$a/! pY|^)-`PfD {`]c^`D``C`fP]f `]fD`=`qÀD``]D`e h]f$a(" @$a/! pY|^)-`PfD {`]c^``~` h]f $a(" @$a/! pY|^)-`PfD 2{`]c^`` h]f $a(" @$a/! pY|^)-`PfD F{`]c^``9`V`` h]f $a(" @$a/! pY|^)-`PfD Z{`]c^`` h]f $a(" @$a/! pY|^)-`PfD n{`]c^``P]f ` h]f$a(" @$a/! pY|^)-`PfD {`]c^```?``P]f D`: ` h]f$a(" @$a/! pY|^)-`PfD {`]c^`D` elD`c`Yb`(o` h]f $a(" @$a/! pY|^)-`PfD {`]c^`` cD`( h]f $a(" @$a/! pY|^)-`PfD {`]c^``-```& h]f $a(" @$a/! pY|^)-`PfD {`]c^````!c`J h]f $a(" @$a/! pY|^)-`PfD {`]c^```^ h]f $a(" @$a/! pY|^)-`PfD |`]c^``f`/`v `` h]f $a(" @$a/! pY|^)-`PfD |`]c^``gP]f D`d`@ h]f$a(" @$a/! pY|^)-`PfD .|`]c^`D`#D`D`L h]f $a(" @$a/! pY|^)-`PfD B|`]c^``!mlD`xID`> h]f $a(" @$a/! pY|^)-`PfD V|`]c^`D`%Yo`P]f `D``D h]f$a(" @$a/! pY|^)-`PfD n|`]c^`D``zm`]``qbD`  h]f $a(" @$a/! pY|^)-`PfD |`]c^`` h]g $a(" @$a/! pY|^)-`PfD |`]c^`D`P]g `pÀD`` h] g$a(" @$a/! pY|^)-`PfD |`]c^`D``+`#P] g `~`{D`Ao` h]g$a(" @$a/! pY|^)-`PfD |`]c^``9`dP]g `OD`+o`.]g`  h]g$a(" @$a/! pY|^)-`PfD |`]c^``kP]!g `ɀD` h]%g$a(" @$a/! pY|^)-`PfD |`]c^`D`$aoD`yݛ`*`!` h])g $a(" @$a/! pY|^)-`PfD }`]c^`D`n`iɂD` h]-g $a(" @$a/! pY|^)-`PfD "}`]c^``uD`D``cP]1g D`s h]5g$a(" @$a/! pY|^)-`PfD :}`]c^`D`P]9g `]=g`YD`D`oD`"`. h]Ag$a(" @$a/! pY|^)-`PfD V}`]c^`` h]Eg $a(" @$a/! pY|^)-`PfD j}`]c^``U`K`]` h]Ig $a(" @$a/! pY|^)-`PfD ~}`]c^`` D`P h]Mg $a(" @$a/! pY|^)-`PfD }`]c^```P]Qg `` h]Ug$a(" @$a/! pY|^)-`PfD }`]c^``AD` h]Yg $a(" @$a/! pY|^)-`PfD }`]c^``V h]]g $a(" @$a/! pY|^)-`PfD }`]c^`D`hP]ag D`X`-`F h]eg$a(" @$a/! pY|^)-`PfD }`]c^``wD`m`6 h]ig $a(" @$a/! pY|^)-`PfD }`]c^``}`;`: h]mg $a(" @$a/! pY|^)-`PfD ~`]c^``QD`N`S``P]qg `n`D` h]ug$a(" @$a/! pY|^)-`PfD *~`]c^``` `D`G` `1`u` h]yg $a(" @$a/! pY|^)-`PfD >~`]c^`D`* h]}g $a(" @$a/! pY|^)-`PfD R~`]c^``'o`)cD``D`-P]g D`D`T h]g$a(" @$a/! pY|^)-`PfD j~`]c^``d`y`b`'` E`D`  h]g $a(" @$a/! pY|^)-`PfD ~~`]c^``%``m`P]g D``a`i` h]g$a(" @$a/! pY|^)-`PfD ~`]c^`` h]g $a(" @$a/! pY|^)-`PfD ~`]c^`` h]g $a(" @$a/! pY|^)-`PfD ~`]c^`D`M` h]g $a(" @$a/! pY|^)-`PfD ~`]c^``eD``D` h]g $a(" @$a/! pY|^)-`PfD ~`]c^``, h]g $a(" @$a/! pY|^)-`PfD ~`]c^`D`YD`t h]g $a(" @$a/! pY|^)-`PfD `]c^``&` [` h]g $a(" @$a/! pY|^)-`PfD "`]c^`D``Q`^` h]g $a(" @$a/! pY|^)-`PfD 6`]c^``bD`P]g ``` h]g$a(" @$a/! pY|^)-`PfD N`]c^`` ` h]g $a(" @$a/! pY|^)-`PfD b`]c^```|D`d`D` h]g $a(" @$a/! pY|^)-`PfD v`]c^`D`, pD`5`b h]g $a(" @$a/! pY|^)-`PfD `]c^`` h]g $a(" @$a/! pY|^)-`PfD `]c^`D`vD`D`b`~` h]g $a(" @$a/! pY|^)-`PfD `]c^``3D`[D`7``>`o`^<e D]WIa`)h$a  - @`H ``/ a `? a`? `;  )-`$a- @`< ``/ `/ `? a`? )-`&$a  - @ `0 ``/ a `; )-`(P0Pf]Y$a-! P `$ ``/ `? )-`q  ) ` $a/! ?@Y| ] Ug $a/! @ ^)-` `Y a{aaa }` &a(a0ba8a@"aH`P'aXU``$a- @`< ``/ `/ `?  aJ)-`=` h$a- @`< ``/ `/ `?  aJ)-`u`p$a- @`< ``/ `/ `?  aJ)-``D`gN&R&V&b&&&&&''] KaH ``.' aD]Q $a/K @$a/! P0 ` aaYa)- DcD]*UID$ ` a`+ } )-` aD]R $a/K @$a/! P0 ` aaYa)- DcD]N=ID$ ` a`+ } )-` aD]S $a/K @$a/! P0 ` aaYa)- DcD]ruID$ ` a`+ } )-`]'.'&&&b&&DEP]gp y]goRQ E  h]U $a(  @$a/! PY| ` `h)-`]D^`P]g\  5i|  MD]FI*NrFFII~D)DD`$1ja{!/! { Y|f-$a{"/!  $a{#/! $a{$/! $a{%/! €)$a{&/! Y|ƀ-$a{'/! ʀ$a{(/! ΀$a{)/! Ҁ$a{*/! ր)$a{+/! Y|ڀ-$a{,/! ހ$a{-/! $a{./! $a{//! )$a{0/! Y|-$a{1/! $a{2/! $a{3/! $a{4/! )$a{5/! Y|-$a{6/! $a{7/!  $a{8/! $a{9/! )$a{:/! Y|-$a{;/! $a{/! &)$a{?/! Y|*-$a{@/! .$ama{A/! 2$a{B/! 6$a{C/!  :)$a{D/!  Y|>-$a{E/!  B$a{F/!  F$a{G/!  J$a{H/!  N)$a{I/!  Y|R-$a{J/!  V$a{K/! # Z$a{L/! ' ^$a{M/! + b)$a{N/! / Y|f-$a{O/! 3 j$a{P/! 7 n$a{Q/! ; r$a{R/! ? v)$a{S/! C Y|z-$a{T/! G ~$a{U/! K $a{V/! O $a{W/! S )$a{X/! W Y|-$a{Y/! [ $a{Z/! _ $a{[/! c $a{\/! g )$a{]/! k Y|-$a{^/! o $a{_/! s $a{`/! w $ma{a/! { )$a{b/!  Y|-$a{c/!  $a{d/!  $a{e/!  $a{f/!  Ɓ)$a{g/!  Y|ʁ-$a{h/!  ΁$a{i/!  ҁ$a{j/!  ց$a{k/!  ځ)$a{l/!  Y|ށ-$a{m/!  $a{n/!  $a{o/!  $ian!/! { :f)$an"/!  Y|-$an#/! $an$/! $an%/! $an&/! )$an'/! Y|-$an(/!  $an)/! $an*/! $an+/! )$an,/! Y|-$an-/! $an./! "$an//! &$an0/! *)$an1/! Y|.-$an2/! 2$an3/! 6$an4/! :$an5/! >)$an6/! Y|B-$an7/! F$an8/! J$an9/! N$an:/! R)$an;/! Y|V-$an/! b$an?/! f)$an@/! Y|j-$nanA/! n$anB/! r$anC/!  v$anD/!  z)$anE/!  Y|~-$anF/!  $anG/!  $anH/!  $anI/!  )$anJ/!  Y|-$anK/! # $anL/! ' $anM/! + $anN/! / )$anO/! 3 Y|-$anP/! 7 $anQ/! ; $anR/! ? $anS/! C )$anT/! G Y|-$anU/! K $anV/! O ‚$anW/! S Ƃ$anX/! W ʂ)$anY/! [ Y|΂-$anZ/! _ ҂$an[/! c ւ$an\/! g ڂ$an]/! k ނ)$an^/! o Y|-$an_/! s $an`/! w $-oana/! { $anb/!  )$anc/!  Y|-$and/!  $Aiag!/! { e$ag"/!  $ag#/! )$ag$/! Y| -$ag%/! $ag&/! $ag'/! $ag(/! )$ag)/! Y|-$ag*/! "$ag+/! &$ag,/! *$ag-/! .)$ag./! Y|2-$ag//! 6$ag0/! :$ag1/! >$ag2/! B)$ag3/! Y|F-$ag4/! J$ag5/! N$ag6/! R$ag7/! V)$ag8/! Y|Z-$ag9/! ^$ag:/! b$ag;/! f$ag/! r$ag?/! v$ag@/! z$oagA/! ~)$agB/! Y|-$agC/!  $agD/!  $agE/!  $agF/!  )$agG/!  Y|-$agH/!  $agI/!  $agJ/!  $agK/! # )$agL/! ' Y|-$agM/! + $agN/! / $agO/! 3 $agP/! 7 )$agQ/! ; Y|-$agR/! ? ƒ$agS/! C ƃ$agT/! G ʃ$agU/! K ΃)$agV/! O Y|҃-$agW/! S փ$agX/! W ڃ$agY/! [ ރ$agZ/! _ )$ag[/! c Y|-$ag\/! g $ag]/! k $ag^/! o $ag_/! s )$ag`/! w Y|-$Ipaga/! { $agb/!  $haL!/! { Je$aL"/!   )$aL#/! Y|-$aL$/! $aL%/! $aL&/! $aL'/! )$aL(/! Y|"-$aL)/! &$aL*/! *$aL+/! .$aL,/! 2)$aL-/! Y|6-$aL./! :$aL//! >$aL0/! B$aL1/! F)$aL2/! Y|J-$aL3/! N$aL4/! R$aL5/! V$aL6/! Z)$aL7/! Y|^-$aL8/! b$aL9/! f$QhaJ!/! { d$aJ"/!  n)$aJ#/! Y|r-$aJ$/! v$aJ%/! z$aJ&/! ~$aJ'/! )$aJ(/! Y|-$aJ)/! $aJ*/! $aJ+/! $aJ,/! )$aJ-/! Y|-$aJ./! $aJ//! $aJ0/! $aJ1/! )$aJ2/! Y|-$aJ3/! $aJ4/! $aJ5/! $aJ6/! )$aJ7/! Y|„-$aJ8/! Ƅ$aJ9/! ʄ$aJ:/! ΄$aJ;/! ҄)$aJ/! ބ$aJ?/! $aJ@/! )$AqaJA/! Y|-$aJB/! $aJC/!  $aJD/!  $aJE/!  )$aJF/!  Y|-$aJG/!  $aJH/!  $gaB!/! { Zd$aB"/!  )$aB#/! Y|-$aB$/! $aB%/! $aB&/! $aB'/! ")$aB(/! Y|&-$aB)/! *$aB*/! .$aB+/! 2$aB,/! 6)$aB-/! Y|:-$aga:!/! { c$a:"/!  B$a:#/! F$a:$/! J)$a:%/! Y|N-$a:&/! R$a:'/! V$a:(/! Z$a:)/! ^)$}fa2 /! w Y|ca-$a2!/! { f$a2"/!  j$a2#/! n)$a2$/! Y|ra-$a2%/! v$a2&/! z$a2'/! ~)$a2(/! Y|a-$a2)/! $a2*/! $a2+/! )$a2,/! Y|a-$a2-/! $a2./! $a2//! )$a20/! Y|a-$a21/! $a22/! @`$yfa/ /! w a`)$a/!/! { Y|-$a/"/!  $a/#/! $a/$/! `)$a/%/! Y|…-$a/&/! ƅ$a/'/! ʅ$a/(/! ΅`)$a/)/! Y|҅-$a/*/! օ$a/+/! څ$a/,/! ޅ`)$a/-/! Y|-$a/./! $a///! $a///! `)$a///! Y|-$a///! $a///! $a///! `)$a///! Y|-$a///! $a///!  $a///! `)$a///! Y|-$a///! $a///! @`$ufa/ /! w `$a/!/! { ")$a/"/!  Y|&-$a/#/! *$a/$/! .$a/%/! 2$fa, /! w `)$a,!/! { Y|:-$a,"/!  >$a,#/! B$a,$/! F$a,%/! J)$a,&/! Y|N-$a,'/! R$a,(/! V$a,)/! Z$a,*/! ^)$_a/!  Y|$a/!  $a/!  $a/!  $a/!  $a/! { $a/! w $a/! s $a/! o $a/! k $a/! g $a/! c $a/! _ $a/! [ $a/! W $a/! S $a/! O $a/! K $a/! G $a/! C $a/! ? $a/! ; $a/! 7 $a/! 3 $a/! / $a/! + $a/! ' $a/! # $a/!  $a/!  $a/!  $a/!  #-ކچֆ҆)Άʆ#-Ɔ†)#-)#-)#-~zvr)nj#-f!$ra/!  Y|$a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  $a/!  )^Z#-VRNJ)FB#->:62).*#-&")#- )#-)$ra/!  Y|$a/!  $a/!  $a/!  $a/!  $a/! { $a/! w $a/! s $a/! o $a/! k $a/! g $a/! c $a/! _ $a/! [ $a/! W $a/! S $a/! O $a/! K $a/! G $a/! C $a/! ? $a/! ; $a/! 7 $a/! 3 $a/! / $a/! + $a/! ' $a/! # $a/!  $a/!  $a/!  $a/!  #-އڇ)և҇·ʇ#-Ƈ‡)#-)#-)#-~z)vrnj#-fb$ra/!  Y|$a/!  $a/!  $a/!  $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! $a/! )^Z#-VRNJ)FB#->:62).*#-&")#- )#-)$!ra/! Y|$a/! $a/! $a/! $a/!  $a/! { $a/! w $a/! s $a/! o $a/! k $a/! g $a/! c #-)~z#-vr)njfbq e_i_m_q_u_y_}______________ffffffffffffffffffffffffff`3/B aBP" aB, aB\» ` B a b a"( a.0b a<8 aN@ a6HB aP a:X a` aHhB aZp a4x a a0B `Jb8a>b a a8 ` aB" a2 a a  ab aR" aL a  a& aX aV aT aJ" aF  a(B a@0B a(8 a@ a$H aP aX aD` ah a*pD$a_fa2/! o Y|jc)- ___!_%_)_-_1_5_EiIiMiQiUiYi]iaieiiimiqiuiyi}iiiiiiiiiiiiiii)n-n1n5n9n=nAnEnInMnQnUnYn]naneninmnqnunyn}nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnoo o ooooo!o%o)o1o5o9o=o`kkaB4"aBaBf"aBaB0 aB(baBb0‡aB8BaB@ˆaBtH"aBBPaBX"aB`aBJh"aBpaBx"aBhaBЈBaBaBbaBaBBaBPaBBaBaB"aBaBDaBjBaB(’aBVBaB aB8"aBaB"aBaB BaBx(–aX0BaB8—aB@BaBH˜aBPbaB XaBn`baB,haBpaBx"aB*œaB$aB"aB&žaBdBaBrŸaB2baBaBvaB\BaBaB6aB"aBZ¤aB"aB"aB@¦aBaBBaBNBaBT aBH(aB0BaB:8aB@aBHbaBPBaB`X"aB`BaBh"aBp±aBxbaB~"aB|aBaBµaBzaBRaB̰aBaBaBaBaBpaBF¾aB<aBaB baBBaBL"aB^aBaB aBl(aB0aB8baB>@BaB.HBaBP$_Aoane/!  Y|)- ^^^^__ _ _bbbbbb`baB‡aBBaBˆaB"aB aB("aB0aB8"aB @ aH a P aX a` ah ap$^ba /!  Y|\)- ^^^^^^^^^^^^^^^^^^^^=eAeEeIeMeQeUeYe]eaeeeiemeqeueye}eeee`))X`*&aX` X`"aY`J`& ~AK`J(AM`0N`,8AO`0@P`HR`2PY`Xb`.`" `h!VapVa6xaGa GaPaHa>Ha:aIaIaaJa4SaLaTaUa(Ua<"aNLa KaALaBMaNa@aNaDOaQaF Pa (Qa$0aRa88RaH@$^ea,/! W Y|_)-Q ]]]]]]]]]]]]]]]]]]]]cc`b#`j `'a&$`($` 'a($`0`*8b(a @(aH"'`PB%`X%``"-ah-a$pb&`x`&`b/a,&`"b` 80a1aD$]ca/!  Y|*])-b  [D` [D` [D` [D` [D` [D` [D` [D` [D` [D` [D` [D` [D` [D` [D` [D` [D`$a/! p^`[PfD2 } P]g D`F` ]g D`E` `]c [D` [D` [[ [ [[[[[![%[)[-[1[5[9[=[A[E[I[UhYh]hahehihmhqhuhyh}hhhhhhhhhhhhhhhhhhhYp]papepipmpqpupyp}pppppppppppppppp`NJ"NaBNa"BOaBbOaBRPaBn QaB4("RaB0Ra8SaBv@bTaBrHUaBhPUaBXVaB0`bWaBPh"XaBfpXaB>xYaBNZaB b[aBZ\aB:\aBb]aB^^aBj_aB8_aB`aB(`aBaaBHaaBBbaB baBcaB"daBVdaBDbeaB\faBfaBl gaB(bhaBd0iaB*8iaB@@BjaBXHjaBBPbkaB,XlaB6`laB|h"maB2pmaBxbnaBJ"oaBtoaB$bpaB~"qaBqaBraBLBsaBsaBzbtaBxuaB&uaB"vaBFvaBBwaBpwaBxaB "yaTaBaBaB aB(aB0BaB`8aB.@b a(š a*0B aP8 a@ a2H avP aX" a` ah" a pb ahx a4" `$N" `6% an" `-µ`Z5a  a8 ad aV a:b aD aH" az a& ax" a,b a< `f‡ al" a\ B at( `|0ŝ ap8b aT@" aXH arP" aX a(` a.h aBp ax a a`aN a B a0" a@ aR a" aa^ a a¥ab `%C `L!$ZqaB./! Y|>2)-Y YYZZ Z ZZZZZ!Z%Z)Z-Z1Z5Z9Z=ZAZEZ]dadedidmdqdudyd}dddd`!!-a Ba`( b3aa" a(aa0a.8aa@a8H!aPaXa<`ahB;a2pB6axa$aaa*b a4 a6a0a `>a:`6a,e` a*B`9a a& a@Aa$Yda$/! 7 Y|^:)-=$]Y^a /!  葒$YY\a /!  Y|)-$ Ya/! $a/! $a/! $a/!  $a/! { $a/! w $a/! s $a/! o $a/! k $a/! g $a/! c %#njfb^)-Z%#VRNJLeX`D YX]X]g D` $a/! p^)-`UXPfD]VQXXP]g D`VMXiXm\\VIXX\]g D`VEXX]g D`VAXXIFV=XXV9XX]g D`V5XXy\]h D`V1XXV-XX\!]V)XX]h D`V%XX}\] h D`V!XX\VXqX] h D`VX}X]h D`VXyXu\\]h D`VXuX]h D`V XX-]]h D`V XX]!h D`VXX\]%h D`VXmXq\])h D`VWX]-h D` WD` WD`WWaX-r1r5r9r=rArErIrQrUrYr]rarerirmrqr`1h WD`PWfD$}Wba/!  Y|[)-q )W-W1W5W9W=WAWEWIWMWQWUWYW]WaWeWiWmWqWuWWWWWWWWWWWWWWWWWWWWbbur`3+» aHB `TB ab a  a b a&( a40 aF8B a.@ a2H aP a@XB aR` a,h ap a(xb8a6 ab a0 a" a: a* a ab a" aJ aD a a  aP aN aL" aB a>B aB a8 a$  a( a0 a 8 a@ a aBP@A aBH> aBPB@ aB4XB aB`= aBhb? aBp"A aB>x< aBb= aBf@ aBB? aB\"> aB= aBBvaˆ"aB8 a^"9 apa:a¨ `<q; aB"; a < a¬aa|> ab? aT"X aJ @ `R(eA `œ0a8ba`@bD atHBE a PF aFXbG aš`a†hV `Np2bazxa¼al¿aBaDbL a BM anP a@N a’bO a2; aBWa("Q ajba€baLS aT aha"X `&$a- @`0 ``/ `/ `; )-`avB< aB D$UUpagc/!  Y| UU]5hI D`X] $a/! p^)-`UPfD] UQV]9hI D`$a/! pY|^)-`PfD `]c UVIkf6Da DbD `  `D Ɗ` D]m`q Dq: UU]=h D`X $a/! p^)-`UPfD] UV=kf6Da D`  `D ` D]m`q Dq:$a/! pY|^)-`PfD `]c UMV}rr]Ah D` UU]Eh D` $a/! p^)-`UPfD] UU]Ih D`E UV!kf6Da D"`  `D "` D]m`q Dq: UU]Mh] D`Xq $a/! p^)-`}UPfD] yUV9kf6Da DbL `  `D B` D]m`q Dq:$a/! pY|^)-`PfD `]c uUaVrr]Qh] D`R eU]Uh D`E ]UaU]Yh D`) $a/! p^)-`YUPfD] UUU]]h D`E QUVkf6Da D`  `D ` D]m`q Dq:M EUIU]ah D`X $a/! p^)-`AUPfD] =UVkf6Da D¿`  `D ` D]m`q Dq:$a/! pY|^)-`PfD `]c 9U]Vrr]eh D` -U1U]ih D`X $a/! p^)-`)UPfD] %UU]mh D`E !UV kf6Da D `  `D ` D]m`q Dq: UU]qhM D`a $a/! p^)-`UPfD]  UeV]uhM D`E  UVkf6Da DN `  `D  ` D]m`q IDq: TT]yh D` $a/! p^)-`TPfD] TqV]}h D`$a/! pY|^)-`PfD *`]c TV kf6Da Db`  `D >` D]m`q *Dq:6 TT]h D`X $a/! p^)-`TPfD] TV)kf6Da DM`  `D ^` D]m`q Dq:$a/! pY|^)-`PfD `]c T%Vrr]h D`n TT]h D` $a/! p^)-`TPfD] TV]h D`E TT]hE D`U $a/! p^)-`TPfD] TV]hE D`E TT]h D`X $a/! p^)-`TPfD] TVAkf6Da D`  `D ʌ` D]m`q Dq:1 TYV]h D`E0T]hf D` TT]h D` $a/! p^)-`TPfD] T=V]h D`E TV-k]h D`E yT}T]hu D` $a/! p^)-`uTPfD] eqTIV`D]hu D`E mTV5kf6Da D@ `  `D *` m`]m`q Dq: eT]h D`E ]TaT]h D`1 $a/! p^)-`YTPfD] UTAV]h D`$a/! pY|^)-`PfD R`]c QTV1kf6Da D> `  `D f` D]m`q RDq:^ ITMT]h D` $a/! p^)-`ETPfD] ATV]h D`E 9T=T]h D` $a/! p^)-`5TPfD] 1TV]h D`E L%T`  L!T` LT`y($a /: @ $a/! p^)-`PfD] ]h`h D`^)-`T]ƍʍDa@L`D4OTc y΄D  T V`hP]h D`8D]h D` $a/! 'PY|ލx `  aBaaa a a(a 0"a8`+ } P]hʍ D`F)-`(`ލ]h D`]h D`]h D`]h D`]h D`]i D`]i D`] T T] iQ D`e $a/! p^)-`TPfD] SV%kf6Da D"; `  `D Z` D]m`q MDq: S9V] iQ D`EPS]i D`S]i D`S]i D`< S` aaB'a'a SD`SSrrr`iuefS]!i D`S]%i D`S])i D` S]-i D`"g S]1i D`bf SD`(SSrrrrr`5iddBeLS`LS`q} LS`($a /: @ $a/! p^)-`PfD] ]9i`=i D`Ύ^)-`S]ގDaL`D4OSc DH͂D S]Ai D`E SS]Eiu D` $a/! p^)-`SPfD] }SVEkf6Da DW`  `D ` D]m`q Dq:$a/! pY|^)-`PfD `]c ySiVrr]Iiu D`" uS]Mi D`E qS]Qi D`E mSmV]Ui D`E QSUS]Yi) D`= $a/! p^)-`MSPfD] ISVkf6Da DB8 `  `D ^` D]m`q %Dq:e ES5V]]i) D`EL9S`2L5S`1;8L1S`($a /: @ $a/! p^)-`PfD] ]ai`ei D`X~^)-`-S]DaL`D4O)Sc ̀Db3 L%S` L!S`V>yLS`($a /: @ $a/! p^)-`PfD] ]ii5 D`P^`S]ƏDa(L`D4OSc D* + ̀D S-V]mi D`E  S)V}VV]qi D`  S V]ui5 D`E RS]yi D`P $a/! p^)-`RPfD] RVkf6Da D4 `  `D ` D]m`q Dq:$a/! pY|^)-`PfD `]c R1Vrr]}i D` RR]ia D`Xu $a/! p^)-`RPfD] RUV]ia D`E RVkf6Da DF `  `D B` D]m`q ]Dq: RR]i D`- $a/! p^)-`RPfD] R!V]i D`E$a/! pY|^)-`RRPfD `]c RD` RDcD0 R``/ `/ `; $a/! pY|^)-`RRPfD `]c RD` RDcD0 R``/ `/ `; LR`2LR`8LR`($a /: @ $a/! p^)-`PfD] ]i D`^`R]DaL`D4O}Rc # ЂDLyR`I 2-1 TLuR`i 8A2LqR`($a /: @ $a/! p^)-`PfD] ]i D`p֐^`mR]DaL`D4OiRc DS T  MRuV]i D`E IRV]i D`E ER]i D`E 9R=R]i D` $a/! p^)-`5RPfD] 1RyV]i D`$a/! p^)-`f6  D  ]i D`E`Bv ` ]i D`E` } P]i D`F` D  ]i D`E` ` DB  ]i D`E` &` ]i D`]i D``Dr ]i D`E`D]c $a- @  `0 ``/ `/ `; )--REV]i D`$a/! p^`f6 D } P]i D`F` Bv` ]i D`E` DB  ]i D`E` 0]i D`` ` } P]i D`]i D``rz`D]c )RV]i D`E %RD`0 !R``/ a `; HR]SVk4Oc ˄Da{KDED($a /: @ $a/! p^)-`PfD] ]i9 D`p^`]Da@L`D L`L`yL`  E!cQ QQQQQQQQQQQQQQQQQQQQAdEdIdMdQdUd` a(b`05¦ab& aBva. B8 a4(a0¿a8F a@bD a$Ha*P"; a X> a `a"h"apaxMabL aa&"aN a@ a4 a ba a2a,Wa$QYda /!  Y|n^)-$}Qe]a/!  Ē H yQ``/ `/  `?  a a GuQVVVW WYY`iP]i) D`D]i D`< qQ``/ `/ `?  a< mQ``/ `/ `?  a$iQa/!  Y|)-$a/!  F$a /!  J$a /!  N$a /! # Y|R)-$a /! ' V$a /! + Z$a/! / ^$a/! 3 Y|b)-$a/! 7 f$a/! ; j$a/! ?@n` eQD`DaDH aQ``/ `/  `?  a a ]QD`DaDH YQ``/ `/  `?  a a UQD`DaD< QQ``/ `/ `?  a MQD`DaD< IQ``/ `/ `?  a EQD`DaDH AQ``/ `/  `?  a a =QD`DaDH 9Q``/ `/  `?  a a 5QD`DaDH 1Q``/ `/  `?  a a -QD`DaDH )Q``/ `/  `?  a a %QD`DaDH !Q``/ `/  `?  a a QD`DaDH Q``/ `/  `?  a a QD`DaDH Q``/ `/  `?  a a  QD`DaDH  Q``/ `/  `?  a a QD`DaDH Q``/ `/  `?  a a$P^a/!  Y|)-T P``/ `/  `?  aa aB P ^^^M^`iGD]j D` PD`DaDH P``/  `/ `?  aa PD`DaDl P``/ `/  `?  abaB ™aBBaBšaB < P``/ `/ `?  a P ^5^=^A^E^I^$`jcD] j D`q PPPPPPPPPf f fffff!f%f)f-f1f5f9f=fAfEfIfMfQfUfYf]fafefifmfqfqqqqqq`3,aB,aB@aBFBaB.baBN baB0(baB0baBP8"aB@V aBHBaBTPaB:XaB`baBHhaB"pBaB xaB2aB"aB*aBBaB"aB aB6"aB>aBVBaBLbaBaB8aBDaB aBRaBaB(aBbaB$aBaB aBJ(aBB0aB48"aB&@"aB`;ab(aJb@`¨Ca<D`>ajBaˆ»a&aZb`\ab`x`Fa”M`a^`" _" `–(_ `0u_" a8|a@",`H"a´P`X"a`* ah a2pB axBIa¬Iatab"a¦a֠a(a¢ a¤abaH`$a-! P`H ``/ `/  `?  a a)-` `†hb{aŠ% a` D$Ca /!  Y|$a /!  $a /!  $a /!  $a /!  $a /!  $a /!  $a /!  $a /!  $a /!  $a /!  $a /!  $a /!  $a /!  $a /!  $a /!  $a /!  $a /!  $a /! { $a /! w $a /! s $a /! o $a /! k $a /! g $a /! c $a /! _ $a /! [ $a /! W $a /! S $a /! O $a /! K $a /! G &")- )-)-ޕڕ֕)-ҕΕʕƕ•)-9x$ sa /! C Y|$a /! ? $a /! ; $a /! 7 $a /! 3 $a /! / $a /! + $a /! ' $a /! # $a /!  $a /!  $a /!  $a /!  $a /!  $a /!  $a /!  $a /!  $a /! $a /! $a /! $a /! $a /! $a /! $a /! $a /! $a /! $a /! $a /! $a /! $a /! $a /! $a /! )-)-~z)-vrnjfb)-^ZVRNJ)-FB>:62)-.*$sa /! Y|$a /! $a /! $a /! $a /! $a /! $a /! $a /! $a /! $a /! $a /! $a /! $a /! $a /! $a /! $a /! $a /! $a /!  $a /! { $a /! w $a /! s $a /! o $a /! k $a /! g $a /! c $a /! _ $a /! [ $a /! W $a /! S $a /! O $a /! K $a /! G &")- )-)-ޖږ)-֖ҖΖʖƖ–)-$sa /! C Y|$a /! ? $a /! ; $a /! 7 $a /! 3 $a /! / $a /! + $a /! ' $a /! # $a  /!  $a  /!  $a /!  $a /!  $a /!  $a /! $a /!  )-fb^ZVR)-NJFB>:)-62.*TL9B`D(5BF`jr | -B1B]jr D` r $a/! p^)-`)BPfD]H%BdD !B`} BrcDT B`Y a"`3"`3 `3 bB`3"b`3VBEBLVB=BV BABV BIBBMVBMBLVAVxLA` DxA=``jr%F9  A  'MSUS'bIBJJKbKK"LV$ AA]j D`r $a/! p^)-`APfD]HAdD A`} ArcD0 A`Y aq`3Bf`3VAA $a-! P`H``/ `/  `?  a a)-``jP]j `j"II]j D`H D`D]j D` $a/! P $a/! pY|^)-`fS  ]j(`jBz z ~ b~  Š  D`B`DY T`  `D" } P]j D`D` ]j D`D`D] ` a)-` `]VAA:$VA ]jJ D`EVA ]j D`EVAjJVAfJVAVVA ]j D`EVA ]j D`EVyA ]jAK D`EVuA ]j D`EVmA ]j D`ELUA`DlQA-E`jr 'q '9a]j` ]j D`E ]j D`E ]j D`E ]j D`E IAMA]j D`r $a/! p^)-`EAPfD]HAAdD =A`} 9ArcD< 5A`Y ab`3d`3bB]`3"V1AYA%~V-AaAA0]j D`V)A]A ]j D`E`L A`DAF`'j}rц IF)SSUS5KuTb* ]k D`EE]8La " i" a]8La  i a$a/!-@Y|$a/!  $a/! $a/!  0 `"aBa"a)-BJ>Zb :0 `"aBa"a)-`] b   ]k D`EE]8La biba]8La BiBa ] k D`E ] k D`Ea  $a-! P`< ``/ `/ `?  a)-` `k]k`kP]k D`* D` $a/! PY|$ ` aB`a)-``P]!k D`] @A]%k D`r $a/! p^)-`@PfD]H@dD @`} @rcDT @`Y a"`3b `3b`3 "`3`3 V@A ])k D`EV@A ]-k D`EV@ AV@AV@A ]1k D`EV@jKV@P ]5k D`EV@ ]9k D`EV@STXrm*V@L@`% 8Dp@MF`=kYrqR} 9q`9'?b??"@@% ]Ak2 D`E @@]Ek D`ir $a/! p^)-`@PfD]H@dD @`} @ercD$ @`Y a`3V@@V@OV}@ OhLu@` DPq@E`Ik5rц J95b<a]Mk` $a/! @ $a/! pY| $a-! P`H ``/ `/  `?  a a)-``QkP]Uk$`Ykr<"===B> D`D]]k D`$a/! @ ^)-$a/!  H `<`"=aH=a=aB>a $a/! $a/!  )-$a/!  z^`sssssfD!P]ak D`` `D])-`]]LeD`ekDi i@m@]ikr D`Er $a/! p^)-`e@PfD]Ha@dD ]@`} Y@ArcD$ U@`Y a"`3VQ@y@MHE@aj4Oc "Daf/DED($a /: @ $a/! p^)-`PfD] ]mk` qk}]F-F5F 9F$a/! P0 ` aaYa)- DcD]= IDF}5 Y%Y|y}. I]4Uc DDDDDDDD ]uk D`E D` ^)-`]DaL`D L`L`qL`E!c!!VA@st ]yk D`EV=@ ]}k D`E\L!@`D|@%E)EEEUEYE]EaEeEiEmEqEuEyE}EF`kr%FZ 5B8]`D ]kr D`E ]k D`E ]k D`Ef89b99 }":y}~ @@]k D`"!r $a/! p^)-`@PfD]H @dD  @`} @rcD` @`Y a`3 b`3"B`3b`3 `3b`3 "V?9@ ]kr D`EV?5@I~V?)@II|V?1@V?%@i~V?-@]}H?l4Oc Da4rDED($a /: @ $a/! p^)-`PfD] ]k(`k֛i%]cB@F ]k D`E D`(ޛ^)-`]DaL`D L`L`V|qL` E֛!cV?n{V? fDk` `D ` D] `"6IEV? fDk` `D ` D] `""IEV?{V?~V?=tAt ]k D`EV?@L?`DH? F`kq q   ]k^ D`E ]k D`E ]k D`E ]k D`E ]k D`E ??]k D` q $a/! p^)-`?PfD]H?dD ?`} ?qcD$ ?`Y ab2 `3V??V?OV?OV?P>]ml D`8 q $a/! p^)-`>PfD]H>dD >`} >qcD< >`Y ay`3"w`3`3bV> ?EV>?"$V> ?5V>nOV>ZOL>`D >>]ql D`q $a/! p^)-`>PfD]H>dD >`} >qcD0 >`Y a"`3`3b >D`PP>fD#>]"R GHG>]QG>]G>]G>]IG>]~G>]:$G}>]%~Gy>]uBGHGu>] CGHG#q>]]CGHG#m>] GHGi>]EGHGe>]5GHG$a/! @Y|$a/! $a/!  0 `aaa)- Zb$a/! Y|>B$a/! @J`:0 `aaa)-6R`a>]G"$#]>]GY>]M~G"U>]!GQ>]GM>]GI>]GHGE>]GHGA>]GHG=>]GHG9>]GHG5>]GHG1>]GHG->]GHG#)>]GHG%>]GHG!>]iGHG>]#GHG>]GHG>]MGHG>]GHG >]GHG >]GHG>]GHG>]=GHG=]m*GHG#=]JGHG=]GHG=]GHG=]EGHG=]GHG=]GHG=]GHG=]]}GHG=]|GHG#=]i~GHG=]aGHG"=]uHG=]GHG=]PGHG=]GHG#=]GHG=]GHG=]GHG=]GHG=]GHG=]GHG=]GHG=]%GHG=]BGHG=]GHG=]ɀGHG=]UGHG#=]GHG=]-GHG=]GHG=]GHG }=ggggggggghh h hhhhh!h%h)h-h1h5h9h=hAhEhIhMhppppppppppppppppqq q qqqqq!q%q)q-q1q5q9q=qEqIqMqQqUqYq]qaq`NG`~b`.b`$;`j` b`T(b?`p0b`28`€@B`:Hl`vP`ˆX"```Fh`lp`rx"`@`&"`"`R"`D`h`tB`0b`V`` X`6O`>>`NQ`\e`,B`n"l`Xo`T`BB `` "`x(B`L0Œ`d8`†@b`8Hb2 `P^`X"T`*`"_`Hhf`pQ`„xB`4BZ`b `J"``^b`B`(``6"w`|y`Š``#B`Z#`‚b`bq`f`P`<`z"`Œ "`("R ` 0 D$y=eqaJI/!  Y| :)-Uq Q=U=Y=]=a=e=i=m=q=ddddddddddee e eeeee!e%e)e-e1e5e`)"`B"`&``8`" B`((`>0b`8`@B`H` PB `X ``B!`h!`pB"`:x"` #`$`.$`0%`4%`B&`$&`6b'`*(`(` ")`)`,B*`*`"+`@+`2"`<# D$M=9ea%/! g Y|N_B)--q !=D`P=]ulip D` =D`=]u`&q³DH=]q^  =D` =]u`&YDH=]qn <]yl D`EP<a]}l <a]l <fDl` `D ` D] `"W&E <fDl` `D ` D] `"WIE <]l D`E <<]lmp D`0 p $a/! p^)-`<PfD] <pcD$ <`Y a`3bPy~4fDo``D` D$4a(" @$a/! pY|^)-`PfD W`]c^`4`"rz4fDo` `D ` D 4D`p4qFIs`o J9b--".../0b0"R  ]o© D`ED[]99B:B:::;;b;b;"<"<<< ]o D`E 4D`4_________ `````)`-`1`` oEK}R 'J'q '' 'dABC*# U4D`8PM4fD I4D`|E4Q4Y4`oWeT R%!)MS'MFVP]o D` ]o D`E ]o(`oa],L` ]LbwW`]LbeE`]LbbB`]LbsS`]LboO`]LbcC`]LbkK`]LbeE`]LbtT`` D ]o D`E ]o D`E ]o D`E D`E ]o(`o]$L`]LbuU`]LbpP`]LbgG`]LbrR`]LbaA`]LbdD`]LbeE``D ]oz^E ]ofE ]onErEb , $a/! pY|W^)-`A4f6D=  ]o D`#`P]o D`` D0]o D`` bA } ]o D`F` Dbg  ]o D`b`  W`D] =4D`$94uuyu}uuuu`oWbWW"XX54`o]o D`DH 14``/ `/  `?  a a  4]of D`E  4]o D`E 4]o D`E 3]o D`E03]o D`P3al]o 3El]o h3!l]p$a(" @$a/! pY|^)-`PfD J`]c^` 3fDp` `D ` D] p`"{ D`EP35l] p  3fDp` `D ` D] `"n|&E h3Il]p $a(" @$a/! pY|^)-`PfD ~`]c^`P3}l]p  3fDp` `D ` D] `"nxa'E h39l]!p $a(" @$a/! pY|^)-`PfD `]c^` 3fD%p` `D ` D] `"V|&EP3l])p  3fD-p` `D ` D] `"ByIEP3]l]1p  3fD5p` `D ` D] `"}&EP3Yl]9p  3fD=p` `D ` D] `"~a'EP3l]Ap  3fDEp` `D ` D] `"V}a'E h3l]Ip $a(" @$a/! pY|^)-`PfD `]c^` 3fDMp` `D ` D] `"}IE h3=l]Qp $a(" @$a/! pY|^)-`PfD "`]c^` 3fDUp` `D ` D] `".|IE h3l]Yp $a(" @$a/! pY|^)-`PfD B`]c^` 3fD]p` `D ` D] `"za'E h3ql]ap $a(" @$a/! pY|^)-`PfD b`]c^` 3fDep` `D ` D] `"B|a'E h3l]ip $a(" @$a/! pY|^)-`PfD `]c^` 3fDmp` `D ` D] `"xIE h3l]qp $a(" @$a/! pY|^)-`PfD `]c^` }3fDup` `D ` D] `"{a'E hy3l]yp $a(" @$a/! pY|^)-`PfD ¬`]c^` u3fD}p` `D ` D] `"{&E hq3l]p $a(" @$a/! pY|^)-`PfD `]c^` m3fDp` `D ` D] `"{&E hi31l]p $a(" @$a/! pY|^)-`PfD `]c^` e3fDp` `D ` D] `"}&EPa3l]p  ]3fDp` `D ` D] `"zIEPY3l]p  U3fDp` `D ` D] `"za'EPQ3l]p  M3fDp` `D ` D] `"&EPI3ul]p  E3fDp` `D ` D] `"|IEPA3l]p  =3fDp` `D ` D] `"Z{a'EP93l]p 53ml]p 13fDp` `D ` D] `"yIE -3fDp` `D ` D] `"}IEP)3l]p  %3fDp` `D ` D] `"ya'EP!3el]p  3fDp` `D ` D] `"^zIEP3l]p 3l]p 3fDp` `D ` D] `"j~IE  3fDp` `D ` D] `"nyIE h 3il]p $a(" @$a/! pY|^)-`PfD ҭ`]c^`P3Al]p  3fDp` `D ` D] `"xa'E h2Ul]p $a(" @$a/! pY|^)-`PfD `]c^` 2fDp` `D ` D] `"~&EP2)l]p  2fDq` `D ` D] `"R~a'EP2-l]q  22] qT D`XU $a/! p^)-`2PfD] 2UcD= 2`DDY aU`3C`3w`33b`3O"`3q"`3?`3b¦`3i"`3)`3{b`3+b"`3G"b`3#`3a`3b`3"»`3B`3b`3Yb`3e"¾`3QB`3 `3cb"`3)"`3A`3M`3b`3m""`3/`3`3bb`3"`3'b`3g`31bb`39"Bv`3-"`3s«`3[bB`3"`3`3`3Ib"`3_"b`3`3`35b`3 "B`3=`3o`3Wbb`3K"`3;`3 `3Mbb`37"`3`3%¿`3ubB`3E""`3!`3S"`3}bb`3"`3k`3]B`3yb02;D] qT D` 2:UC]q D`E2Q:C]q D` 2;D]q D`E 2:IC]q D`E 2E:C]!q D`E2y:C]%q D` 2=:C])q D`E 29AC]-q D`E2Y6!7]1q D`2:YC]5q D` 2i:C]9q D`E 2; D]=q D`E 2:C]Aq D`E2]Eq D`2:C]Iq D` 2):mC]Mq D`E2:C]Qq D`2:C]Uq D` 2:C]Yq D`E}2;C]]q D` y2u:C]aq D`Eu2I:C]eq D` q2e:C]iq D`E m2U:C]mq D`Ei2 :QC]qq D`e2:C]uq D` a2Y:C]yq D`E ]2]:C]}q D`E Y2U67]q D`E U2:aC]q D`EQ2:C]q D` M25:yC]q D`EI2Q67]q D`E2q:C]q D` A2:C]q D`E =29:}C]q D`E 92}:C]q D`E 52]q D`E12;D]q D` -2:]C]q D`E)2]q D` %2A:C]q D`E !2:C]q D`E 2]6%7]q D`E 2]q D`E 2-:qC]q D`E2 ; D]q D`  2 ;D]q D`E 2%:iC]q D` 2]q D`E 2:C]q D`E1!:eC]q D` 1]q D`E 1]q D`E1]q D` 11::CC`qP]q`q  b  D`D]q D` $a/! pY|^)-`!f@%D¿P]q D`` Dbg  ]r D`b`#DB]r D``!D] r D``B] r D``D]r D``0]r D``]r D``DbA } ]r D`F` DB]!r D``  `]%r D`` ])r D``]-r D``D]1r D``]5r D``"D P]9r D`F` D]=r D``D]Ar D`` D" ]Er D`F` Db]Ir D`` DB]Mr D``D]Qr D``Db]Ur D``"]Yr D``]]r D``"]ar D``]er D``D]1:EC]irT D` 1m:C]mr D`E 1:C]qr D`E 1a:C]ur D`E 1 :MC]yr D`E 1:C]}r D`EP1fDT`1f6 D= $Yˀ]rT D`E#`P]r D``80]r D`` ']r D``b]r D`` :]r D`` B']r D``D T`6 } ]r D`F` DB:]r D`` 1]r D`0H 1``/ `/  `?  a a 1` a 11Q8 `r]rI D`eT11111bbbbcc c ccccc!c%c)c`>a "a)`MWB)ab` W+a($`06b`(86b`@6`H6"`PY`X0a``h"a&pF`$xN` 6G`6b]`6S`"6"ia D$}1-ca/! C Y|\)-MT =1A1E1I1M1Q1U1Y1]1a1e1iiiiiiiiiiiiiiiiijj j jjjjj!j%j)j-jllllllllmm m mmmmm!m%m)m-m1m5m9m=mAmEmImMmQmUmYm]memimmmqmumym}mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmnn n nnnnn!n`yxabV`te aªa,ad b`.(0BaZ0a¢8b``@a„H`:PaPXBa(`a˜h` p"`Hxaaˆ"aNba^aȠba2a?a®ba@`aŠ¦`"Bar«a"aa<aDaLa8B`baF `|(&`”0_B`°8 bah@a&H`P"`¶XBa `¿`hBaœp¾ax`–a´5` [a`²i7" aJVa"{ `x``†"a`jan`¦`f]b`¾fb`vfa¨a\baa¸` `(Bv`00"a8)a@baHB`zPg`$Xg`’` haha0p>`x;aBb(a b@`4Ca6D`ba€Ba»aRaTb`apb`>`ŒaVM`aŽ`¼_" `_ `u_" a|a¬ ",`("a0`º8"a*@* aH a¤PB alXBIa`Iažhapb"axaša(a a˜¤aba~H`‚ `XhD$91%na{p/!  Y|)-!T$ U0``/ a  Q0D`8LI0a "Oi4LE0` 9 5LA0`3aV]ٿݿ)ѿUu%y9)1M=U}eIA!-iQE 5aտm]qY=1>L=0`($a /: @ $a/! p^)-`PfD] ]r9O D`ڱ^`90]DaL`D DO50c#@D*D802!-1+%B3--)55D,9.=b2AD4Ebb1ID.M"4Q/UDB9YDB7]DB}B6aD0e3i6m7qD"+u,yB5 *0}D/1DB8DT //////`Ma haaB;a9a ba(`.......`a"aba·a"a ¹a ("a 0$.}BGY]]Ubsa /! @ Y|^)-PZb"͗]vH"j $a /!  Y|)-$a /! $a /!  $a /!  $a /!  "JB` m.q.u.y.}...bbbbbb`aaa baµa "a(¹a0"a8"a@aHbaP·aXa`a hD$i.ba /!  Y|[")-qH$-.m7a /!  9H%H[$.=Ha /!  Y|H H)-$-Ya /!  HGi$y-Ya /!  Y|AGG)-I$]-I.a /!   GFUH$E-Va /!  Y|FF)-0Z*b Bb$a/!  ; ` baa%a=aQ a a(a 0 a 8Ba@aH¨aPaX"a`D)-$a/! Y|FJ$a/!  N$a/!  R$a/!  V)-$a /!  Y|ZJ$a /!  ^$a /! # b$a /! ' f)-$a /! + Y|jJ$a/! / n$a/! 3 r$a/! 7@v)-`3;9}z %*)*-*1*5*9*=*A*E*I*M*Q*U*Y*]*a*fffffgg g ggggg!g%g)g-g1g5g9g=gAgEgIgMgQgUgYg]gqqqqqqqqq`?7vaB^waBN< aB<= aBhb= aB "xaB"(xaB`0ByaB.8yaBZ@BzaBHHzaBLPB{aB X{aB`uaB>h"vaBptaB0xBtaBsaB,uaBDbuaBvaBJA aBFB aBLaB4= aBP"> aBB> aB:> aB b? aB8? aBdB@ aB@@ aBb"A aB(MaBlbB aBB aBR"C aB bMaB6(C aBf0C aB*8BD aB@MaBHD aBVPE aB$XbE aB\`"; aBjh; aB p; aBxB< aBbG aBE aBH aBTBF aBXH aB2F aB& D$!*qa:*/! Y|b~)-!:T ))))))`bn aB l aBn aB"l aBbm aB m aB($)Q,/E]HQV YQbra /! @ Y|^Zb ¡9BB $a /!  )-$a /! $a /!  Y|Bb L>bn 8MNB=$a /!  )-$a /! Y|$a /!  $a /!  e$a /!  )-$a /! Y|$a /!  $a /!  G  b%{D ])a)e)i)m)q)aYeYiY` q aBbr aBr aBbo aBBq aB s aB(u aB 0bw aB8"LaB@b{ aB H$Y)mYa /!  Y|)-y80 (((`aaBa$(a,-e0578:;;5DGaHPPVXYMbsyta/! @ Y|^Zb*"ɜ)E[I _a $a/!  ʲ0 `a a‰a"aa)- Zb"a$a/! Y|Ҳ0`a a"aa‰a$a/! @޲`‰$a/! ֲ Zb$a/! @0 `a a‰aa)-`"a$a/! @ Y|`Bq eBQB EjbjiQG8 y" "F>B}P—f ''''''''''''''''ddddddddddddddddd`""b`i6a ’`2a2) ` 2a4(Ba0a$8‡a@aH a>Pa:62.*& ()"  ().$&a$/! K +,u+-$a$/! O F$a$/! S J)$a$/! W N$a$/! [ +Ru+-$a$/! _ V$a$/! c Z)$a$/! g ^$a$/! k +bu+-$a$/! o f$a$/! s j)$a$ /! w n$a$!/! { +ru+-$a$"/!  v$a$#/! z)$a$$/! @~` =&A&E&I&M&Q&U&Y&]&a&e&i&m&q&u&bbb`aJa> aB a a a (" a 0 a8B a@ aH a"PaXa`Y a$h"apaxIa ; aaD$9&ba/!  Y|z\)-+$%Va/! W )*))q$%ua/! _ Y|a( ()BP $fD u'`P$fDQ'`P#fD1'`P#fD&`P#fD&` #D` #D` #D`$}"%ra/! _ Y|##)-$")ra/! _ y#%#r$  sa/! [@Y|U"u)`$a /!   $a /! # ³$a /! ' Ƴ$a /! + ʳ$a/! / γ$a/! 3 ҳ$a/! 7 ֳ)$a/! ; ڳ$a/! ? ޳$a/! C $a/! G VM ]r D`EVI1/ ]r D`EVE-/ ]r D`EVAqA ]r D`EV=)/E]8La riraV9]8La riraV5]8La rira`L` D   ]r D`)  $a/! p^)-`PfD]HdD `} % cDx ` Y a `3b`3"`3"`3`3bb`3 "`3`3 V1# ]r D``EV# ]r D`EV-# ]r D`EV) ]r D`EV%!? ]r D`EV! ]r D`EVPH}7:}jTOcDDVhD?V $a-! P`H ``/ `/  `?  a a)-``rP]r`rhR D`XD]rڴ D` $a/! P $a/! pY|^)-`ff D } P]r,` s]Tb·"B D`F` Dbg  ]s D`b`D" ] s D`F` D0] s D`` 1 ]s D`F` b]s D`` b1 ]s D`F` ]s D``']!s D``DbA ]%s D`F` B'])s D``D `2]-s D``D]δ0 `abA`+ } P]1sڴ D`F?a)-``δ]5s D`]CV $a-! P $a-! P`H ``/ `/  `?  a a)- D`DaD`9sP]=s `As]Tº" D`0D]Es D` $a/! pY|^)-`f6 D70]Is D``  ]Ms D`` P]Qs D``D']Us D``=  ]Ys D`#`bg  ]]s D`b`bA } ]as D`F` B']es D``D `6 ]is D`F` Di]ms D`` D]`H ``/ `/  `?  a a)-``qsP]us`yshR D`XD]}s. D` $a/! P"0 ` abA`+ } P]s. D`F7a)-``"0]s D`]b@VhCa >$a/!5PFT `Y a?`3 bhC`3 "ib@`3iC`3jD`3bk)- cDv `}HdDED($a /: @ $a/! p^)-`PfD] ]sh D`Pz^`]Da,L` DL`´^0L` VVV fDs` `D ` D] `"jYIEV fDs` `D ` D] `"BYa'EVVYV fDs` `D ` D] `"~YIEV fDs` `D ` D] `".YIEqL` E!cHQ1y79GyjwOc# <V ]s]T D`E5V $a-! P`H ``/ `/  `?  a a)-``sP]s`s]Tb D`XD]s D` $a/! P$ ` abA`+ } P]s D`F)-` `]DV ]s]T D`E5D;D";>Vh",VhB3).aJweED($a /: @ $a/! p^)-`PfD] ]s]T D`8Z^`]jDa`L` D0L` )RVFtL`SV fDs` `D ` D] `"YIEV fDs` `D ` D] `"6XIEVYV fDs` `D ` D] `"JXIEVYV fDs` `D ` D] `"X&EV fDs` `D ` D] `"X&EV fDs` `D ` D] `"X&EV fDs` `D ` D] `"X&EV^XVYV fDs` `D ` D] `"rXa'EVYV fDs` `D ` D] `"X&EVYV fDs` `D ` D] `"X&EV fDs` `D ` D] `"Xa'EV*YV&YqV ]s D`EV ]s D`EV ]s D`E WL`  E!c[[H5@ujEuOcC DD"DkDWb"D"DŒDb"Da]w$a/!57PF ` Y a`3 Œ`3b"`3 "`3"`3"`3bk`3"`3b`3"`3 bb`3"`3)- cDUw `}HdDzED($a /: @ $a/! p^)-`PfD] ]sީ D`^`]Da|L` D8L` W|L`%VUVY]UeiV ]sq D`Emjy&&&&&VW '!'VWVWV fDs` `D ` D] `"WIEVWqy0L`  iEz!cH 5M?!AAAmj%uOc#>D4ZDDBGDb5W?a'fx$a/!5PF` `Y a>`3 b?`3"D`3 b5`3 4`3bBG`3")- cDw `}HdDED($a /: @ $a/! p^)-`PfD] ]t© D`P^`]&DaL` D L`WZPL`VqWaV ]t D`EeiKvmjjV ] tAK D`Eq8L` iaK e E!cH. 5Q?%AAqjOc# DBLNDUQVJBOKrDbUQbMbN~Da!zJ$a/!5+PF ` Y aQ`3Q`3BO`3 bU`3"bN`3 bM`3K`3 bBL`3"bU`3)- cDw `}HdD^ED($a /: @ $a/! p^)-`PfD] ] tJ D`^`]DaL`" D,L` f~rNLL`Va]t`eiKvmjjNqV ]t D`EV ]t D`E,L` iaK E^!cH.5Aijww4Oc  'DB$Na#RdDED($a /: @ $a/! p^)-`PfD] ]tAK D`0 ֹ^`]DaDL`DL`NPL`VEV ]!t D`EޙV ]%t D`EV ])t D`Eq1XV0]-t D`V ]1t D`EV ]5t D`EV ]9t D`E$L`}raKEι!cV5I?Aww ]=tJ D`EV4E?Aww ]At© D`EV44A?A ]Et D`EV fDIt` `D ` D] `"}IEV fDMt` `D ` D] `"~a'EVxV}VvVxV&~VJV fDQt` `D ` D]`"BzrEVj}VyVyV~V}|VyF{Vu~VqVzVm fDUt` `D ` D] `"|a'EViZzVe4ww ]YtJ D`EVavvhV]ww½VY wwhVU4%?A ]]t D`EVQ4}Aww ]at D`EVM4ww ]et© D`EVI49wwbEVE4Qw}wBDVA4MwywbBV=4IwuwBV945wqwBAV5}4=wmw"CV1y4AwiwEV-u4-wewDV)q41wawCV%m4Ew]w#V! 1g Vi4)wYw`Ve4ww-KV2a4iAwYV]4eAww $a-! P`< ``/ `/ `?  a)-` `it]mt`qtAKz D` $a/! 'PY|x `  a N`+  } P]ut D`F!ab!a""aba 1a("a0Za8)-`(`z]yt D`]}t D`]t D`]t D`]t D`]t D`]t D`]V # $a-! P`H ``/ `/  `?  a a)-``tP]t `tv v Bw w  D`8D]t D` $a/! PY|H ` a%`+  } P]t D`F!`+ ]t D`FYa a)-``P]t D`]t D`]PL`D ]t D`  $a/! p^)-`PfD]V  ]t D`EV ] ]t D`EV\ ]t D`EHZk4Oc  AVyDa9~DED($a /: @ $a/! p^)-`PfD] ]t} D`x^`]DaL`DL`~XL`i V`V`V ]t`ta]t`I]D D`E91VQVQVQ5:V-V5iVRVRV)RqVARVe}L`I Ev!cssHkOc# DoV ]t`t)4RA  59q S =I ~]]E]8La bdibdabe ]t D`E ]t D`E D`EpV ]t D`EV $a-! P`H ``/ `/  `?  a a)-``tP]t D`@D]t D` $a/! PB ` a)-` `]D V ]t D`ED"pV ]t D`E V ]t D`EkV ]u D`EbnV ]u D`EmV ] u D`E-V ] u D`Eado~^$a/!5pF^)- `DaDMxf6  bn"A ` Dob@ `p? `; `D A ` DY }` < `kb= `"p"> `m> `-B ` HdDED($a /: @ $a/! p^)-`PfD] ]u D` ν^`]޽Da(L`D0L` 6~r*f L`ZrFsRsqrL`JprE!cHIYkTOcVaUV ]ui D`EUV ]u D`EVV ]u D`EDawZDED($a /: @ $a/! p^)-`PfD] ]!ui D`*^`]:Da,L` DL`L`ErL`Jp1 E !c~Vxx ]%u} D`EV  La`D UY])u D`x  $a/! p^)-`QPfD]VMjQVIjAVEqjIVAj ]-u D`EV=jAV9}j ]1u D`EV5jj1V1j9V-eIV)jIV%ij ]5u D`EV!j ]9u D`EVmj1Vj)Vuj!VjV jQxUxaV yj9VjQH}]k4Oc  ¨ MD aKLMDED($a /: @ $a/! p^)-`PfD] ]=u D`^`]DaL`DL`M]E!cwwHQQkTOcVI Vi D ma8TWDED($a /: @ $a/! p^)-`PfD] ]AuQ D`p&^`]6DaL`DL`"mL`L` E !cvH)'*]RS\1^A_mkqkukYxOc"@DV]D!VuVDBV=DADA~aVUDV}B6V9: ̀D6DVDB;V)RaVeDVDeVm*aVVE DVqDb VDVi DVaVmb3VD-DVMBa9d 6DED($a /: @ $a/! p^)-`PfD] ]Eu3 D`8^`]Da L`DdL`frvbjZnz~^PL`i Vm*V=~Aq$ya/! w Y|$a/! s $a/! o $a/! k $a/! g $a/! c ) D` D` $a/! /P `  aB a"a a  a  a( a 0Oa8Ba@ aH aP)-`4` P])w D`]-w D`]1w D`]5w D`]9w D`]=w D`]Aw D`]Ew D`]Iw D`]Mw D`] D`<mzqzuzyz}zzzzzz` QwvvBww]UwB D`]Yw D`]]w D`"v`aw]ew D`XDH ``/ `/  `?  a a L`Y L`aL`V$a/! @Y| `"ra)-`]>V>m($a /: @ $a/! p^`PfD] ]iwu D`^)-`]DaL`DTOcz"r>"] mDxL` L`SVWqL`VUW>Y($a /: @ $a/! p^)-`PfD] ]mwa D`0^`]Da0L` D$a/!5PF< `Y a)`3TB*`3UB)`3bV)- cDz `}HdDe4Oc )B*>DB)YP]qw D`]uw D`]yw D`]}w D`]w D`]w D`]w D`]w D`]w D`}]w D`y]w D`u]w D` iD`XemU]qyuyyy}yyyyyyyyyyyyyyyyyyyzzzzzzzzzzzzz`wn ]"R  ]wf D`Eu]8La  i a"ss $a-! P`< ``/ `/ `?  a)-` `w]wf D` $a/! PH ` a4aBa a"a )-``P]wf D`]w D`]w D`]w D`] ]w D`E ]w D`EsBttubuu ]w D`E ]w D`E $a/! p-^)-`aq!f)@6 P]w D``"  } ]w D`F`   ]w D`F`  ]w D``  ]w D``,D ]w D``*Dn]w D``#   $a- @ $a- P0 ``/ `/ `; )- DcD]wb D`$a/! pY|^)-`PfD B`]c`0 ``/ `/ `; )-`]$`3b B BHZ=5N $a- @ $a- P0 ``/ `/ `; )- DcD]wb D`$a/! pY|^)-`PfD r`]c`0 ``/ `/ `; )-`]$`3b B rH=5~`4B  }  ]wb D`EF`5D P]w D``.  ]w D`F` B ]x D``D•  ]x D`BM`1  ] x D`F`  ] x D``D"/  $a- @ $a- P0 ``/ `/ `; )- DcD]xb D`$a/! pY|^)-`PfD `]c`0 ``/ `/ `; )-`]$`3b b H=5 $a- @ $a- P0 ``/ `/ `; )- DcD]xb D`$a/! pY|^)-`PfD `]c`0 ``/ `/ `; )-`]$`3b b H2=5&`3D P]x D``D -`D" ]x D``(D"]!x D``D ]%x D``h } ])x D`F` DB ]-x D``-D ]1x D``B ]5x D``&D ]9x D``)"  ]=x D`F` B ]Ax D``0b]Ex D``!B]Ix D``$"]Mx D`` ]Qx D``%]Ux D``D  ]Yx D`F`  ]]x D``'" ]ax D`` ]ex D`]ix D``  ]mx D``" ]qx D``b ]ux D``+B ]yx D``/] ]D`Yzzzzzzzzzzz{{ { {{{{{!{%{){-{1{5{9{={A{E{I{M{Q{U{Y{]{a{e{i{`}xbBU`x]x D`D QD`DaDH M``/ `/  `?  a aE]`IA]D$ =`<aa$9a/!  Y|6)-P1fDP-fDP)fD%fIF`Db  `DHa5G`P!f"QP]x`x5 D``bc!`DViuMvYvevqv}vvvvvvv` eq}IvUvavmvyvvvvvvv`b4a4a@B5a" a a@ a(/a 0"n a 8 a@" aHMaBP5aXbNa`NaBhb a pbOaxOaB"ha%Bi`D$va/! K b)^ ]amyEvQv]vivuvvvvvvvm{ `i] `P]xq D`$  ` aB a $a/! p^)-`yf6 DP]x0` xfx"yyyBzz{b{ D``"]x D``']x D``D;]x D``B']x D``D `Db ]x D`` ]x D``D]]xq D`8H ``/ `/  `?  a a $a-! P`H ``/ `/  `?  a a)- D`DaDu{y{`xP]x D`D]x D`T uuu`B ` `³ aa¡ ` .a($ua /! Y|)-$a/!   aU  !(`P]x5 D`b ]eE]iD]mVN}DL`DLYYY`x ]x" D`E]` ]x D`E ]x D`EDHB ]x D`E $a-! /P` ` `/  `/ `?  a B a aB aa )a(v a0 a8)-`0` xP]x`x"R D`]x^ D`]x D`]x D`]x D`]x D`]x D`8D]y D` $a/! PY|0 ` aa a)-``RP]y^ D`] y D`] $a-! P`T ``/ `/  `?   a a" a)-`` yP]y" D`]y D`]y D` $a/! PY| ` a)-` `] $a-! P`H ``/ `/  `?  a a)-``yP]!y`%y" D``D])y D` $a/! PY|$ ` a"a)-``P]-y D`] $a-! P`H ``/ `/  `?  a a)-``1yP]5y`9y" D`XD]=y: D` $a/! PY|.0 ` aa a)-``P]Ay: D`]Ey D`](]]Iy" D`D` $a-! P`< ``/ `/ `?  a)-` `My]Qy" D` $a/! PY|z0 ` ab a a)-``P]Uy" D`]Yy D`] ]]y D` $a/! p^)-`PfD]V}VyVuVqHm"GjOc#VB V V$D VB V DDaLDED($a /: @ $a/! p^)-`PfD] ]ay%$ D`^`]Da0L` D L`L`EiL`E !ckHiGGkx%xOc# Db bV`V`"qqDV ]ey D`EV`DbV`V`DBra8E!$a/!5pF^)- `DaD{f6  Db ` b `"`"q"` qb`D` `Y }`Db ``DBrb`HdDED($a /: @ $a/! p^)-`PfD] ]iy D`XN^`]^DaL`D0L` 2.6" L`Vz L` E!cJJHeGyWjjOc0D VB VB  V_ D V D V Db8V D V" D V"  VB B V Vb D V VB] D V VD VB  V V:DB V DB D" V D Vb » b VDb V= V " Y. VB  V"  VBQ D V2Db VB V*Db V D" V B VRDB V  V  VD Vb D V" D -DVD lD" V  ].DB V  V Da~8DED($a /: @ $a/! p^)-`PfD] ]myA D`&.^`]>Da,L` DL`,"&*l L`Y. .Ea//].V ---!0---- .-!-4L` - u0/- E !cfHa WWE]m]klOc# D‡V $a-! Pu.`H ``/ `/  `?  a a)-``qyP]uy D`(D]yy D` $a/! P}/r ` a)-` `]DV`BV`V`V`DbV`B >BV 0]],U]Df#g`4#aY?$a/!5pF^)- `DaD{f6  D‡"`Db`b`B` `Y }``b`"`B ` Bb` HdD^ED($a /: @ $a/! p^)-`PfD] ]}y D` ^`]DaXL`D0L` f>0L` /i 5Vj|V fDy` `D ` D] `"z&E.(L`  I  .A E^!cTTH]Q]kTOcDbDBB~V$]LL`~bEbDDa '$a/!5pF^)- `DaD{fb"`DY }``DBb`B~`DHdD ED($a /: @ $a/! p^)-`PfD] ]y`y  D`h 2^)-`]BFDaHL`DL`@L`/vnwrwvw9>.ɒ0L`   v.^A fw- = E !cRRHYM]k4Oc Dbb^ a㓆$a/!5pF^)- `DaD |fb `DY }`b^ " `D `DHdDbED($a /: @ $a/! p^)-`PfD] ]y`yb$]LL`~EaD D`X ~^)-`]Da`L` DL`@L`/vnwrwvw>.ɒ0L`   v.^A fwEb!cYYHQkOc#DBDDVP]y`y D`V]y D`bV]y D`"V]y D`Dap DED($a /: @ $a/! p^)-`PfD] ]y D`P^`]DaL`D L`]E!ceeHIHYk1yOc#V"VB՘Bb ]DV`" Da}eDED($a /: @ $a/! p^)-`PfD] ]y D`H *^`]:Da L`D(L`&՘]",L` IqV} L`9E !ccHE]]i]kOcC B VBDB D¶ Dµ :BDbDDBDDa0-DED($a /: @ $a/! p^)-`PfD] ]y$`yZ ]yz D`E ]y D`E ]y D`E ]y D`E D`f^)-`]vDaL`D8L` :bDL`i f],L` ^A I E !cbH9Gyk|Oc@abV.D"}DjVDbD V $a-! P`H ``/ `/  `?  a a)-``yP]y$`yt`y5/$]]``F..h B ]y D`E ]y D`E ]y D`E ]y D`E ]y D`E ]y D`EH ]y D`E ]y D`E ]y D`Eb" D`xD]y D` $a/! PY|0 ` ab a a)-``P]z D`]z D`]!wV ] z D`E" DuV ] z D`ExV ]z D`EDrV ]z D`ED!kV" DiVD!jVbDvV ]z D`E D!lVDAyV ]z D`EDkVD!vV ]!z D`EwV ]%z D`E VDbV.Da3DED($a /: @ $a/! p^)-`PfD] ])z D`^`]Da@L`D\L`^vj} L`VuL`.E!caaH5PR\u]9_]__ekOcC  D" UD D>!" !B %"ED qDŠ[ Dua(DED($a /: @ $a/! p^)-`PfD] ]-z`1z  D`^)-`]"&DaL`D L`>!4L` %U!qEu L`E !c4H1&'}GWYk{%|TOcV ]5z D`EbD" a>CDDED($a /: @ $a/! p^)-`PfD] ]9z D`hV^`]fDa(L`DL`JL`i >vL`I vEB!c((V-]|| ]=zz D`EV)a|| ]Az D`EV!iG ]Ez D`EV'*IHmIYQ[fD` D ` D]Iz D``V*GHIYPQQRYSSYIZM[[\{{A||fD` D` D]Mz D` V*GXX\ufD` D` D]Qz D`VV ]Y|| ]Uzz D`EV eGmGyGG!|||Vi|| ]Yz D`EV|| V|| /V]Q||"V9|=||V]=]U||Vm||Vq|}|bVe|y|VM|u|Ve*|}VGG{{ ]]z D`EV\VGVG{{VG|| ]az D`EV&UGGQQ\{{||Y]P@/L4IHB1K&M$C )A: ?OF3N'7+D-.JE@68G< 2,K a"L aL aM aM aN aaHaGaFža;aEaDaCaBaAa@"a?Ba:a>a=bN a N a O aO a­aP aBQ aQ aR a S aBT aT a<U aV a"W aW aW aBX aX aY aY aZ a "[ a!\ a"\ a#\ a$*] a% ^ a&"_ a'Ba(B` a=` a)a a*Bb a+%b a,c a-c a.c a/f a0#bf a19f a2"g a3g a4"h a>h a5;a6h a7Bi a8=bj a9j a:k a;! a ad a?>bY a@0aAaB5Bd aCaD(U aE DVG}{{ViGuGG|V 5]|| %]LL`~EaD"V{| $a-! Pu.`H ``/ `/  `?  a a)-``ezP]iz D`D]mz D` $a/! P}/n ` a)-` `]V1]| | $a-! Pw`H ``/ `/  `?  a a)-``qzP]uzT`yzb´"B]}z D`]z D`0]z D`]z D`B D`PD]z D` $a/! ?P*w ` aBva1aa>a ba(;a0B'a 8'a@a HaP3aX4a`ah"ap)-`D`P]z D`]z D`]z D`]z D`]z D`]z D`]z D`]z D`]z D`]z D`]z D`]z D`]z D`]z D`]V{{ $a-! Pu.`H ``/ `/  `?  a a)-``zP]z D`D]z D` $a/! P}/b ` a)-` `]V)]{{%aDLL`~bEcV{{ $a-! Pu.`H ``/ `/  `?  a a)-``zP]zF D``D]z D` $a/! P}/ ` a)-` `]V%]{{ $a-! Pw`H ``/ `/  `?  a a)-``zP]z<` zFBb±"0]z D`]z D` D``D]z D` $a/! +P*w `  aBva1a >a ;a B'a('a0ba8a@"aH)-`0` P]z D`]z D`]{ D`]{ D`] { D`] { D`]{ D`]{ D`]{ D`]V\AVVV&VGV}Vy-|5|P]{ D`Vu)|1|]!{ D`Vq&&&{{`@LI`9 DEWYYYY`(%{fD ` " } P] (`]){ D`%  ]eE]iDP]mF`D ` D]u""" ]-{ D`EP]1{ D`5$=$ ]5{ D`E ]9{ D`E ]={ D`E ]A{ D`E ]E{ D`E ]I{ D`E ]M{ D`E ]Q{ D`E ]U{ D`E ]Y{ D`E ]]{ D`E ]a{ D`E ]e{ D`E ]i{ D`E ]m{ D`E ]q{ D`E ]u{ D`E ]y{ D`E ]}{ D`E ]{ D`E ]{ D`E ]{ D`E ]{ D`E ]{ D`E ]{ D`E ]{ D`E =A]{ D`@ $a/! p^)-`9PfD]H5dD 1`} -cD )` Y a  `3" b `3 " `3 `3b Z `3" >`3  `3 ³ `3b `3" " `3 `3 ! b`3 b" V%Q\V!e ] V&||V'aGW{|||V]qVmV iV Y*VMmVayVUWV|| D`fD` D ` D D`` uuuuu` a ia!ja ja!ka ka(!la0$ua  /!  Y|)- $a/! Py0 ` aB a1a``P]{ D`]{ D`] D`}}`{"y`{]{" D`]{ D``D D``PfDP!] )Pf"QP]x`x5BZ`bc!`D]`DH`P“  PfDIF`] PfD] PfD] PfD]`H{` 9` QUY]aeimquy}``/  `/ `;  ? a"aT a&BU aBV a$ _ a(d a0Be a8g a @i aHm aPp aXv a `b a(hb ap ax a}`"D$Ma-  $a-  v)8zPQfD 9`PI]{`]\ D`E]{`A]{`\=]{`}\P9]{`\5]{`]F1]{`]-]{` )]{S D`E %]{ D`EP!]{`]]]{`}]]{`\]{`]]{`]P ]{`\ ]{`]^]{`\]{`]{`q]{`}^P]{`=\]{`]{`=]]{`I]{` ]{S D`EP]{`]]{`^ ]{S D`EP]{`^ ]{ D`E ]{ D`E]{`=^]{`[]{`] ]{S D`EH (((` aaabaa $(a/!  Y|7)-  $a- PH ``/ `/ `?   a  `+ } P]q0 D)- D`DaDUFYG]GEbatD]{%Y $a/!-pF^`ff D`Du`b;R`D  ]``` =Y]LeD]K] $a-!-P`< ``? `? `?  a)-` `i]m` =]K] $a/!5pF^)-`Pf D  ]}B"`  P]y`  `IE` D`D`D, ]` $a-!-P`< ``? `? `?  a)-` `i]m` =]}] $a/!5pF:^)-`Pf D  ]}BB"`  P]y`  :`IE` D% ]` $a-!-P`< ``? `? `?  a)-` `i]m` =]y] $a/!5pFn^)-`Pf D  ]}vB"`  P]y`  n`IE`  } RD` D`DY E`  `D+ ]` $a-!-P`< ``? `? `?  a)-` `i]m` =]K] $a/!5pF^)-`Pf D  ]}B"`  P]y`  `IE`D] m]{q D`E i]{ D`E $a/! p^)-`eFf D% } P]{) D`D`  ]{ D`D`  `DS  ]{ D`B` D] $a/! p^)-`aEPf DS  ]{ D`B` D `] $a/! p%^`]FPf  } P]{1 D`D` S  ]{ D`B` D`] $a/! pa^)-`YqPf  } P]|m D`F` S  ]| D`B` D a`] $a/! pU^)-`UFfS  ] |a D`B` D } P] | D`F`  U`D ]| D`F` q ]| D`F` D] $a/! p^)-`QEf6 } P]|) D`D` Db ]| D`D` DS  ]!| D`B`Y ]%| D`D` D1 ])| D`D` D `D } P]-|) D`D` ] M]1|q D`E I]5| D`E E]9| D`E A]=| D`E =]A| D`E 9]E| D`E 5]I| D`E 1]M| D`E -]Q| D`E )]U| D`E %]Y| D`E !]]| D`E ]a| D`E ]e| D`E ]i| D`E ]m| D`E  ]q| D`E  ]u| D`Ea]y|`  $a/! pY|^)-`9^%})}-}1}5}9}!f@(žP]}|`|q D``"D } ]| D`D`&Dœ]| D``Db ]| D`D`D  ]| D`D` ›]| D``DŸ ]| D`D`$ 0D ]| D`D` B ]| D`F`  ` P]| D`]| D`` D ]| D`D`" ]| D`F`'B ]| D`]| D`` Dš ]| D`F` " ]| D`F` %DB ]| D`]| D`` D]| D``DB ]| D`D`#Db ]| D`F` DS  ]| D`B` D™ ]| D`F` D ]| D`D`B ]| D`D`D] ]|q D`E ]| D`E ]| D`E ]| D`E ]| D`E ]| D`E ]} D`E ]} D`E ] } D`E ] } D`E!4u99;!<]} 04EGuZ1sisMt9u]Z]/0ssux5y]]/0)Hssux]] $a- @`< ``/ `/ `?  aJ)-`0E`a/D]} $a/ @$a/ PY|0 ` a 1 a m a )-``P]} R]H^`0k]9]0<EFkUss1uy]]}k]<F]]!}m]],04BkYs%tEt]]%}s] D` D` D` D` }D` yD` )q!f@cabkaD"balaDga Db`a DhaDBea  gaDBha`aDaaDBiada iaea  da Dfa Dja D a  DbaBjaD]e069FZks-tt-u]P])}i ]HaY$,;<>M@@ABQBB]jtw4Oc DmVDlaa,`DED($a /: @ $a/! p^)-`PfD] ]-}  D`h%v^`]DaL`5 TDL`rL`eqL`Ej!c"" YD` UD`AI`&q³DH =MFF%F_` `%`E`M`U`ttD` 5EFF!F__`!`A`I`Q`ttD`19`&Y ]1} D`EHP-]5} D`)y9]9} D`!]=} D`]A} D` ]E} D`B DQbY~DDaD$Qza/! _ Y|U)< )``/ `/ `?  aJ   L`5 La  L`3 La ]I} D`E  L`+ La$ `".aŠa$a/!  Y|&)-    L`) La  L`' La  L`% La  L` La  L`A La  L`A La q L`! La iD` aD` ]e`M}1 =  ]Q} D`E $ Y`aaB a$U% a/!  Y|)-   M L` LaEff DP]U}  D`` DBS  ]Y} D`"2`D $]]} D`EB"`D]a} D`` Db]e} D``D8]i} D`` D"9]m} D`` !]q} D``]u} D``""]y} D``  `"4P]}}  D``D8]} D`` D< 5``/ `/ `?  a  - L`a La ! L` La D``} ] $  `" `Xa$ a/!  Y|2)-U    L`A Laff k ]}%  D`E`bl ]} D`E` a ]} D`E` X ]} D`E` Db`DlR`  ]} D`E`DBn ]} D`E`Dl ]} D`E`b4D`D4aB z` B ]} D`E` Dk ]} D`E`D ]} D`E`  `B5D`Da ]} D`E`bm ]} D`E` ]} D`E ]} D`E ]} D`E ]} D`E ]} D`E U}]} D`E ]} D`E ]} D`E ]} D`E ]} D`E ]} D`E ]} D`E ]} D`EP0F5x]}U  ]}%  D`E ]} D`E ]} D`E DQb$a- SP  ``/! `/ `;# a !aa `   ` B `( `0" `8YŠa@[ aH`&P aXb4a` `# } P]}M D`F" `ha$p"ax) DQb DbDDbDV]}`l ``/  `/  `; Ba a `3  }  ]~%  D`E ]~ D`E aba   L`! La  L`a La0}] ~\` ~  "! 1 9 A e a  $a-! P`< ``/ `/ `?  a)-` `~]~ D` $a/! P ` a)-` `] ]~ D`E D`0ym}]~ D`u]!~ D`q]%~ D`m])~ D`i]-~ D`T euuuu`   L`B=b;>=b5 Lf B=`b;` >``=` b5`($aua /!  Y|)-  Y]1~ D`E Ui}]5~ D`E Q]9~ D`E Mq}]=~ D`E I]A~ D`E E]E~ D`ET Auuuu`   L`;<< Lf aa;a<a <a a($=ua /!  Y|*)- V5 %-5=EMU]emu} % Y a i q y                 Q!Y!a!i!q!y!!""""""""""# ###%#-#5#=#E#M#U#]#e#m#u#}###e$m$u$}$$$$$$$$$$$$$$$$$% %%A%I%Q%Y%a%i%q%y%%%%%%%&&&&&vv v vvvvv!v%v)v-v1v5v9v=vAvyyyyyyyyyyyyzz z zzzzz!z%z)z-z1z5z9z=zAzEzIzMzUzYz]zazezizM}`$ 1`"8`8` $-]$a/!  Y|IB)>   % L`A La  L` La D`  D` D` D` D` D` D` D` D` D` D` D` D` D` D` D` D`P} `I~=  "Be I i Y a  ]M~ D`Ey Q yccccccccdd d ddddd!d%d)d-d1d5d9d`!a aa!aa, a(!a0a.8Aa0@aHa"Pa X!a`ah!ap!axAa$Aaaaa a*Aaa&aa(D$u=da/! c Y|])-5   m L`A La aD` YD`QfD` D ` D MD`EfD` D` D AD` 9D` 1D` )D`!fD` D` D D`fD` D` D D` fD` D` D D` D`fD` D` D D`fD` D` D D` D`fD` D` D D` D`fD` D` D D` D` D`` %-5=IU]`Q~   = A U~Y~E Dq }  I]Du]8La |i|a|   ]]~6 D`E 1c5c9c=cAcEcIcMcQcUcYc]cacecicmcqcucyc` aA{a}a !a a( ^ a(a0 a8"/ a@"[ a&H aP a"X" a `a h ap!ax a^ aaaa$B aD$}ca/! S Y|]N)-    L` La D`$a/ @))`P]a~ D]  SS^)-`P}`P]e~ = U   E   I   M Y Q bg g "h ! y``/# `/) `?  YaZabZaZa b[a \a (bNa0Na$8Pa&@QaHb\aPRaX\a`B]ah]apKaxbMaOaD$ua- S $a- O $a- K@ ` ``/# `/  `? YaZabZa Zab[a \a(bNa0Na8Pa@QaHb\aPRaX\a`B]ah]ap)-~  mD` iD` eD` aD`$]a/A@>Zq  ``? )-` YaIFP]i~ ]m~D` U``/  `/  `?  aJGa bHaAa ID` AD` =D` 9D` 1D` -D`x )D` %D` !D`$a/ @m2,` 9 P]q~ ]u~]y~5R]}~D]`^)-`Da = A XE ~~~~~~~~ ``/ `/ `?  aJ AaBaBaBa bCa (Ca0BDa8Da"@aHBEa PEaXFa`GahGap  D`  D` D`  D`  D`  D`  D`  D`  D`  eeeeeeeeeeeeeeeeeeeeeeeeeeeeqqqqqqqrr r r`))Ta:ca6Ada4!aLa ^a"(Aa0aa<8 `D@$a- PT``/ `/ `? ba  aJBQa) DcDaa$HaP:a>X` `5 aFhaPpaaxa!a  a,aJab aa2!`0$a- /P ` `/  `/  `?  a  `+ } Dba ta a bua  a (Ya 0)- D`DaD!+a&a*baIa.B>a %`$a- PH ``/ `/ `?   a  `+ } D)- D`DaD`m baBnaHboaja `(Bsa@ sa(a0baN8I `8@$ ra,+/! Y|b&)- L ` ,L ` eVOVOVOVOVOVOqL `& 5 ($a /: @ $a/! p^)-`PfD] ]~Z D`~^` ]DaLL`D$a/!5PFT `Y ae`3 ""l`3B`3o`3b".`3 ")- cD } `}HdD TO c".B5De&D"l o    ]~  D`X  $a/! p^)-` PfD]  Ft`~P]~`~~ b  D`D]~ D` $a/! pY|^)-`f6DOP]~ D``DP]~ D``DY B`  `Db } ]~ D`D`D]  -FtEyIy`~P]~z D`D]~ D`j  iFt`~]~`~|    D`D]~. D` $a/! pY|"^)-`f6P]~ D`` DM]~. D`` M } ]~ D`D`DS  ]~ D`B`DY Q`  "`Db]~ D``]  Ft`~P]~8` ~"y | „ " ‡  B  " b  D`D]~ D` $a/! pY|r^)-`f6DS  ] D`B`D1P] ~ D``DY "_`  r`Dy  ]  D`©` } ] D`D`"  ] D`B`]  Et`P]`!|    D`D]% D` $a/! pY|^)-`f6 DB } P]) D`D`b]- D``]1 D``DM ]5 D`D`  ]9 D`D` DM]= D``DY "T`  `D]A D``DS  ]E D`B`]  Ft `I]M D` $a/! pY|2^)-`fDY b?`  ` } P]Q D`D` S  ]U D`B` W ]Y D`D` D]Hr ]]E"r2  yF}t}`]P]a(`eb{     n D`xD]iz D` $a/! pY|^)-`f6DS  ]m D`B` } P]qz D`D`D1]u D``bV]y D``Y b `  n`D]} D``]  9FtMyQy}`P] D`D] D`  =Ft}`]<` b{ }  B  „ " ‡  B   D`(D] D` $a/! pY|^)-`f6 !DP] D``DS  ] D`B` } ] D`D`  ] D``1] D``{  ] D``Y BZ`  `b  ] D`"`DP] D``]  1Ft} `] D` $a/! pY|:^)-`fDY ;`  ` } P] D`D` S  ] D`B` W ] D`D` D] } E9s=sEst}`] D`D] D` y Ft}`]D`y { b{ }  B  " „ " ‡    D`D] D` $a/! pY|^)-`f6 $DP] D``S  ] D`B`­ } ] D`D` ] D`D`  ] D``1] D``{  ] D``Y f` # `b  ]  D`"`!DP]  D``] u mFt}`]`|  B  D`D] D` $a/! pY|^)-`f6P]! D`` DM]% D`` M } ]) D`D`DS  ]- D`B`DY O`  `Db]1 D``]8Le `  s:ttqhLa `%&5tQ tuY *uus}uvtft91tL] `3i U V ]5 D`EV ]9 D`EV ]= D`EVHV ]A D`EV ]E D`Ea V,N]$N]P]I D``]M D`]Q D`]U D`$]]Y D`B`]] D`]a D`]e D`$]]i D`?`]m D`]q D`]u D`$]]y D`y `]} D`] D`] D`$]] D`b`] D`] D`] D`$]] D`=`] D`] D`] D`$] `] D`] D`] D`$]] D`Œ`] D`] D`] D`V )f6 ŒaDbay aDaIaDBa?a a]V ]ŀ D` Ee ] V ]ɀ D`EV ]̀ D`EV ]р D`EV ]Հ D`EV ]ـ D`EV ]݀ D`EV ] D`EV ] D`EV ] D`EV ] D`EV@V ] D`EV ] D`EV@V ] D`EV ] D`EV ] D`EV ] D`EV ]  D`EV ]  D`EV ] D`EV ] D`EV ] D`EV ] D`EV ]! D`EV ]% D`EV ]) D`EV ]- D`EV ]1 D`EV ]5 D`EV ]9 D`EV ]= D`EV ]A D`EV ]E D`EV ]I D`EV ]M D`E($a /: @ $a/! p^)-`PfD] ]Q D`ln^`Y ]~Da4L` DOU c6Db%D U BDDbDbbrDDB b~DB:B½"D"nJD" ] F"&DJ DBD¿DB.D"Q VDDD e DVDDbfD">bzD""bD"D"DD"D"2VDY ~DDba D"{ i  M Q ]Uu  D`hm  $a/! p^)-`I PfD] LA `($a /: @ $a/! p^`PfD] ]Y+ D`@^`= ]DaL`D4O9 c DbJDL5 ` - wL1 `ɒw4L- ` V`BV` V`V`V`&V`.V`BV ]]`aA  D`EUV ]e D`E($a /: @ $a/! p^)-`PfD] ]i D`^`) ]"DaDL`DO! c# DUb BDbb bD L `  L `VL `9U;VtR^]yBEXISTpFbenstfMCPNODvRc()=($a /: @ $a/! p^)-`PfD] ]m`q=  D`N^)-` ]^bDaL`DTO cU;> D9DbF@L `.:t/=  ^sbauA  L `($a /: @ $a/! p^)-`PfD] ]u`y9 ]5/t50I]D]D]D]D]D]D]D]D]D]D]D]D]D]D]D]D]D]D]D&]D]D]D]D]Ds ]Dr]D]D]D]Da!I]DB]D]D]D D`@ ~^)-` ]DaPL`D4O c DBD$L ` T1  \L `Tj^aVR}VV fD}` `D ` D] `"yIEV{V{V2{V fD` `D ` D] `"*~IEq&R^j WL `VhVeVhVef($a /: @ $a/! p^)-`PfD] ]e D`~^` ]DaXL`D$a/!5PFT `Y a `3 H`3bV`3 b* `3" `3)- cD - `}HdD5 TO cD* v nHbVr zL ` $L `VVqr WPL `V`V`V`VfVhVgVfVfVfWV ]f D`EWV}hmVh WW($a /: @ $a/! p^)-`PfD] ]f D`^` ]DaDL`DO cC DbDDbbτDWDb WDbBm"DWDWD L `  L `>L `ѕ($a /: @ $a/! p^)-`PfD] ]`-  D`H.^)-` ]>BDaL`D4O c Dtbѕ"L `I 5 1 ,L ` i %I)U=L `($a /: @ $a/! p^)-`PfD] ] D`b^` ]rDaL`D4O c bCDD L `($a /: @ $a/! p^)-`PfD] ]`%  D`^)-` ]DaL`D4O c DBDL `TL `$L `m)eiq($a /: @ $a/! p^)-`PfD] ]`!  ] D`Ea]8L`  "--".."//"01 m )"`  D`P^)-` ]Da L`DOy c#")± iDmBAqDe& Lu `m Lq `m Lm `q;($a /: @ $a/! p^)-`PfD] ]`  D`^)-`i ]DaL`D$a/!5pF^ `DaDe qUUY5ff B`"H` b E` b3B`"5H`  bJ`D4K`DF` D"ObG` "B`3bD`D3@`5L`B4I`DY }`bA`y C`-"E`a"K`DHdD Oa cC B`m "5m4ub b3mDD"Omq;3mD35mB4mDmy znanD-~n L] ` LY `qLU `V $a-! P`< ``/ `/ `?  a)-` `] D` $a/! PV ` a)-` `]ɒ($a /: @ $a/! p^`PfD] ] D`r^)-`Q ]Da$L`D4OM c JDByɒ  LI `zu LE `u LA `($a /: @ $a/! p^)-`PfD] ]Ł`Ɂ Y]LeD ]́ D`E D`0^)-`= ]DaL`D4O9 c D"~ DL- `!   L) `" Rqq L% `($a /: @ $a/! p^)-`PfD] ]с,` Ձ MF 4RD D`^)-`! ]Da$L`D4O c "?DuL `[ َ9*grggh>hI q)zhi 5~k lu1=!yu=y 2V. !9 Vmn m- Ro  o opz YR !A:L `sA2gzgg hFhymhfk=jll*}9 E)}ٚEVJ!6^6!&VюV|VzV~VxVVyV{V"}V.zVxVxV&yVzV}VzVxV|V~VNV{V{VZyV|q;zmouq5Zo >!o  p  IEHL `VV )PfD]V Pf|  ]ف D`E`B}  ]݁ D`E`D}  ]ၗ D`E`]V ]偗 D`EV ]遗 D`EV ]큗 D`EV ] D`EV PfD]V ] D`EV ] D`EV ] D`EVa]9L`zB{{B||b}~ ~IbbB"b‚bB"‡b"Bbb"‘% B’I"* ) b+ b, B. Nbb4 b{bB7 8 ": ; ; = > E`XV ] D`EVv"V ] D`E($a /: @ $a/! p^)-`PfD] ]  D`%6^` ]FDa 9PfD}`  `D ` D] D`E  ] D`E  ] D`E  ]+ D`0E  ] D`E  ] D`E  X_UP`v"a]`. ] D`E ] D`E] D`$a/! pY|^)-`fDo  ] D`E` ` ] D`E`x  ] D`E`D]c  %;!D`P]`e"   D`D]6 D` $a/! PY|*< ` a"a"a a)-``P]ł6 D`]ɂ D`]͂ D`]  ]т D`E  ]Ղ D`E  ]ق D`E } ]݂ D`E u ]႗ D`E q ]傗 D`E m ]邗 D`E i ]킗 D`@Eae ]`$a/!5pF^)- `DaDa % )yff b`D"` "`b` ` Db ` b` Db` 0Dbb`"``Y }`DHdDA $a/!5pF^)- `DaD]  %}f6> `Db`D`b`"`DY }`DHdD= PY ] D`$a/!5OPF `Y a#b`3"b`3`3b`3b`3 "`3!`3 `3bb`3%"`3`3"`3b`3"`3B`3`3bb`3 "`3)- cDU  9 RRRWMY l `}HdD1  M Q ] D` $a/! p^)-`I PfD] $%a- @< ``/ `/ `; BSa)8`E ` ] D`ED] D`E A ] D`E= ]`Xy+9 ]" b   b b BbBI 5 2M:C] T D`EN"1 I]D U7]P]  D`] D`] D`] D`] D` - ]! D`E) %]%+ D` $%a- @< ``/ `/ `; %a)8`% ` ]) D`ED]- D`E ! ]1 D`h EP ]5 D` ]9 D` ]= D`  11:uC]AT D`E  ]E D`EL ` (L `eVNVNVNVNVNVNqL `Z]($a /: @ $a/! p^)-`PfD] ]I D`^` ]DaL`' @D$a/!5PFT `Y aB `3 b`3B`3 b `3"b`3)- cD B `}HdDTO cbD DbZB B]$L `  dL `)V $a-! P`< ``/ `/ `?  a)-` `M]Q D` $a/! PB ` a)-` `]ae-V^NV fDU` `D ` D] `"JIEV>PVBPV fDY` `D ` D] `"zPIEVvPVFPV fD]` `D ` D] `"NPIEVJPVbPV*Pq1VL `"  ޻ =    j  }  V" V ]a D`E}1X&2rR^j>J' W($a /: @ $a/! p^)-`PfD] ]e D`^` ]DaL`, 4D$a/!5PF `##Y a?;`3bb?`39"`3f`3'X`35bQ`3A"B`3-BZ`3)O`3b"H`3"T`3b `3 ^`3#b"_`33""T`3 "=`3Z`3CbK`3"`3=b`3`3bbs`31"`3+B`3;`3Ebb`3"`3 `3`3/b`3"B`3%|`37`3b"`3!")- cD  `}HdDO c"@Df D"Hj^}D>Db? "T DbrDbD'"_ Q }B O "=T ^B&; DZBZ ޻KX=b  RDjD" W1X|D2DBJDbsX ) L `   < d = A      !  % ) - 1 5 9   $   H  `  x l  D  T @ X P h p (  4 0 , t \  - )  !   | 8 1 y m i u q }                                       = A E I M Q U Y ] a e i m q u y }       ! % ) - 1 5 9 = A E I M Q U Y ] a e ! ) - % i m 5 9 ! E 1 ] Y U Q M I a i e } m q y       u           !        %                  1 5 - ) U Q = A E Y ] a e i m M 9 I q    }     u y        I                     M     !     % ) - 1          = q A E I Q M U Y ] a e i m y u   q } 9 5    = 9 5 1     m i       e a E A u q     ] Y     % ! - )   M I U Q } y                   e U Y ] q a   i m      y u }             %                 )  !     Y - 1 5 9 = A I M Q E U    U    m q u y e Y ] m q a i   -   ! % 1 ) u % E I 5 ) - = y 9 A 1 } a e i } ]                              Q M   5 E 9 = A                  Q u } y                               O c D A V fDi` `D ` D]`"PrE Q VP m  D   M VPD ڷ mD ! V fDm` `D ` D] `"Ja'E ]VD Qκ c } VQ ޸  -f  }D !D QV bD mƓD D D E !E  b VKD e RD 9 V fDq` `D ` D] `"&KIED VS ! )BD u )X VD  U VQ  VS VD  } V fDu` `D ` D] `"bIE ab  o V RD UwD    (VL ,VM DD 4VL JD b ImD 1  XD c @VK  ] UM u VyD V fDy` `D ` D] `"}&ED y  I - VJ X azD TVK  VnJD X ] X }VD iZD iʓ Iֺ hV>L ^  1ZD tVM ڸ o y X 9 U  VK 1p  V fD}` `D ` D]F`"JE  VbT ζ MD  XD X D IlD & dD YV -cD 9eD  q“ -} X UV ^ . qD r ]֓D  o VfK % V fD` `D ` D] `"Ja'E VRD VN ]X 9V uҸ Q* V Qq  V !q = V fD` `D ` D] `"Pa'E AVD  D    Y VV V }X VND VL VFR VD -mD Օ  VK ]ZD -B 핂D 6 D VR VND c VR iV alD VzL  VJJ -yV VKD d =X  Mb VK jD VD ] V.Q eV vD a VBQ UޓD VJND 5 D  VJ XD 5p >D !uZ m )p jD V:T VM i VV y 'D o e VVQ VZRD vD VNK E o ) V*UD D fD  bD VFJD }~ ) W ]VD Yړ u VQD > %VD %qV =VD  V 1  ME v 0VLD i 5n %E m& 5E AX 2 b N U VV UV MX DVK D ! VU V !mV MҺ VS  aZ 5V V IVD %E VP Y D UX =VD mD  `VKD dVRJ -V MMD YR VK  V fD` `D ` D] `"JIE xVK  X VJS !V 5 yVD  EV E D fD bD A 9VD q VK D %cD 9 VzUD VQ uVD X & -p ُ ay&D yX >D EVD VM }  VK iVD  VL VVM VKD V6N 1 EX  !D M[D VSD CD eZ } iXD }D IV }A` qVD  V fD` `D ` D]F`"JE D IX VR VK 6D X V"S VK 6 ʶD d I[D VBM VM ej I VUD bD VM q Y V fD` `D ` D] `"Q&E = V fD` `D ` D] `""Pa'E 1VD V6SD V fD` `D ` D]F`"rJE V fD` `D ` D] `"&Pa'E  e& E> j Q[ uD "D y V fD` `D ` D] `"|IED e VVV VS  1}VD V2R eD }!' ָ E VNT VjMD C MD Q5 D aV E m  D oD AfD V~K D ND 5 VTD VL AmD VnR ) VJ ] eΓ qZ  VK A AV D eo  )V VQ VR r  *D D <VNJ  X VD b  VD  %yZD  ћ f VT Z i D YX  VS F ) y)` =o %D Uo i VjQD 5 V fD` `D ` D] `"Ka'E D    VvTD pVfL m V~Q iD  ]bD mb VR QmD 5VD VrSD 1 W ]o  :D qD D V V fD` `D ` D]F`"JE q&   VKD ED q V~~D UD eED  VTD q VQ  VR  VRD VK D V N u Uʺ -D } y oD VK MVD VS u Y  % ZD VL  JD ED U ޶ mZD V fD` `D ` D] `"~}IED !V"N QXD uD nD *D  VT VKD E VU ] V.V eV y VQ moD YU V&T VSD ED D )uV =D  5F VD qXD 9 ]D i&D  VKD 9D eD 5 V D z %D Ub uX N QV YV ʷD ٛD IbD bD mED ):D VD  D ! VD % ʞ $VbK e'D X cD aVD =j 1 V fD` `D ` D] `"Ja'E 8VN =2 V^SD uD  !X ilD m HVK ! C E V fD` `D ` D] `"PIE q݀D - [ aXD  VTD PVL  D XVKD - V>UD -V~M \V.MD lVK y E |VrN )VM YƺD M:D :D  u`  A" MVD VD eX  IJ mV 9XD ƞ mz Q VU U A'D VK R Eں l A޺ M VUD =  VRL 1[D 9B r 9D X VD D CD VP DD )}ZD aғD V*L V:K 9y VM  : VD  V VT 1 VRU  p V = VU n a VBVD V 5 VfUD irD EcD I VP mXD VK VFO % VU aD  VT A VU m VVD VK V2O  B -E h a] $a(" @$a/! pY|^)-`PfD `]c^`P a]  h a]$a(" @$a/! pY|^)-`PfD `]c^`  fDŃ` `D ` D] `"OIE h a]Ƀ $a(" @$a/! pY|^)-`PfD `]c^` h a]̓ $a(" @$a/! pY|^)-`PfD `]c^` h a]у $a(" @$a/! pY|^)-`PfD `]c^` $a/!5`^` 5EEFu! fmqDB'P]ՃI D``'B*]ك D``. D<9R`O fD ` `D ` D] `"'IE` D3E`>BIP]݃I D``cDE]გ D``_DH]僒 D``b"!`"`2B69:`C.&` ] D`E` (`%">`S"=AR`Q(`$ ]I D`pE`k"JP] D``eDb.&`hD ] D`E`f.] D``62Q`;D".] D``5 ] D`E`D&`BeT`D"?QR`U  ] D`pE`iD=e`RD6Q`D# ] I D`E`nb ]  D`pE`jDb0P] D``8! ] D`E`mDB ] D`E` D:]`LD7Q`FDB5Q`A lD2}`< ]I D`E`BBP]! D``ZD9R`JDB;)R`M)]% D``+DD]) D`H`^ ]- D`E`D*]1 D``/$ ]5 D`E`o1]9 D``9  ]= D`E` L`C]A D`P`]I]E D``dD5`Bb fD % ` `D ` D] `"'a'E`!D(P]II D``(! ]M D`E`lD ]Q D`E`, ]U D`8E`D-]Y D``4Db`D`Db9R`ID/]] D``7D>IR`TD fD 9 ` `D ` D] `"6(IE`&D(P]aI D``*D"G]e D``aDb`q`B7=`EDb:!R`K DJmT`p DB+]i D``0 `DB,]m D``1D ]q D`xE`g`D,6`3D" ]u D`E`DB8R`G;1R`NbFP]yI D```DA]} D``YD ] D`E`D fD ! ` `D ` D] `"'a'E`D<`PB `b` Dn'`MP]I D`P`\D fD 1 ` `D ` D] `"(a'E`"P]I D``) D`D"@] D``WB] D``[1EK`:D" fD 5 ` `D ` D] `""(a'E`#4Q`@8 R`HD ]I D`E`-"3P] D``=bb` @] D``XB4Q`?D ] D`E`DBr'`D?] D``VD G 5FYYYt]tatt `]r D`] D` ] D`E ] D`ED] D`b   ] D`# $a/! p^)-` PfD]  cD`  `Y a b`3"b{`3 `3B`3b`3 "~`3 y ]ń D`E u ]Ʉ D`E $a-! P-`H``/ `/  `?  a a)- D`DaDq aFt`̈́P]ф`Մ B  D`D]ل D` $a/! pA^)-`m fD } P]݄ D`D` Y `  `Œ ]ᄖ D`D` S  ]儖 D`B` D]Li ` (Le `a^nqV ]q D`E0La ` VM~pV ] D`EbuR}V($a /: @ $a/! p^)-`PfD] ] D`( ^`] ] Da,L` D$a/!5/PF ` Y aB`3bM`3 "N`3Nb`3O`3bPBI`3"Q`3Q"`3 R"`3bSI`3 "T)- cDY B `}HdDOU c# IDRB"}DpD"DbbDBIuLQ `jLM `eqLLI `¸V%VY]U*ViƸmVIV ]q D`EMyp($a /: @ $a/! p^)-`PfD] ]q D`7Z^`E ]jDaL`) DD$a/!5KPF `Y a`3`3`3b"`3#"`3`3`3b`3"`3`3 b`3 b`3 "`3`3"`3b†`3"`3!)- cDA B `}HdDO= cC iD¸DbmD*JD"MDDFNƸ]"YUDVD†ypDBL5 `  L1 `ZqL- ` Va]TL`)*E`V]TL`()*E`V]`V]`V]`6V] `5M6*V]L`(B"B&'b'12()* E`AMMMYM^SSaB^uju}($a /: @ $a/! p^)-`PfD] ]  D`!^`) ]Da^uD6Db*b(BCjuB.DL^'D;DB-"/NSD,",AMD L! `L `qXL `V ]y D`xEV"R V ] D`EVf! fM P]`Bp D`@`b] `! Ab'`D} ]M`Qy ]M`Q]! D`EE`*I P]`BpF``]%$`)Hc D` ` `]`yBp`D"%`,^P] `! ^'`7"b]- D`` v ]1``yvHa]LL`]"rH ]5 D` EE`-%]HD D` E`DBP] `! EB'`2Dz`'D_]%$`)yHcz` ]9`=]<e ``D D`E`DDP]A© D``PDe]Ey D`` T ]IJ D`E`UD\ ]1``\Ha]LL`!] ]M D`E]]]P]Qy D`]bE`I]DE`:]U D``E"E ]9`="E]<e E`1`F`DE`QD ]1%E`AP]%$`)yGY]aez`"t]i D`` bx]m`q% D``%[ ]1``[Ha]LL`!]P]u D`]b]]] ]9`=yB[]<e `DEE`I]DE`9bF ]1``ybFHa]LL`!]P]m`q]yAK D`j]F&]B%]3b]B>!]P]m`qy'jE`I]DE`R] `! ~'`]XP] `! yYX`6" ]1``"Ga]LL`]]}}B D`G]bP] D`G] ]y D`EG]jGE`I]DE`hD"] D``bf] D``] `! !Q'`N ]9`=]<e `¨`DE`XD:`j ]1``yGa]LL`]"G6E`I]DE`qD ]9`=y]<e ``b`DE``D¸ ]1qE`WDc ]1``cHa]LL`]P] D`0`E`=%]`DE`Ab ]1``ybHa]LL`!]bc ]9`=a]<e Bb`DEE`I]DE`@BT ]1``yBTHa]LL`!]B%]`r]bSIbE`]`IDE`TD ]1``yGa]LL`]P]}B D`G6E`I]DE`mA ]`yBpF` ]9`=]<e ``DE`GD ]1``yGa]LL`6E`I]DE`eDfP] D```b` ]1``yb`Ha]LL`]HE`$]HDE`>DbP] `! Bb'`|"{]`y] D` D``(Dr] D``DB ]1``BGa]LL`!]b#Z6E`I]DE`p DP]y D``D]`% D``.Dw`$ ]1``Ga]LL`]"G]"ZG6]bGE`I]DE`v" ]M`Qy'E`5=`B_P]%$`)Gcz`a`?bg:`¨ ]1``y¨Ga]LL`!]Z]BG6]P]}B D`E`I]DE`z¿ ]1``y¿Ha]LL`!]&]RE`I]DE`Y ]1``yGa]LL`*6BE`I]DE`gaP]``Ņy`@` D` ` % ]1``%Ha]LL`!]#%]]]]"]"]]Q]E` I]DE`D" ]1``y"G]LL`]BZG6E`]DE`yDB ]1``BHa]LL`]zB!]ŒP]``Ņy`@]:IE`%]IDE`I"`^" ]9`=y"]<e A```B`E`aª`dD(P]m`qj`Lbhb`]Ʌ}B D``_ ]1``yHa]LL`!]"E`I]DE`DB ]1``yBHa]LL` E`%]IDE`Hr ]1``yrHa]LL`]NHE`$]HDE`1b|Z`)P]ͅr D``\Db ]1``ybGa]LL`]"G!]P]х}B D`6E`I]DE`rD]%$`)yGcz`Da`  ]1``Ga]LL`]ZG]P]Յ}B D`G6E`I]DE`{Db ]1``ybGa]LL`]:GE`I]DE`kDB_ ]1``yB_Ha]LL`!]Wj]E`I]DE`<y ]M`QyRE`&r ]1``rHa]LL`]iH]jHE`M%]HDE`0DP]`yBpF`D ]9`=]<e "```DE`VDvz`! ]1``yGa]LL`]P]م}B D`G6E`I]DE`xDB ]1``yBHa]L`+!] :] ](] ]b ]B)]B ]+]  ]M`QE] ],]"  ]M`Q ]1``yHa]LL`!](:]".].E`I]DEE]b-]-] ]" ]b0]0 E`]DE`u>P] `! y1>'`OD ]1``Ga]LL`6]GE`I]DE`~DbP]݅r D``ZDBwR`"DB[`8D ]M`Qy%E`-b ]1``bGa]LL`6]P]}B D`GE`I]DE`oD}]`yb`+DP]ީ D``Dbj`fD`s&`b%`MDi%`YP]`y'F`_ ]1``_Ga]LL`]WjGE`I]DE`=`tb ]1``ybG]LL`6]:GE`]DE`lDBP]ީ D``Di`#d ]1``ydGa]LL`]"G]GE`I]DE`BDE P]`yBpF`Q] `! -KQ'`SD ]M`Q6E`Fb ]9`=b]dg`b``¥`"``"``E`b"P] `! y"'`J]]`'F` D ]M`QE`cB`/P]`yBpF`D ]1``Ga]LL`]"G!]P]}B D`6E`I]DE`nb'`4D ]1``yHa]LL`!]]bE`I]DE`}D® ]1``y®Ga]LL`]"G]P]}B D`G6]bZGE`I]DE`wDb] ]1``yb]Ha]LL`!]b]]]B^&]]I]^E`I]DE`;B ]1``yBHa]LL`!]qr]%IE`5%]IDE`b&P]r D```]%$`)yH`z` DBe ]1``BeHa]LL`]H]H]H!]'E`)%]HDE`C(`K" ]1``y"Ha]LL`!]&]bR]B:]E`I]DE`[D¯ ]1``y¯Ga]LL`]"G6E`I]DE`iDBP] D``3]`V ] y D`EV ]  D` EV ] D`EV ] D`EV ] D`pEV ] D`pEV ]! D`EV ]% D`pEV ]) D`EV ]- D`EV ]1 D`EV ]5 D`HEV ]9 D`EV ]= D`EVR V ]A D`E($a /: @ $a/! p^)-`PfD] ]E D`6.^` ]>yDa`L` D$a/!5WPF  `Y ab`3 b`3"`3b^`3`3'bB`3"B`3 `3x`3 b{`3"~`3!z`3B`3b"`3"S`3%`3#`3b`3"`3)`3)- cD my1$,. /A6-<<=BBEs5susysss9tQtUtmtAuYux-yAy `}HdDO cC D"zDDBDvDD"Dbb^2{SD&x~"BBDL `q($a /: @ $a/! p^)-`PfD] ]I`M D`n^)-` ]~DaL`D$a/& PY|H ` aY a aua"va )- DcD =j`-D]!)$a/!5pF^)- `DaD f`DY }`D Q`BK`DHdD4O c  BKDq  !;D]U D`E  =Eut]Y D`E  ]]q D`E  ;D]a D`E $a/!5`F^)-` 1E!`fA]]`yDa ]]`D"` `"b%`Dab`oD-]]`aPi`PDA]4]`De`5b]]`DbF`D"]e]`Da*P]i= D``Q`M=͆`$Q`ab`pDF`D]]`]m|]`rz`CD !` D}`N"]]`]e]`DB<]]`B]]]`D’`}D{aDA]!]`D]4]`b`DA`iDAk]P]m{ ]`n$a/! C@F `3a4a+a5ab5a 5a(B6a06a8"<a@<aH:aP%aX>a`b?ah?ap,a x)-`8` G]G`D!a  D`9 `DO]FZ]` S)`D!]54]`]]`Db ` D=R`}`Da}`:H'`}K`V]]`\a~D"$]q]`D%` D]y|]`be]Z]`,DaeDu`xaU`Y]u|]`B]i]`BE `uD`l= `^DX`Dq`77]a]`q`] ]`]]`1 `]]`Dq ` DbuF`ZF`;`oDu i`D!K`ct `FA~]%Y]`"uE `HDBk]Z]`5DBi1`2 D` DAR`ai``-]=4]`]I4]`]}]`aaADI`2]]`wb`ba~D].`&bab!]Q]``vI `KD4`Bs= `DDbaa]4]`f`.Df]Z]`-A]]`]4]`Da ` xY `ODap`D]}]`D!m]P]u~ ]`a]4]`Dy }`D5`!`D&`m'`+]]`D]-]`%5` D `y`A `jz] ]`QDb `DaD4`|S`T"I`dA]`]`7aGa<D`"]]`xD`ZD![%F`cDA]]`q ` DYUS`"W]bZ]`b`( ]]`bq``-F`}`p D!`D]]`]a|]` DAR`]DR`^a.`)D] 4]`aDb0]]`"v `J D(]]`D]4]`Da`  ] L``(D]]`V]^Z]`D4`Dby `]]vZ]` D]m]`;`9`DE` !S`Da`hb4])]`DN`Ln'`:a DZYR`ba4``D`S`%D `;]u]`"` Dqj`AD5]]`a`F6Z`D!]4]`D`|`D!+'` ] L``&D)]]`DA|)` DG1`=]A4]`b]]` D!"P]= D`P`DE`D"A]]`D= ``D]]`WDa`yR`l]4]` d]]`u]y]`qD]]F]`[bZ]jZ]`D]%I]` DG `S`Db`D1`b]-]`Da]4]`AR`/Da% $a-!-P}`< ``? `? `?  a)-` `]= D` $a/!-PFz H ` aaaaY a )-`$`z ~~~y D]` DMu`KDb/]]``A]}]`P9]]`Bq `@Db+]]`D]`(]i|]`"a"%]}]`Db@R`D]]` D"pS`<DO`O]]`DaHD]]`!]Y]`€ `\D]EI]`DX]P][ ]`_Da Dņ`rD"]eS` D`X!v!`D!s]``% Y`DDƒ]]`bDb `D.]]`DA]]`Dc]Z]`) Dv`D`"]]`DJ`D_uS`" D]4]`]]`8aSaU@ن`-" -` 4`Y}`D` D`DBe`JR`CDaD]u]`DJ 5`B`Da"`DBK`]4]`D]4]`D`DaS)`]]`D3` Z`Db-]]`Da]q4]`D"H `D¦]~]`uT`1] ]`D ~`A`D]]`]]P]͆c ]`g!`AQY`A]4]`D]a]`;] L``DAd2`sDS`VD)%Y`Di`/AY]P]ц\ ]``]0]`6B~aXD]]`D]ZZ]`"w `Lbaw 0DT`X]4]`D]]`<a5`nD*]]`E%`KR`EDa`0Dm]Z]`9D@Ն`,]4]`DtF`t`1`"U]ZZ]`DW]fZ]`  `> 0Du `DaaDaED!0P]Ն= D``Y]]ن] ]`a^aR`h,]]`DBaD`  DI`aK`& D|5Y`]4]`DY5`D7EF`b&]]` DB]]`[]P]݆` ]`d]i]`Dy`DjS`3Dpa?"*`ab"]]]`F`D`nDa>5` D]M]` D8`]]`DM |`D2=F` ab]}]`Df:`yaQ`Rl]Z]`7<ņ`" HD<` a<`! DBe `jDk]P]| ]`D!Li`Gb]]`"] ]`Db3]]`DE`DA]5]`BDB>9``thF`}D]54]`aMq`JA y`lDj]P]z ]`b]~]`BKaC`9`aODatDb%q`R``D/]]`D1`4`DHl`@ =`byQ `PDar]]`AF`:D-e`!w`D]]P]b ]`faD`6S`bI``TDE`D‘a{D!aD]a4]`Dm]P] ]`9``|D"Y~ ]6Z`B]q|]`D]4]`D4]1]`B`}S`$D5F`Db1]]`DQ]Q]`QDX]]`^D!x]]`A4`A]0]`3j]Z]`4DbI`D]4]`D`DK5`F`uD`D[]S`Dc`r]4]`D]]`a\]P]a ]`eDag]]t]`z]4]`A]]`D&]]`]1]`D'`D`}aE `8A6`~ `Y`g]]`xDu `]U]`D5`=D-`?z!`D%`A"`A] Y]`I=]]`Db\]rZ]`D"Z`R`{aa."]]`D  ] q D`E  ] D`E  ]Q D`E  ] D`E $a-! P`< ``/ `/ `?  a)- D`DaD  %8;<<AEME FIFFP_9`t `]!q D` $a/! @^)-` $a-! #P`l ``/ `/  `?  ab`+  } P]% D`F™`+  ]) D`FB`+ ]- D`Fš`+ ]1 D`F)- D`DaD EEAFFFFPt=}A}E} `5]9 D`z   ]= D``E $a/! p^)-` PfD]  9cD  ` Y a`3 Bb`3 `3`3B`3 B`3B`3B`3`3B  ]A D`E $a/! p^)-` 5$ff Dq  ]E`I D``DbP]M D``]Q D``D]U D`` Dq  ]Y D`b`DS  ]] D`B`D" } ]q`&qDH]uV` ]a D`D` `Y b` "q  ]e D`` b } P]i D`D`] $a-! P`` ``/  `/ `?   a aa Ha)- DcD Ftрـ݀`mP]q D`]u D`]y D`]} D`  ] D`Eu ]B|a $-'056FkkrMu)xyy]P]n ] a,/0BFZ]st]u]]l]< } ``/ `/ `; # aHu k4Oc BVDaw"DED($a /: @ $a/! p^)-`PfD] ] D`^`]DaL`DL`]E!cvq ]>v]a] L` E`FHm   MyRMZ\Y]q])^E_k{1TOcE"G± bFDa IDED($a /: @ $a/! p^)-`PfD] ] D`^`]&DaL`DL`L`uL`% uE!c e ]q D`EHa q XkOcC AiV ] D`ED!V ] D`EDV ] D`EDV ] D`EVbDV ] D`EVTf\]Vbnmz} ]q D`Eb ] D`E ] D`E ] D`E ] D`E ] D`E ]Ň D`EDVDyVD!VAVVADVDaVa9I@DED($a /: @ $a/! p^)-`PfD] ]ɇq D`^`]DaL`DTL`jiRvy^]EJ!c__P] ]͇I D`Y ]ч D`ZU `Ma}?D`$a/+ PE$ ` aa^)- DcDM +i`]`D $a- @`T ``/ `/ `? a  aJ `+  }  D)-`I )F}`sm``$D]e U$a/! PY|< `Y a aM`+ } aD9a)- DcDE ]FFD $a- @`H ``/ `/ `? a^ aJ)-`A %45Fa`u`kt9bD]  M$a/+ PE$ ` aa^)- DcD= q`M]j`Da9 ]L`]`]`]`]`` 5 ]ՇI D`E 1 ]ه D`E- ]`) ]` % ]݇S D`E ! ]ᇔ D`EP  a]   a]釐 a]퇐 a]񇐑 `] `] `] `]`]`] `] `]`]`]`]`]!`]%`])`]-`]1`]5`]9`]=`]A`]E`]I`]M`]Q ha]U$a(" @$a/! pY|^)-`PfD 2`]c^` ha]Y $a(" @$a/! pY|^)-`PfD F`]c^` ha]] $a(" @$a/! pY|^)-`PfD Z`]c^` ha]a $a(" @$a/! pY|^)-`PfD n`]c^`P`]e  h)a]i$a(" @$a/! pY|^)-`PfD `]c^` h!a]m $a(" @$a/! pY|^)-`PfD `]c^` ha]q $a(" @$a/! pY|^)-`PfD `]c^` ha]u $a(" @$a/! pY|^)-`PfD `]c^` ha]y $a(" @$a/! pY|^)-`PfD `]c^` h`]} $a(" @$a/! pY|^)-`PfD `]c^` hea] $a(" @$a/! pY|^)-`PfD `]c^` h}Ua] $a(" @$a/! pY|^)-`PfD `]c^` hy9a] $a(" @$a/! pY|^)-`PfD &`]c^` hua] $a(" @$a/! pY|^)-`PfD :`]c^` hqMa] $a(" @$a/! pY|^)-`PfD N`]c^` hm1a] $a(" @$a/! pY|^)-`PfD b`]c^` hi`] $a(" @$a/! pY|^)-`PfD v`]c^` he%a] $a(" @$a/! pY|^)-`PfD `]c^` haAa] $a(" @$a/! pY|^)-`PfD `]c^`P]`] Y`] hUua]$a(" @$a/! pY|^)-`PfD `]c^` hQaa] $a(" @$a/! pY|^)-`PfD `]c^` hM-a] $a(" @$a/! pY|^)-`PfD `]c^` hI5a] $a(" @$a/! pY|^)-`PfD `]c^` hE]a] $a(" @$a/! pY|^)-`PfD  `]c^` hAYa] $a(" @$a/! pY|^)-`PfD `]c^` h=}a]ň $a(" @$a/! pY|^)-`PfD 2`]c^` h9=a]Ɉ $a(" @$a/! pY|^)-`PfD F`]c^` h5`]͈ $a(" @$a/! pY|^)-`PfD Z`]c^` h1Ea]ш $a(" @$a/! pY|^)-`PfD n`]c^` h-qa]Ո $a(" @$a/! pY|^)-`PfD `]c^` h)ma]و $a(" @$a/! pY|^)-`PfD `]c^` h%Qa]݈ $a(" @$a/! pY|^)-`PfD `]c^` h!Ia] $a(" @$a/! pY|^)-`PfD `]c^` hya] $a(" @$a/! pY|^)-`PfD `]c^` hia] $a(" @$a/! pY|^)-`PfD `]c^` ] D`E ] D`E  ] D`E  B!0f FB "E`0D A  fD A ` `D ` D]`"^+rE` Q +` ^3`  fD ` `D ` D] `"j?IE` 3` B` M +`D  fD ` `D ` D] `"J7&E`B mf:`uD ! ` ]<`D Q9`m  fD ` `D ` D] `"GIE`W } ,`  fD ` `D ` D] `"*3IE` &?` - fD -` `D ` D] `":DIE`" >` }R?`D  fD ` `D ` D] `" 4IE` f>` )`nD m>`D  5` 8`OD n4` ! fD !` `D ` D] `"3IE` >E`3  H`^E`D I`y I`nD 9 f`D .` !A` ) fD )` `D ` D] `"&DIE`!D uC`   fD ` `D ` D] `"9a'E`f =`D *`{ U +` >` j.` n;`D  fD ` `D ` D]F`"@E` }  fD } ` `D ` D] `"DIE`( afC` >A` (`V ,`D UB`D *`|  fD ` `D ` D] `"fAa'E` F`LE`E` 4`DE` 7`HD G`] r3`D 1 fD 1` `D ` D] `"DIE`'  fD ` `D ` D] `"N9IE`cD ZH`bE`  fD ` `D ` D]F`"@E`  fD ` `D ` D]-`"?DE` UB` u C`D  fD ` `D ` D] `"D&E`*D y.C`   fD ` `D ` D] `"7&E`? IBB` -  (` J6`2 aD`+DE`  ~'`D Z6`6 ] fD ]` `D ` D]`"6:rE`q n6`7 }=`D  fD ` `D ` D] `"8IE`YD i>` I9`lE` (`X C` 1C`DE` 2`  fD ` `D ` D]-`"JDE` y(`^ .6`+ 9 fD 9` `D ` D] `"vDa'E`%  fD ` `D ` D] `"Z;a'E` ?`E`  fD ` `D ` D] `"8IE`M   fD  ` `D ` D]F`"'E`  /`D MVB` 125` I`  fD ` `D ` D] `"9a'E`g D B6`0 +`D I`~D F`I  fD ` `D ` D] `"RIIE`tD Y fD Y` `D ` D] `"<IE` fH`eD nI`wD  fD ` `D ` D] `"*IE`y q>` -A` 66`-  fD ` `D ` D] `">&E` E`8 E`7 q fD q` `D ` D]R`"RCE`D )`m ]>`D B*`t J`E` % *` u>3` >-`E` ]5`" 9 fD 9` `D ` D] `";a'E`  fD ` `D ` D] `";&E` Q fD Q` `D ` D] `"2IE`D Q fD Q` `D ` D] `"Fa'E`M )`p :` ! fD !` `D ` D] `"1IE` =  fD = ` `D ` D] `"J+a'E` >`D  fD ` `D ` D] `"rC&E` F`KD I`E` Y 0`  fD ` `D ` D] p`"Z=jE` }:6`.E`DE` -`  fD ` `D ` D] `"<&E`D F3`D 6`= V*`uE` ]JC`D -C` *8`RD B`D z-` (`SD G`V f-` ;` I`|DE`  r'` -=`E`D NI`s = fD =` `D ` D] `"5&E` *`z G`[E` )`lD <`D ] +`  fD ` `D ` D] `";IE` F`JD a +` U>`DE`D 5:`} nC`D  '`  fD ` `D ` D] `":9IE`bD 565`  fD ` `D ` D] `"2IIE`pD ! fD !` `D ` D] `"J8&E`V z3` ) fD )` `D ` D] `"N5IE` ")`dD .`E` i V1` y2`D J` e ,` -`D *`DE` 4` "G`P ) /`D  fD ` `D ` D] `"6IE`:D E`:D .*`s fF`ED n'`D } fD }` `D ` D] `":IE`{ )zA` &9`a  fD ` `D ` D] `"b<a'E`D Y>` u b,`D &E`1  fD ` `D ` D] `":>IE`D %<` >`D  fD ` `D ` D] `";a'E` 1A`  fD ` `D ` D] `"v@IE` F4` )`jE`D iD`- 5~1` 4` m2` 4` A5` E`9 G`\ zE`6 U 0` U=` M5`'E` n*`wD ! /` v<` ! fD !` `D ` D] `" =&E` M :`n .` >`  fD ` `D ` D]`"^8rE`W  fD ` `D ` D] `" >IE` <` ~>`D %Z4` *`} Y fD Y` `D ` D] `"1IE`D Ub5` =;`D rI`xD  fD ` `D ` D]`"?rE`E`DE`  fD ` `D ` D] `"R>a'E` M fD M` `D ` D] `"FIE`ND YFC` E`   fD  ` `D ` D] `"'IE` E` .` F6`1 y fD y` `D ` D] `"=&E` *` =`D 5A`D *`q E<` E1` A`D 6)`eD 2H``D A.B`  fD ` `D ` D] `"">IE`D @`E` 4`  ^H`cD 9 60`D ,` uF<`D >6`/ 28`T - fD -` `D ` D] `":5&E`  fD ` `D ` D] *`"AE` aZ2`D yR6`4 *F`BD  fD ` `D ` D] `">a'E`DE`  fD ` `D ` D]-`"@DE` RA`E` i fD i` `D ` D] `";a'E`D :@`E`E`E`DE` 1(`] E fD E` `D ` D] `"5&E`  6`; !&1`D M&8`QD -`D 4` D  fD ` `D ` D] `"68IE`U B` i5`%D } E`.D I fD I` `D ` D] `"=a'E` }H`i q fD q` `D ` D] `"J<a'E`D   fD  ` `D ` D]F`"'E` A`D I6`) R-`E` fE`5D 26`, -`E` FI`q 7`KD JI`r I6`<DE`E` eBC`  I 0`D H`_DE` Y  fD Y ` `D ` D] `"+&E`D q(`b  fD ` `D ` D] `"*a'E` N>` =9`h -`D  fD ` `D ` D]F`"'E`  fD ` `D ` D] `"*a'E`  fD ` `D ` D] `""7&E`@ e fD e` `D ` D] `"2&E` E fD E` `D ` D] `"Ca'E` F`@ QH`g u(`aD RF`DD y  fD y ` `D ` D] `"bDIE`$D e 1` B.` :E`2 1 fD 1` `D ` D] `"B;&E`D ,` eN:`sD } fD }` `D ` D] `"2IE` 2` 4`  /`E`D 4`  fD ` `D ` D]-`"@DE`D QjB`  fD ` `D ` D] `"6IE`9D ^<`  fD ` `D ` D] `"24IE` mB` B` @`D J`D Az'`DE` +`D H`kD 5 fD 5` `D ` D] `"D&E`  F/`DE` B3`D *-` ) (` ] fD ]` `D ` D] `"1IE` e>`  fD ` `D ` D] `"8a'E`Z >`E` A fD A` `D ` D] `"Da'E`& A fD A` `D ` D] `"2<IE`  fD ` `D ` D]-`"3DE` I`{ *A` 6>` ,` -` E`; 8`N RE`4D 2`DE`  fD ` `D ` D] `"7IE`L V6`5 ;`D F` "8`P  fD ` `D ` D] `";IE`D 8`_ %8`[D  fD ` `D ` D] `"7a'E`J A` )`k Z/` E`= i(`` 3` Y5`! b@` V.` E`> ):1` yH`j I`z %C`D I` i &,`D 5 ` 4`  ?` Z*`v  2/`DE` m :,` iR:`tD A` ]E`/D G`Y -` Z3`D 5.;`D ..`D 11`  fD ` `D ` D] `"9IE`` I`  fD ` `D ` D] `"^7&E`C I`oD q:`zD  fD ` `D ` D]-`"ADE`D :`~  fD ` `D ` D]F`"'E` q2` >` C`E`D 4` D q 9`iD V;`D 4`D  /`D q N,` *`x -`  fD ` `D ` D] `" +IE` ,`DE`  fD ` `D ` D] `"7IE`FDE` u:`w U:`o -N1`D })`c y fD y` `D ` D] `"z:a'E`v I`DE` Mn=`D ~.` u>?`  fD ` `D ` D] `"Ba'E`  fD ` `D ` D]`"?rE` % fD %` `D ` D]-`"CDE`  fD ` `D ` D] `"HIE`lDE`  fD ` `D ` D] `"*IE`r F`AD E:G`RD ;`  fD ` `D ` D] `"7IE`I r8`XD  fD ` `D ` D] `"DIE`)D !(`T Qv5`D @`D E`<D  fD ` `D ` D] `"r7&E`DD  /`E`D E r0` ] 0` e;` y v,` G`OD YA` .` .`D 3` 2+`D ) fD )` `D ` D] `"2=&E` = fD =` `D ` D] `"NDa'E`#D zF`F 5&G`Q  fD ` `D ` D] `"<&E`D q*6`*D  fD ` `D ` D] `"?IE` 4` i fD i` `D ` D] `"n2&E`D  fD ` `D ` D] `"6a'E`>E`D 9 fD 9` `D ` D] `":a'E`|D eD`,D @` jI`v $D  fD ` `D ` D] `"6+IE` %&@`D G`X uN6`3 7`G Q fD Q` `D ` D] `"=a'E` >`  fD ` `D ` D] `"67&E`AD ?`D I fD I` `D ` D] `"CIE`D G`ZD  fD ` `D ` D] `"3IE`D )C`D fI`uD A`D ~?`  fD ` `D ` D] `"<a'E`D %R1` r)`hE`  fD ` `D ` D] `"3a'E`D  fD ` `D ` D] `"6IE`8 FH`aD a fD a` `D ` D] `" <IE`D =v'` 1 `E` = fD =` `D ` D] `"bGIE`T .`D 5` .8`S  fD ` `D ` D]`"v9rE`e I`}D m(`_E` !C`  fD ` `D ` D] `"3IE` E  fD E ` `D ` D] `"r+IE` qC` D -8`] a5`#D  /`DE` B`DE`D - /`D -^(`KE` DE` y*?` E~B`E` )r(`L Y":`p D M fD M` `D ` D] `"22IE`D F`HD ?` uH`h :`y A fD A` `D ` D] `"vGIE`U  fD ` `D ` D] `"j>IE`D F=`D e5`$ +` I fD I` `D ` D] `"F2IE` m;` 96`(D )`i mNC` Q 0` U fD U` `D ` D] `" 2IE`  fD ` `D ` D] `"3a'E`DE` >F`C E9`k v3` A9`j M 0`D =B` bH`dE` 1 fD 1` `D ` D] `"8a'E`^D 9NG`S *` 9B`D b9`d  fD ` `D ` D] `"=IE`D f?`D  fD ` `D ` D] `"4IE`D *`~ 4`D ) fD )` `D ` D] `"8IE`\D a>`DE` J(` 9 fD 9` `D ` D] `"1IE`E`  fD ` `D ` D] `":&E`x  fD ` `D ` D] `"7a'E`E F`GD ;` .` 1 0` 2J` I`m = J0` )`o a 0` D  fD ` `D ` D] `"=IE` 5 "0`D ijC`D zH`fD I +` m5`&DE` ^)`g % /` aJ:`rD A ^0`  n/` m j1`DE` J)`f  fD ` `D ` D] `"N@IE` E`? 4` ] $a- @`< ``/ `/ `?  aJ)-`i)$,./15=66799:;<BEeFGlrmssss t5tit u=uiuAxx y)y} aD]O $a/K @*$ ` a`+ } )-`,/9]]-]]%/1!ssI]5]04EFZr-ss9yA!]~Z] $a-!-P`H ``? `? `?  a `; } D)- DcD!/056Fsss=x}}!}E `]= D`@$a-B @`0 ``/ `/ ba)-`0)<E_9j`R D]J PM,056FqZZMry%yi]3Q9'0BEFUY1t5u1x ] @U0%<s!y] B0BUZ]]0=]He.06:e<<EFZkQs}sss)teteuxyy]mR]!$..0569BEkrt)uQuau-x]]v]-$,.6%sqsstmu y]=],.5sIu)]H A*GEHQH}IIIyPRY)Y\%\a]I_k!x|}Oc)@VUq):7iDB8m;qB5Ҽg D<uX DAڼ3AVMAV%>VIR<Vb9޼D AVE2V}B65:">}"=D9B7V=DB;Db:V!RaVuD192VQD4μ"?VQR8V RD"31AVD=B4ʼ5VD6VQDּDVmD:V]a $a/!5pF^)- `DaD!f*@+"0`q"'` 71`Dg b)` X 0`B5(` B8b2`D<b8` ;7`DAb,`3$`b/`A%`>"?`)<"9`!b93`D =`'A.`2b#`B6*`">b;`$"=9`"D94`B7-`DB;6`Db:b5`a<`&D1!`2"`D4'` "??`*8"3`D"3"$`Ab>`(D=:`#B4b&`5"*` D6"-`D+`DY }`D"<`%D:"6`HdDfED($a /: @ $a/! p^)-`PfD] ]9 D`^`]DaL`DL`'91Avʼ):μҼ5:ּڼrnim޼qu~}z L`qL`aɞEf!cHk4Oc " !Da[DED($a /: @ $a/! p^)-`PfD] ]!) D`^`]DaL`D L`!]E!c ]% D`E ]) D`E ]- D`E ]1 D`E ]5 D`E ]9 D`E ]= D`E ]A D`EHi eRkOc#V 7] ]E D`E ]I D`E ]M D`E DAVzDVrDV D!˂Da&I<DED($a /: @ $a/! p^)-`PfD] ]Q D`^`]DaL`D L`jL`L`! Eb!c]] ]U  D`EH Yu*y**%HQQRYRRASiS-TiTTTTUU5UMUmUUUUUXX\\U]-^]krx{}IOc# M~MB" D V B D Da>&DED($a /: @ $a/! p^)-`PfD] ]Y  D`@ ^`]Da$L`D,L` ~V$L`!U;L`= E!c//$a/! @Y| `a)-`]P]]m D``a*u%M0 GQSSVVY\\\]zq{H`D ]a D`E ]e D`E ]i D`x E ]m D`E6 ]q D`E ]u D`E ]y D`E ]} D`EVr ] D`E ] D`E ] D`E]HD` q] D`E m] D`E i] D`E$a/! pY|^)-`e-`)bPfD= P]q' `D]c a] D`E ]] D`E Y ] D`E U] D`E Q] D`E M] D`E I] D`@ E E] D`E A] D`E =] D`E 9] D`E 5]ʼn D`EH1kYOc# D B BbD "    DaZR`DED($a /: @ $a/! p^)-`PfD] ]ɉ D`^`]Da(L`D0L` 0L` EViL`9 ! E!c -]͉ D`E )e]щ D`E %i]Չ D`E !]]ى D`E0Q]݉ D` a]ቑ D`E D`DaDV`  ``/  `/ `;  B a!Ba a a ba  a(B3a0 a83`3 } P] D`]鉗 D`" a@ `3  ]퉗 D`E ] D`EPaHPaP aX$a/! p6^)-`PfD `]c D`+ + +++++!+%+)+-+1+5+9+=+A+E+I+M+Q+U+Y+]+a+e+i+m+q+u+y+}+++++++++++++++++++++++++++++++++,, , ,,,,,!,%,-,1,P~~ ~ ~~~~~!~%~)~-~1~5~9~=~A~E~I~M~Q~U~Y~]~a~e~i~m~q~u~y~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  !`% n ]"R 0],U]Df$g`4$0]]g`4$ 0.],]Df%g`4%0]g`4%`2 ] D``E ] D`XE ] D`E ]  D`E ]  D`E ] D``E ] D`E ] D`E ] D`E ]! D` E ]% D`E ]) D`E ]- D`E$*]1HGF"R  ]5 D`E ]9 D`E ]= D`E ]A D`E ]E D`E ]I D`E ]M D`E ]Q D`E ]U D`E] L`Y]aeimquy}ŊɊ͊ъՊي݊  !%)-159=AEIMQUY]aeimquy}ŋɋ͋ыՋً݋  !%)-159=AEIMQUY]aeimquy}ŌɌ͌ьՌٌ݌  !%)-159=AEIMQUY]aeimquy}ōɍ͍эՍٍݍ  !%)-159=AEIMQU` ]Y D`E ]] D`E ]a D`E0 ``/ `/ `;  Q 95,, /115!9:i<<!E]`m`ss tUuquy=yQub ]  ]$ `aBaB$a/!  Y| )- D` D` >qt`eq *Zl 0 000!0)0`"a ab`)"{ `$a- 7@ $a- 3 $a- / $a- + $a- ' $a- # $a-  $a-  $a- @ `H``/ `/ `; a ea)-  ` `/  `/ `; aeaT aa"a a(a0a8"4a@Ma HD)       )  `b`  aB(" aB0 `8$-0a  /!  Y|O )-f6DP]i D``DS  ]m D`B`DG } ]q D`D`DX]u D``Y ^`  `D]y D``D]} D`( D`DaDH ``/ `/  `?  a a `e ` a $a-! P $a-! P`H``/ `/  `?  a a)- D`DaD`P]m D`D] D` $a/! pY|J!^)-`PfD `]`H ``/ `/  `?  a a)-``P]m D`D] D` $a/! Pb!n! ` a)-` `] $a-! PJ!`H ``/ `/  `?  a a)-``P]m D`D] D` $a/! Pb!! ` a)-` `] $a-! PJ!`H ``/ `/  `?  a a)-``P]m D`D] D` $a/! Pb!! ` a)-` `] ]m D`E ] D`E ] D`E ] D`E }] D`E y]Ŏ D`E u]Ɏ D`E q]͎ D`E m]ю D`E i]Վ D`E e]َ D`E a]ݎ D`E ]]᎖ D`E Y]厖 D`E$U]LL`bŒEbDHQ XikuM4Oc D]a)h DED($a /: @ $a/! p^)-`PfD] ]m D`` j"^`]z"Da(L`DL`]L`i L`I  Eb"!c66PM]m D`PH I``/ `/  `?  a aAf6 HP]M D``DBI] D``,] D``DBJ] D``S  ] D`B`G } ] D`D`= "`DY X`  E`"KP] M D``Db]  D``9u9$4AsMsuw!w%wwwwwwwwwx}}}}}}}}}}}}}}}}`1EK}Fb]FVRyR%Yʦ-F5F}.5 Y}= A  '%5eq =  9'F ^q`yj |F F9Z ]" D`E ] D`E ] D`E ]! D`E ]% D`E ]) D`E ]- D`E $a-! P`H ``/ `/  `?  a a)-``1P]5`9"x bx x  D`D]=:# D` $a/! PY|.#H ` aa"aa`+ } P]A:# D`F)-``.#]E D`]I D`]M D`] ]Q" D`E ]U D`E ]Y D`E ]] D`E"y y y Bz z { b{ { "| | | B} } ~ ~ "   B   b  "   B   b „ "   B   b ‡   B   b Š "   "R  ]a D`E#0]e D`# ]i D`E ]m D`E ]q D`E ]u D`E ]y D`E ]} D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E( ]P] D`D` $a-! P`H ``/ `/  `?  a a)-``P]" D`8D] D` $a/! PY|V$$ ` aa)-``P]ŏ" D`] ]ɏ D`E ]͏ D`E`( ]]я D`D`  B   ]Տ D`E ]ُ D`E ]ݏ D`E ]Ꮢ D`E ]叒 D`E ]鏒 D`E ]폒 D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ]  D`E ]  D`E ] D`E ] D`E ] D`E ] D`E ]! D`E ]% D`E ]) D`E ]- D`E ]1 D`E ]5 D`E ]9 D`E ]= D`E ]A D`E ]E D`E ]I D`E ]M D`E ]Q D`E ]U D`E ]Y D`E ]] D`E ]a D`E ]e D`E ]i D`E ]m D`E ]q D`E ]u D`E ]y D`E ]} D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ]Ő D`E ]ɐ D`E ]͐ D`E ]ѐ D`E ]Ր D`E ]ِ D`E ]ݐ D`E ]ᐒ D`E ]吒 D`E ]鐒 D`E ]퐒 D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ]  D`E ]  D`E ] D`E ] D`E ] D`E ] D`E ]! D`E ]% D`E ]) D`E ]- D`E ]1 D`E ]5 D`E ]9 D`E ]= D`E ]A D`E ]E D`E ]I D`E ]M D`E ]Q D`E ]U D`E ]Y D`E ]] D`E ]a D`E ]e D`E ]i D`E ]m D`E ]q D`E ]u D`E ]y D`E ]} D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E ] D`E b  $a-! P`H ``/ `/  `?  a a)-``őP]ɑ`͑" "  D`D]ё( D` $a/! PY|(< ` aza"{a{a)-``P]Ց( D`]ّ D`]ݑ D`]$a/! @$ ` aia)-`]P]" D`]呒 D`J I]4Uc DDDDDDDD ]鑒 D`EB]4c DDDDDDDD ]푒 D`E ]] D`E ] D`E  >P5]M D`1] D` -DcDT )``/ `/  `?  a ea  a  !`) ` a<``/ `/ `?  a  `   ` a<``/ `/ `?  a ` ` a<``/ `/ `?  a ` ` a<``/ `/ `?  a ` ` a<``/ `/ `?  a ` ` a<``/ `/ `?  a ` ` a<``/ `/ `?  a `e ` a<``/ `/ `?  a `I }` a<u``/ `/ `?  a m`- i` a<a``/ `/ `?  a Y` U` a $a/! p9^)-`Q GJJ9JJKmKKKKKELLLM M%MN!N)NOPfD`]<M``/ `/ `?  a $a-! Py9`< ``/ `/ `?  a)- D`DaDIM! JJ5JJKiKKKKKALLLM M!MNN%NO1P! `] D`) E` A` a$a/! P0`aaYa)- DcD=]9IDP9]  D`@H 5``/ `/  `?  a a $a- P< ``/ `/ `?  a )- D`DaD1.6Fl}5q)aD]L $a/K @)*$ ` a`+ } )-` -` )` a<!``/ `/ `?  aPfD ` D`DaD<  ``/ `/ `?  a ` ` a $a/! p9^)-`%ey&)G-G5G=G5HI!J)J1JIJQJYJiJqJyJJJJJJJJJJJJJJJJK K5K=KEKMKUK]KKKKKKKKKL LLL%L-L5L=LMLUL]LeLmLuLLLLLLLLLLLLLmMuM}MMMMMMM N1NINQNYNaNiNqNyNNNNNNNNNNNNNNNNNOO)O1O9OAOQOYOaOiOqOyOOOOOOOOOOOOOOP PP)PmyPfD`]<``/ `/ `?  a $a-! Py9`< ``/ `/ `?  a)- D`DaD]qaI!&)G)G1G9G1H9HIJ%J-JEJMJUJeJmJuJ}JJJJJJJJJJJJJJJJK1K9KAKIKQKYKKKKKKKKKL LLL!L)L1L9LILQLYLaLiLqLLLLLLLLLLLLLiMqMyMMMMMMN-NENMNUN]NeNmNuN}NNNNNNNNNNNNNNNNNO%O-O5O=OMOUO]OeOmOuOOOOOOOOOOOOOOOP P%P-P15 ` ] D`:* ` ` a<``/ `/ `?  a `i ` a $a-! P)`<``/ `/ `?  a)-`L `] D` $a/! P)z* ` a)-` `]H``/  `/ `?  a9`r* `M ` a $a/! p9^)-`!GGIIIJ JAJaJK%K-KeKuK}KKKKK}LLMM-M5M=MEMMMUM]MeMMMMMMMMMMMNN9NAN OO!OIOOOP!PsayeyiyPfD`] $a-! P)`< ``/ `/ `?  a)-`L `]! D` $a/! P)* ` a)-` `]H``/  `/ `?  a9`* $a-! Py9`< ``/ `/ `?  a)- D`DaD uGGHIIIIJ=J]J K!K)KaKqKyKKKKKyLLMM)M1M9MAMIMQMYMaMMMMMMMMMMMM N5N=NO OOEO}OOPP5P9= `%]) D`*f6 Y b` DNP]-5 D``D } ]1 D`D` S  ]5 D`B`D ]9 D`D` 9]= D`` -`0]A5 D``"-]E D``D]I D` `-MEK}b]FR* -F5F 4R 9'9'Fq` ZH ]Q:+ D`E ]U D`E ]]Y D`E ]] D`EE]8La |i|a ]a D`Eb ˜ "  B ( ]P]e D`D` $a-! P`H ``/ `/  `?  aa)-``iP]m`q:++ D`]u+ D` $a/! PY|0 ` a9aNa)-``+P]y+ D` ]]} D`E]]5 D` D`DaDH ``/ `/  `?  a a `  ` aI|um5'),01777777778 88%818=8I8Y8e8q8}8888BEE]FFqYaZ\%bllltIx=%`}] IR ] D`E }] D`E y] D`E u] D`E q] D`E m] D`E $a-! Py9`< ``/ `/ `?  a)- D`DaDi)))%GK] `] D`9ae]` a] D`E >]fD`  `D ` D] D`E Y] D`EaU]` uQ]8La  i aHM 5 =u 'q*****GGAHUHuIII]PqPRURR=SaS)TUUVWWXXXY-YYY][ \!\I\\\I]y]]!^^Mkrru]xx{{I||||E Oc D VVDVD VbZD%VaDB V!b D"<V¹ D ViD% V>VDB VEb .DB VAD» "  VeDV-Vɼ Vab Va4VUD)V9B VݢD VѫD V)D M*V]B VAD" V VDB V'VD" D"ED V峌D V)F:Db VV" VA V"BV $a-! P*`< ``/ `/ `?  a)-` `] D` $a/! P*, ` a)-` `]B V- Vѭ VD-VD V V!D VD V٥ Vb  a E9 V-D½ !D " V1D VB5VE V z" Vi Vib b V DB Vy!VѺD 6D"FqӈD Vդ" D» VᡄD" VD VQD"8Vɱb` U7VͰD")VDVᴀD¿ *;UV VU\ %"  RbVED ^" VD V Vb V VVB  VB2VZ Vb  ViD B$V=D" bB Q VQD *D .Db ViB V I V٧ Ve }]bV)D VDbW DB ݀DV V٣\ VB VըBVMDVID D VVebG1;Db   !b VY v" 93V b V!D Vɳ V=D<V9DVqD V VqDb Vy9V!DV%b+VD V]D V" VDB V; UD V*D" !D  DVշ #Vb V$ V%DBVѸD VB[ VD"VIDBAV $a-! P*`< ``/ `/ `?  a)-` `Œ]ɒ D` $a/! P*R. ` a)-` `]"VD VB D D ͖" VD"  ¦ iD V*Db] }" V!Db VBi "B VmU/VY"@V",VD Vz*D V{ § y6VAVAB&V Vٶ" 'Vͻ1VŽ(ұD  DDb0V}bVDB 1D" 2D".D| a VD" V DCV $a-! P*`< ``/ `/ `?  a)-` `͒]ђ D` $a/! P*. ` a)-` `]Db >" VDB V"; - V٩ VݦD"1VD .V­ D"f q AD"/V5" D VE 1b V b  VD¨ ᑂD3V1"!V VͮD VժDa  Ve6fD  DBV;Y" bVm VE VE VD yBVe VDViD¿ VVչDb VI" VD V" &BVݵ VDb E9Va~'DED($a /: @ $a/! p^)-`PfD] ]Ւ D`zj/^`]z/Da(L`D1L` b&-Z-~-,IR-,,!-,J/2.R/.---f,2/q-"-.N--.,1&/B/r,--v2--E9,9q.6- .-.-z,:-r.--.z--...- /-:.Z/"/V--",,.-,v.&*>-.26:/~,%R,--V/-, --/fE".a.,- bMQ,^>.b-j,-.^,,^-f/}.z-UYB-*-r-F--,/--}-B.j-V,---:v,.F.,.^/Z, .-./n.,./~.6/n,.,&.ZVi ͖R 1>/%A]y--6...v-F/n-.N/.*/.-./J-.*.-b,.!,.ұf-,,..,-//....--/,U.,-z.b/U1;.*y>4L` BU!U;(L`9A  - =  EJ,!cPI]ْ D`8H E``/ `/  `?  a a *Aiq%$),0146777777777 88!8-898E8U8a8m8y8888%9q9;BEEEYFFF!WEYQY]Z}[\llllasIt uEx }91-A`N` ]ݒH`J(((/!R'` ]/ D`E ]钔 D`E ]풔 D`E 0M],U]Df&g`4&0]]/g`4& D`E]G $a/K @ +/$ ` a`+ } f~|)-=fS  ] D`B` DY `  `DP] D``  } ] D`D` Dt5 ɀ̀Հ` FR R z %!  " Z $a-! P`H ``/ `/  `?  a a)-``P]` 0bp p  D`D] 0 D` $a/! PY|0< ` aaaa)-``0P]0 D`] D`] D`]Br r s bs s "t t 1] D` -D`DaDH )``/ `/  `?  a a ]! D`E }^]% D`E0]) D` ]]- D`E  ]1 D`E  ]5 D`E ]9 D`E i^y^y}]= D`E e^u}]A D`E a^}}]E D`E u^]I D`E eU^a}fD` D ` D]M6 D`Y^fD` D` D]Q D` 7[] ]U D`EI 6 5F]^q^lr)sese}%e,a   )!D]Y P Q}}]] D`yy uYy[Q^] )PfDbc]a D` `bl]e D``D]`DH.6U!]I]D]D>]`P]i+ D`HD&D2D`+]<e D$&&a/! @Y| `-a)-`]a]m`$L&a/! @`a`]HH* <``/ `/ `; 4`3 } P]qM D`F ]u D`E]y D` $a- @H ``/  `/ `; a4`3 } P]}M D`F)-`m^`"D]& D`E %]$] ] D`ED ]} D`EP] D` ] D`E ] D`E ] D`E ] D`E ] D`E$a/!5pF^)- `DaD} Yf6 `""`± `Db`BA"!`DY }`D`&b `HdD! Hm ^k4Oc uDa}GDED($a /: @ $a/! p^)-`PfD] ]} D`1^`]1DaL`D L`u L`L`J,! E1!c^^Pf ]a D`E`D ]`$a/! pA^)-`PPZQ\^Q_Y__fD  ](`- .2 ]22 D`E D`E` `  ] D`E`D  ] D`E` ] D`E`]c0 ``/ `/ `;  $a- P-0 ``/ `/ `; )- DcD}//PP1Y^M_U_jei]œ22 D`&2!!u]">PqE='FYZY`a]ɓN   mE =y ),[8a  ]͓ D`E ]ѓ D`E ]Փ D`E ]ٓ D`E ]ݓ D`E ]ᓕ D`E ]哕 D`E D]铕 D`?iff B  } P]5 D`] D``"  D`  D` D u}`  ]`h } D` D  iD` D  D`D"  D` F`b`B`D  D`D %`  } D` " ` -`D `D a]5 D`E $a- P` ``/  `/  `;   aU ab a a)- DcD][[[[[]yr` ] D`Ei] D` Yj]5 D`E Uj] D`E Qj]  D`E MDcDT I``/  `/ `; b a a ea!=f01 $D= ifD=` `Da D] `M D`E`/D/ }  ] D`EF`Dl ] D`E`- ] D`E`D ifD`  `Da D]!`%M D`E`&D ifD`  `Da D]!`%M"~3E`%D  `"j }  ]) D`EF`D"-I`bl ]- D`E`.  ]1 D`EF`B  P]5 D`]9 D``#< ifD<`  `Da D]!`%M~3E`)M } P]= D`F`"D0 ]A D`F`DB  ]E D`E`  ]I D`E` .  ]M D`EF`D ]Q D`F`!D ]U D`E` Dv  ]Y D`E` D ifD`  `Da D] `MR3E`.Db; ifDb;`  `Da D] `MR3E`,/ }  ]] D`E ]a D`E`D0 P]e D`F`D< ifD<`  `Da D]!`%M ~3E`(b5 ifDb5`  `Da D] `MR3E`0  ]i D`E` ]m D`E` DB b3`D"9 ]q D`E`DQ  ]u D`E`8 ]y D`E`D\ ]} D`E` Dl3`D `  ] D`E` Bn ] D`E`" } P] D`] D``"1 ] D`F`  ifD`  `Da D]!`%M~3E`*B  ] D`E` =  ] D`E`D } P] D`F`$DB= ifDB=`  `Da D] `MR3E`+; ifD;`  `Da D]!`%M~3E`'D  ] D`E`D> ifD>`  `Da D] `MR3E`-$a/! p1 ^)-`5u[zPfB  ]. D`E`D `]c 1j] D`E -j] D`E )j] D`E %j] D`E !5j] D`E j] D`$a/! pY|^)-`Pf1 } P] D`F`  ]Ŕ D`]ɔ D``D ^5`]c DcDV`x ` `/ `/  `;   a aeab a a v a( 6 Ay I[^_mqP`= A 0 3-j2]z15ID]͔. D`&5 `-a $a-  cP-``// `/) `?  a  `+' } 1D`+! MQb`++ Y]`+# ei`+ } qu"`+ }`+ …`+% B`+ } b`+ `+  `+ "`+ } B`+  b`+  `+ `+- } ‘`+  `+ `+ %))- D`DaDEAjAaD]є  u*Ej9x `=my] 6 FM}&&}FIbUaxD]Ք7 iQ-y&1b,` 1D]6MZb  ``; $=ba/B .6)-Zb a)}!bAb5jIjMjQj}u`*R J  ]R)F 2 2 eRmRZ}R9f.6y>: Z!FuR .     : D]` D` DDDDDDDDDDDDDDbbbs`DaBBEaBEaaGaB a&("Fa0FaB8"Ga@aBHaPGa$X0aB`HaB hapHa xHa bIa"aIaB$Da/! O Y|zF6)-UH9  U$,0u7<<<>??I@@@AUBBBYjuwwwI}}OcC VfDD"-peDbJui"!pD"iDS"V ]ٔQ D`EBiLV $a-! P`T ``/ `/  `?   aLaMa)-``ݔBM"ND]Q D` $a/! PY|r6 ` a)-` `]VQD6V ]Q D`EDbDaz1nED($a /: @ $a/! p^)-`PfD] ]Q D`6^`]6DaPL`DPL`f66eSuiiZ6V6i!p-p6 L`ZJqL` EN6!cHZkx}mQ4Oc " Da DED($a /: @ $a/! p^)-`PfD] ]`6 D`6^)-`]66DaL`D L`]E!c H 1  U}U'*GG!HYHyIIIaPuPPQ RRaReSSiUUVWXXX%YYQZmZZa[\)\\\%^}krux{{E||}aOcC "/ " D D  ]D %D}=A{5ǂD VP[]a9b1fD` D ` D] D` ] D` E>)D^ >D  DB !1"[ ^ ʀDa֪,FDED($a /: @ $a/! p^)-`PfD] ] D` 7^`].7DaL`DTL`7]5=1>%L`!1qL`6fE6!cV % 'GMHIPWY}ZY[[\\\^ux{7V e*HqImP!YiZyZU[\\^] 7V@z]¥"""BIb"bV ]Q D`EV ] D`EVy ]  D`EV} ]  D`EV]]`]`]`]`]!`]%`])`]-`]1`]5`]Lb'`]Lb'`]Lb '`]Lb!'`]Lb"'`]Lb#'`]Lb$'`]Lb%'`]Lb(1`]Lb)1`]Lb*1`]Lb+1`]Lb,1`]Lb-1`]Lb.1`]Lb/1`]9`]=`]LbZ'`]Lb['`]Lb\'`]Lb]'`]Lb^'`]Lb_'`]Lb`'`]Lba'`]Lbd1`]Lbe1`]Lbf1`]Lbg1`]Lbh1`]Lbi1`]Lbj1`]Lbk1`VeZx}qEIq]i?] @]mA] B]qCD]u $a/! @ |^Z`MaD` `  `$a- @ <L0``/ `/ `? )-Z`MaD`"-a-a ".a.a "/a(/a0"0a81 a@m a H)`+ } \]% M ]) N"aP)- D`DaD,` ]#G]#H]I]J]K]#L]#OD]|]#D]#E]#F ` `)-`]D $a- @ <L0 ``/ `/ `; )-`] U $a( pAM^`^`e<=W `H  $a- K@<L ``/# `/  `? YaZabZa Zab[a \a(bNa0Na8Pa@QaHb\aPRaX\a`B]ah]ap)-`D`\]} ]e~= U   E   I   M Y Q ] $a/ @$a/! P |T ` aY a1 a m aB^`+ } \]-  DM a )- DcD`]a~D]i \]  ] ^)-`WM `H& $a- @ $a- P<|T ``/  `/ `?  `+ } \]q Da ea)-``]u]yD]}$a 1  @$a/! P | `&& aI`+E } \] DM`+ ]DQ`+ ]D`+5 ]DY `+I ]D+a0%a.,a8 a* 3a$(4a0B=a85a6@;a"Hb5aab>aa(9a=a9a "a>a>b?a a:"a&1 a )- DcD`\] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]D]] ]  ^)-`LH ``/ `/ `? a^ aJ)-`bD]   $a 1 i@$a/+ P|$ ` aa^)- DcD]`D^`DWI `H $a- @LH ``/ `/ `? a^ aJ)-`b D]  $a 1 I@$a/+ P|$ ` aa^)- DcD]`D^`DW`H $a- @LH ``/ `/ `? a^ aJ)-`b D]  $a 1 M@$a/+ P|$ ` aa^)- DcD]`D^`W`H$a/! @ |0 `B`abaY a)-`]\]T ]UDWy `H. $a- @<L< ``/ `/ `?  aJ)-`a{D]$F $a3@ @$a/! P |H ` aaaaY a )- DcD`y D]\]$G ]$H]$I^)-`DW-`H' $a- @LH ``/ `/ `? a^ aJ)-`bD]   $a 1 m@$a/+ P|$ ` aa^)- DcD]U`D^`W!`H+ $a- @<LT ``/  `/ `?  aJ aa)-`a.\]2 ]3]1$a/ @$a/! P |H ` a"a1 am aY a )- DcD`!D]}\]4 ]5]6^)-`WE`H* $a- @<LH ``/ `/ `?   aJ `+ } \]q0 D)-`atD]{%$a/= @$a/! 7P | `  a Y aaaa a(a0+a8 a @b;aH%aP`+ } \]. D,aX)- DcD,` ](])]+*]+],]+-]+/D]E\]+& ]+'^)-`DW`H5]&DW`H# $a- @LH ``/ `/ `? a^ aJ)-`bD]  $a 1 ]@$a/+ P|$ ` aa^)- DcD]%`D^`We `H $a- @ $a- P<|H ``/ `/ `? ba aJ)-``\]H `D]G$a/K @$a/! P |< ` aaYa1 a)- DcD]Q I\]I $ ` a`+ } )-`L<``/ `/ `?  aJ)-`aD]P $a/K @$a/! Pm|0 ` aaYa)- DcD]e ID$ ` a`+ } )-`W`H3\]&} W`H< $a/! c@$a/! P |^)-`]D E] UU $a/! @ ^`- `a 1a"a aa a"(Ba0a8ba @IaHa(Pa,Xa`ahBa$p axa"a*aa.baaBa&Y a)-`h`\]: ]:]:]:]:]:]:]:]:]:]:]:]m:]q:]u:]y:]}:]:]:]:]:]:]:]W= `H $a- @QL< ``/ `/ `?  aJ)-`aD]O $a/K @$a/! Pm|0 ` aaYa)- DcD]9= ID$ ` a`+ } )-`W`H$a/! @ | `,,Baa$a ba(™aR "a (a 0a&8a>@BaHaTPaLXba`œah"aBp)axaa.Ba<a:a@ba"Ÿa"aa8aFBa*a6aHaPba2¢a4"aNa0aBaVa BaJ(a,0a8baD@¥aH"aPY aX)-``*\]&Z ]&[]&\]&]]^]&_]&`]&a]&b]&c]&d]Ie]f]&g]&h]&i]&j]&k]'l]m]n]o]'p]q] 'r] 's]'t]u]'v]'w]x'!'%')'-'1'5'9'D]]V]='W]A'X]E'YWbC`H]I'W `HQWQ`H $a-  c@<L- ``// `/) `?  aJ `+' } \]q D`+! ] ] !b`++ ]"] #`+# ] $]%%`+ ] &]%'"`+ ](]%)`+ ]*]%+…`+% ],]%-B`+ ].]%/b`+ ]0]%1`+  ]2]%3`+ ]4]%5"`+ ]!6]%7B`+  ]%8]%9b`+  ]):]%;`+ ]-<]%=`+- ]1>]%?‘`+ ]5@]%A`+ ]9B]%C`+ ]=D]%E)-`aD]є $a/T @$a/' OP | ` aEa `+ } \] DU`+ ]D`+ ]D`+  ]D`+ ]D`+! } \] D`+ ]D`+% ]DY `+ ]D{a1 ab{a E a ( a0 a 8I a@ a"H)- DcD `\] ]]]]]]] ]] `-a)-`W`H7\]9% W`H $a- @QL< ``/ `/ `?  aJ)-`aD]=%J $a/K @$a/! Pm|0 ` aaYa)- DcD]ID$ ` a`+ } )-`DWB`H;\]' DWq `H- $a- @<L< ``/ `/ `?  aJ)-`azD]A $a3? @$a/! P |T ` aaaaa Y a()- DcD`\]E q D]]B]C]D^)-`W`H  $a- @<L` ``/  `/  `?  aJGa bHaAa)-` a\] ]i~]m~D]$a/A@$a/AP | `55`?M  a OHa 3a a ia % BIa (Ia g0Ja #8Ja c@"4a 'HKa _PbKa XKa A`BLa 9h:a Ep;a YxLa !"Ma ]"7a Ma aMa QbNa CNa +"Oa 1Oa Pa ;bPa UPa "Qa Qa 9a =ba Ra Sba ba [bRa /Ra 7 ba (BSa )01 a 8Sa I@BTa HTa eP"Ua GXUa 3`Ua WhbVa pWa 5xWa "Xa ?m a - a K)-``6\]b ]b]b]b]b]E]!]]b] ]b]b]b]]]]b]]b]b]]b]]]]]]]c]c] c]] c]c]c]c]c]!c]A?]%]]%c])c]-c]1c] ]]]D]I ``? )-`W`\1DW`H, $a- @<LH ``/ `/ `?   aJ `+ } \]q@ D)-`axD]Ք7$a/> @$a/) 3P | `  aY aaaa a (+a0b;a 8`+ } \]> D,a@%aH aP)- DcD,` \]: ];]<]=] ?Y D]! ] 8]9^)-`W"`H) $a- @<L< ``/ `/ `?  aJ)-`a7D]U%  $a *  @$a/! gP |9 ` a$Y aI`+ } \] DM`+ ]DQ`+/ ]DaaBa a*(a0ba&8a,@BaHa0P"aXa`a"ha pa xaaaa aa()- DcDP`\]Y% ]]%]a%]e%]i%]m%]q%]u%]y%]}%]%]%]%]% ]%!]%"]%#]%$]q "]%]%^`DWb`H6]Q%Wu `H2 $a- @<L< ``/ `/ `?  aJ)-`a|D]'] $a2h @$a/! P |0 ` aY aa)- DcD] u \]'^ D^)-`DWC`H]aW9`H  $a- @<L< ``/ `/ `?  aJ)-`a/D]} $a/ @$a/ P |0 ` a 1 a m a )-``A \]} ]]H^`WE`H $a- @QL< ``/ `/ `?  aJ)-`a D]M $a/K @$a/! Pm|0 ` aaYa)- DcD]q EID$ ` a`+ } )-`DW`H $a- @QL< ``/ `/ `?  aJ)-`aD]K $a/K @$a/! Pm|0 ` aaYa)- DcD] ID$ ` a`+ } )-`DW`H  $a- @<L` ``/  `/ `?  aJ_aB`a i a)-` a8\]  ]]D]$a /G @$a/! P |M `00 a:1 a`a"aaBaaJ "ba (ba40"ca(8caP@ca$HBdaXPdaXBeaV`eahfapfaNxga6ga8habhaLhaBia&ia@"jaja "kaka0"la^laH"ma2ma>"nana.Boa"oaTbpa*pa< bqa\(qa0braR8m a@raHBsa,P- aZX"aF`saDhBta pM ax)- DcD`-\] ] ] ] ]]]]]!]%])]-]1]5]9]=]A]E]I]M]Q]U]Y]]]a]e]i]m]q]u]y]}]]]]]]]]]]]D] ]]]^)-`WA `H  $a- @LH ``/ `/ `? a^ aJ)-`bD]  $a 1 Q@$a/+ P|$ ` aa^)- DcD] `D^`DWY`H$ $a- @LH ``/ `/ `? a^ aJ)-`bD]  $a 1 a@$a/+ P|$ ` aa^)- DcD] `D^`DW`HW1`H/$a-B @<L0 ``/ `/ ba)-``\]K D]JW=`H9](DW`H$a/! ;@ | `Y aaBa aba a(a0ba8a@"aHaP"aXa`ah)-`8` \]( ]!(]%(])(]-(]1(]5(]9(]=(]A(D]]E(]I(]M(DW!`H $a- /@<L ` `/  `/  `?  aJ `+ } \]q Dbataabua  a(Ya0)-`,a ]]]]]]D]Y$a/ @$a/& P |H ` aY a aua"va )- DcD`\]  D] !] ] ^)-`Wi`HLDW9`H $a- @Q< ``/ `/ `?  aJ)-`aD]L $a/K @$a/! Pm|0 ` aaYa)- DcD] 9ID$ ` a`+ } )-`WE `H" $a- @LH ``/ `/ `? a^ aJ)-`bD]  $a 1 Y@$a/+ P|$ ` aa^)- DcD] `D^`WB`H4\]Q(~ DW`H $a- K@<L ``/ `/ `?  aJ AaBaBaBa bCa (Ca0BDa8Da"@aHBEa PEaXFa`GahGap)-`Da\] ]Q]U]1 ~~~~~~~~]M$a/ @$a/ P |` ` a B@a @a "Aa 1 a  m a ("a 0)-`,` 9 \]q~ ]u~]y~]]]}~D]`^`DW`H|)DWQ `< DW`H $a- @<LT ``/ `/ `? a  aJ `+  } \]q D)-``]`$D]e$a ) @$a/! P |< `Y a aM`+ } \]9 D9a)- DcD] \] D^)-`W)`H( $a- @LH ``/ `/ `? a^ aJ)-`bD]   $a 1 q@$a/+ P|$ ` aa^)- DcD] `D^`W]`H% $a- @LH ``/ `/ `? a^ aJ)-`bD]   $a 1 e@$a/+ P|$ ` aa^)- DcD] `D^`DW`H! $a- @LH ``/ `/ `? a^ aJ)-`bD]  $a 1 U@$a/+ P|$ ` aa^)- DcD]!`D^`DW`H0$a/! ;@ | `Y aaaaa a(a 0a8a @aHaPaXa`ah)-`8` \]O ]P]Q]R]S](T]}U](V](W](XD]]L]M]ɓNDW`H$a/! 7@ | ` Y aaa"aa a (a 0a8³a@aHaPbaXa`)-`,`  $a- @<LH ``/ `/ `?   aJa)-`a]\]i) D]m)$a/Q @$a/! P |` ` aY a aba-`+ } \]q) Dba a()- DcD`]u)]y)D]]})])^` $a- @<LH ``/ `/ `?   aJa)-`aY\])) D]-)$a/E @$a/! P |< ` aY aa`+ } \]1) D)- DcD]]5)D^` $a- @<L< ``/ `/ `? a)-``\] D]$a /f @$a/! #P |l ` aY aa`+ } \] D!`+  ]D `+ ]D`+  ]D`+ ]D)- DcD]\] D^)-` $a- @<LH ``/ `/ `?   aJa)-`a`\]=) D]A)$a/R @$a/! P |H ` aY aaaBa )- DcD`\]E) D]mb]I)]M)^` $a- @<LH ``/ `/ `?   aJa)-`aa\]U) D]Y)$a/V @$a/! P |H ` aY aa-aba )- DcD`\]]) D]b]a)]e)^` $a- @<LH ``/ `/ `?   aJa)-`a_\]) D])$a/N @$a/! P |H ` aY aa-aba )- DcD`\]) D]])])^` $a- @<L< ``/ `/ `?  aJ)-`a^D]( $a/O @$a/! [P | ` aY a 1 a"a$Ba `+ } \]( D`++ ](D5`+ ](D`+ ](DY`+ ](D`+' } \]( D`+ ](Du`+ ](D!`+) ](D`+ ](D`+ } \]( D`+ ](Dy`+! ](D`+  ](D`+ ])D`+  } \]) D`+ ] )D)- DcD`] )D]b\]) ])^` $a- @<LH ``/ `/ `?   aJa)-`a[\]( D]($a/I @$a/! P |< ` aY aaa)- DcD]\]( ](^` $a- @<LH ``/ `/ `?   aJa)-`ab\]) D])$a/X @$a/! P |< ` aY aaQa)- DcD]\]!) ]%)^`]]9)y]Q)z $a- @<LH ``/ `/ `?   aJa)-`aZ\](| D]({$a /H @$a/! P |` ` aY a aba-`+ } \]( Dba a()- DcD`](](D]9B](}](~^`WA`H:])&DWQ`H1 $a- @<L< ``/ `/ `?  aJ)-`a}D]-&Y $a ,M @$a/! P |< ` aY aBaa)- DcD]Q\]1&Z ]5&[^)-`DW`\9DW `H $a- @QL< ``/ `/ `?  aJ)-`aD]N $a/K @$a/! Pm|0 ` aaYa)- DcD] ID$ ` a`+ } )-`W`H $a- #@<Ll ``/  `/ `?  aJ `+  } \]qW Db3a eaa)-` a']MX]QY]UZD]YV$a/B $a/B P | `**`;3  a I3a 1"4a 4a C5a O b5a =(5a 0B6a )86a S@"7a H7a %P8a Xb8a E`8a h"9a Ap9a 7x9a B:a /:a G;a Qa ;%a -+a +,a M a b;a K;a "<a <a '<a ?B=a =a >a b>a 9>a b?a ?a #  a ("a !01 a 58Q a@)- D`DaD`*\][ ]ц\]ن]]^]_]݆`]a]b]͆c]d]e]f]g]Eh])}i]j]}k]l]!}m]n]go]gp]uqy]ar]%}s]t]u]v]w]$x]y]z]m{]|]}]u~]}$a/! C@F| `3a4a+a5ab5a 5a(B6a06a8"<a@<aH:aP%aX>a`b?ah?ap,a x)-`8` G]GD]```; Zb $a/B  )-Zb$a/B Zb$a/B Zb $a/B  )-Zb$a/B @`DWb`H8\]9& D]Y`D]T%]T&Q d ! %  U $a 1 u@^)-`$a 1 y@^`$a 1 }@  ^`$a 1 @9!^)-`$a 1 @!  ^`$a 1 @=%^`$a 1 @  ^)-`$a 1 @ ^`$a 1 @^`$a 1 @mU^)-`$a 1 @  ^`$a/! @ |< `aaaa)-`D  \]T D$a/D @$a/! P$a/! P | `= a)-`]\]q' D|< ` aia! aY a)-`]\]T( ]T)]T*"$F^` $a- @L< ``/ `/ `?  aJ)-`a+D] e $a- @$a/! P<|$ `Y a `i)- DcD]%qD$ ``/ `/ )-`$a /; @F^` $a- @L< ``/ `/ `?  aJ)-`a-D]Mb $a- @$a/! P<|0 `aY a `)- DcD]$a/! PM|H ` `Y a aia! a )-``\]A- D]b%]E+]I,$D0 ``/ `/ `; )-`}A $a/B @<|$ ``/ `/ )-`$a/ @ <|$ ``/ `/ )-`\]T` ]T_ ]Tf$a/! @$a/! _P |! ` abaa a"a a*("a0a,8"a"@aH"aPaX"a`ahBa(pa x"aa&abaa Ba$1 a)- DcD\`\]Tj ]Tk]Tl]Tm]Tn]To]Tp]Tq]Tr]Ts]Tt]Tu]Tv]Tw]Tx]Ty]Tz]T{]T|D]]Ug]Uh] Ui^` ] UU$a/F @$a/! P | ` a)- D`DaD]eD^`$a/! @ |< `aaaa)-`q  D node:buffer!ext:deno_node/internal/buffer.mjs?node:child_process ext:core/mod.js ext:core/ops'ext:deno_node/internal/child_process.ts%ext:deno_node/internal/validators.mjs ext:deno_node/internal/errors.ts&ext:deno_node/internal/primordials.mjs node:utilext:deno_node/internal/util.mjs node:process node:buffer@ node:clusterext:deno_node/_utils.tsA node:console.ext:deno_node/internal/console/constructor.mjs%ext:runtime/98_global_scope_shared.jsBnode:constantsnode:fsnode:osC node:crypto ext:deno_node/internal/errors.ts+ext:deno_node/internal_binding/constants.ts!ext:deno_node/internal/options.ts(ext:deno_node/internal_binding/crypto.ts'ext:deno_node/internal/crypto/random.ts'ext:deno_node/internal/crypto/pbkdf2.ts'ext:deno_node/internal/crypto/scrypt.ts%ext:deno_node/internal/crypto/hkdf.ts'ext:deno_node/internal/crypto/keygen.ts%ext:deno_node/internal/crypto/keys.ts.ext:deno_node/internal/crypto/diffiehellman.ts'ext:deno_node/internal/crypto/cipher.ts$ext:deno_node/internal/crypto/sig.ts%ext:deno_node/internal/crypto/hash.ts%ext:deno_node/internal/crypto/x509.ts%ext:deno_node/internal/crypto/util.ts,ext:deno_node/internal/crypto/certificate.tsext:deno_crypto/00_crypto.jsD node:dgram node:buffer node:events ext:deno_node/internal/errors.tsext:deno_node/internal/dgram.ts%ext:deno_node/internal/async_hooks.ts*ext:deno_node/internal_binding/udp_wrap.ts%ext:deno_node/internal/validators.mjs&ext:deno_node/internal_binding/util.ts+ext:deno_node/internal_binding/constants.ts node:processnode:diagnostics_channel$ext:deno_node/internal/util/types.tsEnode:diagnostics_channel ext:deno_node/internal/errors.ts%ext:deno_node/internal/validators.mjs node:processFnode:dns ext:deno_node/_next_tick.tsext:deno_node/internal/util.mjs%ext:deno_node/internal/validators.mjsext:deno_node/internal/net.ts#ext:deno_node/internal/dns/utils.ts&ext:deno_node/internal/dns/promises.ts ext:deno_node/internal/errors.ts&ext:deno_node/internal_binding/ares.ts,ext:deno_node/internal_binding/cares_wrap.ts node:punycodeext:deno_node/_utils.tsGnode:dns/promisesnode:dnsH node:domainext:deno_node/_utils.tsI node:eventsext:deno_node/_events.mjsJnode:fs)ext:deno_node/_fs/_fs_access.ts#ext:deno_node/_fs/_fs_appendFile.tsext:deno_node/_fs/_fs_chmod.tsext:deno_node/_fs/_fs_chown.tsext:deno_node/_fs/_fs_close.ts"ext:deno_node/_fs/_fs_constants.tsext:deno_node/_fs/_fs_copy.tsext:deno_node/_fs/_fs_cp.jsext:deno_node/_fs/_fs_dir.tsext:deno_node/_fs/_fs_dirent.tsext:deno_node/_fs/_fs_exists.ts"ext:deno_node/_fs/_fs_fdatasync.tsext:deno_node/_fs/_fs_fstat.tsext:deno_node/_fs/_fs_fsync.ts"ext:deno_node/_fs/_fs_ftruncate.ts ext:deno_node/_fs/_fs_futimes.tsext:deno_node/_fs/_fs_link.tsext:deno_node/_fs/_fs_lstat.tsext:deno_node/_fs/_fs_mkdir.ts ext:deno_node/_fs/_fs_mkdtemp.tsext:deno_node/_fs/_fs_open.ts ext:deno_node/_fs/_fs_opendir.tsext:deno_node/_fs/_fs_read.ts ext:deno_node/_fs/_fs_readdir.ts!ext:deno_node/_fs/_fs_readFile.ts!ext:deno_node/_fs/_fs_readlink.ts!ext:deno_node/_fs/_fs_realpath.tsext:deno_node/_fs/_fs_rename.tsext:deno_node/_fs/_fs_rmdir.tsext:deno_node/_fs/_fs_rm.tsext:deno_node/_fs/_fs_stat.ts ext:deno_node/_fs/_fs_symlink.ts!ext:deno_node/_fs/_fs_truncate.tsext:deno_node/_fs/_fs_unlink.tsext:deno_node/_fs/_fs_utimes.tsext:deno_node/_fs/_fs_watch.tsext:deno_node/_fs/_fs_write.mjs ext:deno_node/_fs/_fs_writev.mjs"ext:deno_node/_fs/_fs_writeFile.ts#ext:deno_node/internal/fs/utils.mjs%ext:deno_node/internal/fs/streams.mjsKnode:fs/promisesnode:fsL node:httpext:core/mod.js ext:core/ops ext:deno_web/08_text_encoding.jsext:deno_web/02_timers.jsnode:net node:buffer ext:deno_node/internal/errors.ts node:eventsext:deno_node/_next_tick.ts%ext:deno_node/internal/validators.mjs node:streamext:deno_node/_http_outgoing.ts node:assertext:deno_node/internal/http.tsext:deno_node/_http_common.tsext:deno_node/_http_agent.mjsext:deno_node/internal/url.tsext:deno_node/internal/util.mjs*ext:deno_node/internal_binding/tcp_wrap.tsext:deno_node/_utils.ts!ext:deno_node/internal/timers.mjsext:deno_http/00_serve.js ext:deno_fetch/22_http_client.jsext:deno_fetch/20_headers.jsext:deno_web/03_abort_signal.jsext:deno_web/06_streams.jsext:deno_net/01_net.jsM node:http2ext:core/mod.js ext:core/opsext:deno_node/_utils.ts node:events node:buffernode:netnode:tls-ext:deno_node/internal/stream_base_commons.ts-ext:deno_node/internal_binding/stream_wrap.tsext:deno_http/00_serve.jsext:deno_node/_next_tick.ts ext:deno_web/08_text_encoding.js node:stream ext:deno_node/internal/errors.tsext:deno_node/_http_common.tsN node:httpsext:deno_node/_utils.tsext:deno_node/internal/url.ts node:httpext:deno_node/_http_agent.mjs ext:deno_fetch/22_http_client.js%ext:deno_node/internal/validators.mjsext:deno_node/internal/util.mjs node:bufferOext:deno_node/inspector.ts node:eventsext:deno_node/_utils.tsP'ext:deno_node/internal/child_process.tsext:core/mod.js ext:core/ops&ext:deno_node/internal/primordials.mjsext:deno_node/_util/asserts.ts node:events+ext:deno_node/internal_binding/constants.tsext:deno_node/_utils.ts node:streamext:deno_node/_util/os.tsext:deno_node/_next_tick.ts ext:deno_node/internal/errors.ts node:buffer$ext:deno_node/internal_binding/uv.ts%ext:deno_node/internal/validators.mjsext:deno_node/internal/util.mjs#ext:deno_node/internal/fs/utils.mjs node:processQ,ext:deno_node/internal/crypto/certificate.tsext:deno_node/_utils.tsR'ext:deno_node/internal/crypto/cipher.ts ext:core/mod.js ext:core/ops ext:deno_node/internal/errors.ts%ext:deno_node/internal/validators.mjs node:bufferext:deno_node/_utils.tsext:deno_node/_stream.mjs%ext:deno_node/internal/crypto/keys.ts%ext:deno_node/internal/crypto/util.ts$ext:deno_node/internal/util/types.tsS.ext:deno_node/internal/crypto/diffiehellman.ts ext:core/opsext:deno_node/_utils.ts$ext:deno_node/internal/util/types.ts ext:deno_node/internal/errors.ts%ext:deno_node/internal/validators.mjs node:buffer%ext:deno_node/internal/crypto/util.tsT%ext:deno_node/internal/crypto/hash.ts ext:core/ops ext:deno_web/08_text_encoding.js node:buffer node:streamext:deno_web/00_infra.js%ext:deno_node/internal/validators.mjs%ext:deno_node/internal/crypto/keys.tsU%ext:deno_node/internal/crypto/hkdf.ts ext:core/ops%ext:deno_node/internal/validators.mjs ext:deno_node/internal/errors.ts%ext:deno_node/internal/crypto/util.ts%ext:deno_node/internal/crypto/keys.ts!ext:deno_node/internal/buffer.mjs$ext:deno_node/internal/util/types.tsV'ext:deno_node/internal/crypto/keygen.ts%ext:deno_node/internal/crypto/keys.ts%ext:deno_node/internal/crypto/util.tsext:deno_node/_utils.ts ext:deno_node/internal/errors.ts%ext:deno_node/internal/validators.mjs ext:core/opsW%ext:deno_node/internal/crypto/keys.ts ext:core/ops*ext:deno_node/internal/crypto/constants.ts'ext:deno_node/internal/crypto/cipher.ts ext:deno_node/internal/errors.tsext:deno_node/_utils.ts node:buffer$ext:deno_node/internal/util/types.ts&ext:deno_node/internal/crypto/_keys.ts%ext:deno_node/internal/validators.mjsext:deno_web/00_infra.jsX'ext:deno_node/internal/crypto/pbkdf2.ts ext:core/ops node:bufferY'ext:deno_node/internal/crypto/random.ts ext:core/mod.js ext:core/opsext:deno_node/_utils.ts-ext:deno_node/internal/crypto/_randomBytes.ts-ext:deno_node/internal/crypto/_randomFill.mjs+ext:deno_node/internal/crypto/_randomInt.ts%ext:deno_node/internal/validators.mjs$ext:deno_node/internal/util/types.ts ext:deno_node/internal/errors.tsZ'ext:deno_node/internal/crypto/scrypt.ts node:buffer ext:core/ops[$ext:deno_node/internal/crypto/sig.ts ext:core/opsext:deno_node/_utils.ts%ext:deno_node/internal/validators.mjs node:buffer+ext:deno_node/internal/streams/writable.mjs%ext:deno_node/internal/crypto/keys.ts%ext:deno_node/internal/crypto/hash.ts$ext:deno_node/internal/util/types.ts ext:deno_node/internal/errors.ts\%ext:deno_node/internal/crypto/util.tsext:deno_node/_utils.ts node:buffer ext:deno_node/internal/errors.ts$ext:deno_node/internal/util/types.ts*ext:deno_node/internal/crypto/constants.ts]%ext:deno_node/internal/crypto/x509.ts ext:core/ops node:buffer ext:deno_node/internal/errors.ts$ext:deno_node/internal/util/types.ts%ext:deno_node/internal/validators.mjsext:deno_node/_utils.ts^ext:deno_node/internal/dgram.tsnode:dns%ext:deno_node/internal/validators.mjs ext:deno_node/internal/errors.ts*ext:deno_node/internal_binding/udp_wrap.ts&ext:deno_node/internal_binding/util.ts$ext:deno_node/internal_binding/uv.ts_&ext:deno_node/internal/dns/promises.ts%ext:deno_node/internal/validators.mjsext:deno_node/internal/net.ts#ext:deno_node/internal/dns/utils.ts ext:deno_node/internal/errors.ts,ext:deno_node/internal_binding/cares_wrap.ts node:punycode` ext:deno_node/internal/errors.ts'ext:deno_node/internal/util/inspect.mjs%ext:deno_node/internal/error_codes.ts$ext:deno_node/internal_binding/uv.tsext:deno_node/_util/asserts.tsext:deno_node/_util/os.ts+ext:deno_node/internal_binding/constants.ts+ext:deno_node/internal/hide_stack_frames.tsext:deno_node/_utils.tsa'ext:deno_node/internal/event_target.mjs ext:deno_node/internal/errors.ts%ext:deno_node/internal/validators.mjs node:processext:deno_node/_next_tick.tsext:deno_web/02_event.jsext:deno_node/internal/util.mjs node:util node:eventsb#ext:deno_node/internal/fs/utils.mjs node:buffer ext:deno_node/internal/errors.ts$ext:deno_node/internal/util/types.tsext:deno_node/internal/util.mjs node:utilext:deno_node/internal/url.ts%ext:deno_node/internal/validators.mjs node:path!ext:deno_node/internal/assert.mjsext:deno_node/_fs/_fs_lstat.tsext:deno_node/_fs/_fs_stat.tsext:deno_node/_util/os.ts node:process+ext:deno_node/internal_binding/constants.tscext:deno_node/internal/http.ts node:timersext:deno_node/_utils.tsd)ext:deno_node/internal/readline/utils.mjse3ext:deno_node/internal/streams/add-abort-signal.mjs ext:deno_node/internal/errors.ts0ext:deno_node/internal/streams/end-of-stream.mjsf.ext:deno_node/internal/streams/buffer_list.mjs node:buffer'ext:deno_node/internal/util/inspect.mjsg1ext:deno_node/internal/streams/lazy_transform.mjs%ext:deno_node/internal/crypto/util.ts node:streamh(ext:deno_node/internal/streams/state.mjsi&ext:deno_node/internal/test/binding.ts%ext:deno_node/internal_binding/mod.tsj!ext:deno_node/internal/timers.mjsext:core/mod.js'ext:deno_node/internal/util/inspect.mjs%ext:deno_node/internal/validators.mjs ext:deno_node/internal/errors.ts node:processext:deno_web/02_timers.jskext:deno_node/internal/util.mjs%ext:deno_node/internal/validators.mjs-ext:deno_node/internal/normalize_encoding.mjs&ext:deno_node/internal/primordials.mjs ext:deno_node/internal/errors.ts+ext:deno_node/internal_binding/constants.tsl'ext:deno_node/internal/util/inspect.mjs%ext:deno_node/internal/validators.mjs%ext:deno_node/internal/error_codes.tsext:deno_console/01_console.jsmnode:netext:deno_node/_utils.ts node:eventsext:deno_node/internal/net.ts node:stream%ext:deno_node/internal/async_hooks.ts ext:deno_node/internal/errors.ts$ext:deno_node/internal/util/types.ts-ext:deno_node/internal/stream_base_commons.ts!ext:deno_node/internal/timers.mjsext:deno_node/_next_tick.ts ext:deno_node/internal/dtrace.ts node:buffer%ext:deno_node/internal/validators.mjs*ext:deno_node/internal_binding/tcp_wrap.ts+ext:deno_node/internal_binding/pipe_wrap.ts-ext:deno_node/internal_binding/stream_wrap.tsext:deno_node/_util/asserts.tsext:deno_node/_util/os.tsnode:dns$ext:deno_node/internal_binding/uv.ts&ext:deno_node/internal_binding/util.ts'ext:deno_node/internal/util/debuglog.tsnode:diagnostics_channelnnode:os ext:core/opsext:deno_node/_utils.ts node:processext:deno_node/_util/os.ts ext:deno_node/internal/errors.ts+ext:deno_node/internal_binding/constants.tsext:runtime/30_os.js!ext:deno_node/internal/buffer.mjsonode:path/posixext:deno_node/path/mod.tspnode:path/win32ext:deno_node/path/mod.tsq node:pathext:deno_node/path/mod.tsrnode:perf_hooksext:deno_node/_utils.tsext:deno_web/15_performance.jss node:punycode ext:core/opsext:deno_node/internal/idna.tst node:processext:core/mod.js ext:core/opsext:deno_node/_utils.ts node:events node:module(ext:deno_node/internal/process/report.ts%ext:deno_node/internal/validators.mjs ext:deno_node/internal/errors.ts!ext:deno_node/internal/options.tsext:deno_node/_util/asserts.ts node:pathext:deno_web/00_infra.js!ext:deno_node/_process/process.ts!ext:deno_node/_process/exiting.ts"ext:deno_node/_process/streams.mjsext:deno_node/_next_tick.tsext:deno_node/_util/os.tsext:deno_io/12_io.jsext:runtime/40_process.js%ext:deno_node/internal_binding/mod.ts+ext:deno_node/internal_binding/constants.ts$ext:deno_node/internal_binding/uv.ts-ext:deno_node/internal/process/per_thread.mjsunode:querystring node:buffer%ext:deno_node/internal/querystring.tsv node:readlineext:deno_node/_readline.mjsw"ext:deno_node/readline/promises.ts,ext:deno_node/internal/readline/promises.mjs-ext:deno_node/internal/readline/interface.mjs ext:deno_node/internal/errors.ts%ext:deno_node/internal/validators.mjsext:deno_node/internal/util.mjsx node:replext:deno_node/_utils.tsy node:streamext:deno_node/_stream.mjsznode:stream/consumers ext:deno_web/08_text_encoding.js node:buffer{node:stream/promisesext:deno_node/_stream.mjs|node:stream/webext:deno_web/06_streams.js ext:deno_web/08_text_encoding.js}node:string_decoder node:bufferext:deno_node/_utils.ts~node:sys node:util node:testext:deno_node/_utils.ts node:timersext:core/mod.js!ext:deno_node/internal/timers.mjs%ext:deno_node/internal/validators.mjsext:deno_node/internal/util.mjsext:deno_web/02_timers.jsnode:timers/promises node:util node:timersnode:tlsext:deno_node/_utils.tsext:deno_node/_tls_common.tsext:deno_node/_tls_wrap.tsnode:ttyext:core/mod.js ext:core/ops ext:deno_node/internal/errors.ts-ext:deno_node/internal_binding/stream_wrap.ts,ext:deno_node/internal_binding/async_wrap.tsnode:net"ext:deno_node/_process/streams.mjsnode:url ext:deno_node/internal/errors.ts%ext:deno_node/internal/validators.mjs ext:deno_node/path/_constants.ts node:path node:punycodeext:deno_node/_util/os.ts%ext:deno_node/internal/querystring.tsnode:querystringext:deno_url/00_url.jsnode:util/types$ext:deno_node/internal/util/types.ts node:util ext:core/mod.jsext:deno_node/internal/util.mjs(ext:deno_node/_util/_util_callbackify.js'ext:deno_node/internal/util/debuglog.ts'ext:deno_node/internal/util/inspect.mjs%ext:deno_node/internal/error_codes.tsnode:util/types node:buffer*ext:deno_node/internal/util/comparisons.ts node:process%ext:deno_node/internal/validators.mjs4ext:deno_node/internal/util/parse_args/parse_args.jsext:deno_node/_utils.tsnode:v8 ext:core/opsext:deno_node/_utils.tsnode:vmext:core/mod.jsext:deno_node/_utils.ts ext:core/opsnode:worker_threadsext:core/mod.js ext:core/ops node:pathext:deno_node/_utils.ts node:events2ext:deno_broadcast_channel/01_broadcast_channel.jsext:deno_web/13_message_port.jsext:deno_node/wasi.ts node:zlibext:deno_node/_utils.ts+ext:deno_node/internal_binding/constants.tsext:deno_node/_zlib.mjsext:deno_node/_brotli.js'ext:deno_node/internal/util/debuglog.ts'ext:deno_node/internal/util/inspect.mjs%ext:deno_node/internal/async_hooks.ts,ext:deno_node/internal_binding/async_wrap.ts ext:deno_node/internal/errors.ts)ext:deno_node/internal_binding/symbols.ts%ext:deno_node/internal/validators.mjsext:core/mod.js%ext:deno_node/internal/error_codes.ts+ext:deno_node/internal/hide_stack_frames.ts$ext:deno_node/internal/util/types.ts-ext:deno_node/internal/normalize_encoding.mjs!ext:deno_node/internal/assert.mjs ext:deno_node/internal/errors.tsext:deno_node/_utils.ts ext:deno_web/08_text_encoding.js$ext:deno_node/internal_binding/uv.ts%ext:deno_node/internal/error_codes.tsext:deno_node/_http_common.ts$ext:deno_node/internal/util/types.tsext:core/mod.js'ext:deno_node/internal_binding/types.ts&ext:deno_node/internal/crypto/_keys.tsext:deno_node/_stream.mjsext:deno_node/_next_tick.tsext:deno_web/03_abort_signal.jsext:deno_web/09_file.jsnode:string_decoderext:deno_node/internal/util.mjs$ext:deno_node/internal/util/types.ts'ext:deno_node/internal/util/debuglog.ts'ext:deno_node/internal/util/inspect.mjs ext:deno_node/internal/errors.ts node:process node:buffer node:events*ext:deno_node/internal/streams/destroy.mjs0ext:deno_node/internal/streams/end-of-stream.mjs(ext:deno_node/internal/streams/utils.mjsnode:stream/web%ext:deno_node/internal/validators.mjs ext:deno_node/assertion_error.ts node:util%ext:deno_node/_util/std_fmt_colors.tsext:deno_io/12_io.js ext:deno_node/internal/errors.ts"ext:deno_node/_util/std_asserts.tsext:core/mod.jsext:deno_url/00_url.js%ext:deno_node/_util/std_fmt_colors.ts'ext:deno_node/_util/std_testing_diff.ts*ext:deno_node/internal/util/comparisons.ts$ext:deno_node/internal/util/types.ts node:buffer&ext:deno_node/internal_binding/util.ts!ext:deno_node/internal/buffer.mjs ext:core/mod.js ext:deno_web/08_text_encoding.js%ext:deno_node/internal/error_codes.ts0ext:deno_node/internal_binding/string_decoder.ts(ext:deno_node/internal_binding/buffer.ts(ext:deno_node/internal_binding/_utils.ts$ext:deno_node/internal/util/types.tsext:deno_node/internal/util.mjs%ext:deno_node/internal/validators.mjsext:deno_web/00_infra.jsext:deno_web/05_base64.jsext:deno_web/09_file.js&ext:deno_node/internal/primordials.mjs.ext:deno_node/internal/console/constructor.mjs ext:core/ops ext:deno_node/internal/errors.ts%ext:deno_node/internal/validators.mjs node:buffer'ext:deno_node/internal/util/inspect.mjs$ext:deno_node/internal/util/types.ts#ext:deno_node/internal/constants.ts-ext:deno_node/internal/readline/callbacks.mjs#ext:deno_node/internal/cli_table.ts%ext:runtime/98_global_scope_shared.js!ext:core/mod.jsext:deno_web/02_event.jsext:deno_web/02_timers.jsext:deno_web/05_base64.js ext:deno_web/08_text_encoding.jsext:deno_console/01_console.jsext:deno_cache/01_cache.jsext:deno_web/14_compression.jsext:runtime/11_workers.jsext:deno_web/15_performance.jsext:deno_crypto/00_crypto.jsext:deno_url/00_url.jsext:deno_url/01_urlpattern.jsext:deno_fetch/20_headers.jsext:deno_web/06_streams.jsext:deno_web/10_filereader.js"ext:deno_websocket/01_websocket.js(ext:deno_websocket/02_websocketstream.js2ext:deno_broadcast_channel/01_broadcast_channel.jsext:deno_web/09_file.jsext:deno_fetch/21_formdata.jsext:deno_fetch/23_request.jsext:deno_fetch/23_response.jsext:deno_fetch/26_fetch.js ext:deno_fetch/27_eventsource.jsext:deno_web/13_message_port.jsext:deno_webidl/00_webidl.js ext:deno_web/01_dom_exception.jsext:deno_web/03_abort_signal.jsext:deno_web/16_image_data.jsext:deno_webgpu/00_init.jsext:deno_webgpu/02_surface.jsext:runtime/90_deno_ns.js+ext:deno_node/internal_binding/constants.ts ext:core/ops!ext:deno_node/internal/options.ts.ext:deno_node/internal_binding/node_options.ts(ext:deno_node/internal_binding/crypto.tsext:deno_node/_utils.ts2ext:deno_node/internal_binding/_timingSafeEqual.ts*ext:deno_node/internal_binding/udp_wrap.ts ext:core/ops,ext:deno_node/internal_binding/async_wrap.ts-ext:deno_node/internal_binding/handle_wrap.ts)ext:deno_node/internal_binding/symbols.ts$ext:deno_node/internal_binding/uv.tsext:deno_node/_utils.ts node:bufferext:deno_node/internal/net.tsext:deno_net/01_net.jsext:deno_node/_util/os.ts&ext:deno_node/internal_binding/util.ts ext:core/opsext:deno_node/_next_tick.tsext:core/mod.js%ext:deno_node/internal/validators.mjs!ext:deno_node/_process/exiting.ts%ext:deno_node/internal/fixed_queue.tsext:deno_node/internal/net.ts node:buffer ext:deno_node/internal/errors.ts+ext:deno_node/internal_binding/node_file.ts#ext:deno_node/internal/dns/utils.ts!ext:deno_node/internal/options.ts node:process&ext:deno_node/internal_binding/ares.ts,ext:deno_node/internal_binding/cares_wrap.ts ext:deno_node/internal/errors.ts%ext:deno_node/internal/validators.mjsext:deno_node/internal/net.ts&ext:deno_node/internal_binding/ares.ts,ext:deno_node/internal_binding/cares_wrap.tsext:deno_node/internal/net.ts$ext:deno_node/internal_binding/uv.ts,ext:deno_node/internal_binding/async_wrap.ts&ext:deno_node/internal_binding/ares.tsext:deno_node/_utils.tsext:deno_node/_util/os.tsext:deno_node/_events.mjs'ext:deno_node/internal/util/inspect.mjs ext:deno_node/internal/errors.ts%ext:deno_node/internal/validators.mjsext:deno_node/_utils.ts!ext:deno_node/_process/process.tsext:deno_node/_fs/_fs_access.tsext:deno_node/_fs/_fs_common.ts+ext:deno_node/internal_binding/constants.ts$ext:deno_node/internal_binding/uv.ts#ext:deno_node/internal/fs/utils.mjsext:deno_node/internal/util.mjs#ext:deno_node/_fs/_fs_appendFile.tsext:deno_node/_fs/_fs_common.ts#ext:deno_node/internal/fs/utils.mjs"ext:deno_node/_fs/_fs_writeFile.tsext:deno_node/internal/util.mjsext:deno_node/_fs/_fs_chmod.ts#ext:deno_node/internal/fs/utils.mjs node:path%ext:deno_node/internal/validators.mjsext:deno_node/internal/util.mjsext:deno_node/_fs/_fs_chown.tsext:deno_node/_fs/_fs_common.ts#ext:deno_node/internal/fs/utils.mjs node:path%ext:deno_node/internal/validators.mjsext:deno_node/internal/util.mjsext:deno_node/_fs/_fs_close.ts#ext:deno_node/internal/fs/utils.mjsext:core/mod.js"ext:deno_node/_fs/_fs_constants.ts+ext:deno_node/internal_binding/constants.tsext:deno_node/_fs/_fs_copy.tsext:deno_node/_fs/_fs_common.ts#ext:deno_node/internal/fs/utils.mjs+ext:deno_node/internal_binding/constants.ts$ext:deno_node/internal_binding/uv.tsext:deno_node/internal/util.mjsext:deno_node/_fs/_fs_cp.js ext:core/ops#ext:deno_node/internal/fs/utils.mjsext:deno_node/internal/util.mjsext:deno_node/_fs/_fs_dir.tsext:deno_node/_fs/_fs_dirent.tsext:deno_node/_util/asserts.ts ext:deno_node/internal/errors.ts ext:deno_web/08_text_encoding.jsext:deno_node/_fs/_fs_dirent.tsext:deno_node/_utils.tsext:deno_node/_fs/_fs_exists.ts ext:core/opsext:deno_web/00_infra.js"ext:deno_node/_fs/_fs_fdatasync.tsext:deno_fs/30_fs.jsext:deno_node/_fs/_fs_fstat.tsext:deno_node/_fs/_fs_stat.tsext:deno_fs/30_fs.jsext:deno_node/_fs/_fs_fsync.tsext:deno_fs/30_fs.js"ext:deno_node/_fs/_fs_ftruncate.tsext:deno_fs/30_fs.js ext:deno_node/_fs/_fs_futimes.tsext:deno_fs/30_fs.jsext:deno_node/_fs/_fs_link.tsext:deno_web/00_infra.jsext:deno_node/internal/util.mjsext:deno_node/_fs/_fs_lstat.tsext:deno_node/_fs/_fs_stat.tsext:deno_node/internal/util.mjsext:deno_node/_fs/_fs_mkdir.tsext:deno_node/internal/util.mjs ext:deno_node/internal/errors.ts#ext:deno_node/internal/fs/utils.mjs%ext:deno_node/internal/validators.mjs ext:deno_node/_fs/_fs_mkdtemp.ts ext:deno_web/08_text_encoding.jsext:deno_node/_fs/_fs_exists.tsext:deno_node/_fs/_fs_mkdir.ts ext:deno_node/internal/errors.tsext:deno_node/internal/util.mjsext:deno_node/_fs/_fs_open.tsext:core/mod.js"ext:deno_node/_fs/_fs_constants.tsext:deno_node/_fs/_fs_common.ts%ext:deno_node/internal/validators.mjs ext:deno_node/internal/errors.ts#ext:deno_node/internal/fs/utils.mjs#ext:deno_node/internal/fs/handle.ts ext:deno_node/_fs/_fs_opendir.tsext:deno_node/_fs/_fs_dir.ts#ext:deno_node/internal/fs/utils.mjs ext:deno_node/internal/errors.ts%ext:deno_node/internal/validators.mjsext:deno_node/internal/util.mjsext:deno_node/_fs/_fs_read.ts node:buffer ext:deno_node/internal/errors.tsext:deno_io/12_io.jsext:deno_fs/30_fs.js#ext:deno_node/internal/fs/utils.mjs%ext:deno_node/internal/validators.mjs ext:deno_node/_fs/_fs_readdir.ts ext:deno_web/08_text_encoding.jsext:deno_node/_fs/_fs_watch.tsext:deno_node/_fs/_fs_dirent.ts ext:deno_node/internal/errors.ts#ext:deno_node/internal/fs/utils.mjsext:deno_node/internal/util.mjs!ext:deno_node/_fs/_fs_readFile.tsext:deno_node/_fs/_fs_common.ts node:bufferext:deno_io/12_io.js#ext:deno_node/internal/fs/handle.tsext:deno_web/00_infra.jsext:deno_fs/30_fs.js!ext:deno_node/_fs/_fs_readlink.ts ext:deno_web/08_text_encoding.jsext:deno_node/_utils.tsext:deno_web/00_infra.jsext:deno_node/internal/util.mjs!ext:deno_node/_fs/_fs_realpath.tsext:deno_node/internal/util.mjsext:deno_node/_fs/_fs_rename.tsext:deno_web/00_infra.jsext:deno_node/internal/util.mjsext:deno_node/_fs/_fs_rmdir.ts#ext:deno_node/internal/fs/utils.mjs node:path ext:deno_node/internal/errors.tsext:deno_node/internal/util.mjsext:deno_node/_fs/_fs_rm.ts#ext:deno_node/internal/fs/utils.mjs ext:deno_node/internal/errors.tsext:deno_node/internal/util.mjsext:deno_node/_fs/_fs_stat.ts ext:deno_node/internal/errors.tsext:deno_node/internal/util.mjs ext:deno_node/_fs/_fs_symlink.tsext:deno_web/00_infra.jsext:deno_node/internal/util.mjs!ext:deno_node/_fs/_fs_truncate.tsext:deno_web/00_infra.jsext:deno_node/internal/util.mjsext:deno_node/_fs/_fs_unlink.tsext:deno_node/internal/util.mjsext:deno_node/_fs/_fs_utimes.tsext:deno_web/00_infra.jsext:deno_node/internal/util.mjsext:deno_node/_fs/_fs_watch.ts node:path node:eventsext:deno_node/_utils.ts node:util#ext:deno_node/internal/fs/utils.mjs%ext:deno_node/internal/validators.mjsext:deno_node/_fs/_fs_stat.tsext:deno_node/_util/async.tsext:deno_node/_fs/_fs_write.mjs node:buffer%ext:deno_node/internal/validators.mjsext:deno_io/12_io.jsext:deno_fs/30_fs.js#ext:deno_node/internal/fs/utils.mjs$ext:deno_node/internal/util/types.tsext:deno_node/_fs/_fs_common.ts ext:deno_node/_fs/_fs_writev.mjs node:buffer#ext:deno_node/internal/fs/utils.mjsext:deno_node/_fs/_fs_common.tsext:deno_io/12_io.jsext:deno_fs/30_fs.js"ext:deno_node/_fs/_fs_writeFile.tsext:deno_web/00_infra.js node:bufferext:deno_node/_fs/_fs_common.tsext:deno_node/_util/os.ts ext:deno_node/internal/errors.ts#ext:deno_node/internal/fs/utils.mjsext:deno_node/internal/util.mjsext:deno_fs/30_fs.js%ext:deno_node/internal/fs/streams.mjs ext:deno_node/internal/errors.tsext:deno_node/internal/util.mjs node:util%ext:deno_node/internal/validators.mjs*ext:deno_node/internal/streams/destroy.mjsext:deno_node/_fs/_fs_open.tsext:deno_node/_fs/_fs_read.tsext:deno_node/_fs/_fs_write.mjs ext:deno_node/_fs/_fs_writev.mjsext:deno_node/_fs/_fs_close.ts node:buffer#ext:deno_node/internal/fs/utils.mjs node:streamext:deno_node/internal/url.tsext:deno_node/_next_tick.tsext:deno_node/internal/url.tsnode:url*ext:deno_node/internal_binding/tcp_wrap.ts ext:deno_node/_utils.tsext:deno_node/_util/asserts.ts1ext:deno_node/internal_binding/connection_wrap.ts,ext:deno_node/internal_binding/async_wrap.ts-ext:deno_node/internal_binding/stream_wrap.ts)ext:deno_node/internal_binding/symbols.ts$ext:deno_node/internal_binding/uv.tsext:deno_node/_util/async.tsext:deno_node/internal/net.ts)ext:deno_node/internal_binding/_listen.ts-ext:deno_node/internal/stream_base_commons.ts %ext:deno_node/internal/async_hooks.ts-ext:deno_node/internal_binding/stream_wrap.ts$ext:deno_node/internal/util/types.ts ext:deno_node/internal/errors.ts!ext:deno_node/internal/timers.mjs node:timers%ext:deno_node/internal/validators.mjs$ext:deno_node/internal_binding/uv.ts node:buffer-ext:deno_node/internal_binding/stream_wrap.tsext:core/mod.js ext:core/ops ext:deno_web/08_text_encoding.js node:bufferext:deno_node/_utils.ts-ext:deno_node/internal_binding/handle_wrap.ts,ext:deno_node/internal_binding/async_wrap.ts$ext:deno_node/internal_binding/uv.tsext:deno_node/_util/asserts.tsext:core/mod.jsext:deno_node/_util/os.ts ext:core/ops$ext:deno_node/internal_binding/uv.tsext:deno_node/_util/asserts.tsext:deno_node/_util/os.ts1ext:deno_node/internal_binding/_libuv_winerror.ts*ext:deno_node/internal/crypto/constants.ts&ext:deno_node/internal/crypto/_keys.ts*ext:deno_node/internal/crypto/constants.ts-ext:deno_node/internal/crypto/_randomBytes.ts node:buffer-ext:deno_node/internal/crypto/_randomFill.mjs ext:core/ops-ext:deno_node/internal/crypto/_randomBytes.ts node:buffernode:util/types ext:deno_node/internal/errors.ts+ext:deno_node/internal/crypto/_randomInt.ts ext:core/ops%ext:deno_node/internal/error_codes.ts+ext:deno_node/internal/hide_stack_frames.ts0ext:deno_node/internal/streams/end-of-stream.mjs ext:deno_node/internal/errors.tsext:deno_node/internal/util.mjs%ext:deno_node/internal/validators.mjs!ext:deno_node/_process/process.ts%ext:deno_node/internal_binding/mod.ts,ext:deno_node/internal_binding/async_wrap.ts(ext:deno_node/internal_binding/buffer.ts,ext:deno_node/internal_binding/cares_wrap.ts+ext:deno_node/internal_binding/constants.ts(ext:deno_node/internal_binding/crypto.ts+ext:deno_node/internal_binding/pipe_wrap.ts-ext:deno_node/internal_binding/stream_wrap.ts0ext:deno_node/internal_binding/string_decoder.ts)ext:deno_node/internal_binding/symbols.ts*ext:deno_node/internal_binding/tcp_wrap.ts'ext:deno_node/internal_binding/types.ts*ext:deno_node/internal_binding/udp_wrap.ts&ext:deno_node/internal_binding/util.ts$ext:deno_node/internal_binding/uv.ts-ext:deno_node/internal/normalize_encoding.mjs ext:deno_node/internal/dtrace.ts+ext:deno_node/internal_binding/pipe_wrap.ts ext:deno_node/_utils.tsext:deno_node/_util/asserts.ts1ext:deno_node/internal_binding/connection_wrap.ts,ext:deno_node/internal_binding/async_wrap.ts-ext:deno_node/internal_binding/stream_wrap.ts$ext:deno_node/internal_binding/uv.tsext:deno_node/_util/async.ts)ext:deno_node/internal_binding/_listen.tsext:deno_node/_util/os.ts+ext:deno_node/internal_binding/constants.tsext:runtime/30_os.jsext:core/mod.js ext:core/opsext:deno_web/02_event.jsext:deno_node/path/mod.tsext:deno_node/_util/os.tsext:deno_node/path/_win32.tsext:deno_node/path/_posix.tsext:deno_node/path/common.ts ext:deno_node/path/_interface.tsext:deno_node/internal/idna.ts(ext:deno_node/internal/process/report.tsext:core/mod.js!ext:deno_node/_process/process.tsnode:os!ext:deno_node/_process/process.tsext:core/mod.jsext:deno_node/_next_tick.tsext:deno_fs/30_fs.js!ext:deno_node/_process/exiting.ts"ext:deno_node/_process/streams.mjs node:buffer-ext:deno_node/internal/readline/callbacks.mjs node:streamext:deno_io/12_io.js&ext:deno_node/internal_binding/util.tsext:runtime/40_process.jsext:core/mod.js ext:core/opsext:deno_fs/30_fs.jsext:deno_io/12_io.jsext:deno_web/00_infra.jsext:deno_web/03_abort_signal.jsext:deno_web/06_streams.js-ext:deno_node/internal/process/per_thread.mjs%ext:deno_node/internal/querystring.ts ext:deno_node/internal/errors.tsext:deno_node/_readline.mjs-ext:deno_node/internal/readline/callbacks.mjs6ext:deno_node/internal/readline/emitKeypressEvents.mjs"ext:deno_node/readline/promises.ts%ext:deno_node/internal/validators.mjsext:deno_node/internal/util.mjs ext:deno_node/internal/errors.ts node:process-ext:deno_node/internal/readline/interface.mjs,ext:deno_node/internal/readline/promises.mjs&ext:deno_node/internal/primordials.mjs)ext:deno_node/internal/readline/utils.mjs%ext:deno_node/internal/validators.mjs(ext:deno_node/internal/streams/utils.mjs ext:deno_node/internal/errors.ts-ext:deno_node/internal/readline/interface.mjs ext:deno_node/internal/errors.ts%ext:deno_node/internal/validators.mjs'ext:deno_node/internal/util/inspect.mjs node:events6ext:deno_node/internal/readline/emitKeypressEvents.mjs)ext:deno_node/internal/readline/utils.mjs-ext:deno_node/internal/readline/callbacks.mjsext:deno_node/_stream.mjs node:processnode:string_decoder+ext:deno_node/internal/readline/symbols.mjsext:deno_node/_tls_common.tsext:deno_node/_tls_wrap.ts&ext:deno_node/internal/primordials.mjs!ext:deno_node/internal/assert.mjsnode:netext:deno_node/_tls_common.ts-ext:deno_node/internal_binding/stream_wrap.ts ext:deno_node/internal/errors.ts node:process'ext:deno_node/internal/util/debuglog.ts*ext:deno_node/internal_binding/tcp_wrap.ts+ext:deno_node/internal_binding/pipe_wrap.ts node:eventsext:deno_node/internal/util.mjsext:deno_node/_next_tick.ts-ext:deno_node/internal/stream_base_commons.ts$ext:deno_node/internal/util/types.ts,ext:deno_node/internal_binding/async_wrap.ts ext:deno_node/path/_constants.ts(ext:deno_node/_util/_util_callbackify.jsext:core/mod.jsext:deno_node/_next_tick.ts%ext:deno_node/internal/validators.mjs4ext:deno_node/internal/util/parse_args/parse_args.jsext:core/mod.js%ext:deno_node/internal/validators.mjs/ext:deno_node/internal/util/parse_args/utils.js%ext:deno_node/internal/error_codes.ts node:processext:deno_node/_zlib.mjs node:buffer node:streamext:deno_node/_zlib_binding.mjs node:util node:assert+ext:deno_node/internal_binding/constants.tsext:deno_node/_next_tick.ts$ext:deno_node/internal/util/types.tsext:deno_node/_brotli.jsext:core/mod.js ext:core/ops+ext:deno_node/internal_binding/constants.ts ext:deno_web/08_text_encoding.js node:stream node:buffer)ext:deno_node/internal_binding/symbols.ts'ext:deno_node/internal_binding/types.tsext:core/mod.js*ext:deno_node/internal/streams/destroy.mjs ext:deno_node/internal/errors.ts!ext:deno_node/_process/process.ts(ext:deno_node/internal/streams/utils.mjs%ext:deno_node/_util/std_fmt_colors.tsext:core/mod.js'ext:deno_node/_util/std_testing_diff.tsext:core/mod.js%ext:deno_node/_util/std_fmt_colors.ts0ext:deno_node/internal_binding/string_decoder.ts'ext:deno_node/internal_binding/_node.ts(ext:deno_node/internal_binding/buffer.ts'ext:deno_node/internal_binding/_node.ts(ext:deno_node/internal_binding/_utils.tsext:deno_web/00_infra.js#ext:deno_node/internal/constants.tsext:deno_node/_util/os.ts-ext:deno_node/internal/readline/callbacks.mjs ext:deno_node/internal/errors.ts%ext:deno_node/internal/validators.mjs)ext:deno_node/internal/readline/utils.mjs#ext:deno_node/internal/cli_table.ts'ext:deno_node/internal/util/inspect.mjsext:runtime/11_workers.js ext:core/mod.js ext:core/opsext:deno_webidl/00_webidl.jsext:deno_console/01_console.jsext:deno_url/00_url.jsext:deno_web/12_location.jsext:runtime/10_permissions.jsext:runtime/06_util.jsext:deno_web/02_event.jsext:deno_web/13_message_port.jsext:runtime/90_deno_ns.jsext:core/mod.js ext:core/opsext:deno_web/02_timers.js ext:deno_fetch/22_http_client.jsext:deno_console/01_console.jsext:deno_ffi/00_ffi.jsext:deno_net/01_net.jsext:deno_net/02_tls.jsext:deno_http/01_http.jsext:runtime/01_errors.jsext:runtime/01_version.tsext:runtime/10_permissions.jsext:deno_io/12_io.jsext:runtime/13_buffer.jsext:deno_fs/30_fs.jsext:runtime/30_os.jsext:runtime/40_fs_events.jsext:runtime/40_process.jsext:runtime/40_signals.jsext:runtime/40_tty.jsext:runtime/40_http.jsext:deno_kv/01_db.tsext:deno_cron/01_cron.tsext:deno_webgpu/02_surface.js.ext:deno_node/internal_binding/node_options.ts2ext:deno_node/internal_binding/_timingSafeEqual.ts node:buffer-ext:deno_node/internal_binding/handle_wrap.tsext:deno_node/_util/asserts.ts,ext:deno_node/internal_binding/async_wrap.ts%ext:deno_node/internal/fixed_queue.ts+ext:deno_node/internal_binding/node_file.tsext:deno_node/_util/asserts.tsext:deno_io/12_io.jsext:deno_fs/30_fs.js ext:deno_node/_fs/_fs_common.ts"ext:deno_node/_fs/_fs_constants.ts%ext:deno_node/internal/validators.mjsext:deno_node/_utils.ts #ext:deno_node/internal/fs/handle.ts node:events node:buffernode:fsext:core/mod.js ext:deno_node/_util/async.tsext:core/mod.jsext:deno_web/02_timers.js 1ext:deno_node/internal_binding/connection_wrap.ts-ext:deno_node/internal_binding/stream_wrap.ts )ext:deno_node/internal_binding/_listen.ts1ext:deno_node/internal_binding/_libuv_winerror.ts ext:core/opsext:deno_node/path/_win32.ts ext:deno_node/path/_constants.ts ext:deno_node/internal/errors.tsext:deno_node/path/_util.tsext:deno_node/_util/asserts.tsext:deno_node/path/_posix.ts ext:deno_node/path/_constants.ts ext:deno_node/internal/errors.tsext:deno_node/path/_util.tsext:deno_node/path/common.tsext:deno_node/path/separator.ts ext:deno_node/path/_interface.ts6ext:deno_node/internal/readline/emitKeypressEvents.mjs)ext:deno_node/internal/readline/utils.mjs+ext:deno_node/internal/readline/symbols.mjs node:timersnode:string_decoder+ext:deno_node/internal/readline/symbols.mjs/ext:deno_node/internal/util/parse_args/utils.jsext:core/mod.js%ext:deno_node/internal/validators.mjsext:deno_node/_zlib_binding.mjs ext:core/ops'ext:deno_node/internal_binding/_node.tsext:runtime/10_permissions.jsext:core/mod.js ext:core/opsext:deno_web/00_infra.jsext:deno_web/02_event.jsext:runtime/06_util.jsext:core/mod.js ext:core/opsext:runtime/01_errors.jsext:core/mod.jsext:runtime/01_version.tsext:core/mod.jsext:runtime/13_buffer.jsext:core/mod.jsext:deno_web/00_infra.jsext:runtime/40_fs_events.jsext:core/mod.js ext:core/opsext:deno_web/00_infra.jsext:runtime/40_signals.jsext:core/mod.js ext:core/opsext:runtime/40_tty.jsext:core/mod.js ext:core/ops ext:runtime/40_http.jsext:core/mod.js ext:core/opsext:deno_http/01_http.js!ext:deno_node/path/_util.ts ext:deno_node/path/_constants.ts ext:deno_node/internal/errors.ts"ext:deno_node/path/separator.tsext:deno_node/_util/os.ts#ext:runtime/41_prompt.jsext:core/mod.js ext:core/opsext:deno_io/12_io.js$%ext:runtime/98_global_scope_window.js ext:core/mod.js ext:core/opsext:deno_web/12_location.jsext:deno_console/01_console.jsext:deno_webidl/00_webidl.js$ext:deno_web/04_global_interfaces.js$ext:deno_webstorage/01_webstorage.jsext:runtime/41_prompt.jsext:deno_webgpu/00_init.js%%ext:runtime/98_global_scope_worker.jsext:core/mod.js ext:core/opsext:deno_web/12_location.jsext:deno_console/01_console.jsext:deno_webidl/00_webidl.js$ext:deno_web/04_global_interfaces.jsext:deno_webgpu/00_init.js&ext:runtime_main/js/99_main.jsext:core/mod.js ext:core/opsext:deno_web/02_event.jsext:deno_web/12_location.jsext:runtime/01_version.tsext:runtime/30_os.jsext:deno_web/02_timers.jsext:deno_console/01_console.jsext:deno_web/15_performance.jsext:deno_url/00_url.jsext:deno_fetch/26_fetch.jsext:deno_web/13_message_port.jsext:runtime/90_deno_ns.jsext:runtime/01_errors.jsext:deno_webidl/00_webidl.js ext:deno_web/01_dom_exception.js%ext:runtime/98_global_scope_shared.js%ext:runtime/98_global_scope_window.js%ext:runtime/98_global_scope_worker.jsext:deno_web/00_infra.js'  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'-ext:deno_node/internal/readline/callbacks.mjs#ext:deno_node/internal/cli_table.ts!ext:deno_node/_fs/_fs_readFile.ts%ext:runtime/98_global_scope_worker.js%%ext:deno_node/internal/crypto/util.ts\-ext:deno_node/internal/normalize_encoding.mjsnode:querystringu node:readlinev-ext:deno_node/internal/readline/interface.mjs node:httpL&ext:deno_node/internal/dns/promises.ts_*ext:deno_node/internal_binding/tcp_wrap.ts2ext:deno_broadcast_channel/01_broadcast_channel.js''ext:deno_node/internal/crypto/scrypt.tsZ ext:deno_node/assertion_error.ts.ext:deno_node/internal_binding/node_options.tsext:deno_node/internal/idna.tsnode:string_decoder}ext:deno_node/_fs/_fs_copy.tsext:deno_node/_fs/_fs_chmod.tsnode:stream/promises{ext:deno_node/_fs/_fs_open.ts(ext:deno_websocket/02_websocketstream.js$*ext:deno_node/internal/util/comparisons.tsext:deno_http/00_serve.js--ext:deno_node/internal/stream_base_commons.ts ext:core/opsnode:url ext:deno_node/path/_constants.tsnode:child_process?%ext:deno_node/internal/crypto/hkdf.tsUext:deno_webidl/00_webidl.jsnode:assert/strict<ext:deno_node/path/_posix.tsext:deno_node/_fs/_fs_unlink.ts"ext:deno_node/readline/promises.tswnode:dnsF ext:deno_node/internal/errors.ts`ext:deno_node/internal/util.mjsk node:cluster@-ext:deno_node/internal_binding/stream_wrap.tsext:deno_node/path/mod.ts%ext:deno_node/internal/fixed_queue.tsext:runtime/40_fs_events.jsext:runtime/01_errors.js ext:deno_node/_fs/_fs_writev.mjs(ext:deno_node/internal/streams/state.mjsh.ext:deno_node/internal/crypto/diffiehellman.tsS+ext:deno_node/internal/crypto/_randomInt.ts)ext:deno_node/internal/readline/utils.mjsd'ext:deno_node/internal/event_target.mjsanode:fs/promisesK(ext:deno_node/internal/streams/utils.mjsext:deno_node/_fs/_fs_fsync.tsnode:v8 ext:deno_node/_fs/_fs_readdir.ts2ext:deno_node/internal_binding/_timingSafeEqual.ts$ext:deno_webstorage/01_webstorage.js%ext:deno_node/internal/dgram.ts^ext:deno_node/_fs/_fs_common.ts  ext:deno_fetch/27_eventsource.js!,ext:deno_node/internal_binding/async_wrap.tsext:deno_node/_fs/_fs_rmdir.tsnode:osnext:runtime/06_util.js*ext:deno_node/internal_binding/udp_wrap.ts node:punycodes#ext:deno_node/internal/dns/utils.ts ext:deno_node/_fs/_fs_mkdtemp.ts"ext:deno_node/_fs/_fs_writeFile.ts#ext:deno_node/internal/fs/utils.mjsbext:runtime/40_http.js  node:httpsNext:deno_fetch/23_request.jsnode:tty&ext:deno_node/internal/test/binding.tsiext:deno_web/16_image_data.js%ext:deno_node/_util/std_fmt_colors.tsext:deno_node/_zlib.mjsext:deno_cron/01_cron.ts,ext:deno_webgpu/02_surface.js node:eventsIext:deno_node/wasi.ts'ext:deno_node/internal/child_process.tsPext:deno_node/_fs/_fs_lstat.tsext:deno_web/10_filereader.jsnode:fsJext:deno_node/_fs/_fs_stat.tsext:deno_kv/01_db.ts+"ext:deno_node/_fs/_fs_fdatasync.tsext:deno_fs/30_fs.js0.ext:deno_node/internal/console/constructor.mjsnode:netmext:deno_node/_utils.ts ext:deno_node/_fs/_fs_symlink.ts ext:deno_node/_fs/_fs_futimes.ts node:consoleAext:deno_node/_http_agent.mjs4%ext:deno_node/internal/crypto/keys.tsWext:runtime/40_signals.jsext:deno_node/_fs/_fs_rename.ts node:cryptoCext:deno_node/inspector.tsOext:deno_node/_util/asserts.ts0ext:deno_node/internal/streams/end-of-stream.mjs node:timersnode:tlsext:deno_node/_fs/_fs_chown.ts4ext:deno_node/internal/util/parse_args/parse_args.jsext:runtime/30_os.js"ext:deno_websocket/01_websocket.js#*ext:deno_node/internal/streams/destroy.mjsext:deno_node/00_globals.js1node:diagnostics_channelEext:deno_web/14_compression.js%ext:runtime/98_global_scope_shared.jsext:deno_node/_fs/_fs_fstat.ts&ext:deno_node/internal/primordials.mjs'ext:deno_node/_util/std_testing_diff.tsext:runtime/10_permissions.jsext:deno_node/_util/async.ts  ext:deno_web/08_text_encoding.js%ext:deno_node/internal/error_codes.ts)ext:deno_node/internal/streams/duplex.mjs6node:stream/web|$ext:deno_node/internal/util/types.ts'ext:deno_node/internal_binding/_node.ts node:test!ext:deno_node/_fs/_fs_readlink.ts ext:deno_node/internal/dtrace.tsext:runtime_main/js/99_main.js&%ext:deno_node/internal/fs/streams.mjsext:deno_node/path/separator.ts" node:module3(ext:deno_node/internal_binding/_utils.tsext:deno_web/00_infra.jsext:deno_crypto/00_crypto.js&ext:deno_node/internal/url.ts ext:deno_fetch/22_http_client.js'ext:deno_node/internal/util/debuglog.ts(ext:deno_node/internal_binding/buffer.ts node:buffer>'ext:deno_node/internal/crypto/cipher.tsRext:deno_node/internal/http.tsc!ext:deno_node/internal/timers.mjsj node:replx%ext:deno_node/internal/querystring.ts node:assert;ext:deno_node/path/_win32.tsext:runtime/41_prompt.js#.ext:deno_node/internal/streams/buffer_list.mjsf-ext:deno_node/internal/process/per_thread.mjs#ext:deno_node/internal/fs/handle.ts ext:deno_node/_fs/_fs_link.tsext:deno_fetch/23_response.jsext:deno_web/02_timers.js ext:deno_web/05_base64.js'ext:deno_node/internal/crypto/pbkdf2.tsX$ext:deno_web/04_global_interfaces.js ext:deno_web/12_location.js+ext:deno_node/internal/streams/readable.mjs8ext:deno_node/_fs/_fs_watch.ts%ext:deno_node/internal/validators.mjsnode:sys~ext:deno_node/_readline.mjsext:runtime/11_workers.jsext:deno_node/internal/net.tsext:deno_node/02_init.js2+ext:deno_node/internal_binding/pipe_wrap.ts+ext:deno_node/internal_binding/node_file.ts node:zlibext:deno_node/_fs/_fs_exists.ts!ext:deno_node/internal/assert.mjsext:deno_web/02_event.js node:stream/consumersz%ext:deno_node/internal_binding/mod.tsext:runtime/40_process.js'ext:deno_node/internal/crypto/random.tsY'ext:deno_node/internal/crypto/keygen.tsVnode:path/win32p,ext:deno_node/internal_binding/cares_wrap.ts-ext:deno_node/internal/crypto/_randomBytes.ts$ext:deno_node/internal/crypto/sig.ts[ext:deno_fetch/20_headers.js!ext:deno_node/_process/exiting.tsext:deno_node/path/common.tsext:deno_ffi/00_ffi.js(node:path/posixo1ext:deno_node/internal_binding/connection_wrap.ts  node:streamy&ext:deno_node/internal_binding/ares.ts%ext:deno_node/internal/async_hooks.tsext:deno_web/13_message_port.js(ext:deno_node/internal_binding/crypto.ts!ext:deno_node/internal/buffer.mjs3ext:deno_node/internal/streams/add-abort-signal.mjseext:deno_cache/01_cache.js"'ext:deno_node/internal/util/inspect.mjsl&ext:deno_node/internal/crypto/_keys.ts'ext:deno_node/internal_binding/types.tsext:deno_fetch/22_body.js node:http2Mext:deno_node/_next_tick.ts!ext:deno_node/_process/process.ts6ext:deno_node/internal/readline/emitKeypressEvents.mjsext:deno_web/06_streams.jsext:core/mod.js,ext:deno_node/internal/crypto/certificate.tsQ(ext:deno_node/internal/process/report.ts"ext:deno_node/_process/streams.mjs+ext:deno_node/internal/readline/symbols.mjs%ext:deno_node/internal/crypto/x509.ts]#ext:deno_web/02_structured_clone.js ext:deno_node/_fs/_fs_utimes.tsext:deno_url/00_url.js"ext:deno_node/_util/std_asserts.ts"ext:deno_node/_fs/_fs_ftruncate.ts-ext:deno_node/internal/crypto/_randomFill.mjsext:deno_net/01_net.js) node:util*ext:deno_node/internal/crypto/constants.tsext:deno_node/_fs/_fs_write.mjsext:deno_node/_brotli.js"ext:deno_node/_fs/_fs_constants.ts&ext:deno_node/internal_binding/util.tsnode:perf_hooksrnode:timers/promises$ext:deno_node/internal_binding/uv.tsext:deno_fetch/21_formdata.jsext:deno_node/_fs/_fs_mkdir.tsext:deno_net/02_tls.js*ext:deno_node/_fs/_fs_cp.jsext:deno_node/_tls_wrap.ts(ext:deno_node/_util/_util_callbackify.jsext:deno_node/_fs/_fs_access.tsext:deno_node/_events.mjsext:deno_node/_fs/_fs_close.ts ext:deno_node/_fs/_fs_opendir.ts node:dgramD!ext:deno_node/_fs/_fs_realpath.ts)ext:deno_node/internal_binding/symbols.ts#ext:deno_node/internal/constants.tsext:deno_webgpu/00_init.js/ext:deno_node/internal/util/parse_args/utils.js ext:deno_web/01_dom_exception.jsext:deno_console/01_console.jsext:deno_http/01_http.js.ext:deno_web/15_performance.js,ext:deno_node/internal/streams/transform.mjs9ext:deno_node/_stream.mjsnode:worker_threads.ext:deno_node/internal/streams/passthrough.mjs7ext:runtime/90_deno_ns.jsext:runtime/01_version.ts%ext:deno_node/internal/crypto/hash.tsText:deno_web/09_file.js node:processtext:deno_web/01_mimesniff.js+ext:deno_node/internal_binding/constants.tsext:deno_node/_fs/_fs_rm.tsext:deno_node/_util/os.tsext:deno_node/path/_util.ts!ext:runtime/40_tty.jsext:deno_node/_fs/_fs_dir.tsnode:async_hooks= node:domainHnode:vmext:deno_node/_tls_common.tsext:deno_io/12_io.js/,ext:deno_node/internal/readline/promises.mjsnode:util/typesext:deno_url/01_urlpattern.jsext:deno_node/_http_outgoing.ts51ext:deno_node/internal/streams/lazy_transform.mjsg node:pathqext:deno_node/_zlib_binding.mjsext:deno_fetch/26_fetch.js -ext:deno_node/internal_binding/handle_wrap.ts ext:deno_node/path/_interface.tsnode:constantsB%ext:runtime/98_global_scope_window.js$!ext:deno_node/internal/options.ts)ext:deno_node/internal_binding/_listen.ts node:dns/promisesGext:deno_node/_fs/_fs_dirent.ts+ext:deno_node/internal/hide_stack_frames.ts#ext:deno_node/_fs/_fs_appendFile.ts+ext:deno_node/internal/streams/writable.mjs:ext:deno_node/_http_common.tsext:deno_web/03_abort_signal.js ext:deno_node/_fs/_fs_read.ts1ext:deno_node/internal_binding/_libuv_winerror.tsext:runtime/13_buffer.js!ext:deno_node/_fs/_fs_truncate.ts0ext:deno_node/internal_binding/string_decoder.ts'