var __bare_os_bundle_exports__ = (() => { var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) { if (typeof require !== "undefined") return require.apply(this, arguments); throw Error('Dynamic require of "' + x + '" is not supported'); }); var __commonJS = (cb, mod) => function __require2() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // ../../node_modules/bare-delta/binding.js var require_binding = __commonJS({ "../../node_modules/bare-delta/binding.js"(exports, module) { module.exports = __require.addon(); } }); // ../../node_modules/b4a/index.js var require_b4a = __commonJS({ "../../node_modules/b4a/index.js"(exports, module) { function isBuffer(value) { return Buffer.isBuffer(value) || value instanceof Uint8Array; } function isEncoding(encoding) { return Buffer.isEncoding(encoding); } function alloc(size, fill2, encoding) { return Buffer.alloc(size, fill2, encoding); } function allocUnsafe(size) { return Buffer.allocUnsafe(size); } function allocUnsafeSlow(size) { return Buffer.allocUnsafeSlow(size); } function byteLength(string, encoding) { return Buffer.byteLength(string, encoding); } function compare(a, b) { return Buffer.compare(a, b); } function concat(buffers, totalLength) { return Buffer.concat(buffers, totalLength); } function copy(source, target, targetStart, start, end) { return toBuffer(source).copy(target, targetStart, start, end); } function equals(a, b) { return toBuffer(a).equals(b); } function fill(buffer, value, offset, end, encoding) { return toBuffer(buffer).fill(value, offset, end, encoding); } function from(value, encodingOrOffset, length) { return Buffer.from(value, encodingOrOffset, length); } function includes(buffer, value, byteOffset, encoding) { return toBuffer(buffer).includes(value, byteOffset, encoding); } function indexOf(buffer, value, byfeOffset, encoding) { return toBuffer(buffer).indexOf(value, byfeOffset, encoding); } function lastIndexOf(buffer, value, byteOffset, encoding) { return toBuffer(buffer).lastIndexOf(value, byteOffset, encoding); } function swap16(buffer) { return toBuffer(buffer).swap16(); } function swap32(buffer) { return toBuffer(buffer).swap32(); } function swap64(buffer) { return toBuffer(buffer).swap64(); } function toBuffer(buffer) { if (Buffer.isBuffer(buffer)) return buffer; return Buffer.from(buffer.buffer, buffer.byteOffset, buffer.byteLength); } function toString(buffer, encoding, start, end) { return toBuffer(buffer).toString(encoding, start, end); } function write(buffer, string, offset, length, encoding) { return toBuffer(buffer).write(string, offset, length, encoding); } function readDoubleBE(buffer, offset) { return toBuffer(buffer).readDoubleBE(offset); } function readDoubleLE(buffer, offset) { return toBuffer(buffer).readDoubleLE(offset); } function readFloatBE(buffer, offset) { return toBuffer(buffer).readFloatBE(offset); } function readFloatLE(buffer, offset) { return toBuffer(buffer).readFloatLE(offset); } function readInt32BE(buffer, offset) { return toBuffer(buffer).readInt32BE(offset); } function readInt32LE(buffer, offset) { return toBuffer(buffer).readInt32LE(offset); } function readUInt32BE(buffer, offset) { return toBuffer(buffer).readUInt32BE(offset); } function readUInt32LE(buffer, offset) { return toBuffer(buffer).readUInt32LE(offset); } function writeDoubleBE(buffer, value, offset) { return toBuffer(buffer).writeDoubleBE(value, offset); } function writeDoubleLE(buffer, value, offset) { return toBuffer(buffer).writeDoubleLE(value, offset); } function writeFloatBE(buffer, value, offset) { return toBuffer(buffer).writeFloatBE(value, offset); } function writeFloatLE(buffer, value, offset) { return toBuffer(buffer).writeFloatLE(value, offset); } function writeInt32BE(buffer, value, offset) { return toBuffer(buffer).writeInt32BE(value, offset); } function writeInt32LE(buffer, value, offset) { return toBuffer(buffer).writeInt32LE(value, offset); } function writeUInt32BE(buffer, value, offset) { return toBuffer(buffer).writeUInt32BE(value, offset); } function writeUInt32LE(buffer, value, offset) { return toBuffer(buffer).writeUInt32LE(value, offset); } module.exports = { isBuffer, isEncoding, alloc, allocUnsafe, allocUnsafeSlow, byteLength, compare, concat, copy, equals, fill, from, includes, indexOf, lastIndexOf, swap16, swap32, swap64, toBuffer, toString, write, readDoubleBE, readDoubleLE, readFloatBE, readFloatLE, readInt32BE, readInt32LE, readUInt32BE, readUInt32LE, writeDoubleBE, writeDoubleLE, writeFloatBE, writeFloatLE, writeInt32BE, writeInt32LE, writeUInt32BE, writeUInt32LE }; } }); // ../../node_modules/bare-delta/index.js var require_bare_delta = __commonJS({ "../../node_modules/bare-delta/index.js"(exports, module) { var binding = require_binding(); var b4a = require_b4a(); async function create(source, target, options = {}) { return new Promise((resolve, reject) => { binding.create(source, target, options, (err, result) => { if (err) reject(err); else resolve(b4a.toBuffer(result)); }); }); } async function apply(source, delta) { return new Promise((resolve, reject) => { binding.apply(source, delta, (err, result) => { if (err) reject(err); else resolve(b4a.toBuffer(result)); }); }); } function createSync(source, target, options = {}) { const result = binding.createSync(source, target, options); return b4a.toBuffer(result); } function applySync(source, delta) { return b4a.toBuffer(binding.applySync(source, delta)); } async function applyBatch(source, deltas) { return new Promise((resolve, reject) => { binding.applyBatch(source, deltas, (err, result) => { if (err) reject(err); else resolve(b4a.toBuffer(result)); }); }); } function applyBatchSync(source, deltas) { return b4a.toBuffer(binding.applyBatchSync(source, deltas)); } module.exports = { create, apply, createSync, applySync, applyBatch, applyBatchSync }; } }); // ../../bare-lib-entry-bareDelta.js var bare_lib_entry_bareDelta_exports = {}; __export(bare_lib_entry_bareDelta_exports, { default: () => bare_lib_entry_bareDelta_default }); var import_bare_delta = __toESM(require_bare_delta()); var bare_lib_entry_bareDelta_default = import_bare_delta.default; return __toCommonJS(bare_lib_entry_bareDelta_exports); })(); ;(function(){var g=globalThis;var s="__bare_os_stdlib__";g[s]=g[s]||{};var e=typeof __bare_os_bundle_exports__!=="undefined"?__bare_os_bundle_exports__:void 0;var v=e!=null&&typeof e==="object"&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;g[s]["bareDelta"]=v;})();